-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathSolutionTemplate.tsp
More file actions
130 lines (102 loc) · 3.6 KB
/
Copy pathSolutionTemplate.tsp
File metadata and controls
130 lines (102 loc) · 3.6 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
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";
import "./UpdateType.tsp";
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
namespace Microsoft.Edge;
@doc("Solution Template Properties")
model SolutionTemplateProperties {
@doc("A unique identifier for the solution template, generated by the system")
@visibility(Lifecycle.Read)
uniqueIdentifier?: string;
@doc("Description of Solution template")
description: string;
@doc("List of capabilities")
capabilities: string[];
@doc("Latest solution template version")
@visibility(Lifecycle.Read)
latestVersion?: string;
@doc("State of resource")
state?: ResourceState;
@doc("Flag to enable external validation")
enableExternalValidation?: boolean;
@doc("Provisioning state of resource")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("The updatable properties of the SolutionTemplate.")
model SolutionTemplateUpdateProperties {
@doc("Description of Solution template")
description?: string;
@doc("List of capabilities")
capabilities?: string[];
@doc("State of resource")
state?: ResourceState;
@doc("Flag to enable external validation")
enableExternalValidation?: boolean;
}
@doc("The type used for update operations of the SolutionTemplate.")
model SolutionTemplateUpdate {
...ArmTagsProperty;
@doc("The resource-specific properties for this resource.")
properties?: SolutionTemplateUpdateProperties;
}
@doc("Solution Template Resource. Contains capabilities and operations for creating versions.")
model SolutionTemplate
is Azure.ResourceManager.TrackedResource<SolutionTemplateProperties> {
@doc("The name of the SolutionTemplate")
@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("solutionTemplateName")
@segment("solutionTemplates")
name: string;
...EntityTagProperty;
}
@doc("Solution Template Version With Update Type")
model SolutionTemplateVersionWithUpdateType {
@doc("Update type")
updateType?: UpdateType;
@doc("Version to create")
@pattern("^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$")
version?: string;
@doc("Solution Template Version")
solutionTemplateVersion: SolutionTemplateVersion;
}
@armResourceOperations
interface SolutionTemplates {
@doc("Get a Solution Template Resource")
get is ArmResourceRead<SolutionTemplate>;
@doc("Create or update a Solution Template Resource")
createOrUpdate is ArmResourceCreateOrReplaceAsync<SolutionTemplate>;
@doc("update a Solution Template Resource")
update is ArmCustomPatchSync<SolutionTemplate, SolutionTemplateUpdate>;
@doc("Create a Solution Template Version Resource")
createVersion is ArmResourceActionAsync<
SolutionTemplate,
SolutionTemplateVersionWithUpdateType,
SolutionTemplateVersion
>;
@doc("Remove Solution Template Version Resource")
removeVersion is ArmResourceActionNoResponseContentAsync<
SolutionTemplate,
VersionParameter
>;
@doc("Delete a Solution Template Resource")
delete is ArmResourceDeleteWithoutOkAsync<SolutionTemplate>;
@doc("List by specified resource group")
listByResourceGroup is ArmResourceListByParent<SolutionTemplate>;
@doc("List by subscription")
listBySubscription is ArmListBySubscription<SolutionTemplate>;
}