@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
@@ -0,0 +1,19 @@
1
+ namespace Azure.ResourceManager.Foundations;
2
+
3
+ #deprecated "Please use Foundations.Resource instead of Foundations.ArmResource"
4
+ alias ArmResource = Resource;
5
+
6
+ #deprecated "Please use Foundations.TrackedResource instead of Foundations.TrackedResourceBase"
7
+ alias TrackedResourceBase = TrackedResource;
8
+
9
+ #deprecated "Please use Foundations.ProxyResource instead of Foundations.ProxyResourceBase"
10
+ alias ProxyResourceBase = ProxyResource;
11
+
12
+ #deprecated "Please use Foundations.ProxyResource instead of Foundations.ExtensionResourceBase"
13
+ alias ExtensionResourceBase = ExtensionResource;
14
+
15
+ #deprecated "Please use Foundations.Sku instead of Foundations.ResourceSkuType"
16
+ alias ResourceSkuType = Sku;
17
+
18
+ #deprecated "Please use Foundations.Plan instead of Foundations.ResourcePlanType"
19
+ alias ResourcePlanType = Plan;
@@ -0,0 +1,21 @@
1
+ namespace Azure.ResourceManager.Foundations {
2
+ /** The complex type of the extended location. */
3
+ model ExtendedLocation {
4
+ /** The name of the extended location. */
5
+ name: string;
6
+
7
+ /** The type of the extended location. */
8
+ type: ExtendedLocationType;
9
+ }
10
+
11
+ /** The supported ExtendedLocation types. */
12
+ union ExtendedLocationType {
13
+ /** Azure Edge Zones location type */
14
+ EdgeZone: "EdgeZone",
15
+
16
+ /** Azure Custom Locations type */
17
+ CustomLocation: "CustomLocation",
18
+
19
+ string,
20
+ }
21
+ }
@@ -0,0 +1,123 @@
1
+ using Azure.ResourceManager.Private;
2
+
3
+ namespace Azure.ResourceManager.Foundations;
4
+
5
+ #deprecated "Please change ManagedIdentityProperties to ManagedServiceIdentity."
6
+ alias ManagedIdentityProperties = ManagedServiceIdentity;
7
+ /**
8
+ * The properties of the managed service identities assigned to this resource.
9
+ */
10
+ @armCommonDefinition(
11
+ "ManagedServiceIdentity",
12
+ {
13
+ version: Azure.ResourceManager.CommonTypes.Versions.v4,
14
+ isDefault: true,
15
+ },
16
+ "managedidentity.json"
17
+ )
18
+ @armCommonDefinition(
19
+ "ManagedServiceIdentity",
20
+ Azure.ResourceManager.CommonTypes.Versions.v5,
21
+ "managedidentity.json"
22
+ )
23
+ model ManagedServiceIdentity {
24
+ @doc("The Active Directory tenant id of the principal.")
25
+ @visibility("read")
26
+ tenantId?: string;
27
+
28
+ @doc("The active directory identifier of this principal.")
29
+ @visibility("read")
30
+ principalId?: string;
31
+
32
+ @doc("The type of managed identity assigned to this resource.")
33
+ type: ManagedServiceIdentityType;
34
+
35
+ @doc("The identities assigned to this resource by the user.")
36
+ userAssignedIdentities?: UserAssignedIdentities;
37
+ }
38
+
39
+ /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", */
40
+ model UserAssignedIdentities is Record<UserAssignedIdentity>;
41
+
42
+ #deprecated "Please change ManagedSystemIdentityProperties to SystemAssignedServiceIdentity."
43
+ alias ManagedSystemIdentityProperties = SystemAssignedServiceIdentity;
44
+ /**
45
+ * The properties of the service-assigned identity associated with this resource.
46
+ */
47
+ @armCommonDefinition(
48
+ "SystemAssignedServiceIdentity",
49
+ {
50
+ version: Azure.ResourceManager.CommonTypes.Versions.v4,
51
+ isDefault: true,
52
+ },
53
+ "managedidentity.json"
54
+ )
55
+ @armCommonDefinition(
56
+ "SystemAssignedServiceIdentity",
57
+ Azure.ResourceManager.CommonTypes.Versions.v5,
58
+ "managedidentity.json"
59
+ )
60
+ model SystemAssignedServiceIdentity {
61
+ @doc("The Active Directory tenant id of the principal.")
62
+ @visibility("read")
63
+ tenantId?: string;
64
+
65
+ @doc("The active directory identifier of this principal.")
66
+ @visibility("read")
67
+ principalId?: string;
68
+
69
+ @doc("The type of managed identity assigned to this resource.")
70
+ type: SystemAssignedServiceIdentityType;
71
+ }
72
+
73
+ /** Alias of ManagedServiceIdentityType for back compatability. Please change to ManagedServiceIdentityType. */
74
+ #deprecated "Please change to ManagedServiceIdentityType."
75
+ alias ManagedIdentityType = ManagedServiceIdentityType;
76
+ /**
77
+ * A managed identity assigned by the user.
78
+ */
79
+ @doc("A managed identity assigned by the user.")
80
+ model UserAssignedIdentity {
81
+ @doc("The active directory client identifier for this principal.")
82
+ clientId?: string;
83
+
84
+ @doc("The active directory identifier for this principal.")
85
+ principalId?: string;
86
+ }
87
+
88
+ /**
89
+ * The kind of managed identity assigned to this resource.
90
+ */
91
+ @doc("The kind of managed identity assigned to this resource.")
92
+ union ManagedServiceIdentityType {
93
+ @doc("No managed identity.")
94
+ None: "None",
95
+
96
+ @doc("System assigned managed identity.")
97
+ SystemAssigned: "SystemAssigned",
98
+
99
+ @doc("User assigned managed identity.")
100
+ UserAssigned: "UserAssigned",
101
+
102
+ @doc("System and user assigned managed identity.")
103
+ SystemAndUserAssigned: "SystemAssigned, UserAssigned",
104
+
105
+ string,
106
+ }
107
+
108
+ /** Alias of SystemAssignedServiceIdentityType for back compatability. Please change to SystemAssignedServiceIdentityType. */
109
+ alias ManagedSystemIdentityType = SystemAssignedServiceIdentityType;
110
+
111
+ /**
112
+ * The kind of managemed identity assigned to this resource.
113
+ */
114
+ @doc("The kind of managemed identity assigned to this resource.")
115
+ union SystemAssignedServiceIdentityType {
116
+ @doc("No managed system identity.")
117
+ None: "None",
118
+
119
+ @doc("System assigned managed system identity.")
120
+ SystemAssigned: "SystemAssigned",
121
+
122
+ string,
123
+ }
@@ -36,7 +36,7 @@ model PrivateEndpoint {
36
36
  }
