@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
@@ -43,7 +43,7 @@ interface Operations {
43
43
  */
44
44
  #deprecated "Use Azure.ResourceManager.TrackedResourceOperations instead"
45
45
  interface ResourceOperations<
46
- Resource extends ArmResource,
46
+ Resource extends Foundations.Resource,
47
47
  Properties extends TypeSpec.Reflection.Model,
48
48
  BaseParameters = DefaultBaseParameters<Resource>
49
49
  > extends TrackedResourceOperations<Resource, Properties, BaseParameters> {}
@@ -59,7 +59,7 @@ interface ResourceOperations<
59
59
  *
60
60
  */
61
61
  interface TrackedResourceOperations<
62
- Resource extends ArmResource,
62
+ Resource extends Foundations.Resource,
63
63
  Properties extends TypeSpec.Reflection.Model,
64
64
  BaseParameters = DefaultBaseParameters<Resource>
65
65
  >
@@ -79,7 +79,7 @@ interface TrackedResourceOperations<
79
79
  */
80
80
  #suppress "deprecated" "This should be deprecated in a future release"
81
81
  interface ProxyResourceOperations<
82
- Resource extends ArmResource,
82
+ Resource extends Foundations.Resource,
83
83
  BaseParameters = DefaultBaseParameters<Resource>
84
84
  >
85
85
  extends ResourceRead<Resource, BaseParameters>,
@@ -100,7 +100,7 @@ interface ProxyResourceOperations<
100
100
  */
101
101
  #suppress "deprecated" "This should be deprecated in a future release"
102
102
  interface TenantResourceOperations<
103
- Resource extends ArmResource,
103
+ Resource extends Foundations.Resource,
104
104
  Properties extends TypeSpec.Reflection.Model
105
105
  >
106
106
  extends TenantResourceRead<Resource>,
@@ -118,7 +118,7 @@ interface TenantResourceOperations<
118
118
  */
119
119
  #suppress "deprecated" "This should be deprecated in a future release"
120
120
  interface ResourceInstanceOperations<
121
- Resource extends ArmResource,
121
+ Resource extends Foundations.Resource,
122
122
  Properties extends TypeSpec.Reflection.Model,
123
123
  BaseParameters = DefaultBaseParameters<Resource>,
124
124
  PatchModel = ResourceUpdateModel<Resource, Properties>
@@ -134,7 +134,7 @@ interface ResourceInstanceOperations<
134
134
  * @template BaseParameters The http parameters that are part of the request
135
135
  */
136
136
  interface ResourceCollectionOperations<
137
- Resource extends ArmResource,
137
+ Resource extends Foundations.Resource,
138
138
  BaseParameters = DefaultBaseParameters<Resource>
139
139
  > extends ResourceListByParent<Resource, BaseParameters>, ResourceListBySubscription<Resource> {}
140
140
 
@@ -142,7 +142,7 @@ interface ResourceCollectionOperations<
142
142
  * An interface for resources with can be listed by subscription.
143
143
  * @template Resource The ArmResource that provides these operations
144
144
  */
145
- interface ResourceListBySubscription<Resource extends ArmResource> {
145
+ interface ResourceListBySubscription<Resource extends Foundations.Resource> {
146
146
  /**
147
147
  * @dev List resources by subscription.
148
148
  * @template Resource The ArmResource to list.
@@ -158,7 +158,7 @@ interface ResourceListBySubscription<Resource extends ArmResource> {
158
158
  * @template ParentFriendlyName The friendly name of the parent resource
159
159
  */
160
160
  interface ResourceListByParent<
161
- Resource extends ArmResource,
161
+ Resource extends Foundations.Resource,
162
162
  BaseParameters = DefaultBaseParameters<Resource>,
163
163
  ParentName extends valueof string = "",
164
164
  ParentFriendlyName extends valueof string = ""
@@ -179,7 +179,7 @@ interface ResourceListByParent<
179
179
  * @template BaseParameters The http parameters that are part of the request
180
180
  */
181
181
  interface ResourceRead<
182
- Resource extends ArmResource,
182
+ Resource extends Foundations.Resource,
183
183
  BaseParameters = DefaultBaseParameters<Resource>
184
184
  > {
185
185
  /**
@@ -196,7 +196,7 @@ interface ResourceRead<
196
196
  * @template BaseParameters The http parameters that are part of the request
197
197
  */
198
198
  interface ResourceCreateSync<
199
- Resource extends ArmResource,
199
+ Resource extends Foundations.Resource,
200
200
  BaseParameters = DefaultBaseParameters<Resource>
201
201
  > {
202
202
  /**
@@ -213,7 +213,7 @@ interface ResourceCreateSync<
213
213
  * @template BaseParameters The http parameters that are part of the request
214
214
  */
215
215
  interface ResourceCreateAsync<
216
- Resource extends ArmResource,
216
+ Resource extends Foundations.Resource,
217
217
  BaseParameters = DefaultBaseParameters<Resource>
218
218
  > {
219
219
  /**
@@ -233,7 +233,7 @@ interface ResourceCreateAsync<
233
233
  #deprecated "This should be deprecated in a future release"
234
234
  @doc("Delete a resource using the asynchronous call pattern")
235
235
  interface ResourceDeleteAsync<
236
- Resource extends ArmResource,
236
+ Resource extends Foundations.Resource,
237
237
  BaseParameters = DefaultBaseParameters<Resource>
238
238
  > {
239
239
  /**
@@ -251,7 +251,7 @@ interface ResourceDeleteAsync<
251
251
  */
252
252
  @doc("Delete a resource using the asynchronous call pattern")
253
253
  interface ResourceDeleteWithoutOkAsync<
254
- Resource extends ArmResource,
254
+ Resource extends Foundations.Resource,
255
255
  BaseParameters = DefaultBaseParameters<Resource>
256
256
  > {
257
257
  /**
@@ -269,7 +269,7 @@ interface ResourceDeleteWithoutOkAsync<
269
269
  */
270
270
  @doc("Delete a resource")
271
271
  interface ResourceDeleteSync<
272
- Resource extends ArmResource,
272
+ Resource extends Foundations.Resource,
273
273
  BaseParameters = DefaultBaseParameters<Resource>
274
274
  > {
275
275
  /**
@@ -288,7 +288,7 @@ interface ResourceDeleteSync<
288
288
  */
289
289
  @doc("Asynchronous resource update")
290
290
  interface ResourceUpdateAsync<
291
- Resource extends ArmResource,
291
+ Resource extends Foundations.Resource,
292
292
  Properties extends TypeSpec.Reflection.Model,
293
293
  BaseParameters = DefaultBaseParameters<Resource>
294
294
  > {
@@ -313,7 +313,7 @@ interface ResourceUpdateAsync<
313
313
  */
314
314
  @doc("Synchronous resource update")
315
315
  interface ResourceUpdateSync<
316
- Resource extends ArmResource,
316
+ Resource extends Foundations.Resource,
317
317
  Properties extends TypeSpec.Reflection.Model,
318
318
  BaseParameters = DefaultBaseParameters<Resource>
319
319
  > {
@@ -333,7 +333,7 @@ interface ResourceUpdateSync<
333
333
  */
334
334
  #suppress "deprecated" "This should be deprecated in a future release"
335
335
  interface ExtensionResourceInstanceOperations<
336
- Resource extends ArmResource,
336
+ Resource extends Foundations.Resource,
337
337
  Properties extends TypeSpec.Reflection.Model
338
338
  >
339
339
  extends ExtensionResourceRead<Resource>,
@@ -345,7 +345,7 @@ interface ExtensionResourceInstanceOperations<
345
345
  * A composite interface for resource collections that include a paginated list operation.
346
346
  * @template Resource The ArmResource that provides these operations
347
347
  */
348
- interface ExtensionResourceCollectionOperations<Resource extends ArmResource>
348
+ interface ExtensionResourceCollectionOperations<Resource extends Foundations.Resource>
349
349
  extends ExtensionResourceList<Resource> {}
350
350
 
351
351
  /**
@@ -354,84 +354,84 @@ interface ExtensionResourceCollectionOperations<Resource extends ArmResource>
354
354
  * @template Properties RP-specific property bag for the resource
355
355
  */
356
356
  interface ExtensionResourceOperations<
357
- Resource extends ArmResource,
357
+ Resource extends Foundations.Resource,
358
358
  Properties extends TypeSpec.Reflection.Model
359
359
  >
360
360
  extends ExtensionResourceInstanceOperations<Resource, Properties>,
361
361
  ExtensionResourceCollectionOperations<Resource> {}
362
362
 
363
363
  alias ResourceCreate<
364
- Resource extends ArmResource,
364
+ Resource extends Foundations.Resource,
365
365
  BaseParameters = DefaultBaseParameters<Resource>
366
366
  > = ResourceCreateAsync<Resource, BaseParameters>;
367
367
 
368
368
  alias ResourceUpdate<
369
- Resource extends ArmResource,
369
+ Resource extends Foundations.Resource,
370
370
  Properties extends TypeSpec.Reflection.Model,
371
371
  BaseParameters = DefaultBaseParameters<Resource>
372
372
  > = ResourceUpdateSync<Resource, Properties, BaseParameters>;
373
373
 
374
374
  #suppress "deprecated" "This should be deprecated in a future release"
375
375
  alias ResourceDelete<
376
- Resource extends ArmResource,
376
+ Resource extends Foundations.Resource,
377
377
  BaseParameters = DefaultBaseParameters<Resource>
378
378
  > = ResourceDeleteAsync<Resource, BaseParameters>;
379
379
 
380
380
  alias ProxyResourceUpdate<
381
- Resource extends ArmResource,
381
+ Resource extends Foundations.Resource,
382
382
  Properties extends TypeSpec.Reflection.Model
383
383
  > = ResourceUpdate<Resource, Properties>;
384
384
 
385
- alias ExtensionResourceRead<Resource extends ArmResource> = ResourceRead<
385
+ alias ExtensionResourceRead<Resource extends Foundations.Resource> = ResourceRead<
386
386
  Resource,
387
387
  ExtensionBaseParameters
388
388
  >;
389
389
 
390
- alias ExtensionResourceCreate<Resource extends ArmResource> = ResourceCreate<
390
+ alias ExtensionResourceCreate<Resource extends Foundations.Resource> = ResourceCreate<
391
391
  Resource,
392
392
  ExtensionBaseParameters
393
393
  >;
394
394
 
395
395
  alias ExtensionResourceUpdate<
396
- Resource extends ArmResource,
396
+ Resource extends Foundations.Resource,
397
397
  Properties extends TypeSpec.Reflection.Model
398
398
  > = ResourceUpdate<Resource, Properties, ExtensionBaseParameters>;
399
399
 
400
400
  #suppress "deprecated" "This should be deprecated in a future release"
401
- alias ExtensionResourceDelete<Resource extends ArmResource> = ResourceDelete<
401
+ alias ExtensionResourceDelete<Resource extends Foundations.Resource> = ResourceDelete<
402
402
  Resource,
403
403
  ExtensionBaseParameters
404
404
  >;
405
405
 
406
- alias ExtensionResourceList<Resource extends ArmResource> = ResourceListByParent<
406
+ alias ExtensionResourceList<Resource extends Foundations.Resource> = ResourceListByParent<
407
407
  Resource,
408
408
  ExtensionBaseParameters,
409
409
  "Extension",
410
410
  "parent"
411
411
  >;
412
412
 
413
- alias TenantResourceRead<Resource extends ArmResource> = ResourceRead<
413
+ alias TenantResourceRead<Resource extends Foundations.Resource> = ResourceRead<
414
414
  Resource,
415
415
  TenantBaseParameters
416
416
  >;
417
417
 
418
- alias TenantResourceCreate<Resource extends ArmResource> = ResourceCreateAsync<
418
+ alias TenantResourceCreate<Resource extends Foundations.Resource> = ResourceCreateAsync<
419
419
  Resource,
420
420
  TenantBaseParameters
421
421
  >;
422
422
 
423
423
  #suppress "deprecated" "This should be deprecated in a future release"
424
- alias TenantResourceDelete<Resource extends ArmResource> = ResourceDelete<
424
+ alias TenantResourceDelete<Resource extends Foundations.Resource> = ResourceDelete<
425
425
  Resource,
426
426
  TenantBaseParameters
427
427
  >;
428
428
 
429
429
  alias TenantResourceUpdate<
430
- Resource extends ArmResource,
430
+ Resource extends Foundations.Resource,
431
431
  Properties extends TypeSpec.Reflection.Model
432
432
  > = ResourceUpdate<Resource, Properties, TenantBaseParameters>;
433
433
 
434
- alias TenantResourceListByParent<Resource extends ArmResource> = ResourceListByParent<
434
+ alias TenantResourceListByParent<Resource extends Foundations.Resource> = ResourceListByParent<
435
435
  Resource,
436
436
  TenantBaseParameters,
437
437
  "Tenant",
package/lib/models.tsp CHANGED
@@ -7,6 +7,28 @@ using Azure.ResourceManager.Private;
7
7
 
8
8
  namespace Azure.ResourceManager;
9
9
 
10
+ /**
11
+ * Spread this model into ARM resource models to specify resource name parameter for its operations. If `Resource` parameter
12
+ * is specified, the resource name will be properly camel cased and pluralized for `@key` and `@segment`
13
+ * automatically. You can also apply explicit override with `KeyName` and `SegmentName` template parameters.
14
+ * @template Resource The ARM resource this name parameter is applying to.
15
+ * @template KeyName Override default key name of the resource.
16
+ * @template SegmentName Override default segment name of the resource.
17
+ * @template NamePattern The RegEx pattern of the name. Default is `^[a-zA-Z0-9-]{3,24}$`.
18
+ */
19
+ model ResourceNameParameter<
20
+ Resource extends Foundations.Resource,
21
+ KeyName extends valueof string = "",
22
+ SegmentName extends valueof string = "",
23
+ NamePattern extends valueof string = "^[a-zA-Z0-9-]{3,24}$"
24
+ > {
25
+ @doc("The name of the {name}", Resource)
26
+ @pattern(NamePattern)
27
+ @defaultResourceKeySegmentName(Resource, KeyName, SegmentName)
28
+ @path
29
+ name: string;
30
+ }
31
+
10
32
  //#region Standard Resource Operation Interfaces
11
33
  /**
12
34
  * Concrete tracked resource types can be created by aliasing this type using a specific property type.
@@ -17,7 +39,7 @@ namespace Azure.ResourceManager;
17
39
  @doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.")
18
40
  @armResourceInternal(Properties)
19
41
  @includeInapplicableMetadataInPayload(false)
20
- model TrackedResource<Properties extends {}> extends TrackedResourceBase {
42
+ model TrackedResource<Properties extends {}> extends Foundations.TrackedResource {
21
43
  @doc("The resource-specific properties for this resource.")
22
44
  @visibility("read", "create")
23
45
  @extension("x-ms-client-flatten", true)
@@ -33,7 +55,7 @@ model TrackedResource<Properties extends {}> extends TrackedResourceBase {
33
55
  @doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.")
34
56
  @armResourceInternal(Properties)
35
57
  @includeInapplicableMetadataInPayload(false)
36
- model ProxyResource<Properties extends {}> extends ProxyResourceBase {
58
+ model ProxyResource<Properties extends {}> extends Foundations.ProxyResource {
37
59
  @doc("The resource-specific properties for this resource.")
38
60
  @visibility("read", "create")
39
61
  @extension("x-ms-client-flatten", true)
@@ -50,7 +72,7 @@ model ProxyResource<Properties extends {}> extends ProxyResourceBase {
50
72
  @doc("Concrete extension resource types can be created by aliasing this type using a specific property type.")
51
73
  @armResourceInternal(Properties)
52
74
  @includeInapplicableMetadataInPayload(false)
53
- model ExtensionResource<Properties extends {}> extends ExtensionResourceBase {
75
+ model ExtensionResource<Properties extends {}> extends Foundations.ExtensionResource {
54
76
  @doc("The resource-specific properties for this resource.")
55
77
  @visibility("read", "create")
56
78
  @extension("x-ms-client-flatten", true)
@@ -150,55 +172,104 @@ model DefaultProvisioningStateProperty {
150
172
  }
151
173
 
152
174
  /**
153
- * Standard Azure Resource Manager definition of ManagedServiceIdentity
175
+ * Model representing the standard `extendedLocation` envelope property for a resource.
176
+ * Spread this model into a Resource Model, if the resource supports extended locations
177
+ *
178
+ * @example
179
+ * ```typespec
180
+ * model Employee is TrackedResource<EmployeeProperties> {
181
+ * ...ResourceNameParameter<Employee>;
182
+ * ...ExtendedLocationProperty;
183
+ * }
184
+ * ```
185
+ */
186
+ model ExtendedLocationProperty {
187
+ @visibility("read", "create")
188
+ extendedLocation?: Foundations.ExtendedLocation;
189
+ }
190
+
191
+ #deprecated "Please change ManagedServiceIdentity to ManagedServiceIdentityProperty."
192
+ alias ManagedServiceIdentity = ManagedServiceIdentityProperty;
193
+
194
+ /**
195
+ * Model representing the standard `ManagedServiceIdentity` envelope property for a resource.
196
+ * Spread this model into a resource model if the resource supports both system-assigned and user-assigned managed identities.
197
+ *
198
+ * @example
199
+ *
200
+ * ```typespec
201
+ * model Foo is TrackedResource<FooProperties> {
202
+ * ...ResourceNameParameter<Foo>;
203
+ * ...ManagedServiceIdentityProperty;
204
+ * }
205
+ * ```
154
206
  */
155
207
  @doc("The managed service identities envelope.")
156
- model ManagedServiceIdentity {
208
+ model ManagedServiceIdentityProperty {
157
209
  @doc("The managed service identities assigned to this resource.")
158
- identity?: ManagedIdentityProperties;
210
+ identity?: Foundations.ManagedServiceIdentity;
159
211
  }
160
212
 
213
+ #deprecated "Please change ManagedSystemAssignedIdentity to ManagedSystemAssignedIdentityProperty."
214
+ alias ManagedSystemAssignedIdentity = ManagedSystemAssignedIdentityProperty;
161
215
  /**
162
- * Standard Azure Resource Manager definition of ManagedServiceIdentity for services
163
- * that only support system-defined identities
216
+ * Model representing the standard `SystemAssignedServiceIdentity` envelope property for a resource.
217
+ * Spread this model into a resource model if the resource supports system-assigned managed identities
218
+ * but does not support user-assigned managed identities.
219
+ *
220
+ * @example
221
+ *
222
+ * ```typespec
223
+ * model Foo is TrackedResource<FooProperties> {
224
+ * ...ResourceNameParameter<Foo>;
225
+ * ...ManagedSystemAssignedIdentityProperty;
226
+ * }
227
+ * ```
164
228
  */
165
229
  @doc("Managed identity for services that are constrained to system-assigned managed identities.")
166
- model ManagedSystemAssignedIdentity {
230
+ model ManagedSystemAssignedIdentityProperty {
167
231
  @doc("The managed service identities assigned to this resource.")
168
- identity?: ManagedSystemIdentityProperties;
232
+ identity?: Foundations.SystemAssignedServiceIdentity;
169
233
  }
170
234
 
235
+ #deprecated "`EntityTag` will be deprecated. Please use `EntityTagProperty` instead."
236
+ alias EntityTag = EntityTagProperty;
171
237
  /**
172
238
  * Model used only to spread in the standard `eTag` envelope property for a resource
239
+ *
173
240
  * @example
174
241
  *
175
242
  * ```typespec
176
243
  * model Foo is TrackedResource<FooProperties> {
177
244
  * // Only have standard Succeeded, Failed, Cancelled states
178
- * ...EntityTag;
245
+ * ...EntityTagProperty;
179
246
  * }
180
247
  * ```
181
248
  */
182
249
  @doc("The eTag property envelope.")
183
- model EntityTag {
250
+ model EntityTagProperty {
184
251
  @doc("If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.")
185
252
  @visibility("read")
186
253
  eTag?: string;
187
254
  }
188
255
 
256
+ #deprecated "`ResourceKind` will be deprecated. Please use `ResourceKindProperty` instead."
257
+ alias ResourceKind = ResourceKindProperty;
189
258
  /**
190
- * Model used only to spread in the standard `kind` envelope property for a resource
259
+ * Model representing the standard `kind` envelope property for a resource.
260
+ * Spread this model into a resource model if the resource support ARM `kind`.
261
+ *
191
262
  * @example
192
263
  *
193
264
  * ```typespec
194
265
  * model Foo is TrackedResource<FooProperties> {
195
266
  * // Only have standard Succeeded, Failed, Cancelled states
196
- * ...ResourceKind;
267
+ * ...ResourceKindProperty;
197
268
  * }
198
269
  * ```
199
270
  */
200
271
  @doc("The resource kind property envelope.")
201
- model ResourceKind {
272
+ model ResourceKindProperty {
202
273
  @doc("Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.")
203
274
  @pattern("^[-\\w\\._,\\(\\\\\\)]+$")
204
275
  @visibility("read", "create")
@@ -211,55 +282,67 @@ model ResourceKind {
211
282
  */
212
283
  @doc("The response of a {name} list operation.", Resource)
213
284
  @friendlyName("{name}ListResult", Resource)
214
- model ResourceListResult<Resource extends ArmResource> is Azure.Core.Page<Resource>;
285
+ model ResourceListResult<Resource extends Foundations.Resource> is Azure.Core.Page<Resource>;
215
286
 
287
+ #deprecated "`ResourcePlan` will be deprecated. Please use `ResourcePlanProperty` instead."
288
+ alias ResourcePlan = ResourcePlanProperty;
216
289
  /**
217
- * Model used only to spread in the standard `plan` envelope property for a resource
290
+ * Model representing the standard `plan` envelope property for a resource.
291
+ * Spread this model into a resource Model if the resource supports ARM `plan`.
292
+ *
218
293
  * @example
219
294
  *
220
295
  * ```typespec
221
296
  * model Foo is TrackedResource<FooProperties> {
222
297
  * // Only have standard Succeeded, Failed, Cancelled states
223
- * ...ResourcePlan;
298
+ * ...ResourcePlanProperty;
224
299
  * }
225
300
  * ```
226
301
  */
227
302
  @doc("The resource plan property envelope.")
228
- model ResourcePlan {
303
+ model ResourcePlanProperty {
229
304
  @doc("Details of the resource plan.")
230
- plan?: ResourcePlanType;
305
+ plan?: Plan;
231
306
  }
232
307
 
308
+ #deprecated "`ResourceSku` will be deprecated. Please use `ResourceSkuProperty` instead."
309
+ alias ResourceSku = ResourceSkuProperty;
233
310
  /**
234
- * Model used only to spread in the standard `sku` envelope property for a resource
311
+ * Model representing the standard `sku` envelope property for a resource.
312
+ * Spread this model into a resource model if the resource supports standard ARM `sku`.
313
+ *
235
314
  * @example
236
315
  *
237
316
  * ```typespec
238
317
  * model Foo is TrackedResource<FooProperties> {
239
318
  * // Only have standard Succeeded, Failed, Cancelled states
240
- * ...ResourceSku;
319
+ * ...ResourceSkuProperty;
241
320
  * }
242
321
  * ```
243
322
  */
244
323
  @doc("The SKU (Stock Keeping Unit) assigned to this resource.")
245
- model ResourceSku {
324
+ model ResourceSkuProperty {
246
325
  @doc("The SKU (Stock Keeping Unit) assigned to this resource.")
247
- sku?: ResourceSkuType;
326
+ sku?: Sku;
248
327
  }
249
328
 
329
+ #deprecated "`ManagedBy` will be deprecated. Please use `ManagedByProperty` instead."
330
+ alias ManagedBy = ManagedByProperty;
250
331
  /**
251
- * Model used only to spread in the standard `managedBy` envelope property for a resource
332
+ * Model representing the standard `managedBy` envelope property for a resource.
333
+ * Spread this model into a resource model if the resource is managed by another entity.
334
+ *
252
335
  * @example
253
336
  *
254
337
  * ```typespec
255
338
  * model Foo is TrackedResource<FooProperties> {
256
339
  * // Only have standard Succeeded, Failed, Cancelled states
257
- * ...ManagedBy;
340
+ * ...ManagedByProperty;
258
341
  * }
259
342
  * ```
260
343
  */
261
344
  @doc("The managedBy property envelope.")
262
- model ManagedBy {
345
+ model ManagedByProperty {
263
346
  @doc("The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.")
264
347
  managedBy?: string;
265
348
  }