@azure-tools/typespec-azure-resource-manager 0.70.0-dev.1 → 0.70.0-dev.10
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 +114 -14
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts +10 -4
- package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts +66 -25
- 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 +4 -0
- package/dist/src/linter.js.map +1 -1
- package/dist/src/resource.d.ts +5 -1
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +8 -0
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/arm-custom-resource-usage-discourage.d.ts.map +1 -1
- package/dist/src/rules/arm-custom-resource-usage-discourage.js +44 -2
- package/dist/src/rules/arm-custom-resource-usage-discourage.js.map +1 -1
- package/dist/src/rules/arm-feature-file-usage-discourage.d.ts +4 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.d.ts.map +1 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.js +24 -0
- package/dist/src/rules/arm-feature-file-usage-discourage.js.map +1 -0
- 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/dist/src/state.d.ts +1 -0
- package/dist/src/state.d.ts.map +1 -1
- package/dist/src/state.js +1 -0
- package/dist/src/state.js.map +1 -1
- package/dist/src/tsp-index.d.ts.map +1 -1
- package/dist/src/tsp-index.js +4 -1
- package/dist/src/tsp-index.js.map +1 -1
- package/lib/base-types/agent.tsp +116 -42
- package/lib/base-types/base-types.tsp +10 -4
- package/lib/common-types/common-types.tsp +1 -1
- package/lib/common-types/nsp-operations.tsp +5 -5
- package/lib/common-types/types.tsp +2 -3
- package/lib/decorators.tsp +81 -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/parameters.tsp +3 -3
- 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/lib/common-types/customer-managed-keys-ref.tsp +0 -43
package/lib/base-types/agent.tsp
CHANGED
|
@@ -183,36 +183,87 @@ model AgentPropertiesPlatform<AgentDefinitionType extends AgentDefinition> {
|
|
|
183
183
|
* exchanged between a client and an agent.
|
|
184
184
|
*/
|
|
185
185
|
model ConversationProperties {
|
|
186
|
-
/** Unique conversation identifier. Read-only (set by the service on creation). */
|
|
187
|
-
@visibility(Lifecycle.Read)
|
|
188
|
-
conversationId?: string;
|
|
189
|
-
|
|
190
186
|
/** Timestamp of when the conversation was created. Read-only. */
|
|
191
187
|
@visibility(Lifecycle.Read)
|
|
192
|
-
createdAt?:
|
|
188
|
+
createdAt?: utcDateTime;
|
|
193
189
|
}
|
|
194
190
|
|
|
195
191
|
/**
|
|
196
|
-
*
|
|
192
|
+
* The role of the author of a message item.
|
|
197
193
|
*/
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
|
|
194
|
+
enum MessageRole {
|
|
195
|
+
/** A developer-authored instruction message. */
|
|
196
|
+
Developer,
|
|
197
|
+
|
|
198
|
+
/** A message authored by the end user. */
|
|
199
|
+
User,
|
|
201
200
|
|
|
202
|
-
/**
|
|
203
|
-
|
|
201
|
+
/** A message generated by the assistant (agent). */
|
|
202
|
+
Assistant,
|
|
203
|
+
|
|
204
|
+
/** A message representing the output of a tool. */
|
|
205
|
+
Tool,
|
|
204
206
|
}
|
|
205
207
|
|
|
206
|
-
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
/**
|
|
209
|
+
* The type of an item exchanged within a conversation or produced in a response.
|
|
210
|
+
*/
|
|
211
|
+
enum ItemType {
|
|
212
|
+
/** A message authored by a developer, user, assistant, or tool. */
|
|
213
|
+
Message,
|
|
214
|
+
|
|
215
|
+
/** A function (tool) call requested by the model. */
|
|
216
|
+
FunctionCall,
|
|
217
|
+
|
|
218
|
+
/** The output produced by a function (tool) call. */
|
|
219
|
+
FunctionCallOutput,
|
|
220
|
+
|
|
221
|
+
/** A compaction item summarizing earlier conversation history. */
|
|
222
|
+
Compaction,
|
|
210
223
|
}
|
|
211
224
|
|
|
212
|
-
/**
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
225
|
+
/**
|
|
226
|
+
* A single item exchanged within a conversation.
|
|
227
|
+
*
|
|
228
|
+
* The `type` discriminator selects the item variant. Only the fields relevant to
|
|
229
|
+
* that variant are populated, so all variant-specific fields are optional:
|
|
230
|
+
* - `Message`: `role`, `content`
|
|
231
|
+
* - `FunctionCall`: `callId`, `name`, `arguments`
|
|
232
|
+
* - `FunctionCallOutput`: `callId`, `output`
|
|
233
|
+
* - `Compaction`: `summary`
|
|
234
|
+
*/
|
|
235
|
+
model ConversationItem {
|
|
236
|
+
/** Unique identifier of the item. Read-only (assigned by the service). */
|
|
237
|
+
@visibility(Lifecycle.Read)
|
|
238
|
+
id?: string;
|
|
239
|
+
|
|
240
|
+
/** The item type discriminator. Determines which variant this item represents. */
|
|
241
|
+
type: ItemType;
|
|
242
|
+
|
|
243
|
+
/** The role of the message author. Applies to `Message` items. */
|
|
244
|
+
role?: MessageRole;
|
|
245
|
+
|
|
246
|
+
/** The text content of the message. Applies to `Message` items. */
|
|
247
|
+
content?: string;
|
|
248
|
+
|
|
249
|
+
/** Identifier correlating a function call with its output. Applies to `FunctionCall` and `FunctionCallOutput` items. */
|
|
250
|
+
callId?: string;
|
|
251
|
+
|
|
252
|
+
/** The name of the function (tool) to invoke. Applies to `FunctionCall` items. */
|
|
253
|
+
name?: string;
|
|
254
|
+
|
|
255
|
+
/** Named arguments passed to the function (tool), keyed by parameter name. Applies to `FunctionCall` items. */
|
|
256
|
+
arguments?: Record<unknown>;
|
|
257
|
+
|
|
258
|
+
/** The output produced by the function (tool) call. Applies to `FunctionCallOutput` items. */
|
|
259
|
+
output?: string;
|
|
260
|
+
|
|
261
|
+
/** Summary of the compacted conversation history. Applies to `Compaction` items. */
|
|
262
|
+
summary?: string;
|
|
263
|
+
|
|
264
|
+
/** The status of the item. Read-only. */
|
|
265
|
+
@visibility(Lifecycle.Read)
|
|
266
|
+
status?: ResponseStatus;
|
|
216
267
|
}
|
|
217
268
|
|
|
218
269
|
// ============================================================================
|
|
@@ -226,24 +277,24 @@ model ConversationOutput {
|
|
|
226
277
|
union ResponseStatus {
|
|
227
278
|
/** The response completed successfully. */
|
|
228
279
|
@Azure.Core.lroSucceeded
|
|
229
|
-
Completed: "
|
|
280
|
+
Completed: "Completed",
|
|
230
281
|
|
|
231
282
|
/** The response failed. */
|
|
232
283
|
@Azure.Core.lroFailed
|
|
233
|
-
Failed: "
|
|
284
|
+
Failed: "Failed",
|
|
234
285
|
|
|
235
286
|
/** The response was cancelled. */
|
|
236
287
|
@Azure.Core.lroCanceled
|
|
237
|
-
Cancelled: "
|
|
288
|
+
Cancelled: "Cancelled",
|
|
238
289
|
|
|
239
290
|
/** The response is incomplete. */
|
|
240
|
-
Incomplete: "
|
|
291
|
+
Incomplete: "Incomplete",
|
|
241
292
|
|
|
242
293
|
/** The response is queued for execution. */
|
|
243
|
-
Queued: "
|
|
294
|
+
Queued: "Queued",
|
|
244
295
|
|
|
245
296
|
/** The response is in progress. */
|
|
246
|
-
InProgress: "
|
|
297
|
+
InProgress: "InProgress",
|
|
247
298
|
|
|
248
299
|
string,
|
|
249
300
|
}
|
|
@@ -253,13 +304,9 @@ union ResponseStatus {
|
|
|
253
304
|
* including its output, status, and usage.
|
|
254
305
|
*/
|
|
255
306
|
model ResponseProperties {
|
|
256
|
-
/** Unique response identifier. Read-only (set by the service). */
|
|
257
|
-
@visibility(Lifecycle.Read)
|
|
258
|
-
responseId?: string;
|
|
259
|
-
|
|
260
307
|
/** Timestamp of when the response was created. Read-only. */
|
|
261
308
|
@visibility(Lifecycle.Read)
|
|
262
|
-
createdAt?:
|
|
309
|
+
createdAt?: utcDateTime;
|
|
263
310
|
|
|
264
311
|
/** Model ID used to generate the response. May be specified on request to override the agent default; read-only in GET. */
|
|
265
312
|
`model`?: string;
|
|
@@ -269,39 +316,66 @@ model ResponseProperties {
|
|
|
269
316
|
status?: ResponseStatus;
|
|
270
317
|
|
|
271
318
|
/** Content input to the model. Required on create. */
|
|
272
|
-
input:
|
|
319
|
+
input: ConversationItem;
|
|
273
320
|
}
|
|
274
321
|
|
|
275
322
|
/**
|
|
276
323
|
* An item produced in the response output, such as a message or tool call.
|
|
324
|
+
*
|
|
325
|
+
* The `type` discriminator selects the item variant. Only the fields relevant to
|
|
326
|
+
* that variant are populated, so all variant-specific fields are optional:
|
|
327
|
+
* - `Message`: `role`, `content`
|
|
328
|
+
* - `FunctionCall`: `callId`, `name`, `arguments`
|
|
329
|
+
* - `FunctionCallOutput`: `callId`, `output`
|
|
330
|
+
* - `Compaction`: `summary`
|
|
277
331
|
*/
|
|
278
|
-
model
|
|
279
|
-
/** Unique identifier of the output item. */
|
|
332
|
+
model ResponseItem {
|
|
333
|
+
/** Unique identifier of the output item. Read-only. */
|
|
280
334
|
@visibility(Lifecycle.Read)
|
|
281
335
|
id?: string;
|
|
282
336
|
|
|
283
|
-
/** The
|
|
337
|
+
/** The item type discriminator. Read-only. */
|
|
284
338
|
@visibility(Lifecycle.Read)
|
|
285
|
-
type?:
|
|
339
|
+
type?: ItemType;
|
|
286
340
|
|
|
287
|
-
/** The role
|
|
341
|
+
/** The role of the message author. Applies to `Message` items. Read-only. */
|
|
288
342
|
@visibility(Lifecycle.Read)
|
|
289
|
-
role?:
|
|
343
|
+
role?: MessageRole;
|
|
290
344
|
|
|
291
|
-
/** The
|
|
345
|
+
/** The text content of the message. Applies to `Message` items. Read-only. */
|
|
292
346
|
@visibility(Lifecycle.Read)
|
|
293
|
-
|
|
347
|
+
content?: string;
|
|
294
348
|
|
|
295
|
-
/**
|
|
349
|
+
/** Identifier correlating a function call with its output. Applies to `FunctionCall` and `FunctionCallOutput` items. Read-only. */
|
|
296
350
|
@visibility(Lifecycle.Read)
|
|
297
|
-
|
|
351
|
+
callId?: string;
|
|
352
|
+
|
|
353
|
+
/** The name of the function (tool) invoked. Applies to `FunctionCall` items. Read-only. */
|
|
354
|
+
@visibility(Lifecycle.Read)
|
|
355
|
+
name?: string;
|
|
356
|
+
|
|
357
|
+
/** Named arguments passed to the function (tool), keyed by parameter name. Applies to `FunctionCall` items. Read-only. */
|
|
358
|
+
@visibility(Lifecycle.Read)
|
|
359
|
+
arguments?: Record<unknown>;
|
|
360
|
+
|
|
361
|
+
/** The output produced by the function (tool) call. Applies to `FunctionCallOutput` items. Read-only. */
|
|
362
|
+
@visibility(Lifecycle.Read)
|
|
363
|
+
output?: string;
|
|
364
|
+
|
|
365
|
+
/** Summary of the compacted conversation history. Applies to `Compaction` items. Read-only. */
|
|
366
|
+
@visibility(Lifecycle.Read)
|
|
367
|
+
summary?: string;
|
|
368
|
+
|
|
369
|
+
/** The status of the output item. Read-only. */
|
|
370
|
+
@visibility(Lifecycle.Read)
|
|
371
|
+
status?: ResponseStatus;
|
|
298
372
|
}
|
|
299
373
|
|
|
300
374
|
/** Mix-in for the output property. */
|
|
301
375
|
model ResponseOutputProperty {
|
|
302
376
|
/** Output items (messages, tool calls, etc.). Read-only. */
|
|
303
377
|
@visibility(Lifecycle.Read)
|
|
304
|
-
output:
|
|
378
|
+
output: ResponseItem[];
|
|
305
379
|
}
|
|
306
380
|
|
|
307
381
|
/** Mix-in for the previousResponseId property. */
|
|
@@ -28,12 +28,18 @@ model BaseTypeInfo {
|
|
|
28
28
|
* @example
|
|
29
29
|
*
|
|
30
30
|
* ```typespec
|
|
31
|
-
*
|
|
32
|
-
* model
|
|
33
|
-
*
|
|
34
|
-
* ...AgentToolProperty;
|
|
31
|
+
* // Agent definition and properties using the Appliance deployment model
|
|
32
|
+
* model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
|
|
33
|
+
* model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
|
|
35
34
|
* ...DefaultProvisioningStateProperty;
|
|
36
35
|
* }
|
|
36
|
+
*
|
|
37
|
+
* // The @azureBaseType decorator marks the resource as conforming to the Agent base type.
|
|
38
|
+
* // (The Agent template applies this automatically, but it can also be applied directly.)
|
|
39
|
+
* @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
|
|
40
|
+
* model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
|
|
41
|
+
* ...ResourceNameParameter<ContosoApplianceAgent>;
|
|
42
|
+
* }
|
|
37
43
|
* ```
|
|
38
44
|
*/
|
|
39
45
|
extern dec azureBaseType(target: Model, baseType: valueof BaseTypeInfo);
|
|
@@ -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
|
|
7
|
+
import "./customer-managed-keys.tsp";
|
|
8
8
|
import "./extended-location-ref.tsp";
|
|
9
9
|
import "./internal.tsp";
|
|
10
10
|
import "./commontypes.private.decorators.tsp";
|
|
@@ -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;
|
package/lib/decorators.tsp
CHANGED
|
@@ -19,7 +19,6 @@ namespace Azure.ResourceManager;
|
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
21
|
* @param providerNamespace Provider namespace
|
|
22
|
-
* @param libraryNamespaces a library namespace containing types for this namespace
|
|
23
22
|
*
|
|
24
23
|
*/
|
|
25
24
|
extern dec armProviderNamespace(target: Namespace, providerNamespace?: valueof string);
|
|
@@ -32,7 +31,9 @@ extern dec armProviderNamespace(target: Namespace, providerNamespace?: valueof s
|
|
|
32
31
|
extern dec useLibraryNamespace(target: Namespace, ...namespaces: Namespace[]);
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
* `@armLibraryNamespace` designates a namespace as
|
|
34
|
+
* `@armLibraryNamespace` designates a namespace as containing Azure Resource Manager Provider information.
|
|
35
|
+
* This is used for library namespaces that define reusable ARM resource types that can be shared
|
|
36
|
+
* across multiple provider specifications.
|
|
36
37
|
*
|
|
37
38
|
* @example
|
|
38
39
|
*
|
|
@@ -110,18 +111,25 @@ extern dec resourceGroupResource(target: Model);
|
|
|
110
111
|
extern dec extensionResource(target: Model);
|
|
111
112
|
|
|
112
113
|
/**
|
|
113
|
-
* `@
|
|
114
|
-
*
|
|
115
|
-
*
|
|
114
|
+
* `@armProviderNameValue` sets the provider namespace value on operations.
|
|
115
|
+
* It is used internally to inject the correct provider namespace path segment
|
|
116
|
+
* for resource operations in auto-generated routes.
|
|
116
117
|
*/
|
|
117
118
|
extern dec armProviderNameValue(target: Operation);
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
|
-
* Marks the operation as being a collection action
|
|
121
|
+
* Marks the operation as being a collection action that is not associated with a specific resource instance.
|
|
122
|
+
* Collection actions are operations that act on a resource collection rather than a single resource,
|
|
123
|
+
* such as `checkNameAvailability` or provider-level actions.
|
|
121
124
|
*/
|
|
122
125
|
extern dec armResourceCollectionAction(target: Operation);
|
|
123
126
|
|
|
124
127
|
/**
|
|
128
|
+
* Marks the operation as a custom action on a specific Azure Resource Manager resource type.
|
|
129
|
+
* This decorator associates a POST action operation with its resource,
|
|
130
|
+
* identifying the semantics of the operation as a resource action over a specific resource for documentation,
|
|
131
|
+
* resource validation, and use by downstream emitters.
|
|
132
|
+
*
|
|
125
133
|
* @param resourceModel Resource model
|
|
126
134
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
127
135
|
*/
|
|
@@ -132,6 +140,10 @@ extern dec armResourceAction(
|
|
|
132
140
|
);
|
|
133
141
|
|
|
134
142
|
/**
|
|
143
|
+
* Marks the operation as a create or update (PUT) operation for a specific Azure Resource Manager resource type.
|
|
144
|
+
* This decorator identifies the semantics of the operation as a CreateOrReplace lifecycle operation over a particular resource,
|
|
145
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
146
|
+
*
|
|
135
147
|
* @param resourceModel Resource model
|
|
136
148
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
137
149
|
*/
|
|
@@ -142,12 +154,20 @@ extern dec armResourceCreateOrUpdate(
|
|
|
142
154
|
);
|
|
143
155
|
|
|
144
156
|
/**
|
|
157
|
+
* Marks the operation as a read (GET) operation for a specific Azure Resource Manager resource type.
|
|
158
|
+
* This decorator identifies the semantics of the operation as a Read lifecycle operation over a particular resource,
|
|
159
|
+
* for use in documentation, resource validation, and downstream emitters.
|
|
160
|
+
*
|
|
145
161
|
* @param resourceModel Resource model
|
|
146
162
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
147
163
|
*/
|
|
148
164
|
extern dec armResourceRead(target: Operation, resourceModel: Model, resourceName?: valueof string);
|
|
149
165
|
|
|
150
166
|
/**
|
|
167
|
+
* Marks the operation as an update (PATCH) operation for a specific Azure Resource Manager resource type.
|
|
168
|
+
* This decorator identifies the operation as an Update lifecycle operation over the resource for use in documentation,
|
|
169
|
+
* resource validation, and downstream emitters.
|
|
170
|
+
*
|
|
151
171
|
* @param resourceModel Resource model
|
|
152
172
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
153
173
|
*/
|
|
@@ -158,6 +178,10 @@ extern dec armResourceUpdate(
|
|
|
158
178
|
);
|
|
159
179
|
|
|
160
180
|
/**
|
|
181
|
+
* Marks the operation as a delete (DELETE) operation for a specific Azure Resource Manager resource type.
|
|
182
|
+
* This decorator identifies the operation as a Delete lifecycle operation over the resource for us in documentation,
|
|
183
|
+
* resource validation, and downstream emitters.
|
|
184
|
+
*
|
|
161
185
|
* @param resourceModel Resource model
|
|
162
186
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
163
187
|
*/
|
|
@@ -168,6 +192,10 @@ extern dec armResourceDelete(
|
|
|
168
192
|
);
|
|
169
193
|
|
|
170
194
|
/**
|
|
195
|
+
* Marks the operation as a list (GET collection) operation for a specific Azure Resource Manager resource type.
|
|
196
|
+
* This decorator identifies the semantics of the operation as a collection list operation over a resource type and a particular scope for documentation,
|
|
197
|
+
* resource validation, and downstream emitters.
|
|
198
|
+
*
|
|
171
199
|
* @param resourceModel Resource model
|
|
172
200
|
* @param resourceName Optional. The name of the resource. If not provided, the name of the resource model will be used.
|
|
173
201
|
*/
|
|
@@ -242,21 +270,22 @@ extern dec armCommonTypesVersion(
|
|
|
242
270
|
|
|
243
271
|
/**
|
|
244
272
|
* This decorator is used on Azure Resource Manager resources that are not based on
|
|
245
|
-
* Azure.ResourceManager common types.
|
|
273
|
+
* Azure.ResourceManager common types. It marks a model as an ARM virtual resource,
|
|
274
|
+
* which is useful for defining the scope of resources used only as parents for child resources, or scopes for extension resources.
|
|
246
275
|
*
|
|
247
|
-
* @param propertiesType: The type of the resource properties.
|
|
248
276
|
* @param provider Optional. The resource provider namespace for the virtual resource.
|
|
249
277
|
*/
|
|
250
278
|
extern dec armVirtualResource(target: Model, provider?: valueof string);
|
|
251
279
|
|
|
252
280
|
/**
|
|
253
|
-
* This decorator sets the base type of the given resource
|
|
281
|
+
* This decorator sets the base type of the given resource, indicating where in the
|
|
282
|
+
* Azure Resource Manager hierarchy the resource is located.
|
|
254
283
|
*
|
|
255
|
-
* @param
|
|
284
|
+
* @param baseType The built-in parent of the resource, this can be "Tenant", "Subscription", "ResourceGroup", "Location", or "Extension"
|
|
256
285
|
*/
|
|
257
286
|
extern dec resourceBaseType(
|
|
258
287
|
target: Model,
|
|
259
|
-
|
|
288
|
+
baseType: "Tenant" | "Subscription" | "ResourceGroup" | "Location" | "Extension"
|
|
260
289
|
);
|
|
261
290
|
|
|
262
291
|
/**
|
|
@@ -274,3 +303,44 @@ extern dec resourceBaseType(
|
|
|
274
303
|
* ```
|
|
275
304
|
*/
|
|
276
305
|
extern dec identifiers(entity: ModelProperty | Array<unknown>, properties: valueof string[]);
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Options for defining a feature file and its associated output
|
|
309
|
+
*/
|
|
310
|
+
model ArmFeatureFileOptions {
|
|
311
|
+
/** The feature name */
|
|
312
|
+
featureName: string;
|
|
313
|
+
|
|
314
|
+
/** The associated file name for the features */
|
|
315
|
+
fileName: string;
|
|
316
|
+
|
|
317
|
+
/** The feature description in Swagger */
|
|
318
|
+
description: string;
|
|
319
|
+
|
|
320
|
+
/** The feature title in Swagger */
|
|
321
|
+
title?: string;
|
|
322
|
+
|
|
323
|
+
/** The feature terms of service in Swagger */
|
|
324
|
+
termsOfService?: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Decorator to define a set of feature files for splitting output
|
|
329
|
+
* @param target The service namespace
|
|
330
|
+
* @param features The enum that contains the features
|
|
331
|
+
*/
|
|
332
|
+
extern dec featureFiles(target: Namespace, features: Enum);
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Decorator to define options for a specific feature file
|
|
336
|
+
* @param target The enum member that represents the feature
|
|
337
|
+
* @param options The options for the feature file
|
|
338
|
+
*/
|
|
339
|
+
extern dec featureFileOptions(target: EnumMember, options: valueof ArmFeatureFileOptions);
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Decorator to associate a feature file with a model, interface, or namespace
|
|
343
|
+
* @param target The target to associate the feature file with
|
|
344
|
+
* @param featureName The feature to associate with the target
|
|
345
|
+
*/
|
|
346
|
+
extern dec featureFile(target: Model | Operation | Interface | Namespace, featureName: EnumMember);
|
|
@@ -176,7 +176,7 @@ op CreateOrReplaceSync<
|
|
|
176
176
|
>;
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* A long-running resource CreateOrUpdate (PUT)
|
|
180
180
|
* @template TargetResource the target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
181
181
|
* @template ExtensionResource the resource being created or replaced
|
|
182
182
|
* @template LroHeaders Optional. Allows overriding the lro headers returned on resource create
|
|
@@ -288,7 +288,7 @@ op CustomPatchSync<
|
|
|
288
288
|
>;
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
291
|
+
* Delete a resource asynchronously
|
|
292
292
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
293
293
|
* @template ExtensionResource The resource being deleted
|
|
294
294
|
* @template Response The response type for the operation
|
|
@@ -314,7 +314,7 @@ op DeleteAsyncBase<
|
|
|
314
314
|
| Error;
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
*
|
|
317
|
+
* Delete a resource asynchronously.
|
|
318
318
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
319
319
|
* @template ExtensionResource The resource being deleted
|
|
320
320
|
* @template LroHeaders Optional. Allows overriding the headers in the Accepted response
|
|
@@ -351,7 +351,7 @@ op DeleteAsync<
|
|
|
351
351
|
>;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
*
|
|
354
|
+
* Delete a resource asynchronously
|
|
355
355
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
356
356
|
* @template ExtensionResource The resource being deleted
|
|
357
357
|
* @template LroHeaders Optional. Allows overriding the headers returned in the Accepted response
|
|
@@ -444,7 +444,7 @@ op ActionAsyncBase<
|
|
|
444
444
|
): Response | Error;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
|
-
*
|
|
447
|
+
* A long-running resource action.
|
|
448
448
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
449
449
|
* @template ExtensionResource The resource being acted upon
|
|
450
450
|
* @template Request The request model for the action
|
|
@@ -459,6 +459,7 @@ op ActionAsyncBase<
|
|
|
459
459
|
@extensionResourceOperation(TargetResource, ExtensionResource, "action", OverrideResourceName)
|
|
460
460
|
@returnsDoc("Azure operation completed successfully.")
|
|
461
461
|
@enforceConstraint(ExtensionResource, Foundations.Resource)
|
|
462
|
+
@doc("")
|
|
462
463
|
op ActionAsync<
|
|
463
464
|
TargetResource extends Foundations.SimpleResource,
|
|
464
465
|
ExtensionResource extends Foundations.SimpleResource,
|
|
@@ -520,7 +521,7 @@ op ActionSync<
|
|
|
520
521
|
): Response | Error;
|
|
521
522
|
|
|
522
523
|
/**
|
|
523
|
-
*
|
|
524
|
+
* A long-running resource action that returns no content.
|
|
524
525
|
* @template TargetResource The target resource, e.g. Extension.Subscription or Extension.ManagementGroup or Extension.ResourceGroup
|
|
525
526
|
* @template ExtensionResource The resource being acted upon
|
|
526
527
|
* @template Request The request model for the action
|
|
@@ -535,6 +536,7 @@ op ActionSync<
|
|
|
535
536
|
@enforceConstraint(TargetResource, Foundations.Resource)
|
|
536
537
|
@enforceConstraint(ExtensionResource, Foundations.Resource)
|
|
537
538
|
@post
|
|
539
|
+
@doc("")
|
|
538
540
|
op ActionNoResponseContentAsync<
|
|
539
541
|
TargetResource extends Foundations.SimpleResource,
|
|
540
542
|
ExtensionResource extends Foundations.SimpleResource,
|
|
@@ -140,29 +140,37 @@ alias TenantParentScope<Resource extends Foundations.SimpleResource> = TenantSco
|
|
|
140
140
|
* Parameter model for listing a resource at the tenant scope
|
|
141
141
|
* @template Resource The type of the resource.
|
|
142
142
|
*/
|
|
143
|
-
model TenantScope<Resource extends Foundations.SimpleResource>
|
|
144
|
-
|
|
143
|
+
model TenantScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
144
|
+
Resource,
|
|
145
|
+
TenantBaseParameters
|
|
146
|
+
>;
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
149
|
* Parameter model for listing a resource at the subscription scope
|
|
148
150
|
* @template Resource The type of the resource.
|
|
149
151
|
*/
|
|
150
|
-
model SubscriptionScope<Resource extends Foundations.SimpleResource>
|
|
151
|
-
|
|
152
|
+
model SubscriptionScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
153
|
+
Resource,
|
|
154
|
+
SubscriptionBaseParameters
|
|
155
|
+
>;
|
|
152
156
|
|
|
153
157
|
/**
|
|
154
158
|
* Parameter model for listing a resource at the location scope
|
|
155
159
|
* @template Resource The type of the resource.
|
|
156
160
|
*/
|
|
157
|
-
model LocationScope<Resource extends Foundations.SimpleResource>
|
|
158
|
-
|
|
161
|
+
model LocationScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
162
|
+
Resource,
|
|
163
|
+
LocationBaseParameters
|
|
164
|
+
>;
|
|
159
165
|
|
|
160
166
|
/**
|
|
161
167
|
* Parameter model for listing an extension resource
|
|
162
168
|
* @template Resource The type of the resource.
|
|
163
169
|
*/
|
|
164
|
-
model ExtensionScope<Resource extends Foundations.SimpleResource>
|
|
165
|
-
|
|
170
|
+
model ExtensionScope<Resource extends Foundations.SimpleResource> is ResourceParentParameters<
|
|
171
|
+
Resource,
|
|
172
|
+
ExtensionBaseParameters
|
|
173
|
+
>;
|
|
166
174
|
|
|
167
175
|
/**
|
|
168
176
|
* Parameter model for listing a resource at the resource group scope
|
|
@@ -240,22 +248,24 @@ op checkNameAvailability<
|
|
|
240
248
|
): Response | ErrorResponse;
|
|
241
249
|
|
|
242
250
|
/**
|
|
243
|
-
*
|
|
251
|
+
* The base template for Azure Resource Manager GET and HEAD Operations.
|
|
244
252
|
* @template Parameters The parameter object for the operation.
|
|
245
253
|
* @template Response The response or union of responses for success.
|
|
246
254
|
* @template ErrorResponse The error response.
|
|
247
255
|
*/
|
|
256
|
+
@doc("")
|
|
248
257
|
op ArmReadOperation<Parameters extends {}, Response extends {}, ErrorResponse extends {}>(
|
|
249
258
|
...Parameters,
|
|
250
259
|
): Response | ErrorResponse;
|
|
251
260
|
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
262
|
+
* The base template for Azure Resource Manager PUT Operations.
|
|
254
263
|
* @template HttpParameters The parameter object for the operation.
|
|
255
264
|
* @template BodyParameter The body parameter
|
|
256
265
|
* @template Response The response or union of responses for success.
|
|
257
266
|
* @template ErrorResponse The error response.
|
|
258
267
|
*/
|
|
268
|
+
@doc("")
|
|
259
269
|
op ArmCreateOperation<
|
|
260
270
|
HttpParameters extends {},
|
|
261
271
|
BodyParameter extends {},
|
|
@@ -266,12 +276,13 @@ op ArmCreateOperation<
|
|
|
266
276
|
| ErrorResponse;
|
|
267
277
|
|
|
268
278
|
/**
|
|
269
|
-
*
|
|
279
|
+
* The base template for Azure Resource Manager PATCH Operations.
|
|
270
280
|
* @template HttpParameters The parameter object for the operation.
|
|
271
281
|
* @template BodyParameter The body parameter
|
|
272
282
|
* @template Response The response or union of responses for success.
|
|
273
283
|
* @template ErrorResponse The error response.
|
|
274
284
|
*/
|
|
285
|
+
@doc("")
|
|
275
286
|
op ArmUpdateOperation<
|
|
276
287
|
HttpParameters extends {},
|
|
277
288
|
BodyParameter extends {},
|