@azure-tools/typespec-azure-resource-manager 0.42.0-dev.9 → 0.43.0-dev.0

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.
Files changed (31) hide show
  1. package/dist/src/lib.d.ts +17 -2
  2. package/dist/src/lib.d.ts.map +1 -1
  3. package/dist/src/lib.js +6 -0
  4. package/dist/src/lib.js.map +1 -1
  5. package/dist/src/private.decorators.d.ts +2 -0
  6. package/dist/src/private.decorators.d.ts.map +1 -1
  7. package/dist/src/private.decorators.js +40 -2
  8. package/dist/src/private.decorators.js.map +1 -1
  9. package/dist/src/rules/arm-resource-duplicate-property.d.ts.map +1 -1
  10. package/dist/src/rules/arm-resource-duplicate-property.js +3 -1
  11. package/dist/src/rules/arm-resource-duplicate-property.js.map +1 -1
  12. package/dist/src/rules/arm-resource-name-pattern.d.ts +1 -1
  13. package/dist/src/rules/arm-resource-name-pattern.d.ts.map +1 -1
  14. package/dist/src/rules/arm-resource-name-pattern.js +16 -4
  15. package/dist/src/rules/arm-resource-name-pattern.js.map +1 -1
  16. package/lib/arm.foundations.tsp +13 -564
  17. package/lib/arm.tsp +7 -3
  18. package/lib/common-types/backcompat.tsp +19 -0
  19. package/lib/common-types/extended-location.tsp +21 -0
  20. package/lib/common-types/managed-identity.tsp +123 -0
  21. package/lib/{private-links.tsp → common-types/private-links.tsp} +2 -2
  22. package/lib/common-types/types.tsp +452 -0
  23. package/lib/interfaces.tsp +33 -33
  24. package/lib/models.tsp +110 -27
  25. package/lib/operations.tsp +48 -25
  26. package/lib/parameters.tsp +4 -4
  27. package/lib/private.decorators.tsp +22 -0
  28. package/lib/responses.tsp +4 -4
  29. package/package.json +22 -18
  30. /package/lib/{common-types.tsp → common-types/common-types.tsp} +0 -0
  31. /package/lib/{customer-managed-keys.tsp → common-types/customer-managed-keys.tsp} +0 -0
@@ -5,74 +5,6 @@ using Azure.ResourceManager.Private;
5
5
 
6
6
  namespace Azure.ResourceManager.Foundations;
7
7
 
8
- /**
9
- * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
10
- */
11
- @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v3)
12
- @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v4)
13
- @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v5)
14
- @doc("""
15
- A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
16
- """)
17
- model OperationListResult is Azure.Core.Page<Operation>;
18
-
19
- /**
20
- * Base model that defines common properties for all Azure Resource Manager resources.
21
- */
22
- @doc("Common properties for all Azure Resource Manager resources.")
23
- model ArmResource extends ArmResourceBase {
24
- @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")
25
- @visibility("read")
26
- id: string;
27
-
28
- // The name property must be included by the resource type author!
29
-
30
- @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"")
31
- @visibility("read")
32
- type: string;
33
-
34
- @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.")
35
- @visibility("read")
36
- systemData?: SystemData;
37
- }
38
-
39
- /** Base class used for type definitions */
40
- model ArmResourceBase {}
41
-
42
- /**
43
- * The base tracked resource.
44
- */
45
- @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v3)
46
- @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v4)
47
- @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v5)
48
- @doc("The resource model definition for an Azure Resource Manager tracked top level resource")
49
- model TrackedResourceBase extends ArmResource {
50
- @doc("The geo-location where the resource lives")
51
- @visibility("read", "create")
52
- location: string;
53
-
54
- ...ArmTagsProperty;
55
- }
56
-
57
- /**
58
- * The base proxy resource.
59
- */
60
- @doc("The base proxy resource.")
61
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v3)
62
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v4)
63
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v5)
64
- model ProxyResourceBase extends ArmResource {}
65
-
66
- /**
67
- * The base extension resource.
68
- */
69
- // Note that ProxyResource is the base definition for both kinds of resources
70
- @doc("The base extension resource.")
71
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v3)
72
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v4)
73
- @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v5)
74
- model ExtensionResourceBase extends ArmResource {}
75
-
76
8
  /**
77
9
  * An internal enum to indicate the resource support for various path types
78
10
  */
