@azure-tools/typespec-azure-resource-manager 0.70.0-dev.2 → 0.70.0-dev.4
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 +43 -10
- package/dist/generated-defs/Azure.ResourceManager.d.ts +34 -24
- package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +2 -0
- package/dist/src/linter.js.map +1 -1
- 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/lib/common-types/common-types.tsp +1 -1
- package/lib/common-types/customer-managed-keys-ref.tsp +43 -0
- package/lib/common-types/nsp-operations.tsp +5 -5
- package/lib/common-types/types.tsp +2 -3
- package/lib/decorators.tsp +40 -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/private-endpoints.tsp +9 -9
- package/lib/private-links.tsp +3 -3
- package/lib/responses.tsp +17 -12
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ Available ruleSets:
|
|
|
67
67
|
| [`@azure-tools/typespec-azure-resource-manager/unsupported-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/unsupported-type) | Check for unsupported ARM types. |
|
|
68
68
|
| [`@azure-tools/typespec-azure-resource-manager/secret-prop`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/secret-prop) | RPC-v1-13: Check that property with names indicating sensitive information(e.g. contains auth, password, token, secret, etc.) are marked with @secret decorator. |
|
|
69
69
|
| [`@azure-tools/typespec-azure-resource-manager/no-empty-model`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-model) | ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience. |
|
|
70
|
+
| [`@azure-tools/typespec-azure-resource-manager/no-reserved-resource-property`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-reserved-resource-property) | Reserved property names (for example 'billingData') must not be present in a resource's property bag. The property name is matched case-insensitively. |
|
|
70
71
|
|
|
71
72
|
## Decorators
|
|
72
73
|
|
|
@@ -117,7 +118,9 @@ the version of the Azure Resource Manager common-types to use for refs in emitte
|
|
|
117
118
|
|
|
118
119
|
#### `@armLibraryNamespace`
|
|
119
120
|
|
|
120
|
-
`@armLibraryNamespace` designates a namespace as
|
|
121
|
+
`@armLibraryNamespace` designates a namespace as containing Azure Resource Manager Provider information.
|
|
122
|
+
This is used for library namespaces that define reusable ARM resource types that can be shared
|
|
123
|
+
across multiple provider specifications.
|
|
121
124
|
|
|
122
125
|
```typespec
|
|
123
126
|
@Azure.ResourceManager.armLibraryNamespace
|
|
@@ -171,8 +174,9 @@ namespace Microsoft.ContosoService;
|
|
|
171
174
|
|
|
172
175
|
#### `@armProviderNameValue`
|
|
173
176
|
|
|
174
|
-
`@
|
|
175
|
-
|
|
177
|
+
`@armProviderNameValue` sets the provider namespace value on operations.
|
|
178
|
+
It is used internally to inject the correct provider namespace path segment
|
|
179
|
+
for resource operations in auto-generated routes.
|
|
176
180
|
|
|
177
181
|
```typespec
|
|
178
182
|
@Azure.ResourceManager.armProviderNameValue
|
|
@@ -188,6 +192,11 @@ None
|
|
|
188
192
|
|
|
189
193
|
#### `@armResourceAction`
|
|
190
194
|
|
|
195
|
+
Marks the operation as a custom action on a specific Azure Resource Manager resource type.
|
|
196
|
+
This decorator associates a POST action operation with its resource,
|
|
197
|
+
identifying the semantics of the operation as a resource action over a specific resource for documentation,
|
|
198
|
+
resource validation, and use by downstream emitters.
|
|
199
|
+
|
|
191
200
|
```typespec
|
|
192
201
|
@Azure.ResourceManager.armResourceAction(resourceModel: Model, resourceName?: valueof string)
|
|
193
202
|
```
|
|
@@ -224,7 +233,9 @@ Marks the operation as being a check existence (HEAD) operation
|
|
|
224
233
|
|
|
225
234
|
#### `@armResourceCollectionAction`
|
|
226
235
|
|
|
227
|
-
Marks the operation as being a collection action
|
|
236
|
+
Marks the operation as being a collection action that is not associated with a specific resource instance.
|
|
237
|
+
Collection actions are operations that act on a resource collection rather than a single resource,
|
|
238
|
+
such as `checkNameAvailability` or provider-level actions.
|
|
228
239
|
|
|
229
240
|
```typespec
|
|
230
241
|
@Azure.ResourceManager.armResourceCollectionAction
|
|
@@ -240,6 +251,10 @@ None
|
|
|
240
251
|
|
|
241
252
|
#### `@armResourceCreateOrUpdate`
|
|
242
253
|
|
|
254
|
+
Marks the operation as a create or update (PUT) operation for a specific Azure Resource Manager resource type.
|
|
255
|
+
This decorator identifies the semantics of the operation as a CreateOrReplace lifecycle operation over a particular resource,
|
|
256
|
+
for use in documentation, resource validation, and downstream emitters.
|
|
257
|
+
|
|
243
258
|
```typespec
|
|
244
259
|
@Azure.ResourceManager.armResourceCreateOrUpdate(resourceModel: Model, resourceName?: valueof string)
|
|
245
260
|
```
|
|
@@ -257,6 +272,10 @@ None
|
|
|
257
272
|
|
|
258
273
|
#### `@armResourceDelete`
|
|
259
274
|
|
|
275
|
+
Marks the operation as a delete (DELETE) operation for a specific Azure Resource Manager resource type.
|
|
276
|
+
This decorator identifies the operation as a Delete lifecycle operation over the resource for us in documentation,
|
|
277
|
+
resource validation, and downstream emitters.
|
|
278
|
+
|
|
260
279
|
```typespec
|
|
261
280
|
@Azure.ResourceManager.armResourceDelete(resourceModel: Model, resourceName?: valueof string)
|
|
262
281
|
```
|
|
@@ -274,6 +293,10 @@ None
|
|
|
274
293
|
|
|
275
294
|
#### `@armResourceList`
|
|
276
295
|
|
|
296
|
+
Marks the operation as a list (GET collection) operation for a specific Azure Resource Manager resource type.
|
|
297
|
+
This decorator identifies the semantics of the operation as a collection list operation over a resource type and a particular scope for documentation,
|
|
298
|
+
resource validation, and downstream emitters.
|
|
299
|
+
|
|
277
300
|
```typespec
|
|
278
301
|
@Azure.ResourceManager.armResourceList(resourceModel: Model, resourceName?: valueof string)
|
|
279
302
|
```
|
|
@@ -325,6 +348,10 @@ individually tagged
|
|
|
325
348
|
|
|
326
349
|
#### `@armResourceRead`
|
|
327
350
|
|
|
351
|
+
Marks the operation as a read (GET) operation for a specific Azure Resource Manager resource type.
|
|
352
|
+
This decorator identifies the semantics of the operation as a Read lifecycle operation over a particular resource,
|
|
353
|
+
for use in documentation, resource validation, and downstream emitters.
|
|
354
|
+
|
|
328
355
|
```typespec
|
|
329
356
|
@Azure.ResourceManager.armResourceRead(resourceModel: Model, resourceName?: valueof string)
|
|
330
357
|
```
|
|
@@ -342,6 +369,10 @@ individually tagged
|
|
|
342
369
|
|
|
343
370
|
#### `@armResourceUpdate`
|
|
344
371
|
|
|
372
|
+
Marks the operation as an update (PATCH) operation for a specific Azure Resource Manager resource type.
|
|
373
|
+
This decorator identifies the operation as an Update lifecycle operation over the resource for use in documentation,
|
|
374
|
+
resource validation, and downstream emitters.
|
|
375
|
+
|
|
345
376
|
```typespec
|
|
346
377
|
@Azure.ResourceManager.armResourceUpdate(resourceModel: Model, resourceName?: valueof string)
|
|
347
378
|
```
|
|
@@ -360,7 +391,8 @@ individually tagged
|
|
|
360
391
|
#### `@armVirtualResource`
|
|
361
392
|
|
|
362
393
|
This decorator is used on Azure Resource Manager resources that are not based on
|
|
363
|
-
Azure.ResourceManager common types.
|
|
394
|
+
Azure.ResourceManager common types. It marks a model as an ARM virtual resource,
|
|
395
|
+
which is useful for defining the scope of resources used only as parents for child resources, or scopes for extension resources.
|
|
364
396
|
|
|
365
397
|
```typespec
|
|
366
398
|
@Azure.ResourceManager.armVirtualResource(provider?: valueof string)
|
|
@@ -450,10 +482,11 @@ None
|
|
|
450
482
|
|
|
451
483
|
#### `@resourceBaseType`
|
|
452
484
|
|
|
453
|
-
This decorator sets the base type of the given resource
|
|
485
|
+
This decorator sets the base type of the given resource, indicating where in the
|
|
486
|
+
Azure Resource Manager hierarchy the resource is located.
|
|
454
487
|
|
|
455
488
|
```typespec
|
|
456
|
-
@Azure.ResourceManager.resourceBaseType(
|
|
489
|
+
@Azure.ResourceManager.resourceBaseType(baseType: "Tenant" | "Subscription" | "ResourceGroup" | "Location" | "Extension")
|
|
457
490
|
```
|
|
458
491
|
|
|
459
492
|
##### Target
|
|
@@ -462,9 +495,9 @@ This decorator sets the base type of the given resource.
|
|
|
462
495
|
|
|
463
496
|
##### Parameters
|
|
464
497
|
|
|
465
|
-
| Name
|
|
466
|
-
|
|
|
467
|
-
|
|
|
498
|
+
| Name | Type | Description |
|
|
499
|
+
| -------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
500
|
+
| baseType | `"Tenant" \| "Subscription" \| "ResourceGroup" \| "Location" \| "Extension"` | The built-in parent of the resource, this can be "Tenant", "Subscription", "ResourceGroup", "Location", or "Extension" |
|
|
468
501
|
|
|
469
502
|
#### `@resourceGroupResource`
|
|
470
503
|
|
|
@@ -5,14 +5,15 @@ export interface ResourceOperationOptions {
|
|
|
5
5
|
readonly omitTags?: boolean;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Marks the operation as being a collection action
|
|
8
|
+
* Marks the operation as being a collection action that is not associated with a specific resource instance.
|
|
9
|
+
* Collection actions are operations that act on a resource collection rather than a single resource,
|
|
10
|
+
* such as `checkNameAvailability` or provider-level actions.
|
|
9
11
|
*/
|
|
10
12
|
export type ArmResourceCollectionActionDecorator = (context: DecoratorContext, target: Operation) => DecoratorValidatorCallbacks | void;
|
|
11
13
|
/**
|
|
12
|
-
* `@
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @param resource The resource to get the type of
|
|
14
|
+
* `@armProviderNameValue` sets the provider namespace value on operations.
|
|
15
|
+
* It is used internally to inject the correct provider namespace path segment
|
|
16
|
+
* for resource operations in auto-generated routes.
|
|
16
17
|
*/
|
|
17
18
|
export type ArmProviderNameValueDecorator = (context: DecoratorContext, target: Operation) => DecoratorValidatorCallbacks | void;
|
|
18
19
|
/**
|
|
@@ -44,7 +45,6 @@ export type IdentifiersDecorator = (context: DecoratorContext, entity: ModelProp
|
|
|
44
45
|
* namespace Microsoft.ContosoService;
|
|
45
46
|
* ```
|
|
46
47
|
* @param providerNamespace Provider namespace
|
|
47
|
-
* @param libraryNamespaces a library namespace containing types for this namespace
|
|
48
48
|
*/
|
|
49
49
|
export type ArmProviderNamespaceDecorator = (context: DecoratorContext, target: Namespace, providerNamespace?: string) => DecoratorValidatorCallbacks | void;
|
|
50
50
|
/**
|
|
@@ -55,7 +55,9 @@ export type ArmProviderNamespaceDecorator = (context: DecoratorContext, target:
|
|
|
55
55
|
*/
|
|
56
56
|
export type UseLibraryNamespaceDecorator = (context: DecoratorContext, target: Namespace, ...namespaces: Namespace[]) => DecoratorValidatorCallbacks | void;
|
|
57
57
|
/**
|
|
58
|
-
* `@armLibraryNamespace` designates a namespace as
|
|
58
|
+
* `@armLibraryNamespace` designates a namespace as containing Azure Resource Manager Provider information.
|
|
59
|
+
* This is used for library namespaces that define reusable ARM resource types that can be shared
|
|
60
|
+
* across multiple provider specifications.
|
|
59
61
|
*
|
|
60
62
|
* @example
|
|
61
63
|
* ```typespec
|
|
@@ -124,48 +126,55 @@ export type ResourceGroupResourceDecorator = (context: DecoratorContext, target:
|
|
|
124
126
|
*/
|
|
125
127
|
export type ExtensionResourceDecorator = (context: DecoratorContext, target: Model) => DecoratorValidatorCallbacks | void;
|
|
126
128
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
+
* Marks the operation as a custom action on a specific Azure Resource Manager resource type.
|
|
130
|
+
* This decorator associates a POST action operation with its resource,
|
|
131
|
+
* identifying the semantics of the operation as a resource action over a specific resource for documentation,
|
|
132
|
+
* resource validation, and use by downstream emitters.
|
|
129
133
|
*
|
|
130
134
|
* @param resourceModel Resource model
|
|
131
135
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
132
136
|
*/
|
|
133
137
|
export type ArmResourceActionDecorator = (context: DecoratorContext, target: Operation, resourceModel: Model, resourceName?: string) => DecoratorValidatorCallbacks | void;
|
|
134
138
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
139
|
+
* Marks the operation as a create or update (PUT) operation for a specific Azure Resource Manager resource type.
|
|
140
|
+
* This decorator identifies the semantics of the operation as a CreateOrReplace lifecycle operation over a particular resource,
|
|
141
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
137
142
|
*
|
|
138
143
|
* @param resourceModel Resource model
|
|
139
144
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
140
145
|
*/
|
|
141
146
|
export type ArmResourceCreateOrUpdateDecorator = (context: DecoratorContext, target: Operation, resourceModel: Model, resourceName?: string) => DecoratorValidatorCallbacks | void;
|
|
142
147
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
148
|
+
* Marks the operation as a read (GET) operation for a specific Azure Resource Manager resource type.
|
|
149
|
+
* This decorator identifies the semantics of the operation as a Read lifecycle operation over a particular resource,
|
|
150
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
145
151
|
*
|
|
146
152
|
* @param resourceModel Resource model
|
|
147
153
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
148
154
|
*/
|
|
149
155
|
export type ArmResourceReadDecorator = (context: DecoratorContext, target: Operation, resourceModel: Model, resourceName?: string) => DecoratorValidatorCallbacks | void;
|
|
150
156
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
157
|
+
* Marks the operation as an update (PATCH) operation for a specific Azure Resource Manager resource type.
|
|
158
|
+
* This decorator identifies the operation as an Update lifecycle operation over the resource for use in documentation,
|
|
159
|
+
* resource validation, and downstream emitters.
|
|
153
160
|
*
|
|
154
161
|
* @param resourceModel Resource model
|
|
155
162
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
156
163
|
*/
|
|
157
164
|
export type ArmResourceUpdateDecorator = (context: DecoratorContext, target: Operation, resourceModel: Model, resourceName?: string) => DecoratorValidatorCallbacks | void;
|
|
158
165
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
166
|
+
* Marks the operation as a delete (DELETE) operation for a specific Azure Resource Manager resource type.
|
|
167
|
+
* This decorator identifies the operation as a Delete lifecycle operation over the resource for us in documentation,
|
|
168
|
+
* resource validation, and downstream emitters.
|
|
161
169
|
*
|
|
162
170
|
* @param resourceModel Resource model
|
|
163
171
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
164
172
|
*/
|
|
165
173
|
export type ArmResourceDeleteDecorator = (context: DecoratorContext, target: Operation, resourceModel: Model, resourceName?: string) => DecoratorValidatorCallbacks | void;
|
|
166
174
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
175
|
+
* Marks the operation as a list (GET collection) operation for a specific Azure Resource Manager resource type.
|
|
176
|
+
* This decorator identifies the semantics of the operation as a collection list operation over a resource type and a particular scope for documentation,
|
|
177
|
+
* resource validation, and downstream emitters.
|
|
169
178
|
*
|
|
170
179
|
* @param resourceModel Resource model
|
|
171
180
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
@@ -209,18 +218,19 @@ export type ArmResourceOperationsDecorator = (context: DecoratorContext, target:
|
|
|
209
218
|
export type ArmCommonTypesVersionDecorator = (context: DecoratorContext, target: Namespace | EnumMember, version: string | EnumValue) => DecoratorValidatorCallbacks | void;
|
|
210
219
|
/**
|
|
211
220
|
* This decorator is used on Azure Resource Manager resources that are not based on
|
|
212
|
-
* Azure.ResourceManager common types.
|
|
221
|
+
* Azure.ResourceManager common types. It marks a model as an ARM virtual resource,
|
|
222
|
+
* which is useful for defining the scope of resources used only as parents for child resources, or scopes for extension resources.
|
|
213
223
|
*
|
|
214
|
-
* @param propertiesType : The type of the resource properties.
|
|
215
224
|
* @param provider Optional. The resource provider namespace for the virtual resource.
|
|
216
225
|
*/
|
|
217
226
|
export type ArmVirtualResourceDecorator = (context: DecoratorContext, target: Model, provider?: string) => DecoratorValidatorCallbacks | void;
|
|
218
227
|
/**
|
|
219
|
-
* This decorator sets the base type of the given resource
|
|
228
|
+
* This decorator sets the base type of the given resource, indicating where in the
|
|
229
|
+
* Azure Resource Manager hierarchy the resource is located.
|
|
220
230
|
*
|
|
221
|
-
* @param
|
|
231
|
+
* @param baseType The built-in parent of the resource, this can be "Tenant", "Subscription", "ResourceGroup", "Location", or "Extension"
|
|
222
232
|
*/
|
|
223
|
-
export type ResourceBaseTypeDecorator = (context: DecoratorContext, target: Model,
|
|
233
|
+
export type ResourceBaseTypeDecorator = (context: DecoratorContext, target: Model, baseType: Type) => DecoratorValidatorCallbacks | void;
|
|
224
234
|
export type AzureResourceManagerDecorators = {
|
|
225
235
|
armResourceCollectionAction: ArmResourceCollectionActionDecorator;
|
|
226
236
|
armProviderNameValue: ArmProviderNameValueDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Azure.ResourceManager.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,UAAU,EACV,SAAS,EACT,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"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C,CAAC;IAC9D,qBAAqB,EAAE,8BAA8B,CAAC;IACtD,qBAAqB,EAAE,8BAA8B,CAAC;IACtD,kBAAkB,EAAE,2BAA2B,CAAC;IAChD,gBAAgB,EAAE,yBAAyB,CAAC;CAC7C,CAAC"}
|
package/dist/src/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAqFA,eAAO,MAAM,OAAO,+CAElB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -29,6 +29,7 @@ import { lroLocationHeaderRule } from "./rules/lro-location-header.js";
|
|
|
29
29
|
import { missingXmsIdentifiersRule } from "./rules/missing-x-ms-identifiers.js";
|
|
30
30
|
import { noEmptyModel } from "./rules/no-empty-model.js";
|
|
31
31
|
import { noOverridePropsRule } from "./rules/no-override-props.js";
|
|
32
|
+
import { noReservedResourcePropertyRule } from "./rules/no-reserved-resource-property.js";
|
|
32
33
|
import { deleteOperationMissingRule } from "./rules/no-resource-delete-operation.js";
|
|
33
34
|
import { noResponseBodyRule } from "./rules/no-response-body.js";
|
|
34
35
|
import { operationsInterfaceMissingRule } from "./rules/operations-interface-missing.js";
|
|
@@ -78,6 +79,7 @@ const rules = [
|
|
|
78
79
|
unsupportedTypeRule,
|
|
79
80
|
secretProprule,
|
|
80
81
|
noEmptyModel,
|
|
82
|
+
noReservedResourcePropertyRule,
|
|
81
83
|
];
|
|
82
84
|
export const $linter = defineLinter({
|
|
83
85
|
rules,
|
package/dist/src/linter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kCAAkC,E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ACf,4BAA4B;IAC5B,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,8BAA8B;IAC9B,kCAAkC;IAClC,6BAA6B;IAC7B,mCAAmC;IACnC,8BAA8B;IAC9B,0BAA0B;IAC1B,yBAAyB;IACzB,+BAA+B;IAC/B,gCAAgC;IAChC,sBAAsB;IACtB,sBAAsB;IACtB,gCAAgC;IAChC,iBAAiB;IACjB,kBAAkB;IAClB,0BAA0B;IAC1B,uBAAuB;IACvB,cAAc;IACd,gCAAgC;IAChC,qCAAqC;IACrC,qBAAqB;IACrB,yBAAyB;IACzB,kBAAkB;IAClB,8BAA8B;IAC9B,4BAA4B;IAC5B,mBAAmB;IACnB,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,YAAY;IACZ,8BAA8B;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;CACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const noReservedResourcePropertyRule: import("@typespec/compiler").LinterRuleDefinition<"no-reserved-resource-property", {
|
|
2
|
+
readonly default: import("@typespec/compiler").CallableMessage<["propertyName", "reason"]>;
|
|
3
|
+
}, Record<string, never>>;
|
|
4
|
+
//# sourceMappingURL=no-reserved-resource-property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-reserved-resource-property.d.ts","sourceRoot":"","sources":["../../../src/rules/no-reserved-resource-property.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,8BAA8B;;yBAkCzC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRule, getProperty, paramMessage } from "@typespec/compiler";
|
|
2
|
+
import { getArmResource } from "../resource.js";
|
|
3
|
+
import { getProperties } from "./utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* Property names that are reserved and must not appear in a resource's property bag, written with
|
|
6
|
+
* their canonical casing and mapped to the reason each name is reserved. Names are matched
|
|
7
|
+
* case-insensitively. Add a new entry here to reserve an additional resource property name.
|
|
8
|
+
*/
|
|
9
|
+
const reservedProperties = new Map([
|
|
10
|
+
["billingData", "platform billing integration"],
|
|
11
|
+
]);
|
|
12
|
+
/**
|
|
13
|
+
* Case-insensitive lookup keyed by the lowercased reserved name. Both the reserved names and the
|
|
14
|
+
* resource property names are lowercased when compared, while diagnostics report the reserved name
|
|
15
|
+
* with its canonical casing.
|
|
16
|
+
*/
|
|
17
|
+
const reservedPropertiesByLowerName = new Map([...reservedProperties].map(([name, reason]) => [name.toLowerCase(), { name, reason }]));
|
|
18
|
+
export const noReservedResourcePropertyRule = createRule({
|
|
19
|
+
name: "no-reserved-resource-property",
|
|
20
|
+
description: "Reserved property names (for example 'billingData') must not be present in a resource's property bag. The property name is matched case-insensitively.",
|
|
21
|
+
severity: "warning",
|
|
22
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-reserved-resource-property",
|
|
23
|
+
messages: {
|
|
24
|
+
default: paramMessage `Property "${"propertyName"}" is not allowed in the resource property bag. This property name is reserved for ${"reason"}.`,
|
|
25
|
+
},
|
|
26
|
+
create(context) {
|
|
27
|
+
return {
|
|
28
|
+
model: (model) => {
|
|
29
|
+
const resourceModel = getArmResource(context.program, model);
|
|
30
|
+
if (resourceModel === undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const resourceProperties = getProperty(model, "properties")?.type;
|
|
34
|
+
if (resourceProperties === undefined || resourceProperties.kind !== "Model") {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
for (const property of getProperties(resourceProperties)) {
|
|
38
|
+
const reserved = reservedPropertiesByLowerName.get(property.name.toLowerCase());
|
|
39
|
+
if (reserved !== undefined) {
|
|
40
|
+
context.reportDiagnostic({
|
|
41
|
+
format: { propertyName: reserved.name, reason: reserved.reason },
|
|
42
|
+
target: property,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=no-reserved-resource-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-reserved-resource-property.js","sourceRoot":"","sources":["../../../src/rules/no-reserved-resource-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;IACjD,CAAC,aAAa,EAAE,8BAA8B,CAAC;CAChD,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAC3C,CAAC,GAAG,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CACxF,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC;IACvD,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,wJAAwJ;IAC1J,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,kHAAkH;IACvH,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,aAAa,cAAc,qFAAqF,QAAQ,GAAG;KACjJ;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC7D,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBAChC,OAAO;gBACT,CAAC;gBAED,MAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,IAAI,CAAC;gBAClE,IAAI,kBAAkB,KAAK,SAAS,IAAI,kBAAkB,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBAC5E,OAAO;gBACT,CAAC;gBAED,KAAK,MAAM,QAAQ,IAAI,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBACzD,MAAM,QAAQ,GAAG,6BAA6B,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;oBAChF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;wBAC3B,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,EAAE,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE;4BAChE,MAAM,EAAE,QAAQ;yBACjB,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import "./types-ref.tsp";
|
|
|
4
4
|
import "./managed-identity-ref.tsp";
|
|
5
5
|
import "./managed-identity-with-delegation-ref.tsp";
|
|
6
6
|
import "./private-links-ref.tsp";
|
|
7
|
-
import "./customer-managed-keys.tsp";
|
|
7
|
+
import "./customer-managed-keys-ref.tsp";
|
|
8
8
|
import "./extended-location-ref.tsp";
|
|
9
9
|
import "./internal.tsp";
|
|
10
10
|
import "./commontypes.private.decorators.tsp";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./customer-managed-keys.tsp";
|
|
2
|
+
|
|
3
|
+
using Azure.ResourceManager.CommonTypes.Private;
|
|
4
|
+
|
|
5
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
6
|
+
|
|
7
|
+
@@armCommonDefinition(
|
|
8
|
+
Encryption,
|
|
9
|
+
"encryption",
|
|
10
|
+
#{ version: Azure.ResourceManager.CommonTypes.Versions.v4, isDefault: true },
|
|
11
|
+
"customermanagedkeys.json"
|
|
12
|
+
);
|
|
13
|
+
@@armCommonDefinition(
|
|
14
|
+
Encryption,
|
|
15
|
+
"encryption",
|
|
16
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
17
|
+
"customermanagedkeys.json"
|
|
18
|
+
);
|
|
19
|
+
@@armCommonDefinition(
|
|
20
|
+
Encryption,
|
|
21
|
+
"encryption",
|
|
22
|
+
Azure.ResourceManager.CommonTypes.Versions.v6,
|
|
23
|
+
"customermanagedkeys.json"
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
@@armCommonDefinition(
|
|
27
|
+
CustomerManagedKeyEncryption,
|
|
28
|
+
"customerManagedKeyEncryption",
|
|
29
|
+
#{ version: Azure.ResourceManager.CommonTypes.Versions.v4, isDefault: true },
|
|
30
|
+
"customermanagedkeys.json"
|
|
31
|
+
);
|
|
32
|
+
@@armCommonDefinition(
|
|
33
|
+
CustomerManagedKeyEncryption,
|
|
34
|
+
"customerManagedKeyEncryption",
|
|
35
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
36
|
+
"customermanagedkeys.json"
|
|
37
|
+
);
|
|
38
|
+
@@armCommonDefinition(
|
|
39
|
+
CustomerManagedKeyEncryption,
|
|
40
|
+
"customerManagedKeyEncryption",
|
|
41
|
+
Azure.ResourceManager.CommonTypes.Versions.v6,
|
|
42
|
+
"customermanagedkeys.json"
|
|
43
|
+
);
|
|
@@ -92,7 +92,7 @@ interface NspConfigurationOperations<
|
|
|
92
92
|
ResourceParameter extends {} = NspConfigurationNameParameter<NspConfigurationKeyName>
|
|
93
93
|
> {
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* List the network security perimeter configurations to a resource
|
|
96
96
|
* @template ParentResource the parent resource of the NspConfiguration
|
|
97
97
|
* @template Resource Optional. The NspConfiguration resource being listed
|
|
98
98
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -127,7 +127,7 @@ interface NspConfigurationOperations<
|
|
|
127
127
|
>;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* List the network security parameter configuration for a resource without pagination - this should only be used for legacy operations
|
|
131
131
|
* @template ParentResource the parent resource of the NspConfiguration
|
|
132
132
|
* @template Resource Optional. The NspConfiguration resource being listed
|
|
133
133
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -162,7 +162,7 @@ interface NspConfigurationOperations<
|
|
|
162
162
|
>;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
*
|
|
165
|
+
* GET a network security perimeter configuration for a particular resource
|
|
166
166
|
* @template ParentResource the parent resource of the NspConfiguration
|
|
167
167
|
* @template Resource the NspConfiguration resource being read
|
|
168
168
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -196,7 +196,7 @@ interface NspConfigurationOperations<
|
|
|
196
196
|
>;
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
|
-
*
|
|
199
|
+
* Perform an action on a network security perimeter configuration for a particular resource
|
|
200
200
|
* @template ParentResource the parent resource of the NspConfiguration
|
|
201
201
|
* @template Request The request body type
|
|
202
202
|
* @template Response The success response for the read operation
|
|
@@ -238,7 +238,7 @@ interface NspConfigurationOperations<
|
|
|
238
238
|
): Response | Error;
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
|
-
*
|
|
241
|
+
* Perform an action on a network security perimeter configuration for a particular resource
|
|
242
242
|
* @template ParentResource the parent resource of the NspConfiguration
|
|
243
243
|
* @template Request The request body type
|
|
244
244
|
* @template Response The success response for the read operation
|
|
@@ -344,8 +344,7 @@ union createdByType {
|
|
|
344
344
|
string,
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
/**
|
|
348
|
-
@doc("")
|
|
347
|
+
/** Resource Identity Type */
|
|
349
348
|
union ResourceIdentityType {
|
|
350
349
|
SystemAssigned: "SystemAssigned",
|
|
351
350
|
}
|
|
@@ -369,7 +368,7 @@ model Identity {
|
|
|
369
368
|
type?: ResourceIdentityType;
|
|
370
369
|
}
|
|
371
370
|
|
|
372
|
-
/**
|
|
371
|
+
/** Properties of a KeyVault */
|
|
373
372
|
model KeyVaultProperties {
|
|
374
373
|
/** Key vault uri to access the encryption key. */
|
|
375
374
|
keyIdentifier?: string;
|