@azure-tools/typespec-azure-resource-manager 0.70.0-dev.0 → 0.70.0-dev.10
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/README.md +150 -10
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts +35 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts.map +1 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.js +2 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.js.map +1 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.ts-test.d.ts +2 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.ts-test.js +8 -0
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.ts-test.js.map +1 -0
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts +12 -0
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts +66 -25
- package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
- package/dist/src/base-types.d.ts +16 -0
- package/dist/src/base-types.d.ts.map +1 -0
- package/dist/src/base-types.js +30 -0
- package/dist/src/base-types.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +17 -2
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +6 -0
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +8 -0
- package/dist/src/linter.js.map +1 -1
- package/dist/src/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +20 -2
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource.d.ts +6 -2
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +8 -0
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/arm-agent-base-type-child-resources.d.ts +4 -0
- package/dist/src/rules/arm-agent-base-type-child-resources.d.ts.map +1 -0
- package/dist/src/rules/arm-agent-base-type-child-resources.js +94 -0
- package/dist/src/rules/arm-agent-base-type-child-resources.js.map +1 -0
- package/dist/src/rules/arm-agent-base-type-lifecycle-operations.d.ts +4 -0
- package/dist/src/rules/arm-agent-base-type-lifecycle-operations.d.ts.map +1 -0
- package/dist/src/rules/arm-agent-base-type-lifecycle-operations.js +99 -0
- package/dist/src/rules/arm-agent-base-type-lifecycle-operations.js.map +1 -0
- package/dist/src/rules/arm-custom-resource-usage-discourage.d.ts.map +1 -1
- package/dist/src/rules/arm-custom-resource-usage-discourage.js +44 -2
- package/dist/src/rules/arm-custom-resource-usage-discourage.js.map +1 -1
- package/dist/src/rules/arm-feature-file-usage-discourage.d.ts +4 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.d.ts.map +1 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.js +24 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.js.map +1 -0
- package/dist/src/rules/no-reserved-resource-property.d.ts +4 -0
- package/dist/src/rules/no-reserved-resource-property.d.ts.map +1 -0
- package/dist/src/rules/no-reserved-resource-property.js +50 -0
- package/dist/src/rules/no-reserved-resource-property.js.map +1 -0
- package/dist/src/state.d.ts +2 -0
- package/dist/src/state.d.ts.map +1 -1
- package/dist/src/state.js +3 -0
- package/dist/src/state.js.map +1 -1
- package/dist/src/tsp-index.d.ts.map +1 -1
- package/dist/src/tsp-index.js +8 -1
- package/dist/src/tsp-index.js.map +1 -1
- package/lib/arm.tsp +2 -0
- package/lib/base-types/agent.tsp +425 -0
- package/lib/base-types/base-types.tsp +45 -0
- package/lib/common-types/common-types.tsp +1 -1
- package/lib/common-types/nsp-operations.tsp +5 -5
- package/lib/common-types/types.tsp +2 -3
- package/lib/decorators.tsp +81 -11
- package/lib/extension/operations.tsp +8 -6
- package/lib/foundations/arm.foundations.tsp +22 -11
- package/lib/interfaces.tsp +24 -14
- package/lib/legacy-types/extension.tsp +1 -1
- package/lib/legacy-types/operations.tsp +9 -5
- package/lib/legacy-types/private-endpoints.tsp +4 -4
- package/lib/models.tsp +1 -1
- package/lib/operations.tsp +31 -19
- package/lib/parameters.tsp +3 -3
- package/lib/private-endpoints.tsp +9 -9
- package/lib/private-links.tsp +3 -3
- package/lib/private.decorators.tsp +16 -0
- package/lib/responses.tsp +17 -12
- package/package.json +4 -4
- package/lib/common-types/customer-managed-keys-ref.tsp +0 -43
package/lib/decorators.tsp
CHANGED
|
@@ -19,7 +19,6 @@ namespace Azure.ResourceManager;
|
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
21
|
* @param providerNamespace Provider namespace
|
|
22
|
-
* @param libraryNamespaces a library namespace containing types for this namespace
|
|
23
22
|
*
|
|
24
23
|
*/
|
|
25
24
|
extern dec armProviderNamespace(target: Namespace, providerNamespace?: valueof string);
|
|
@@ -32,7 +31,9 @@ extern dec armProviderNamespace(target: Namespace, providerNamespace?: valueof s
|
|
|
32
31
|
extern dec useLibraryNamespace(target: Namespace, ...namespaces: Namespace[]);
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
* `@armLibraryNamespace` designates a namespace as
|
|
34
|
+
* `@armLibraryNamespace` designates a namespace as containing Azure Resource Manager Provider information.
|
|
35
|
+
* This is used for library namespaces that define reusable ARM resource types that can be shared
|
|
36
|
+
* across multiple provider specifications.
|
|
36
37
|
*
|
|
37
38
|
* @example
|
|
38
39
|
*
|
|
@@ -110,18 +111,25 @@ extern dec resourceGroupResource(target: Model);
|
|
|
110
111
|
extern dec extensionResource(target: Model);
|
|
111
112
|
|
|
112
113
|
/**
|
|
113
|
-
* `@
|
|
114
|
-
*
|
|
115
|
-
*
|
|
114
|
+
* `@armProviderNameValue` sets the provider namespace value on operations.
|
|
115
|
+
* It is used internally to inject the correct provider namespace path segment
|
|
116
|
+
* for resource operations in auto-generated routes.
|
|
116
117
|
*/
|
|
117
118
|
extern dec armProviderNameValue(target: Operation);
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
|
-
* Marks the operation as being a collection action
|
|
121
|
+
* Marks the operation as being a collection action that is not associated with a specific resource instance.
|
|
122
|
+
* Collection actions are operations that act on a resource collection rather than a single resource,
|
|
123
|
+
* such as `checkNameAvailability` or provider-level actions.
|
|
121
124
|
*/
|
|
122
125
|
extern dec armResourceCollectionAction(target: Operation);
|
|
123
126
|
|
|
124
127
|
/**
|
|
128
|
+
* Marks the operation as a custom action on a specific Azure Resource Manager resource type.
|
|
129
|
+
* This decorator associates a POST action operation with its resource,
|
|
130
|
+
* identifying the semantics of the operation as a resource action over a specific resource for documentation,
|
|
131
|
+
* resource validation, and use by downstream emitters.
|
|
132
|
+
*
|
|
125
133
|
* @param resourceModel Resource model
|
|
126
134
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
127
135
|
*/
|
|
@@ -132,6 +140,10 @@ extern dec armResourceAction(
|
|
|
132
140
|
);
|
|
133
141
|
|
|
134
142
|
/**
|
|
143
|
+
* Marks the operation as a create or update (PUT) operation for a specific Azure Resource Manager resource type.
|
|
144
|
+
* This decorator identifies the semantics of the operation as a CreateOrReplace lifecycle operation over a particular resource,
|
|
145
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
146
|
+
*
|
|
135
147
|
* @param resourceModel Resource model
|
|
136
148
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
137
149
|
*/
|
|
@@ -142,12 +154,20 @@ extern dec armResourceCreateOrUpdate(
|
|
|
142
154
|
);
|
|
143
155
|
|
|
144
156
|
/**
|
|
157
|
+
* Marks the operation as a read (GET) operation for a specific Azure Resource Manager resource type.
|
|
158
|
+
* This decorator identifies the semantics of the operation as a Read lifecycle operation over a particular resource,
|
|
159
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
160
|
+
*
|
|
145
161
|
* @param resourceModel Resource model
|
|
146
162
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
147
163
|
*/
|
|
148
164
|
extern dec armResourceRead(target: Operation, resourceModel: Model, resourceName?: valueof string);
|
|
149
165
|
|
|
150
166
|
/**
|
|
167
|
+
* Marks the operation as an update (PATCH) operation for a specific Azure Resource Manager resource type.
|
|
168
|
+
* This decorator identifies the operation as an Update lifecycle operation over the resource for use in documentation,
|
|
169
|
+
* resource validation, and downstream emitters.
|
|
170
|
+
*
|
|
151
171
|
* @param resourceModel Resource model
|
|
152
172
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
153
173
|
*/
|
|
@@ -158,6 +178,10 @@ extern dec armResourceUpdate(
|
|
|
158
178
|
);
|
|
159
179
|
|
|
160
180
|
/**
|
|
181
|
+
* Marks the operation as a delete (DELETE) operation for a specific Azure Resource Manager resource type.
|
|
182
|
+
* This decorator identifies the operation as a Delete lifecycle operation over the resource for us in documentation,
|
|
183
|
+
* resource validation, and downstream emitters.
|
|
184
|
+
*
|
|
161
185
|
* @param resourceModel Resource model
|
|
162
186
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
163
187
|
*/
|
|
@@ -168,6 +192,10 @@ extern dec armResourceDelete(
|
|
|
168
192
|
);
|
|
169
193
|
|
|
170
194
|
/**
|
|
195
|
+
* Marks the operation as a list (GET collection) operation for a specific Azure Resource Manager resource type.
|
|
196
|
+
* This decorator identifies the semantics of the operation as a collection list operation over a resource type and a particular scope for documentation,
|
|
197
|
+
* resource validation, and downstream emitters.
|
|
198
|
+
*
|
|
171
199
|
* @param resourceModel Resource model
|
|
172
200
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
173
201
|
*/
|
|
@@ -242,21 +270,22 @@ extern dec armCommonTypesVersion(
|
|
|
242
270
|
|
|
243
271
|
/**
|
|
244
272
|
* This decorator is used on Azure Resource Manager resources that are not based on
|
|
245
|
-
* Azure.ResourceManager common types.
|
|
273
|
+
* Azure.ResourceManager common types. It marks a model as an ARM virtual resource,
|
|
274
|
+
* which is useful for defining the scope of resources used only as parents for child resources, or scopes for extension resources.
|
|
246
275
|
*
|
|
247
|
-
* @param propertiesType: The type of the resource properties.
|
|
248
276
|
* @param provider Optional. The resource provider namespace for the virtual resource.
|
|
249
277
|
*/
|
|
250
278
|
extern dec armVirtualResource(target: Model, provider?: valueof string);
|
|
251
279
|
|
|
252
280
|
/**
|
|
253
|
-
* This decorator sets the base type of the given resource
|
|
281
|
+
* This decorator sets the base type of the given resource, indicating where in the
|
|
282
|
+
* Azure Resource Manager hierarchy the resource is located.
|
|
254
283
|
*
|
|
255
|
-
* @param
|
|
284
|
+
* @param baseType The built-in parent of the resource, this can be "Tenant", "Subscription", "ResourceGroup", "Location", or "Extension"
|
|
256
285
|
*/
|
|
257
286
|
extern dec resourceBaseType(
|
|
258
287
|
target: Model,
|
|
259
|
-
|
|
288
|
+
baseType: "Tenant" | "Subscription" | "ResourceGroup" | "Location" | "Extension"
|
|
260
289
|
);
|
|
261
290
|
|
|
262
291
|
/**
|
|
@@ -274,3 +303,44 @@ extern dec resourceBaseType(
|
|
|
274
303
|
* ```
|
|
275
304
|
*/
|
|
276
305
|
extern dec identifiers(entity: ModelProperty | Array<unknown>, properties: valueof string[]);
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Options for defining a feature file and its associated output
|
|
309
|
+
*/
|
|
310
|
+
model ArmFeatureFileOptions {
|
|
311
|
+
/** The feature name */
|
|
312
|
+
featureName: string;
|
|
313
|
+
|
|
314
|
+
/** The associated file name for the features */
|
|
315
|
+
fileName: string;
|
|
316
|
+
|
|
317
|
+
/** The feature description in Swagger */
|
|
318
|
+
description: string;
|
|
319
|
+
|
|
320
|
+
/** The feature title in Swagger */
|
|
321
|
+
title?: string;
|
|
322
|
+
|
|
323
|
+
/** The feature terms of service in Swagger */
|
|
324
|
+
termsOfService?: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Decorator to define a set of feature files for splitting output
|
|
329
|
+
* @param target The service namespace
|
|
330
|
+
* @param features The enum that contains the features
|
|
331
|
+
*/
|
|
332
|
+
extern dec featureFiles(target: Namespace, features: Enum);
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Decorator to define options for a specific feature file
|
|
336
|
+
* @param target The enum member that represents the feature
|
|
337
|
+
* @param options The options for the feature file
|
|
338
|
+
*/
|
|
339
|
+
extern dec featureFileOptions(target: EnumMember, options: valueof ArmFeatureFileOptions);
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Decorator to associate a feature file with a model, interface, or namespace
|
|
343
|
+
* @param target The target to associate the feature file with
|
|
344
|
+
* @param featureName The feature to associate with the target
|
|
345
|
+
*/
|
|
346
|
+
extern dec featureFile(target: Model | Operation | Interface | Namespace, featureName: EnumMember);
|
|
@@ -176,7 +176,7 @@ op CreateOrReplaceSync<
|
|
|
176
176
|
>;
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* A long-running resource CreateOrUpdate (PUT)
|
|
180
180
|
* @template TargetResource the target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
181
181
|
* @template ExtensionResource the resource being created or replaced
|
|
182
182
|
* @template LroHeaders Optional. Allows overriding the lro headers returned on resource create
|
|
@@ -288,7 +288,7 @@ op CustomPatchSync<
|
|
|
288
288
|
>;
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
291
|
+
* Delete a resource asynchronously
|
|
292
292
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
293
293
|
* @template ExtensionResource The resource being deleted
|
|
294
294
|
* @template Response The response type for the operation
|
|
@@ -314,7 +314,7 @@ op DeleteAsyncBase<
|
|
|
314
314
|
| Error;
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
*
|
|
317
|
+
* Delete a resource asynchronously.
|
|
318
318
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
319
319
|
* @template ExtensionResource The resource being deleted
|
|
320
320
|
* @template LroHeaders Optional. Allows overriding the headers in the Accepted response
|
|
@@ -351,7 +351,7 @@ op DeleteAsync<
|
|
|
351
351
|
>;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
*
|
|
354
|
+
* Delete a resource asynchronously
|
|
355
355
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
356
356
|
* @template ExtensionResource The resource being deleted
|
|
357
357
|
* @template LroHeaders Optional. Allows overriding the headers returned in the Accepted response
|
|
@@ -444,7 +444,7 @@ op ActionAsyncBase<
|
|
|
444
444
|
): Response | Error;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
|
-
*
|
|
447
|
+
* A long-running resource action.
|
|
448
448
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
449
449
|
* @template ExtensionResource The resource being acted upon
|
|
450
450
|
* @template Request The request model for the action
|
|
@@ -459,6 +459,7 @@ op ActionAsyncBase<
|
|
|
459
459
|
@extensionResourceOperation(TargetResource, ExtensionResource, "action", OverrideResourceName)
|
|
460
460
|
@returnsDoc("Azure operation completed successfully.")
|
|
461
461
|
@enforceConstraint(ExtensionResource, Foundations.Resource)
|
|
462
|
+
@doc("")
|
|
462
463
|
op ActionAsync<
|
|
463
464
|
TargetResource extends Foundations.SimpleResource,
|
|
464
465
|
ExtensionResource extends Foundations.SimpleResource,
|
|
@@ -520,7 +521,7 @@ op ActionSync<
|
|
|
520
521
|
): Response | Error;
|
|
521
522
|
|
|
522
523
|
/**
|
|
523
|
-
*
|
|
524
|
+
* A long-running resource action that returns no content.
|
|
524
525
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
525
526
|
* @template ExtensionResource The resource being acted upon
|
|
526
527
|
* @template Request The request model for the action
|
|
@@ -535,6 +536,7 @@ op ActionSync<
|
|
|
535
536
|
@enforceConstraint(TargetResource, Foundations.Resource)
|
|
536
537
|
@enforceConstraint(ExtensionResource, Foundations.Resource)
|
|
537
538
|
@post
|
|
539
|
+
@doc("")
|
|
538
540
|
op ActionNoResponseContentAsync<
|
|
539
541
|
TargetResource extends Foundations.SimpleResource,
|
|
540
542
|
ExtensionResource extends Foundations.SimpleResource,
|
|
@@ -140,29 +140,37 @@ alias TenantParentScope<Resource extends Foundations.SimpleResource> = TenantSco
|
|
|
140
140
|
* Parameter model for listing a resource at the tenant scope
|
|
141
141
|
* @template Resource The type of the resource.
|
|
142
142
|
*/
|
|
143
|
-
model TenantScope<Resource extends Foundations.SimpleResource>
|
|
144
|
-
|
|
143
|
+
model TenantScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
144
|
+
Resource,
|
|
145
|
+
TenantBaseParameters
|
|
146
|
+
>;
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
149
|
* Parameter model for listing a resource at the subscription scope
|
|
148
150
|
* @template Resource The type of the resource.
|
|
149
151
|
*/
|
|
150
|
-
model SubscriptionScope<Resource extends Foundations.SimpleResource>
|
|
151
|
-
|
|
152
|
+
model SubscriptionScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
153
|
+
Resource,
|
|
154
|
+
SubscriptionBaseParameters
|
|
155
|
+
>;
|
|
152
156
|
|
|
153
157
|
/**
|
|
154
158
|
* Parameter model for listing a resource at the location scope
|
|
155
159
|
* @template Resource The type of the resource.
|
|
156
160
|
*/
|
|
157
|
-
model LocationScope<Resource extends Foundations.SimpleResource>
|
|
158
|
-
|
|
161
|
+
model LocationScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
162
|
+
Resource,
|
|
163
|
+
LocationBaseParameters
|
|
164
|
+
>;
|
|
159
165
|
|
|
160
166
|
/**
|
|
161
167
|
* Parameter model for listing an extension resource
|
|
162
168
|
* @template Resource The type of the resource.
|
|
163
169
|
*/
|
|
164
|
-
model ExtensionScope<Resource extends Foundations.SimpleResource>
|
|
165
|
-
|
|
170
|
+
model ExtensionScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
171
|
+
Resource,
|
|
172
|
+
ExtensionBaseParameters
|
|
173
|
+
>;
|
|
166
174
|
|
|
167
175
|
/**
|
|
168
176
|
* Parameter model for listing a resource at the resource group scope
|
|
@@ -240,22 +248,24 @@ op checkNameAvailability<
|
|
|
240
248
|
): Response | ErrorResponse;
|
|
241
249
|
|
|
242
250
|
/**
|
|
243
|
-
*
|
|
251
|
+
* The base template for Azure Resource Manager GET and HEAD Operations.
|
|
244
252
|
* @template Parameters The parameter object for the operation.
|
|
245
253
|
* @template Response The response or union of responses for success.
|
|
246
254
|
* @template ErrorResponse The error response.
|
|
247
255
|
*/
|
|
256
|
+
@doc("")
|
|
248
257
|
op ArmReadOperation<Parameters extends {}, Response extends {}, ErrorResponse extends {}>(
|
|
249
258
|
...Parameters,
|
|
250
259
|
): Response | ErrorResponse;
|
|
251
260
|
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
262
|
+
* The base template for Azure Resource Manager PUT Operations.
|
|
254
263
|
* @template HttpParameters The parameter object for the operation.
|
|
255
264
|
* @template BodyParameter The body parameter
|
|
256
265
|
* @template Response The response or union of responses for success.
|
|
257
266
|
* @template ErrorResponse The error response.
|
|
258
267
|
*/
|
|
268
|
+
@doc("")
|
|
259
269
|
op ArmCreateOperation<
|
|
260
270
|
HttpParameters extends {},
|
|
261
271
|
BodyParameter extends {},
|
|
@@ -266,12 +276,13 @@ op ArmCreateOperation<
|
|
|
266
276
|
| ErrorResponse;
|
|
267
277
|
|
|
268
278
|
/**
|
|
269
|
-
*
|
|
279
|
+
* The base template for Azure Resource Manager PATCH Operations.
|
|
270
280
|
* @template HttpParameters The parameter object for the operation.
|
|
271
281
|
* @template BodyParameter The body parameter
|
|
272
282
|
* @template Response The response or union of responses for success.
|
|
273
283
|
* @template ErrorResponse The error response.
|
|
274
284
|
*/
|
|
285
|
+
@doc("")
|
|
275
286
|
op ArmUpdateOperation<
|
|
276
287
|
HttpParameters extends {},
|
|
277
288
|
BodyParameter extends {},
|
package/lib/interfaces.tsp
CHANGED
|
@@ -13,7 +13,7 @@ namespace Azure.ResourceManager;
|
|
|
13
13
|
*/
|
|
14
14
|
interface Operations {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* List the operations for the provider.
|
|
17
17
|
*/
|
|
18
18
|
@tag("Operations")
|
|
19
19
|
@autoRoute
|
|
@@ -146,9 +146,10 @@ interface ResourceCollectionOperations<
|
|
|
146
146
|
*/
|
|
147
147
|
interface ResourceListBySubscription<Resource extends Foundations.SimpleResource> {
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* List resources by subscription.
|
|
150
150
|
* @template Resource The ArmResource to list.
|
|
151
151
|
*/
|
|
152
|
+
@doc("List {name} resources by subscription ID", Resource)
|
|
152
153
|
listBySubscription is ArmListBySubscription<Resource>;
|
|
153
154
|
}
|
|
154
155
|
|
|
@@ -166,7 +167,7 @@ interface ResourceListByParent<
|
|
|
166
167
|
ParentFriendlyName extends valueof string = ""
|
|
167
168
|
> {
|
|
168
169
|
/**
|
|
169
|
-
*
|
|
170
|
+
* List resources by parent.
|
|
170
171
|
* @template Resource The ArmResource to list.
|
|
171
172
|
* @template BaseParameters The http parameters that are part of the request
|
|
172
173
|
* @template ParentName The name of the parent resource
|
|
@@ -186,10 +187,11 @@ interface ResourceRead<
|
|
|
186
187
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
187
188
|
> {
|
|
188
189
|
/**
|
|
189
|
-
*
|
|
190
|
+
* Retrieve a resource.
|
|
190
191
|
* @template Resource The ArmResource to retrieve.
|
|
191
192
|
* @template BaseParameters The http parameters that are part of the request
|
|
192
193
|
*/
|
|
194
|
+
@doc("Get a {name}", Resource)
|
|
193
195
|
get is ArmResourceRead<Resource, BaseParameters>;
|
|
194
196
|
}
|
|
195
197
|
|
|
@@ -203,10 +205,11 @@ interface ResourceCreateSync<
|
|
|
203
205
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
204
206
|
> {
|
|
205
207
|
/**
|
|
206
|
-
*
|
|
208
|
+
* Create or update a resource using the synchronous call pattern.
|
|
207
209
|
* @template Resource The ArmResource to create or update.
|
|
208
210
|
* @template BaseParameters The http parameters that are part of the request
|
|
209
211
|
*/
|
|
212
|
+
@doc("Create a {name}", Resource)
|
|
210
213
|
createOrUpdate is ArmResourceCreateOrReplaceSync<Resource, BaseParameters>;
|
|
211
214
|
}
|
|
212
215
|
|
|
@@ -220,15 +223,16 @@ interface ResourceCreateAsync<
|
|
|
220
223
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
221
224
|
> {
|
|
222
225
|
/**
|
|
223
|
-
*
|
|
226
|
+
* Create or update a resource using the asynchronous call pattern.
|
|
224
227
|
* @template Resource The ArmResource to create or update.
|
|
225
228
|
* @template BaseParameters The http parameters that are part of the request
|
|
226
229
|
*/
|
|
230
|
+
@doc("Create a {name}", Resource)
|
|
227
231
|
createOrUpdate is ArmResourceCreateOrUpdateAsync<Resource, BaseParameters>;
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
/**
|
|
231
|
-
*
|
|
235
|
+
* A composite interface for resources that include a long-running delete operation.
|
|
232
236
|
* DEPRECATED: Use ResourceDeleteWithoutOkAsync instead
|
|
233
237
|
* @template Resource The ArmResource that provides these operations
|
|
234
238
|
* @template BaseParameters The http parameters that are part of the request
|
|
@@ -240,15 +244,17 @@ interface ResourceDeleteAsync<
|
|
|
240
244
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
241
245
|
> {
|
|
242
246
|
/**
|
|
243
|
-
*
|
|
247
|
+
* Delete a resource using the asynchronous call pattern.
|
|
244
248
|
* @template Resource The ArmResource to delete.
|
|
245
249
|
* @template BaseParameters The http parameters that are part of the request
|
|
246
250
|
*/
|
|
251
|
+
@doc("Delete a {name}", Resource)
|
|
247
252
|
delete is ArmResourceDeleteAsync<Resource, BaseParameters>;
|
|
248
253
|
}
|
|
249
254
|
|
|
250
255
|
/**
|
|
251
|
-
*
|
|
256
|
+
* A composite interface for resources that include a long-running delete operation
|
|
257
|
+
* without returning a final OK response.
|
|
252
258
|
* @template Resource The ArmResource that provides these operations
|
|
253
259
|
* @template BaseParameters The http parameters that are part of the request
|
|
254
260
|
*/
|
|
@@ -258,10 +264,11 @@ interface ResourceDeleteWithoutOkAsync<
|
|
|
258
264
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
259
265
|
> {
|
|
260
266
|
/**
|
|
261
|
-
*
|
|
267
|
+
* Delete a resource using the asynchronous call pattern.
|
|
262
268
|
* @template Resource The ArmResource to delete.
|
|
263
269
|
* @template BaseParameters The http parameters that are part of the request
|
|
264
270
|
*/
|
|
271
|
+
@doc("Delete a {name}", Resource)
|
|
265
272
|
delete is ArmResourceDeleteWithoutOkAsync<Resource, BaseParameters>;
|
|
266
273
|
}
|
|
267
274
|
|
|
@@ -276,15 +283,16 @@ interface ResourceDeleteSync<
|
|
|
276
283
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
277
284
|
> {
|
|
278
285
|
/**
|
|
279
|
-
*
|
|
286
|
+
* Delete a resource using the synchronous call pattern.
|
|
280
287
|
* @template Resource The ArmResource to delete.
|
|
281
288
|
* @template BaseParameters The http parameters that are part of the request
|
|
282
289
|
*/
|
|
290
|
+
@doc("Delete a {name}", Resource)
|
|
283
291
|
delete is ArmResourceDeleteSync<Resource, BaseParameters>;
|
|
284
292
|
}
|
|
285
293
|
|
|
286
294
|
/**
|
|
287
|
-
*
|
|
295
|
+
* A composite interface for resources that include a long-running update operation.
|
|
288
296
|
* @template Resource The ArmResource that provides these operations
|
|
289
297
|
* @template Properties RP-specific property bag for the resource
|
|
290
298
|
* @template BaseParameters The http parameters that are part of the request
|
|
@@ -296,11 +304,12 @@ interface ResourceUpdateAsync<
|
|
|
296
304
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
297
305
|
> {
|
|
298
306
|
/**
|
|
299
|
-
*
|
|
307
|
+
* Update a resource using the asynchronous call pattern.
|
|
300
308
|
* @template Resource The ArmResource to update.
|
|
301
309
|
* @template Properties RP-specific property bag for the resource
|
|
302
310
|
* @template BaseParameters The http parameters that are part of the request
|
|
303
311
|
*/
|
|
312
|
+
@doc("Update a {name}", Resource)
|
|
304
313
|
update is ArmCustomPatchAsync<
|
|
305
314
|
Resource,
|
|
306
315
|
ResourceUpdateModel<Resource, Properties>,
|
|
@@ -321,13 +330,14 @@ interface ResourceUpdateSync<
|
|
|
321
330
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
322
331
|
> {
|
|
323
332
|
/**
|
|
324
|
-
*
|
|
333
|
+
* Update a resource using the synchronous call pattern.
|
|
325
334
|
* @template Resource The ArmResource to update.
|
|
326
335
|
* @template Properties RP-specific property bag for the resource
|
|
327
336
|
* @template BaseParameters The http parameters that are part of the request
|
|
328
337
|
*/
|
|
329
338
|
#suppress "@typespec/http/deprecated-implicit-optionality" "Legacy"
|
|
330
339
|
@patch(#{ implicitOptionality: true })
|
|
340
|
+
@doc("Update a {name}", Resource)
|
|
331
341
|
update is ArmCustomPatchSync<Resource, ResourceUpdateModel<Resource, Properties>, BaseParameters>;
|
|
332
342
|
}
|
|
333
343
|
|
|
@@ -215,7 +215,7 @@ interface ExtensionOperations<
|
|
|
215
215
|
>(...TargetParameters, ...ExtensionInstanceParameters, ...Parameters): Response | ErrorType;
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
*
|
|
218
|
+
* Get a resource
|
|
219
219
|
* @template Resource The resource being read
|
|
220
220
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
221
221
|
* @template Response Optional. The success response for a get operation.
|
|
@@ -246,7 +246,7 @@ interface RoutedOperations<
|
|
|
246
246
|
>(...ParentParameters, ...ResourceTypeParameter, ...Parameters): Response | OverrideErrorType;
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
*
|
|
249
|
+
* Get a resource
|
|
250
250
|
* @template Resource The resource being read
|
|
251
251
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
252
252
|
* @template Response Optional. The success response for a get operation.
|
|
@@ -434,17 +434,19 @@ interface RoutedOperations<
|
|
|
434
434
|
): Response | OverrideErrorType;
|
|
435
435
|
}
|
|
436
436
|
/**
|
|
437
|
-
*
|
|
437
|
+
* DEPRECATED: Use ProviderParameter instead. Get the provider namespace key-value pair
|
|
438
438
|
* @template Resource Optional. The resource to get the provider namespace for.
|
|
439
439
|
*/
|
|
440
|
+
@doc("")
|
|
440
441
|
model Provider<Resource extends {} = TenantActionScope> {
|
|
441
442
|
...ProviderNamespace<Resource>;
|
|
442
443
|
}
|
|
443
444
|
|
|
444
445
|
/**
|
|
445
|
-
*
|
|
446
|
+
* Get the provider namespace key-value pair
|
|
446
447
|
* @template Resource The resource to get the provider namespace for.
|
|
447
448
|
*/
|
|
449
|
+
@doc("")
|
|
448
450
|
model ProviderParameter<Resource extends {}> {
|
|
449
451
|
...ProviderNamespace<Resource>;
|
|
450
452
|
}
|
|
@@ -709,13 +711,14 @@ op ArmListSinglePageByParent<
|
|
|
709
711
|
>;
|
|
710
712
|
|
|
711
713
|
/**
|
|
712
|
-
*
|
|
714
|
+
* The base template for Azure Resource Manager PUT Operations.
|
|
713
715
|
* @template HttpParameters The parameter object for the operation.
|
|
714
716
|
* @template BodyParameter The body parameter
|
|
715
717
|
* @template Response The response or union of responses for success.
|
|
716
718
|
* @template ErrorResponse The error response.
|
|
717
719
|
* @template OptionalRequestBody Optional. Indicates whether the request body is optional
|
|
718
720
|
*/
|
|
721
|
+
@doc("")
|
|
719
722
|
op CreateOperation<
|
|
720
723
|
HttpParameters extends {},
|
|
721
724
|
BodyParameter extends {} | void,
|
|
@@ -731,13 +734,14 @@ op CreateOperation<
|
|
|
731
734
|
): Response | ErrorResponse;
|
|
732
735
|
|
|
733
736
|
/**
|
|
734
|
-
*
|
|
737
|
+
* The base template for Legacy Azure Resource Manager PATCH Operations.
|
|
735
738
|
* @template HttpParameters The parameter object for the operation.
|
|
736
739
|
* @template BodyParameter The body parameter
|
|
737
740
|
* @template Response The response or union of responses for success.
|
|
738
741
|
* @template ErrorResponse The error response.
|
|
739
742
|
* @template OptionalRequestBody Optional. Indicates whether the request body is optional
|
|
740
743
|
*/
|
|
744
|
+
@doc("")
|
|
741
745
|
op UpdateOperation<
|
|
742
746
|
HttpParameters extends {},
|
|
743
747
|
BodyParameter extends {} | void,
|
|
@@ -8,7 +8,7 @@ using Azure.ResourceManager.Foundations;
|
|
|
8
8
|
using Rest;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* List the private endpoint connections over a resource
|
|
12
12
|
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
13
13
|
* @template Resource Optional. The PrivateEndpointConnection resource being listed
|
|
14
14
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -39,7 +39,7 @@ op ListSinglePageByParent<
|
|
|
39
39
|
>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Synchronous PUT operation for a Private endpoint connection to a resource
|
|
43
43
|
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
44
44
|
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
45
45
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -76,7 +76,7 @@ op CreateOrReplaceSync<
|
|
|
76
76
|
>;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* A long-running resource CreateOrUpdate (PUT) for a PrivateEndpointConnection to a resource
|
|
80
80
|
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
81
81
|
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
82
82
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -161,7 +161,7 @@ op CustomPatchAsync<
|
|
|
161
161
|
>;
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
*
|
|
164
|
+
* A resource update using a custom PATCH payload (synchronous) to update a PrivateEndpointConnection to a resource
|
|
165
165
|
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
166
166
|
* @template Resource Optional. The PrivateEndpointConnection resource being patched
|
|
167
167
|
* @template PatchModel The input model for the PATCH request
|
package/lib/models.tsp
CHANGED
|
@@ -340,7 +340,7 @@ model ResourceKindProperty<Type extends string = string> {
|
|
|
340
340
|
model ResourceListResult<Resource extends Foundations.SimpleResource> is Azure.Core.Page<Resource>;
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
|
-
* Paged response containing
|
|
343
|
+
* Paged response containing custom result types.
|
|
344
344
|
* @template Result The type of the values returned in the paged response
|
|
345
345
|
*/
|
|
346
346
|
@doc("The custom response of a list operation.")
|