@@ -93,144 +25,19 @@ enum ResourceHome {
93
25
  Extension,
94
26
  }
95
27
 
96
- /**
97
- * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
98
- */
99
- @doc("""
100
- The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
101
- """)
102
- union Origin {
103
- @doc("Indicates the operation is initiated by a user.")
104
- user: "user",
105
-
106
- @doc("Indicates the operation is initiated by a system.")
107
- system: "system",
108
-
109
- @doc("Indicates the operation is initiated by a user or system.")
110
- `user,system`: "user,system",
111
-
112
- string,
113
- }
114
-
115
- /**
116
- * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
117
- */
118
- @doc("""
119
- Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
120
- """)
121
- union ActionType {
122
- @doc("Actions are for internal-only APIs.")
123
- Internal: "Internal",
124
-
125
- string,
126
- }
127
-
128
- /**
129
- * Localized display information for and operation.
130
- */
131
- @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v3)
132
- @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v4)
133
- @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v5)
134
- @doc("Localized display information for and operation.")
135
- model OperationDisplay {
136
- @doc("""
137
- The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
138
- """)
139
- provider?: string;
140
-
141
- @doc("""
142
- The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
143
- """)
144
- resource?: string;
145
-
146
- @doc("""
147
- The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
148
- """)
149
- operation?: string;
150
-
151
- @doc("The short, localized friendly description of the operation; suitable for tool tips and detailed views.")
152
- description?: string;
153
- }
154
-
155
- /**
156
- * The current status of an async operation.
157
- */
158
- @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v3)
159
- @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v4)
160
- @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v5)
161
- @doc("The current status of an async operation.")
162
- model OperationStatusResult {
163
- @doc("Fully qualified ID for the async operation.")
164
- id?: string;
165
-
166
- @doc("Name of the async operation.")
167
- name?: string;
168
-
169
- @doc("Operation status.")
170
- status: string;
171
-
172
- @doc("Percent of the operation that is complete.")
173
- @minValue(0)
174
- @maxValue(100)
175
- percentComplete?: int32;
176
-
177
- @doc("The start time of the operation.")
178
- startTime?: utcDateTime;
179
-
180
- @doc("The end time of the operation.")
181
- endTime?: utcDateTime;
182
-
183
- @doc("The operations list.")
184
- operations: OperationStatusResult[];
185
-
186
- @doc("If present, details of the operation error.")
187
- error?: ErrorDetail;
188
- }
189
-
190
- /**
191
- * The error detail.
192
- */
193
- @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v3)
194
- @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v4)
195
- @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v5)
196
- @doc("The error detail.")
197
- model ErrorDetail {
198
- @doc("The error code.")
199
- @visibility("read")
200
- code?: string;
201
-
202
- @doc("The error message.")
203
- @visibility("read")
204
- message?: string;
205
-
206
- @doc("The error target.")
207
- @visibility("read")
208
- target?: string;
209
-
210
- @extension("x-ms-identifiers", ["message", "target"])
211
- @doc("The error details.")
212
- @visibility("read")
213
- details?: ErrorDetail[];
214
-
215
- @extension("x-ms-identifiers", ["message", "target"])
216
- @doc("The error additional info.")
217
- @visibility("read")
218
- additionalInfo?: ErrorAdditionalInfo[];
219
- }
220
-
221
28
  /**
222
29
  * Base parameters for a resource.
223
30
  *
224
31
  * @template Resource The type of the resource.
225
32
  */
226
- alias BaseParameters<Resource extends ArmResourceBase> = DefaultBaseParameters<Resource>;
33
+ alias BaseParameters<Resource extends {}> = DefaultBaseParameters<Resource>;
227
34
 
228
35
  /**
229
36
  * Base parameters for a resource.
230
37
  * @template Resource The type of the resource.
231
38
  */
232
39
  @resourceBaseParametersOf(Resource)
