@azure-tools/typespec-azure-resource-manager 0.38.0-dev.4 → 0.38.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/arm.foundations.tsp +63 -56
- package/lib/interfaces.tsp +192 -198
- package/lib/models.tsp +27 -26
- package/lib/operations.tsp +234 -233
- package/lib/parameters.tsp +20 -20
- package/lib/private-links.tsp +6 -6
- package/lib/private.decorators.tsp +3 -3
- package/lib/responses.tsp +20 -20
- package/package.json +1 -1
package/lib/parameters.tsp
CHANGED
|
@@ -123,47 +123,47 @@ model ResourceUriParameter {
|
|
|
123
123
|
/**
|
|
124
124
|
* The dynamic parameters of a resource instance - pass in the proper base type to indicate
|
|
125
125
|
* where the resource is based. The default is in a resource group
|
|
126
|
-
* @template
|
|
127
|
-
* @template
|
|
126
|
+
* @template Resource The resource to get parameters for
|
|
127
|
+
* @template BaseParameters The parameters representing the base Uri of the resource
|
|
128
128
|
*/
|
|
129
129
|
model ResourceInstanceParameters<
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
Resource extends ArmResourceBase,
|
|
131
|
+
BaseParameters = DefaultBaseParameters<Resource>
|
|
132
132
|
> {
|
|
133
|
-
...
|
|
134
|
-
...ProviderNamespace<
|
|
135
|
-
...KeysOf<
|
|
133
|
+
...BaseParameters;
|
|
134
|
+
...ProviderNamespace<Resource>;
|
|
135
|
+
...KeysOf<Resource>;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* The dynamic parameters of a list call for a resource instance - pass in the proper base type to indicate
|
|
140
140
|
* where the list should take place. The default is in a resource group
|
|
141
|
-
* @template
|
|
142
|
-
* @template
|
|
141
|
+
* @template Resource The resource to get parameters for
|
|
142
|
+
* @template BaseParameters The parameters representing the base Uri of the resource
|
|
143
143
|
*/
|
|
144
144
|
model ResourceParentParameters<
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
Resource extends ArmResource,
|
|
146
|
+
BaseParameters = DefaultBaseParameters<Resource>
|
|
147
147
|
> {
|
|
148
|
-
...
|
|
149
|
-
...ProviderNamespace<
|
|
150
|
-
...ParentKeysOf<
|
|
148
|
+
...BaseParameters;
|
|
149
|
+
...ProviderNamespace<Resource>;
|
|
150
|
+
...ParentKeysOf<Resource>;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* The dynamic parameters of a list call for an extension resource instance.
|
|
155
|
-
* @template
|
|
155
|
+
* @template Resource The extension resource
|
|
156
156
|
*/
|
|
157
|
-
alias ExtensionResourceInstanceParameters<
|
|
158
|
-
|
|
157
|
+
alias ExtensionResourceInstanceParameters<Resource extends ArmResource> = ResourceInstanceParameters<
|
|
158
|
+
Resource,
|
|
159
159
|
ExtensionBaseParameters
|
|
160
160
|
>;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* The dynamic parameters of a list call for a tenant resource instance.
|
|
164
|
-
* @template
|
|
164
|
+
* @template Resource the tenant resource
|
|
165
165
|
*/
|
|
166
|
-
alias TenantInstanceParameters<
|
|
167
|
-
|
|
166
|
+
alias TenantInstanceParameters<Resource extends ArmResource> = ResourceInstanceParameters<
|
|
167
|
+
Resource,
|
|
168
168
|
TenantBaseParameters
|
|
169
169
|
>;
|
package/lib/private-links.tsp
CHANGED
|
@@ -165,9 +165,9 @@ model PrivateLinkResourceListResult {
|
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* The name of the private endpoint connection associated with the Azure resource.
|
|
168
|
-
* @template
|
|
168
|
+
* @template Segment The resource type name for private endpoint connections (default is privateEndpointConnections)
|
|
169
169
|
*/
|
|
170
|
-
model PrivateEndpointConnectionParameter<
|
|
170
|
+
model PrivateEndpointConnectionParameter<Segment extends valueof string = "privateEndpointConnections"> {
|
|
171
171
|
/** The name of the private endpoint connection associated with the Azure resource. */
|
|
172
172
|
@path
|
|
173
173
|
@armCommonParameter(
|
|
@@ -183,19 +183,19 @@ model PrivateEndpointConnectionParameter<TSegment extends valueof string = "priv
|
|
|
183
183
|
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
184
184
|
"privatelinks.json"
|
|
185
185
|
)
|
|
186
|
-
@TypeSpec.Rest.segment(
|
|
186
|
+
@TypeSpec.Rest.segment(Segment)
|
|
187
187
|
@key("privateEndpointConnectionName")
|
|
188
188
|
name: string;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
* The name of the private link associated with the Azure resource.
|
|
193
|
-
* @template
|
|
193
|
+
* @template Segment The resource type name for private links (default is privateLinkResources)
|
|
194
194
|
*/
|
|
195
|
-
model PrivateLinkResourceParameter<
|
|
195
|
+
model PrivateLinkResourceParameter<Segment extends valueof string = "privateLinkResources"> {
|
|
196
196
|
/** The name of the private link associated with the Azure resource. */
|
|
197
197
|
@path
|
|
198
|
-
@TypeSpec.Rest.segment(
|
|
198
|
+
@TypeSpec.Rest.segment(Segment)
|
|
199
199
|
@key("privateLinkResourcenName")
|
|
200
200
|
name: string;
|
|
201
201
|
}
|
|
@@ -54,9 +54,9 @@ extern dec armCommonParameter(
|
|
|
54
54
|
*
|
|
55
55
|
* `model Server is TrackedResource<ServerProperties>;`
|
|
56
56
|
*
|
|
57
|
-
* The `TrackedResource<
|
|
58
|
-
* decorator, so it also gets applied to the type which absorbs the
|
|
59
|
-
* definition by using the `is` keyword.
|
|
57
|
+
* The `TrackedResource<Resource>` type (and other associated base types) use the
|
|
58
|
+
* `@armResource` decorator, so it also gets applied to the type which absorbs the
|
|
59
|
+
* `TrackedResource<Resource>` definition by using the `is` keyword.
|
|
60
60
|
*
|
|
61
61
|
* @param properties Arm resource properties
|
|
62
62
|
*/
|
package/lib/responses.tsp
CHANGED
|
@@ -8,23 +8,23 @@ namespace Azure.ResourceManager;
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The ARM synchronous OK response
|
|
11
|
-
* @template
|
|
11
|
+
* @template ResponseBody The contents of the response body
|
|
12
12
|
*/
|
|
13
13
|
@doc("ARM operation completed successfully.")
|
|
14
|
-
model ArmResponse<
|
|
14
|
+
model ArmResponse<ResponseBody> {
|
|
15
15
|
...OkResponse;
|
|
16
|
-
...Body<
|
|
16
|
+
...Body<ResponseBody>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The ARM 201 response for a resource
|
|
21
|
-
* @template
|
|
21
|
+
* @template ResponseBody The contents of the response body
|
|
22
22
|
*/
|
|
23
23
|
@doc("ARM create operation completed successfully.")
|
|
24
|
-
model ArmCreatedResponse<
|
|
24
|
+
model ArmCreatedResponse<ResponseBody> {
|
|
25
25
|
...CreatedResponse;
|
|
26
26
|
...Azure.Core.Foundations.RetryAfterHeader;
|
|
27
|
-
...Body<
|
|
27
|
+
...Body<ResponseBody>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -49,10 +49,10 @@ model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accept
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* @dev The standard ACCEPTED response
|
|
52
|
-
* @template
|
|
52
|
+
* @template Message The description of the response status (defaults to `Resource operation accepted`)
|
|
53
53
|
*/
|
|
54
|
-
@doc(
|
|
55
|
-
model ArmAcceptedResponse<
|
|
54
|
+
@doc(Message)
|
|
55
|
+
model ArmAcceptedResponse<Message extends valueof string = "Resource operation accepted."> {
|
|
56
56
|
...AcceptedResponse;
|
|
57
57
|
...Azure.Core.Foundations.RetryAfterHeader;
|
|
58
58
|
}
|
|
@@ -180,20 +180,20 @@ model ArmDeletedNoContentResponse is ArmNoContentResponse<"Resource deleted succ
|
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Standard ARM NoContent (204) response
|
|
183
|
-
* @template
|
|
183
|
+
* @template Message The description of the response status (defaults to `Operation completed successfully`)
|
|
184
184
|
*/
|
|
185
|
-
@doc(
|
|
186
|
-
model ArmNoContentResponse<
|
|
185
|
+
@doc(Message)
|
|
186
|
+
model ArmNoContentResponse<Message extends valueof string = "Operation completed successfully."> {
|
|
187
187
|
...NoContentResponse;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* @dev Resource update operation succeeded
|
|
192
|
-
* @template
|
|
192
|
+
* @template Resource The resource being updated
|
|
193
193
|
*/
|
|
194
|
-
@doc("Resource '{name}' update operation succeeded",
|
|
195
|
-
model ArmResourceUpdatedResponse<
|
|
196
|
-
is ArmResponse<
|
|
194
|
+
@doc("Resource '{name}' update operation succeeded", Resource)
|
|
195
|
+
model ArmResourceUpdatedResponse<Resource extends Azure.ResourceManager.Foundations.ArmResource>
|
|
196
|
+
is ArmResponse<Resource>;
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
199
|
* @dev Resource create operation succeeded
|
|
@@ -217,11 +217,11 @@ model ArmResourceCreatedResponse<
|
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* @dev Resource synchronous create operation succeeded
|
|
220
|
-
* @template
|
|
220
|
+
* @template Resource The resource being updated
|
|
221
221
|
*/
|
|
222
|
-
@doc("Resource '{name}' create operation succeeded",
|
|
223
|
-
model ArmResourceCreatedSyncResponse<
|
|
224
|
-
is Body<
|
|
222
|
+
@doc("Resource '{name}' create operation succeeded", Resource)
|
|
223
|
+
model ArmResourceCreatedSyncResponse<Resource extends Azure.ResourceManager.Foundations.ArmResource>
|
|
224
|
+
is Body<Resource> {
|
|
225
225
|
...CreatedResponse;
|
|
226
226
|
}
|
|
227
227
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.38.0-dev.
|
|
3
|
+
"version": "0.38.0-dev.5",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|