-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathWorkflow.tsp
More file actions
62 lines (51 loc) · 1.62 KB
/
Copy pathWorkflow.tsp
File metadata and controls
62 lines (51 loc) · 1.62 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "./ProvisioningState.tsp";
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.CommonTypes;
namespace Microsoft.Edge;
@doc("Workflow Properties")
model WorkflowProperties {
@doc("Workflow template Id")
@visibility(Lifecycle.Read)
workflowTemplateId?: string;
@doc("Provisioning state of resource")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("Workflow Resource")
@parentResource(Context)
model Workflow is Azure.ResourceManager.ProxyResource<WorkflowProperties> {
@doc("Name of the workflow")
@maxLength(61)
@minLength(3)
@pattern("^(?!v-)(?!.*-v-)[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$")
@path
@key("workflowName")
@segment("workflows")
name: string;
...ExtendedLocationProperty;
...EntityTagProperty;
}
@armResourceOperations
interface Workflows {
@doc("Get a Workflow resource")
get is ArmResourceRead<Workflow>;
@doc("Create or update a Workflow resource")
createOrUpdate is ArmResourceCreateOrReplaceAsync<Workflow>;
@doc("update a Workflow resource")
update is ArmResourcePatchAsync<Workflow, WorkflowProperties>;
@doc("Delete a Workflow resource")
delete is ArmResourceDeleteWithoutOkAsync<Workflow>;
@doc("List Workflow resources")
listByContext is ArmResourceListByParent<Workflow>;
}