233
- model DefaultBaseParameters<Resource extends ArmResourceBase> {
40
+ model DefaultBaseParameters<Resource extends {}> {
234
41
  ...ApiVersionParameter;
235
42
 
236
43
  // unless tenant or extension
@@ -281,203 +88,6 @@ model ExtensionBaseParameters is TenantBaseParameters {
281
88
  ...ResourceUriParameter;
282
89
  }
283
90
 
284
- /**
285
- * The resource management error additional info.
286
- */
287
- @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v3)
288
- @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v4)
289
- @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v5)
290
- @doc("The resource management error additional info.")
291
- model ErrorAdditionalInfo {
292
- @doc("The additional info type.")
293
- @visibility("read")
294
- type?: string;
295
-
296
- @doc("The additional info.")
297
- @visibility("read")
298
- info?: {};
299
- }
300
-
301
- /**
302
- * Standard type definition for Azure Resource Manager Tags property.
303
- *
304
- * It is included in the TrackedResource template definition.
305
- */
306
- @doc("The Azure Resource Manager Resource tags.")
307
- model ArmTagsProperty {
308
- @doc("Resource tags.")
309
- tags?: Record<string>;
310
- }
311
-
312
- /**
313
- * The kind of entity that created the resource.
314
- */
315
- // NOTE: This is how the extensible enum is named in types.json
316
- @doc("The kind of entity that created the resource.")
317
- union createdByType {
318
- @doc("The entity was created by a user.")
319
- User: "User",
320
-
321
- @doc("The entity was created by an application.")
322
- Application: "Application",
323
-
324
- @doc("The entity was created by a managed identity.")
325
- ManagedIdentity: "ManagedIdentity",
326
-
327
- @doc("The entity was created by a key.")
328
- Key: "Key",
329
-
330
- string,
331
- }
332
-
333
- /**
334
- * Metadata pertaining to creation and last modification of the resource.
335
- */
336
- @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v3)
337
- @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v4)
338
- @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v5)
339
- @doc("Metadata pertaining to creation and last modification of the resource.")
340
- model SystemData {
341
- @visibility("read")
342
- @doc("The identity that created the resource.")
343
- createdBy?: string;
344
-
345
- @visibility("read")
346
- @doc("The type of identity that created the resource.")
347
- createdByType?: createdByType;
348
-
349
- @visibility("read")
350
- @doc("The type of identity that created the resource.")
351
- createdAt?: plainDate;
352
-
353
- @visibility("read")
354
- @doc("The identity that last modified the resource.")
355
- lastModifiedBy?: string;
356
-
357
- @visibility("read")
358
- @doc("The type of identity that last modified the resource.")
359
- lastModifiedByType?: createdByType;
360
-
361
- @visibility("read")
362
- @doc("The timestamp of resource last modification (UTC)")
363
- lastModifiedAt?: plainDate;
364
- }
365
-
366
- /**
367
- * The properties of the managed service identities assigned to this resource.
368
- */
369
- @armCommonDefinition(
370
- "ManagedServiceIdentity",
371
- {
372
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
373
- isDefault: true,
374
- },
375
- "managedidentity.json"
376
- )
377
- @armCommonDefinition(
378
- "ManagedServiceIdentity",
379
- Azure.ResourceManager.CommonTypes.Versions.v5,
380
- "managedidentity.json"
381
- )
382
- @doc("The properties of the managed service identities assigned to this resource.")
383
- model ManagedIdentityProperties {
384
- @doc("The Active Directory tenant id of the principal.")
385
- @visibility("read")
386
- tenantId?: string;
387
-
388
- @doc("The active directory identifier of this principal.")
389
- @visibility("read")
390
- principalId?: string;
391
-
392
- @doc("The type of managed identity assigned to this resource.")
393
- type: ManagedServiceIdentityType;
394
-
395
- @doc("The identities assigned to this resource by the user.")
396
- userAssignedIdentities?: Record<UserAssignedIdentity>;
397
- }
398
-
399
- /**
400
- * The properties of the service-assigned identity associated with this resource.
401
- */
402
- @armCommonDefinition(
403
- "SystemAssignedServiceIdentity",
404
- {
405
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
406
- isDefault: true,
407
- },
408
- "managedidentity.json"
409
- )
410
- @armCommonDefinition(
411
- "SystemAssignedServiceIdentity",
412
- Azure.ResourceManager.CommonTypes.Versions.v5,
413
- "managedidentity.json"
414
- )
415
- @doc("The properties of the service-assigned identity associated with this resource.")
416
- model ManagedSystemIdentityProperties {
417
- @doc("The Active Directory tenant id of the principal.")
418
- @visibility("read")
419
- tenantId?: string;
420
-
421
- @doc("The active directory identifier of this principal.")
422
- @visibility("read")
423
- principalId?: string;
424
-
425
- @doc("The type of managed identity assigned to this resource.")
426
- type: SystemAssignedServiceIdentityType;
427
- }
428
-
429
- /** Alias of ManagedServiceIdentityType for back compatability. Please change to ManagedServiceIdentityType. */
430
- #deprecated "Please change to ManagedServiceIdentityType."
431
- alias ManagedIdentityType = ManagedServiceIdentityType;
432
- /**
433
- * A managed identity assigned by the user.
434
- */
435
- @doc("A managed identity assigned by the user.")
436
- model UserAssignedIdentity {
437
- @doc("The active directory client identifier for this principal.")
438
- clientId?: string;
439
-
440
- @doc("The active directory identifier for this principal.")
441
- principalId?: string;
442
- }
443
-
444
- /**
445
- * The kind of managed identity assigned to this resource.
446
- */
447
- @doc("The kind of managed identity assigned to this resource.")
448
- union ManagedServiceIdentityType {
449
- @doc("No managed identity.")
450
- None: "None",
451
-
452
- @doc("System assigned managed identity.")
453
- SystemAssigned: "SystemAssigned",
454
-
455
- @doc("User assigned managed identity.")
456
- UserAssigned: "UserAssigned",
457
-
458
- @doc("System and user assigned managed identity.")
459
- SystemAndUserAssigned: "SystemAssigned, UserAssigned",
460
-
461
- string,
462
- }
463
-
464
- /** Alias of SystemAssignedServiceIdentityType for back compatability. Please change to SystemAssignedServiceIdentityType. */
465
- alias ManagedSystemIdentityType = SystemAssignedServiceIdentityType;
466
-
467
- /**
468
- * The kind of managemed identity assigned to this resource.
469
- */
470
- @doc("The kind of managemed identity assigned to this resource.")
471
- union SystemAssignedServiceIdentityType {
472
- @doc("No managed system identity.")
473
- None: "None",
474
-
475
- @doc("System assigned managed system identity.")
476
- SystemAssigned: "SystemAssigned",
477
-
478
- string,
479
- }
480
-
481
91
  /**
482
92
  * Defines a properties type used to create named resource update models.
483
93
  * This type is not used directly, it is referenced by ResourceUpdateModel.
@@ -487,7 +97,7 @@ union SystemAssignedServiceIdentityType {
487
97
  @doc("The updatable properties of the {name}.", Resource)
488
98
  @friendlyName("{name}UpdateProperties", Resource)
489
99
  model ResourceUpdateModelProperties<
490
- Resource extends ArmResource,
100
+ Resource extends Foundations.Resource,
491
101
  Properties extends TypeSpec.Reflection.Model
492
102
  > is OptionalProperties<UpdateableProperties<Properties>>;
493
103
 
@@ -501,7 +111,7 @@ model ResourceUpdateModelProperties<
501
111
  @friendlyName("{name}Update", Resource)
502
112
  @omitIfEmpty("properties")
503
113
  model ResourceUpdateModel<
504
- Resource extends ArmResource,
114
+ Resource extends Foundations.Resource,
505
115
  Properties extends TypeSpec.Reflection.Model
506
116
  > is OptionalProperties<UpdateableProperties<OmitProperties<Resource, "Name" | "name">>> {
507
117
  @extension("x-ms-client-flatten", true)
@@ -514,113 +124,48 @@ model ResourceUpdateModel<
514
124
  */
