-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
Copy pathService.tsp
45 lines (41 loc) · 1.42 KB
/
Service.tsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
namespace Microsoft.ApiCenter;
@doc("The service entity.")
model Service is TrackedResource<ServiceProperties> {
@doc("The name of Azure API Center service.")
@maxLength(90)
@minLength(1)
@pattern("^[a-zA-Z0-9-]{3,90}$")
@path
@key("serviceName")
@segment("services")
name: string;
...ManagedServiceIdentityProperty;
}
@armResourceOperations
interface Services {
@doc("Returns details of the service.")
get is Azure.ResourceManager.ArmResourceRead<Service>;
@doc("Creates new or updates existing API.")
createOrUpdate is Azure.ResourceManager.ArmResourceCreateOrReplaceSync<Service>;
@doc("Updates existing service.")
update is ArmResourcePatchSync<Service, ServiceProperties>;
@doc("Deletes specified service.")
delete is ArmResourceDeleteSync<Service>;
@doc("Returns a collection of services within the resource group.")
listByResourceGroup is Azure.ResourceManager.ArmResourceListByParent<Service>;
@doc("Lists services within an Azure subscription.")
listBySubscription is ArmListBySubscription<Service>;
@doc("Exports the effective metadata schema.")
exportMetadataSchema is ArmResourceActionAsync<
Service,
MetadataSchemaExportRequest,
MetadataSchemaExportResult
>;
}