37
37
 
38
38
  /** The private endpoint connection resource */
39
- model PrivateEndpointConnection extends Azure.ResourceManager.Foundations.ProxyResourceBase {
39
+ model PrivateEndpointConnection extends Azure.ResourceManager.Foundations.ProxyResource {
40
40
  /** The private endpoint connection properties */
41
41
  properties?: PrivateEndpointConnectionProperties;
42
42
  }
@@ -120,7 +120,7 @@ union PrivateEndpointServiceConnectionStatus {
120
120
  string,
121
121
  }
122
122
 
123
- model PrivateLinkResource extends Azure.ResourceManager.Foundations.ProxyResourceBase {
123
+ model PrivateLinkResource extends Azure.ResourceManager.Foundations.ProxyResource {
124
124
  /** Properties of the private link resource. */
125
125
  properties?: PrivateLinkResourceProperties;
126
126
  }
@@ -0,0 +1,452 @@
1
+ using TypeSpec.Http;
2
+ using TypeSpec.OpenAPI;
3
+ using Azure.Core;
4
+ using Azure.ResourceManager.Private;
5
+
6
+ namespace Azure.ResourceManager.Foundations;
7
+
8
+ /**
9
+ * Base model that defines common properties for all Azure Resource Manager resources.
10
+ */
11
+ @doc("Common properties for all Azure Resource Manager resources.")
12
+ model Resource {
13
+ @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")
14
+ @visibility("read")
15
+ id?: string;
16
+
17
+ @doc("The name of the resource")
18
+ @visibility("read")
19
+ name?: string;
20
+
21
+ @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"")
22
+ @visibility("read")
23
+ type?: string;
24
+
25
+ @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.")
26
+ @visibility("read")
27
+ systemData?: SystemData;
28
+ }
29
+
30
+ /** The resource model definition for an Azure Resource Manager resource with an etag. */
31
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v3)
32
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v4)
33
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v5)
34
+ model AzureEntityResource extends Resource {
35
+ /** Resource Etag. */
36
+ @visibility("read")
37
+ etag: string;
38
+ }
39
+
40
+ /**
41
+ * Standard type definition for Azure Resource Manager Tags property.
42
+ *
43
+ * It is included in the TrackedResource template definition.
44
+ */
45
+ @doc("The Azure Resource Manager Resource tags.")
46
+ model ArmTagsProperty {
47
+ @doc("Resource tags.")
48
+ tags?: Record<string>;
49
+ }
50
+
51
+ /**
52
+ * The base tracked resource.
53
+ */
54
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v3)
55
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v4)
56
+ @armCommonDefinition("TrackedResource", Azure.ResourceManager.CommonTypes.Versions.v5)
57
+ @doc("The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'")
58
+ model TrackedResource extends Resource {
59
+ @doc("The geo-location where the resource lives")
60
+ @visibility("read", "create")
61
+ location: string;
62
+
63
+ ...ArmTagsProperty;
64
+ }
65
+
66
+ /**
67
+ * The base proxy resource.
68
+ */
69
+ @doc("The base proxy resource.")
70
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v3)
71
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v4)
72
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v5)
73
+ model ProxyResource extends Resource {}
74
+
75
+ /**
76
+ * The base extension resource.
77
+ */
78
+ // Note that ProxyResource is the base definition for both kinds of resources
79
+ @doc("The base extension resource.")
80
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v3)
81
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v4)
82
+ @armCommonDefinition("ProxyResource", Azure.ResourceManager.CommonTypes.Versions.v5)
83
+ model ExtensionResource extends Resource {}
84
+
85
+ /**
86
+ * The SKU (Stock Keeping Unit) assigned to this resource.
87
+ */
88
+ @doc("The SKU (Stock Keeping Unit) assigned to this resource.")
89
+ @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v3)
90
+ @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v4)
91
+ @armCommonDefinition("Sku", Azure.ResourceManager.CommonTypes.Versions.v5)
92
+ model Sku {
93
+ @doc("The name of the SKU, usually a combination of letters and numbers, for example, 'P3'")
94
+ name: string;
95
+
96
+ @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.")
97
+ tier?: SkuTier;
98
+
99
+ @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.")
100
+ size?: string;
101
+
102
+ @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.")
103
+ family?: string;
104
+
105
+ @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.")
106
+ capacity?: int32;
107
+ }
108
+
109
+ /**
110
+ * Available service tiers for the SKU.
111
+ */
112
+ @doc("Available service tiers for the SKU.")
113
+ enum SkuTier {
114
+ @doc("The Free service tier.")
115
+ Free,
116
+
117
+ @doc("The Basic service tier.")
118
+ Basic,
119
+
120
+ @doc("The Standard service tier.")
121
+ Standard,
122
+
123
+ @doc("The Premium service tier.")
124
+ Premium,
125
+ }
126
+
127
+ /**
128
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
129
+ */
130
+ @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v3)
131
+ @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v4)
132
+ @armCommonDefinition("OperationListResult", Azure.ResourceManager.CommonTypes.Versions.v5)
133
+ @doc("""
134
+ A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
135
+ """)
136
+ model OperationListResult is Azure.Core.Page<Operation>;
137
+
138
+ /**
139
+ * Details of a REST API operation, returned from the Resource Provider Operations API
140
+ */
141
+ @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v3)
142
+ @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v4)
143
+ @armCommonDefinition("Operation", Azure.ResourceManager.CommonTypes.Versions.v5)
144
+ @doc("Details of a REST API operation, returned from the Resource Provider Operations API")
145
+ model Operation {
146
+ @doc("""
147
+ The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
148
+ """)
149
+ @visibility("read")
150
+ name?: string;
151
+
152
+ @doc("""
153
+ Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations.
154
+ """)
155
+ @visibility("read")
156
+ isDataAction?: boolean;
157
+
158
+ @doc("Localized display information for this particular operation.")
159
+ display?: OperationDisplay;
160
+
161
+ @doc("""
162
+ The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
163
+ """)
164
+ @visibility("read")
165
+ origin?: Origin;
166
+
167
+ @doc("""
168
+ Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
169
+ """)
170
+ actionType?: ActionType;
171
+ }
172
+
173
+ /**
174
+ * Localized display information for and operation.
175
+ */
176
+ @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v3)
177
+ @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v4)
178
+ @armCommonDefinition("OperationDisplay", Azure.ResourceManager.CommonTypes.Versions.v5)
179
+ @doc("Localized display information for and operation.")
180
+ model OperationDisplay {
181
+ @doc("""
182
+ The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
183
+ """)
184
+ provider?: string;
185
+
186
+ @doc("""
187
+ The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
188
+ """)
189
+ resource?: string;
190
+
191
+ @doc("""
192
+ The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
193
+ """)
194
+ operation?: string;
195
+
196
+ @doc("The short, localized friendly description of the operation; suitable for tool tips and detailed views.")
197
+ description?: string;
198
+ }
199
+
200
+ /**
201
+ * The current status of an async operation.
202
+ */
203
+ @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v3)
204
+ @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v4)
205
+ @armCommonDefinition("OperationStatusResult", Azure.ResourceManager.CommonTypes.Versions.v5)
206
+ @doc("The current status of an async operation.")
207
+ model OperationStatusResult {
208
+ @doc("Fully qualified ID for the async operation.")
209
+ id?: string;
210
+
211
+ @doc("Name of the async operation.")
212
+ name?: string;
213
+
214
+ @doc("Operation status.")
215
+ status: string;
216
+
217
+ @doc("Percent of the operation that is complete.")
218
+ @minValue(0)
219
+ @maxValue(100)
220
+ percentComplete?: int32;
221
+
222
+ @doc("The start time of the operation.")
223
+ startTime?: utcDateTime;
224
+
225
+ @doc("The end time of the operation.")
226
+ endTime?: utcDateTime;
227
+
228
+ @doc("The operations list.")
229
+ operations: OperationStatusResult[];
230
+
231
+ @doc("If present, details of the operation error.")
232
+ error?: ErrorDetail;
233
+ }
234
+
235
+ /**
236
+ * The default operationId parameter type.
237
+ */
238
+ @doc("The default operationId parameter type.")
239
+ model OperationIdParameter {
240
+ @path
241
+ @minLength(1)
242
+ @doc("The ID of an ongoing async operation.")
243
+ @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v3)
244
+ @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v4)
245
+ @armCommonParameter("OperationIdParameter", Azure.ResourceManager.CommonTypes.Versions.v5)
246
+ operationId: string;
247
+ }
248
+
249
+ /**
250
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
251
+ */
252
+ @doc("""
253
+ Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
254
+ """)
255
+ union ActionType {
256
+ @doc("Actions are for internal-only APIs.")
257
+ Internal: "Internal",
258
+
259
+ string,
260
+ }
261
+
262
+ /**
263
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
264
+ */
265
+ @doc("""
266
+ The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
267
+ """)
268
+ union Origin {
269
+ @doc("Indicates the operation is initiated by a user.")
270
+ user: "user",
271
+
272
+ @doc("Indicates the operation is initiated by a system.")
273
+ system: "system",
274
+
275
+ @doc("Indicates the operation is initiated by a user or system.")
276
+ `user,system`: "user,system",
277
+
278
+ string,
279
+ }
280
+
281
+ /**
282
+ * The error detail.
283
+ */
284
+ @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v3)
285
+ @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v4)
286
+ @armCommonDefinition("ErrorDetail", Azure.ResourceManager.CommonTypes.Versions.v5)
287
+ @doc("The error detail.")
288
+ model ErrorDetail {
289
+ @doc("The error code.")
290
+ @visibility("read")
291
+ code?: string;
292
+
293
+ @doc("The error message.")
294
+ @visibility("read")
295
+ message?: string;
296
+
297
+ @doc("The error target.")
298
+ @visibility("read")
299
+ target?: string;
300
+
301
+ @extension("x-ms-identifiers", ["message", "target"])
302
+ @doc("The error details.")
303
+ @visibility("read")
304
+ details?: ErrorDetail[];
305
+
306
+ @extension("x-ms-identifiers", ["message", "target"])
307
+ @doc("The error additional info.")
308
+ @visibility("read")
309
+ additionalInfo?: ErrorAdditionalInfo[];
310
+ }
311
+
312
+ /**
313
+ * The resource management error additional info.
314
+ */
315
+ @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v3)
316
+ @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v4)
317
+ @armCommonDefinition("ErrorAdditionalInfo", Azure.ResourceManager.CommonTypes.Versions.v5)
318
+ @doc("The resource management error additional info.")
319
+ model ErrorAdditionalInfo {
320
+ @doc("The additional info type.")
321
+ @visibility("read")
322
+ type?: string;
323
+
324
+ @doc("The additional info.")
325
+ @visibility("read")
326
+ info?: {};
327
+ }
328
+
329
+ /**
330
+ * Metadata pertaining to creation and last modification of the resource.
331
+ */
332
+ @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v3)
333
+ @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v4)
334
+ @armCommonDefinition("systemData", Azure.ResourceManager.CommonTypes.Versions.v5)
335
+ @doc("Metadata pertaining to creation and last modification of the resource.")
336
+ model SystemData {
337
+ @visibility("read")
338
+ @doc("The identity that created the resource.")
339
+ createdBy?: string;
340
+
341
+ @visibility("read")
342
+ @doc("The type of identity that created the resource.")
343
+ createdByType?: createdByType;
344
+
345
+ @visibility("read")
346
+ @doc("The type of identity that created the resource.")
347
+ createdAt?: plainDate;
348
+
349
+ @visibility("read")
350
+ @doc("The identity that last modified the resource.")
351
+ lastModifiedBy?: string;
352
+
353
+ @visibility("read")
354
+ @doc("The type of identity that last modified the resource.")
355
+ lastModifiedByType?: createdByType;
356
+
357
+ @visibility("read")
358
+ @doc("The timestamp of resource last modification (UTC)")
359
+ lastModifiedAt?: plainDate;
360
+ }
361
+
362
+ /**
363
+ * The kind of entity that created the resource.
364
+ */
365
+ // NOTE: This is how the extensible enum is named in types.json
366
+ @doc("The kind of entity that created the resource.")
367
+ union createdByType {
368
+ @doc("The entity was created by a user.")
369
+ User: "User",
370
+
371
+ @doc("The entity was created by an application.")
372
+ Application: "Application",
373
+
374
+ @doc("The entity was created by a managed identity.")
375
+ ManagedIdentity: "ManagedIdentity",
376
+
377
+ @doc("The entity was created by a key.")
378
+ Key: "Key",
379
+
380
+ string,
381
+ }
382
+
383
+ /**
384
+ * Details of the resource plan.
385
+ */
386
+ @doc("Details of the resource plan.")
387
+ @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v3)
388
+ @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v4)
389
+ @armCommonDefinition("Plan", Azure.ResourceManager.CommonTypes.Versions.v5)
390
+ model Plan {
391
+ @doc("A user defined name of the 3rd Party Artifact that is being procured.")
392
+ name: string;
393
+
394
+ @doc("The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic")
395
+ publisher: string;
396
+
397
+ @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. ")
398
+ product: string;
399
+
400
+ @doc("A publisher provided promotion code as provisioned in Data Market for the said product/artifact.")
401
+ promotionCode?: string;
402
+
403
+ @doc("The version of the desired product/artifact.")
404
+ version?: string;
405
+ }
406
+
407
+ /**
408
+ * The check availability request body.
409
+ */
410
+ @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v3)
411
+ @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v4)
412
+ @armCommonDefinition("CheckNameAvailabilityRequest", Azure.ResourceManager.CommonTypes.Versions.v5)
413
+ @doc("The check availability request body.")
414
+ model CheckNameAvailabilityRequest {
415
+ @doc("The name of the resource for which availability needs to be checked.")
416
+ name?: string;
417
+
418
+ @doc("The resource type.")
419
+ type?: string;
420
+ }
421
+
422
+ /**
423
+ * The check availability result.
424
+ */
425
+ @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v3)
426
+ @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v4)
427
+ @armCommonDefinition("CheckNameAvailabilityResponse", Azure.ResourceManager.CommonTypes.Versions.v5)
428
+ @doc("The check availability result.")
429
+ model CheckNameAvailabilityResponse {
430
+ @doc("Indicates if the resource name is available.")
431
+ nameAvailable?: boolean;
432
+
433
+ @doc("The reason why the given name is not available.")
434
+ reason?: CheckNameAvailabilityReason;
435
+
436
+ @doc("Detailed reason why the given name is not available.")
437
+ message?: string;
438
+ }
439
+
440
+ /**
441
+ * Possible reasons for a name not being available.
442
+ */
443
+ @doc("Possible reasons for a name not being available.")
444
+ union CheckNameAvailabilityReason {
445
+ @doc("Name is invalid.")
446
+ Invalid: "Invalid",
447
+
448
+ @doc("Name already exists.")
449
+ AlreadyExists: "AlreadyExists",
450
+
451
+ string,
452
+ }