515
125
  @doc("The type used for updating tags in {name} resources.", Resource)
516
126
  @friendlyName("{name}TagsUpdate", Resource)
517
- model TagsUpdateModel<Resource extends ArmResource> {
127
+ model TagsUpdateModel<Resource extends Foundations.Resource> {
518
128
  ...ArmTagsProperty;
519
129
  }
520
130
 
521
131
  // Tenant resource operation definitions
522
132
 
523
- alias TenantParentScope<Resource extends ArmResource> = TenantScope<Resource>;
133
+ alias TenantParentScope<Resource extends Foundations.Resource> = TenantScope<Resource>;
524
134
 
525
135
  /**
526
136
  * Parameter model for listing a resource at the tenant scope
527
137
  * @template Resource The type of the resource.
528
138
  */
529
- model TenantScope<Resource extends ArmResource>
139
+ model TenantScope<Resource extends Foundations.Resource>
530
140
  is ResourceParentParameters<Resource, TenantBaseParameters>;
531
141
 
532
142
  /**
533
143
  * Parameter model for listing a resource at the subscription scope
534
144
  * @template Resource The type of the resource.
535
145
  */
536
- model SubscriptionScope<Resource extends ArmResource>
146
+ model SubscriptionScope<Resource extends Foundations.Resource>
537
147
  is ResourceParentParameters<Resource, SubscriptionBaseParameters>;
538
148
 
539
149
  /**
540
150
  * Parameter model for listing a resource at the location scope
541
151
  * @template Resource The type of the resource.
542
152
  */
543
- model LocationScope<Resource extends ArmResource>
153
+ model LocationScope<Resource extends Foundations.Resource>
544
154
  is ResourceParentParameters<Resource, LocationBaseParameters>;
545
155
 
546
156
  /**
547
157
  * Parameter model for listing an extension resource
548
158
  * @template Resource The type of the resource.
549
159
  */
550
- model ExtensionScope<Resource extends ArmResource>
160
+ model ExtensionScope<Resource extends Foundations.Resource>
551
161
  is ResourceParentParameters<Resource, ExtensionBaseParameters>;
552
162
 
553
163
  /**
554
164
  * Parameter model for listing a resource at the resource group scope
555
165
  * @template Resource The type of the resource.
556
166
  */
557
- model ResourceGroupScope<Resource extends ArmResource> is ResourceParentParameters<Resource>;
558
-
559
- /**
560
- * Details of the resource plan.
561
- */
562
- @doc("Details of the resource plan.")
563
- @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v3)
564
- @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v4)
565
- @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v5)
566
- model ResourcePlanType {
567
- @doc("A user defined name of the 3rd Party Artifact that is being procured.")
568
- name: string;
569
-
570
- @doc("The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic")
571
- publisher: string;
572
-
573
- @doc("The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ")
574
- product: string;
575
-
576
- @doc("A publisher provided promotion code as provisioned in Data Market for the said product/artifact.")
577
- promotionCode?: string;
578
-
579
- @doc("The version of the desired product/artifact.")
580
- version?: string;
581
- }
582
-
583
- /**
584
- * The SKU (Stock Keeping Unit) assigned to this resource.
585
- */
586
- @doc("The SKU (Stock Keeping Unit) assigned to this resource.")
587
- @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v3)
588
- @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v4)
589
- @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v5)
590
- model ResourceSkuType {
591
- @doc("The name of the SKU, usually a combination of letters and numbers, for example, 'P3'")
592
- name: string;
593
-
594
- @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")
595
- tier?: SkuTier;
596
-
597
- @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.")
598
- size?: string;
599
-
600
- @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.")
601
- family?: string;
602
-
603
- @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")
604
- capacity?: int32;
605
- }
606
-
607
- /**
608
- * Available service tiers for the SKU.
609
- */
610
- @doc("Available service tiers for the SKU.")
611
- enum SkuTier {
612
- @doc("The Free service tier.")
613
- Free,
614
-
615
- @doc("The Basic service tier.")
616
- Basic,
617
-
618
- @doc("The Standard service tier.")
619
- Standard,
620
-
621
- @doc("The Premium service tier.")
622
- Premium,
623
- }
167
+ model ResourceGroupScope<Resource extends Foundations.Resource>
168
+ is ResourceParentParameters<Resource>;
624
169
 
