@azure-tools/typespec-azure-resource-manager 0.30.0-dev.6 → 0.30.0-dev.7
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 +117 -14
- package/lib/arm.tsp +3 -0
- package/lib/interfaces.tsp +78 -0
- package/lib/models.tsp +5 -1
- package/lib/operations.tsp +34 -0
- package/package.json +1 -1
package/lib/arm.foundations.tsp
CHANGED
|
@@ -4,6 +4,9 @@ using TypeSpec.Versioning;
|
|
|
4
4
|
|
|
5
5
|
namespace Azure.ResourceManager.Foundations;
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
|
|
9
|
+
*/
|
|
7
10
|
@armCommonDefinition
|
|
8
11
|
@doc("""
|
|
9
12
|
A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
|
|
@@ -90,6 +93,9 @@ enum ActionType {
|
|
|
90
93
|
Internal,
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Localized display information for and operation.
|
|
98
|
+
*/
|
|
93
99
|
@armCommonDefinition
|
|
94
100
|
@doc("Localized display information for and operation.")
|
|
95
101
|
model OperationDisplay {
|
|
@@ -112,6 +118,9 @@ model OperationDisplay {
|
|
|
112
118
|
description?: string;
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The current status of an async operation.
|
|
123
|
+
*/
|
|
115
124
|
@armCommonDefinition
|
|
116
125
|
@doc("The current status of an async operation.")
|
|
117
126
|
model OperationStatusResult {
|
|
@@ -142,6 +151,9 @@ model OperationStatusResult {
|
|
|
142
151
|
error?: ErrorDetail;
|
|
143
152
|
}
|
|
144
153
|
|
|
154
|
+
/**
|
|
155
|
+
* The error detail.
|
|
156
|
+
*/
|
|
145
157
|
@armCommonDefinition
|
|
146
158
|
@doc("The error detail.")
|
|
147
159
|
model ErrorDetail {
|
|
@@ -168,6 +180,10 @@ model ErrorDetail {
|
|
|
168
180
|
additionalInfo?: ErrorAdditionalInfo[];
|
|
169
181
|
}
|
|
170
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Base parameters for a resource.
|
|
185
|
+
* @template TResource The type of the resource.
|
|
186
|
+
*/
|
|
171
187
|
@resourceBaseParametersOf(TResource)
|
|
172
188
|
model BaseParameters<TResource extends ArmResource> {
|
|
173
189
|
...ApiVersionParameter;
|
|
@@ -181,31 +197,44 @@ model BaseParameters<TResource extends ArmResource> {
|
|
|
181
197
|
...ResourceUriParameter;
|
|
182
198
|
}
|
|
183
199
|
|
|
184
|
-
|
|
200
|
+
/**
|
|
201
|
+
* The static parameters for a tenant-based resource
|
|
202
|
+
*/
|
|
185
203
|
model TenantBaseParameters {
|
|
186
204
|
...ApiVersionParameter;
|
|
187
205
|
}
|
|
188
206
|
|
|
189
|
-
|
|
207
|
+
/**
|
|
208
|
+
* The static parameters for a subscription based resource
|
|
209
|
+
*/
|
|
190
210
|
model SubscriptionBaseParameters is TenantBaseParameters {
|
|
191
211
|
...SubscriptionIdParameter;
|
|
192
212
|
}
|
|
193
213
|
|
|
194
|
-
|
|
214
|
+
/**
|
|
215
|
+
* The static parameters for a location-based resource
|
|
216
|
+
*/
|
|
195
217
|
model LocationBaseParameters is SubscriptionBaseParameters {
|
|
196
218
|
...LocationParameter;
|
|
197
219
|
}
|
|
198
220
|
|
|
199
|
-
|
|
221
|
+
/**
|
|
222
|
+
* The static parameters for a resource-group based resource
|
|
223
|
+
*/
|
|
200
224
|
model ResourceGroupBaseParameters is SubscriptionBaseParameters {
|
|
201
225
|
...ResourceGroupParameter;
|
|
202
226
|
}
|
|
203
227
|
|
|
204
|
-
|
|
228
|
+
/**
|
|
229
|
+
* The static parameters for an extension resource
|
|
230
|
+
*/
|
|
205
231
|
model ExtensionBaseParameters is TenantBaseParameters {
|
|
206
232
|
...ResourceUriParameter;
|
|
207
233
|
}
|
|
208
234
|
|
|
235
|
+
/**
|
|
236
|
+
* The resource management error additional info.
|
|
237
|
+
*/
|
|
209
238
|
@armCommonDefinition
|
|
210
239
|
@doc("The resource management error additional info.")
|
|
211
240
|
model ErrorAdditionalInfo {
|
|
@@ -229,6 +258,9 @@ model ArmTagsProperty {
|
|
|
229
258
|
tags?: Record<string>;
|
|
230
259
|
}
|
|
231
260
|
|
|
261
|
+
/**
|
|
262
|
+
* The kind of entity that created the resource.
|
|
263
|
+
*/
|
|
232
264
|
// NOTE: This is how the enum is named in types.json
|
|
233
265
|
@doc("The kind of entity that created the resource.")
|
|
234
266
|
enum createdByType {
|
|
@@ -238,6 +270,9 @@ enum createdByType {
|
|
|
238
270
|
Key,
|
|
239
271
|
}
|
|
240
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Metadata pertaining to creation and last modification of the resource.
|
|
275
|
+
*/
|
|
241
276
|
@armCommonDefinition("systemData")
|
|
242
277
|
@doc("Metadata pertaining to creation and last modification of the resource.")
|
|
243
278
|
model SystemData {
|
|
@@ -266,6 +301,9 @@ model SystemData {
|
|
|
266
301
|
lastModifiedAt?: plainDate;
|
|
267
302
|
}
|
|
268
303
|
|
|
304
|
+
/**
|
|
305
|
+
* The properties of the managed service identities assigned to this resource.
|
|
306
|
+
*/
|
|
269
307
|
@armCommonDefinition("ManagedServiceIdentity", "v4", "managedidentity.json")
|
|
270
308
|
@doc("The properties of the managed service identities assigned to this resource.")
|
|
271
309
|
model ManagedIdentityProperties {
|
|
@@ -284,6 +322,9 @@ model ManagedIdentityProperties {
|
|
|
284
322
|
userAssignedIdentities?: Record<UserAssignedIdentity>;
|
|
285
323
|
}
|
|
286
324
|
|
|
325
|
+
/**
|
|
326
|
+
* The properties of the service-assigned identity associated with this resource.
|
|
327
|
+
*/
|
|
287
328
|
@armCommonDefinition("SystemAssignedServiceIdentity", "v4", "managedidentity.json")
|
|
288
329
|
@doc("The properties of the service-assigned identity associated with this resource.")
|
|
289
330
|
model ManagedSystemIdentityProperties {
|
|
@@ -299,6 +340,9 @@ model ManagedSystemIdentityProperties {
|
|
|
299
340
|
type: ManagedSystemIdentityType;
|
|
300
341
|
}
|
|
301
342
|
|
|
343
|
+
/**
|
|
344
|
+
* A managed identity assigned by the user.
|
|
345
|
+
*/
|
|
302
346
|
@doc("A managed identity assigned by the user.")
|
|
303
347
|
model UserAssignedIdentity {
|
|
304
348
|
@doc("The active directory client identifier for this principal.")
|
|
@@ -308,6 +352,9 @@ model UserAssignedIdentity {
|
|
|
308
352
|
principalId?: string;
|
|
309
353
|
}
|
|
310
354
|
|
|
355
|
+
/**
|
|
356
|
+
* The kind of managed identity assigned to this resource.
|
|
357
|
+
*/
|
|
311
358
|
@doc("The kind of managed identity assigned to this resource.")
|
|
312
359
|
enum ManagedIdentityType {
|
|
313
360
|
None,
|
|
@@ -316,21 +363,32 @@ enum ManagedIdentityType {
|
|
|
316
363
|
SystemAndUserAssigned: "SystemAssigned, UserAssigned",
|
|
317
364
|
}
|
|
318
365
|
|
|
366
|
+
/**
|
|
367
|
+
* The kind of managemed identity assigned to this resource.
|
|
368
|
+
*/
|
|
319
369
|
@doc("The kind of managemed identity assigned to this resource.")
|
|
320
370
|
enum ManagedSystemIdentityType {
|
|
321
371
|
None,
|
|
322
372
|
SystemAssigned,
|
|
323
373
|
}
|
|
324
374
|
|
|
325
|
-
|
|
326
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Defines a properties type used to create named resource update models.
|
|
377
|
+
* This type is not used directly, it is referenced by ResourceUpdateModel.
|
|
378
|
+
* @template TResource The type of the resource.
|
|
379
|
+
* @template TProperties The type of the properties.
|
|
380
|
+
*/
|
|
327
381
|
@doc("The updatable properties of the {name}.", TResource)
|
|
328
382
|
@friendlyName("{name}UpdateProperties", TResource)
|
|
329
383
|
model ResourceUpdateModelProperties<TResource extends ArmResource, TProperties extends object>
|
|
330
384
|
is OptionalProperties<UpdateableProperties<TProperties>>;
|
|
331
385
|
|
|
332
|
-
|
|
333
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Defines a model type used to create named resource update models
|
|
388
|
+
* e.g. `model MyResourceUpdate is ResourceUpdate<MyResourceProperties> {}`
|
|
389
|
+
* @template TResource The type of the resource.
|
|
390
|
+
* @template TProperties The type of the properties.
|
|
391
|
+
*/
|
|
334
392
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
335
393
|
@friendlyName("{name}Update", TResource)
|
|
336
394
|
@omitIfEmpty("properties")
|
|
@@ -340,6 +398,10 @@ model ResourceUpdateModel<TResource extends ArmResource, TProperties extends obj
|
|
|
340
398
|
properties?: ResourceUpdateModelProperties<TResource, TProperties>;
|
|
341
399
|
}
|
|
342
400
|
|
|
401
|
+
/**
|
|
402
|
+
* The type used for updating tags in resources.
|
|
403
|
+
* @template TResource The type of the resource.
|
|
404
|
+
*/
|
|
343
405
|
@doc("The type used for updating tags in {name} resources.", TResource)
|
|
344
406
|
@friendlyName("{name}TagsUpdate", TResource)
|
|
345
407
|
model TagsUpdateModel<TResource extends ArmResource> {
|
|
@@ -350,25 +412,43 @@ model TagsUpdateModel<TResource extends ArmResource> {
|
|
|
350
412
|
|
|
351
413
|
alias TenantParentScope<TResource extends ArmResource> = TenantScope<TResource>;
|
|
352
414
|
|
|
353
|
-
|
|
415
|
+
/**
|
|
416
|
+
* Parameter model for listing a resource at the tenant scope
|
|
417
|
+
* @template TResource The type of the resource.
|
|
418
|
+
*/
|
|
354
419
|
model TenantScope<TResource extends ArmResource>
|
|
355
420
|
is ResourceParentParameters<TResource, TenantBaseParameters>;
|
|
356
421
|
|
|
357
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Parameter model for listing a resource at the subscription scope
|
|
424
|
+
* @template TResource The type of the resource.
|
|
425
|
+
*/
|
|
358
426
|
model SubscriptionScope<TResource extends ArmResource>
|
|
359
427
|
is ResourceParentParameters<TResource, SubscriptionBaseParameters>;
|
|
360
428
|
|
|
361
|
-
|
|
429
|
+
/**
|
|
430
|
+
* Parameter model for listing a resource at the location scope
|
|
431
|
+
* @template TResource The type of the resource.
|
|
432
|
+
*/
|
|
362
433
|
model LocationScope<TResource extends ArmResource>
|
|
363
434
|
is ResourceParentParameters<TResource, LocationBaseParameters>;
|
|
364
435
|
|
|
365
|
-
|
|
436
|
+
/**
|
|
437
|
+
* Parameter model for listing an extension resource
|
|
438
|
+
* @template TResource The type of the resource.
|
|
439
|
+
*/
|
|
366
440
|
model ExtensionScope<TResource extends ArmResource>
|
|
367
441
|
is ResourceParentParameters<TResource, ExtensionBaseParameters>;
|
|
368
442
|
|
|
369
|
-
|
|
443
|
+
/**
|
|
444
|
+
* Parameter model for listing a resource at the resource group scope
|
|
445
|
+
* @template TResource The type of the resource.
|
|
446
|
+
*/
|
|
370
447
|
model ResourceGroupScope<TResource extends ArmResource> is ResourceParentParameters<TResource>;
|
|
371
448
|
|
|
449
|
+
/**
|
|
450
|
+
* Details of the resource plan.
|
|
451
|
+
*/
|
|
372
452
|
@doc("Details of the resource plan.")
|
|
373
453
|
@armCommonDefinition("Plan")
|
|
374
454
|
model ResourcePlanType {
|
|
@@ -388,6 +468,9 @@ model ResourcePlanType {
|
|
|
388
468
|
version?: string;
|
|
389
469
|
}
|
|
390
470
|
|
|
471
|
+
/**
|
|
472
|
+
* The SKU (Stock Keeping Unit) assigned to this resource.
|
|
473
|
+
*/
|
|
391
474
|
@doc("The SKU (Stock Keeping Unit) assigned to this resource.")
|
|
392
475
|
@armCommonDefinition("Sku")
|
|
393
476
|
model ResourceSkuType {
|
|
@@ -407,6 +490,9 @@ model ResourceSkuType {
|
|
|
407
490
|
capacity?: int32;
|
|
408
491
|
}
|
|
409
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Available service tiers for the SKU.
|
|
495
|
+
*/
|
|
410
496
|
@doc("Available service tiers for the SKU.")
|
|
411
497
|
enum SkuTier {
|
|
412
498
|
Free,
|
|
@@ -415,6 +501,11 @@ enum SkuTier {
|
|
|
415
501
|
Premium,
|
|
416
502
|
}
|
|
417
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The type used for update operations of the resource.
|
|
506
|
+
* @template TResource The type of the resource.
|
|
507
|
+
* @template TProperties The type of the properties.
|
|
508
|
+
*/
|
|
418
509
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
419
510
|
@friendlyName("{name}Update", TResource)
|
|
420
511
|
model ProxyResourceUpdateModel<TResource extends ArmResource, TProperties extends object> {
|
|
@@ -455,6 +546,9 @@ model Operation {
|
|
|
455
546
|
actionType?: ActionType;
|
|
456
547
|
}
|
|
457
548
|
|
|
549
|
+
/**
|
|
550
|
+
* The default operationId parameter type.
|
|
551
|
+
*/
|
|
458
552
|
@doc("The default operationId parameter type.")
|
|
459
553
|
model OperationIdParameter {
|
|
460
554
|
@path
|
|
@@ -464,6 +558,9 @@ model OperationIdParameter {
|
|
|
464
558
|
operationId: string;
|
|
465
559
|
}
|
|
466
560
|
|
|
561
|
+
/**
|
|
562
|
+
* The check availability request body.
|
|
563
|
+
*/
|
|
467
564
|
@armCommonDefinition
|
|
468
565
|
@doc("The check availability request body.")
|
|
469
566
|
model CheckNameAvailabilityRequest {
|
|
@@ -474,12 +571,18 @@ model CheckNameAvailabilityRequest {
|
|
|
474
571
|
type?: string;
|
|
475
572
|
}
|
|
476
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Possible reasons for a name not being available.
|
|
576
|
+
*/
|
|
477
577
|
@doc("Possible reasons for a name not being available.")
|
|
478
578
|
enum CheckNameAvailabilityReason {
|
|
479
579
|
Invalid,
|
|
480
580
|
AlreadyExists,
|
|
481
581
|
}
|
|
482
582
|
|
|
583
|
+
/**
|
|
584
|
+
* The check availability result.
|
|
585
|
+
*/
|
|
483
586
|
@armCommonDefinition
|
|
484
587
|
@doc("The check availability result.")
|
|
485
588
|
model CheckNameAvailabilityResponse {
|
package/lib/arm.tsp
CHANGED
|
@@ -25,6 +25,9 @@ using Azure.ResourceManager.Foundations;
|
|
|
25
25
|
@versioned(Azure.ResourceManager.Versions)
|
|
26
26
|
namespace Azure.ResourceManager;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Supported versions of Azure.ResourceManager building blocks.
|
|
30
|
+
*/
|
|
28
31
|
enum Versions {
|
|
29
32
|
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
|
|
30
33
|
v1_0_Preview_1: "1.0-preview.1",
|
package/lib/interfaces.tsp
CHANGED
|
@@ -75,6 +75,8 @@ interface TrackedResourceOperations<
|
|
|
75
75
|
* `/subscriptions/{id}/resourcegroups/{rg}/providers/Microsoft.XXX/...`
|
|
76
76
|
*
|
|
77
77
|
* This is the most common API pattern for Proxy Resources to use.
|
|
78
|
+
* @template TResource the ArmResource that provides these operations
|
|
79
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
78
80
|
*/
|
|
79
81
|
interface ProxyResourceOperations<
|
|
80
82
|
TResource extends ArmResource,
|
|
@@ -93,6 +95,8 @@ interface ProxyResourceOperations<
|
|
|
93
95
|
* `/providers/Microsoft.XXX/...`
|
|
94
96
|
*
|
|
95
97
|
* This is the most common API pattern for Tenant Resources to use.
|
|
98
|
+
* @template TResource the ArmResource that provides these operations
|
|
99
|
+
* @template TProperties RP-specific property bag for the resource
|
|
96
100
|
*/
|
|
97
101
|
interface TenantResourceOperations<TResource extends ArmResource, TProperties extends object>
|
|
98
102
|
extends TenantResourceRead<TResource>,
|
|
@@ -101,6 +105,13 @@ interface TenantResourceOperations<TResource extends ArmResource, TProperties ex
|
|
|
101
105
|
TenantResourceDelete<TResource>,
|
|
102
106
|
TenantResourceListByParent<TResource> {}
|
|
103
107
|
|
|
108
|
+
/**
|
|
109
|
+
* A composite interface for resources that have CRUD operations.
|
|
110
|
+
* @template TResource The ArmResource that provides these operations
|
|
111
|
+
* @template TProperties RP-specific property bag for the resource
|
|
112
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
113
|
+
* @template TPatchModel The model used for PATCH operations
|
|
114
|
+
*/
|
|
104
115
|
interface ResourceInstanceOperations<
|
|
105
116
|
TResource extends ArmResource,
|
|
106
117
|
TProperties extends object,
|
|
@@ -112,15 +123,31 @@ interface ResourceInstanceOperations<
|
|
|
112
123
|
ResourceUpdate<TResource, TProperties, TBaseParameters>,
|
|
113
124
|
ResourceDelete<TResource, TBaseParameters> {}
|
|
114
125
|
|
|
126
|
+
/**
|
|
127
|
+
* A composite interface for resource collections.
|
|
128
|
+
* @template TResource The ArmResource that provides these operations
|
|
129
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
130
|
+
*/
|
|
115
131
|
interface ResourceCollectionOperations<
|
|
116
132
|
TResource extends ArmResource,
|
|
117
133
|
TBaseParameters = BaseParameters<TResource>
|
|
118
134
|
> extends ResourceListByParent<TResource, TBaseParameters>, ResourceListBySubscription<TResource> {}
|
|
119
135
|
|
|
136
|
+
/**
|
|
137
|
+
* An interface for resources with can be listed by subscription.
|
|
138
|
+
* @template TResource The ArmResource that provides these operations
|
|
139
|
+
*/
|
|
120
140
|
interface ResourceListBySubscription<TResource extends ArmResource> {
|
|
121
141
|
listBySubscription is ArmListBySubscription<TResource>;
|
|
122
142
|
}
|
|
123
143
|
|
|
144
|
+
/**
|
|
145
|
+
* An interface for resources which can be listed by parent.
|
|
146
|
+
* @template TResource The ArmResource that provides these operations
|
|
147
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
148
|
+
* @template TParentName The name of the parent resource
|
|
149
|
+
* @template TParentFriendlyName The friendly name of the parent resource
|
|
150
|
+
*/
|
|
124
151
|
interface ResourceListByParent<
|
|
125
152
|
TResource extends ArmResource,
|
|
126
153
|
TBaseParameters = BaseParameters<TResource>,
|
|
@@ -135,10 +162,20 @@ interface ResourceListByParent<
|
|
|
135
162
|
>;
|
|
136
163
|
}
|
|
137
164
|
|
|
165
|
+
/**
|
|
166
|
+
* A composite interface for resources that include a GET operation.
|
|
167
|
+
* @template TResource The ArmResource that provides these operations
|
|
168
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
169
|
+
*/
|
|
138
170
|
interface ResourceRead<TResource extends ArmResource, TBaseParameters = BaseParameters<TResource>> {
|
|
139
171
|
get is ArmResourceRead<TResource, TBaseParameters>;
|
|
140
172
|
}
|
|
141
173
|
|
|
174
|
+
/**
|
|
175
|
+
* A composite interface for resources that include a synchronous create or update operation.
|
|
176
|
+
* @template TResource The ArmResource that provides these operations
|
|
177
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
178
|
+
*/
|
|
142
179
|
interface ResourceCreateSync<
|
|
143
180
|
TResource extends ArmResource,
|
|
144
181
|
TBaseParameters = BaseParameters<TResource>
|
|
@@ -146,6 +183,11 @@ interface ResourceCreateSync<
|
|
|
146
183
|
createOrUpdate is ArmResourceCreateOrUpdateSync<TResource, TBaseParameters>;
|
|
147
184
|
}
|
|
148
185
|
|
|
186
|
+
/**
|
|
187
|
+
* A composite interface for resources that include a long-running create or update operation.
|
|
188
|
+
* @template TResource The ArmResource that provides these operations
|
|
189
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
190
|
+
*/
|
|
149
191
|
interface ResourceCreateAsync<
|
|
150
192
|
TResource extends ArmResource,
|
|
151
193
|
TBaseParameters = BaseParameters<TResource>
|
|
@@ -153,6 +195,11 @@ interface ResourceCreateAsync<
|
|
|
153
195
|
createOrUpdate is ArmResourceCreateOrUpdateAsync<TResource, TBaseParameters>;
|
|
154
196
|
}
|
|
155
197
|
|
|
198
|
+
/**
|
|
199
|
+
* A composite interface for resources that include a long-running delete operation.
|
|
200
|
+
* @template TResource The ArmResource that provides these operations
|
|
201
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
202
|
+
*/
|
|
156
203
|
@doc("Delete a resource using the asynchronous call pattern")
|
|
157
204
|
interface ResourceDeleteAsync<
|
|
158
205
|
TResource extends ArmResource,
|
|
@@ -161,6 +208,11 @@ interface ResourceDeleteAsync<
|
|
|
161
208
|
delete is ArmResourceDeleteAsync<TResource, TBaseParameters>;
|
|
162
209
|
}
|
|
163
210
|
|
|
211
|
+
/**
|
|
212
|
+
* A composite interface for resources that include a synchronous delete operation.
|
|
213
|
+
* @template TResource The ArmResource that provides these operations
|
|
214
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
215
|
+
*/
|
|
164
216
|
@doc("Delete a resource")
|
|
165
217
|
interface ResourceDeleteSync<
|
|
166
218
|
TResource extends ArmResource,
|
|
@@ -169,6 +221,12 @@ interface ResourceDeleteSync<
|
|
|
169
221
|
delete is ArmResourceDeleteSync<TResource, TBaseParameters>;
|
|
170
222
|
}
|
|
171
223
|
|
|
224
|
+
/**
|
|
225
|
+
* A composite interface for resources that include a long-running update operation.
|
|
226
|
+
* @template TResource The ArmResource that provides these operations
|
|
227
|
+
* @template TProperties RP-specific property bag for the resource
|
|
228
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
229
|
+
*/
|
|
172
230
|
@doc("Asynchronous resource update")
|
|
173
231
|
interface ResourceUpdateAsync<
|
|
174
232
|
TResource extends ArmResource,
|
|
@@ -182,6 +240,12 @@ interface ResourceUpdateAsync<
|
|
|
182
240
|
>;
|
|
183
241
|
}
|
|
184
242
|
|
|
243
|
+
/**
|
|
244
|
+
* A composite interface for resources that include a synchronous update operation.
|
|
245
|
+
* @template TResource The ArmResource that provides these operations
|
|
246
|
+
* @template TProperties RP-specific property bag for the resource
|
|
247
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
248
|
+
*/
|
|
185
249
|
@doc("Synchronous resource update")
|
|
186
250
|
interface ResourceUpdateSync<
|
|
187
251
|
TResource extends ArmResource,
|
|
@@ -195,6 +259,11 @@ interface ResourceUpdateSync<
|
|
|
195
259
|
>;
|
|
196
260
|
}
|
|
197
261
|
|
|
262
|
+
/**
|
|
263
|
+
* A composite interface for resources that includes CRUD operations.
|
|
264
|
+
* @template TResource The ArmResource that provides these operations
|
|
265
|
+
* @template TProperties RP-specific property bag for the resource
|
|
266
|
+
*/
|
|
198
267
|
interface ExtensionResourceInstanceOperations<
|
|
199
268
|
TResource extends ArmResource,
|
|
200
269
|
TProperties extends object
|
|
@@ -204,9 +273,18 @@ interface ExtensionResourceInstanceOperations<
|
|
|
204
273
|
ExtensionResourceUpdate<TResource, TProperties>,
|
|
205
274
|
ExtensionResourceDelete<TResource> {}
|
|
206
275
|
|
|
276
|
+
/**
|
|
277
|
+
* A composite interface for resource collections that include a paginated list operation.
|
|
278
|
+
* @template TResource The ArmResource that provides these operations
|
|
279
|
+
*/
|
|
207
280
|
interface ExtensionResourceCollectionOperations<TResource extends ArmResource>
|
|
208
281
|
extends ExtensionResourceList<TResource> {}
|
|
209
282
|
|
|
283
|
+
/**
|
|
284
|
+
* A composite interface for resources that include CRUD and list operations.
|
|
285
|
+
* @template TResource The ArmResource that provides these operations
|
|
286
|
+
* @template TProperties RP-specific property bag for the resource
|
|
287
|
+
*/
|
|
210
288
|
interface ExtensionResourceOperations<TResource extends ArmResource, TProperties extends object>
|
|
211
289
|
extends ExtensionResourceInstanceOperations<TResource, TProperties>,
|
|
212
290
|
ExtensionResourceCollectionOperations<TResource> {}
|
package/lib/models.tsp
CHANGED
|
@@ -72,6 +72,10 @@ model KeysOf<TResource> {}
|
|
|
72
72
|
@copyResourceKeyParameters("parent")
|
|
73
73
|
model ParentKeysOf<TResource> {}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Model describing the provider namespace.
|
|
77
|
+
* @template TResource The resource provided by the namespace.
|
|
78
|
+
*/
|
|
75
79
|
model ProviderNamespace<TResource> {
|
|
76
80
|
@path
|
|
77
81
|
@segment("providers")
|
|
@@ -219,7 +223,7 @@ model ResourceKind {
|
|
|
219
223
|
|
|
220
224
|
/**
|
|
221
225
|
* Paged response containing resources
|
|
222
|
-
* @template
|
|
226
|
+
* @template TResource The type of the values returned in the paged response (must be a resource)
|
|
223
227
|
*/
|
|
224
228
|
@doc("The response of a {name} list operation.", TResource)
|
|
225
229
|
@friendlyName("{name}ListResult", TResource)
|
package/lib/operations.tsp
CHANGED
|
@@ -25,6 +25,9 @@ op ArmListBySubscription<TResource extends ArmResource>(
|
|
|
25
25
|
/**
|
|
26
26
|
* A resource list operation, at the scope of the resource's parent
|
|
27
27
|
* @template TResource the resource being patched
|
|
28
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
29
|
+
* @template TParentName Optional. The name of the parent resource
|
|
30
|
+
* @template TParentFriendlyName Optional. The friendly name of the parent resource
|
|
28
31
|
*/
|
|
29
32
|
@get
|
|
30
33
|
@autoRoute
|
|
@@ -240,6 +243,11 @@ op ArmResourceDeleteAsync<
|
|
|
240
243
|
| ArmDeletedNoContentResponse
|
|
241
244
|
| ErrorResponse;
|
|
242
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Delete a resource synchronously
|
|
248
|
+
* @template TResource The resource being deleted
|
|
249
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
250
|
+
*/
|
|
243
251
|
@autoRoute
|
|
244
252
|
@doc("Delete a {name}", TResource)
|
|
245
253
|
@armResourceDelete(TResource)
|
|
@@ -251,6 +259,13 @@ op ArmResourceDeleteSync<
|
|
|
251
259
|
...ResourceInstanceParameters<TResource, TBaseParameters>
|
|
252
260
|
): ArmDeletedResponse | ArmDeletedNoContentResponse | ErrorResponse;
|
|
253
261
|
|
|
262
|
+
/**
|
|
263
|
+
* A long-running resource action.
|
|
264
|
+
* @template TResource The resource being acted upon
|
|
265
|
+
* @template TRequest The request model for the action
|
|
266
|
+
* @template TResponse The response model for the action
|
|
267
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
268
|
+
*/
|
|
254
269
|
@autoRoute
|
|
255
270
|
@extension("x-ms-long-running-operation", true)
|
|
256
271
|
@extension(
|
|
@@ -274,6 +289,13 @@ op ArmResourceActionAsync<
|
|
|
274
289
|
body: TRequest
|
|
275
290
|
): ArmAcceptedLroResponse | ArmResponse<TResponse> | ErrorResponse;
|
|
276
291
|
|
|
292
|
+
/**
|
|
293
|
+
* A synchronous resource action.
|
|
294
|
+
* @template TResource The resource being acted upon
|
|
295
|
+
* @template TRequest The request model for the action
|
|
296
|
+
* @template TResponse The response model for the action
|
|
297
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
298
|
+
*/
|
|
277
299
|
@autoRoute
|
|
278
300
|
@armResourceAction(TResource)
|
|
279
301
|
@post
|
|
@@ -290,6 +312,12 @@ op ArmResourceActionSync<
|
|
|
290
312
|
body: TRequest
|
|
291
313
|
): ArmResponse<TResponse> | ErrorResponse;
|
|
292
314
|
|
|
315
|
+
/**
|
|
316
|
+
* A long-running resource action that returns no content.
|
|
317
|
+
* @template TResource The resource being acted upon
|
|
318
|
+
* @template TRequest The request model for the action
|
|
319
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
320
|
+
*/
|
|
293
321
|
@autoRoute
|
|
294
322
|
@extension("x-ms-long-running-operation", true)
|
|
295
323
|
@extension(
|
|
@@ -312,6 +340,12 @@ op ArmResourceActionNoContentAsync<
|
|
|
312
340
|
body: TRequest
|
|
313
341
|
): ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
|
|
314
342
|
|
|
343
|
+
/**
|
|
344
|
+
* A synchronous resource action that returns no content.
|
|
345
|
+
* @template TResource The resource being acted upon
|
|
346
|
+
* @template TRequest The request model for the action
|
|
347
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
348
|
+
*/
|
|
315
349
|
@autoRoute
|
|
316
350
|
@armResourceAction(TResource)
|
|
317
351
|
@post
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.30.0-dev.
|
|
3
|
+
"version": "0.30.0-dev.7",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|