625
170
  /**
626
171
  * The type used for update operations of the resource.
@@ -630,109 +175,13 @@ enum SkuTier {
630
175
  @doc("The type used for update operations of the {name}.", Resource)
631
176
  @friendlyName("{name}Update", Resource)
632
177
  model ProxyResourceUpdateModel<
633
- Resource extends ArmResource,
178
+ Resource extends Foundations.Resource,
634
179
  Properties extends TypeSpec.Reflection.Model
635
180
  > {
636
181
  @extension("x-ms-client-flatten", true)
637
182
  properties?: ResourceUpdateModelProperties<Resource, Properties>;
638
183
  }
639
184
 
640
- /**
641
- * Details of a REST API operation, returned from the Resource Provider Operations API
642
- */
643
- @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v3)
644
- @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v4)
645
- @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v5)
646
- @doc("Details of a REST API operation, returned from the Resource Provider Operations API")
647
- model Operation {
648
- @doc("""
649
- The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
650
- """)
651
- @visibility("read")
652
- name?: string;
653
-
654
- @doc("""
655
- Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations.
656
- """)
657
- @visibility("read")
658
- isDataAction?: boolean;
659
-
660
- @doc("Localized display information for this particular operation.")
661
- display?: OperationDisplay;
662
-
663
- @doc("""
664
- The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
665
- """)
666
- @visibility("read")
667
- origin?: Origin;
668
-
669
- @doc("""
670
- Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
671
- """)
672
- actionType?: ActionType;
673
- }
674
-
675
- /**
676
- * The default operationId parameter type.
677
- */
678
- @doc("The default operationId parameter type.")
679
- model OperationIdParameter {
680
- @path
681
- @minLength(1)
682
- @doc("The ID of an ongoing async operation.")
683
- @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v3)
684
- @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v4)
685
- @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v5)
686
- operationId: string;
687
- }
688
-
689
- /**
690
- * The check availability request body.
691
- */
692
- @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v3)
693
- @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v4)
694
- @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v5)
695
- @doc("The check availability request body.")
696
- model CheckNameAvailabilityRequest {
697
- @doc("The name of the resource for which availability needs to be checked.")
698
- name?: string;
699
-
700
- @doc("The resource type.")
701
- type?: string;
702
- }
703
-
704
- /**
705
- * Possible reasons for a name not being available.
706
- */
707
- @doc("Possible reasons for a name not being available.")
708
- union CheckNameAvailabilityReason {
709
- @doc("Name is invalid.")
710
- Invalid: "Invalid",
711
-
712
- @doc("Name already exists.")
713
- AlreadyExists: "AlreadyExists",
714
-
715
- string,
716
- }
717
-
718
- /**
719
- * The check availability result.
720
- */
721
- @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v3)
722
- @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v4)
723
- @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v5)
724
- @doc("The check availability result.")
725
- model CheckNameAvailabilityResponse {
726
- @doc("Indicates if the resource name is available.")
727
- nameAvailable?: boolean;
728
-
729
- @doc("The reason why the given name is not available.")
730
- reason?: CheckNameAvailabilityReason;
731
-
732
- @doc("Detailed reason why the given name is not available.")
733
- message?: string;
734
- }
735
-
736
185
  alias DefaultProviderNamespace = {
737
186
  @path
738
187
  @TypeSpec.Rest.segment("providers")
package/lib/arm.tsp CHANGED
@@ -7,7 +7,13 @@ import "@azure-tools/typespec-autorest";
7
7
  import "@azure-tools/typespec-azure-core";
8
8
 
9
9
  import "./arm.foundations.tsp";
10
- import "./common-types.tsp";
10
+ import "./common-types/common-types.tsp";
11
+ import "./common-types/backcompat.tsp";
12
+ import "./common-types/types.tsp";
13
+ import "./common-types/managed-identity.tsp";
14
+ import "./common-types/private-links.tsp";
15
+ import "./common-types/customer-managed-keys.tsp";
16
+ import "./common-types/extended-location.tsp";
11
17
  import "./private.decorators.tsp";
12
18
  import "./models.tsp";
13
19
  import "./operations.tsp";
@@ -15,8 +21,6 @@ import "./decorators.tsp";
15
21
  import "./interfaces.tsp";
16
22
  import "./responses.tsp";
17
23
  import "./parameters.tsp";
18
- import "./private-links.tsp";
19
- import "./customer-managed-keys.tsp";
20
24
 
21
25
  using TypeSpec.Http;
22
26
  using TypeSpec.Rest;