@azure-tools/typespec-azure-resource-manager 0.30.0-dev.5 → 0.30.0-dev.7
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/dist/src/operations.d.ts +2 -0
- package/dist/src/operations.d.ts.map +1 -1
- package/dist/src/operations.js +9 -0
- package/dist/src/operations.js.map +1 -1
- package/dist/src/resource.d.ts +1 -0
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +30 -1
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/core-operations.js +1 -1
- package/dist/src/rules/core-operations.js.map +1 -1
- package/lib/arm.foundations.tsp +184 -14
- package/lib/arm.tsp +3 -0
- package/lib/decorators.tsp +12 -0
- package/lib/interfaces.tsp +78 -0
- package/lib/models.tsp +80 -0
- package/lib/operations.tsp +95 -28
- package/lib/parameters.tsp +6 -0
- package/lib/responses.tsp +11 -0
- package/package.json +1 -1
package/dist/src/operations.d.ts
CHANGED
|
@@ -35,5 +35,7 @@ export declare function $armResourceDelete(context: DecoratorContext, target: Ty
|
|
|
35
35
|
export declare function $armResourceList(context: DecoratorContext, target: Type, resourceType: Type): void;
|
|
36
36
|
export declare function $armRenameListByOperation(context: DecoratorContext, entity: Type, resourceType: Type, parentTypeName?: string, parentFriendlyTypeName?: string): void;
|
|
37
37
|
export declare function $armResourceAction(context: DecoratorContext, target: Type, resourceType: Type): void;
|
|
38
|
+
export declare function $armResourceCollectionAction(context: DecoratorContext, target: Type): void;
|
|
39
|
+
export declare function isArmCollectionAction(program: Program, target: Operation): boolean;
|
|
38
40
|
export {};
|
|
39
41
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEhB,KAAK,EACL,SAAS,EACT,OAAO,EACP,IAAI,EAGL,MAAM,oBAAoB,CAAC;AA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AAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,QA6B3F;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,EACZ,YAAY,EAAE,IAAI,EAClB,cAAc,CAAC,EAAE,MAAM,EACvB,sBAAsB,CAAC,EAAE,MAAM,QAoDhC;AAkBD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,QAqC7F;AASD,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAInF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAElF"}
|
package/dist/src/operations.js
CHANGED
|
@@ -4,6 +4,7 @@ import { $actionSegment, getActionSegment, getParentResource, getSegment } from
|
|
|
4
4
|
import { createStateSymbol, reportDiagnostic } from "./lib.js";
|
|
5
5
|
import { getArmResourceInfo, getResourceBaseType, ResourceBaseType } from "./resource.js";
|
|
6
6
|
const armResourceOperationsKey = createStateSymbol("armResourceOperations");
|
|
7
|
+
const armResourceCollectionActionKey = createStateSymbol("armResourceCollectionAction");
|
|
7
8
|
function getArmResourceOperations(program, resourceType) {
|
|
8
9
|
let operations = program.stateMap(armResourceOperationsKey).get(resourceType);
|
|
9
10
|
if (!operations) {
|
|
@@ -181,4 +182,12 @@ function uncapitalize(name) {
|
|
|
181
182
|
}
|
|
182
183
|
return name[0].toLowerCase() + name.substring(1);
|
|
183
184
|
}
|
|
185
|
+
export function $armResourceCollectionAction(context, target) {
|
|
186
|
+
if (!validateDecoratorTarget(context, target, "@armResourceCollectionAction", "Operation"))
|
|
187
|
+
return;
|
|
188
|
+
context.program.stateMap(armResourceCollectionActionKey).set(target, true);
|
|
189
|
+
}
|
|
190
|
+
export function isArmCollectionAction(program, target) {
|
|
191
|
+
return program.stateMap(armResourceCollectionActionKey).get(target) === true;
|
|
192
|
+
}
|
|
184
193
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAKjB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA2C1F,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAKjB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA2C1F,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;AAC5E,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,6BAA6B,CAAC,CAA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iB;IACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;AAC/E,CAAC"}
|
package/dist/src/resource.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare function $subscriptionResource(context: DecoratorContext, entity:
|
|
|
72
72
|
export declare function $locationResource(context: DecoratorContext, entity: Type): void;
|
|
73
73
|
export declare function $resourceGroupResource(context: DecoratorContext, entity: Type): void;
|
|
74
74
|
export declare function $extensionResource(context: DecoratorContext, entity: Type): void;
|
|
75
|
+
export declare function $armProviderNameValue(context: DecoratorContext, entity: Type): void;
|
|
75
76
|
export declare function $resourceParameterBaseFor(context: DecoratorContext, entity: Type, values: Type): void;
|
|
76
77
|
export declare function $resourceBaseParametersOf(context: DecoratorContext, entity: Type, resourceType: Type): void;
|
|
77
78
|
export declare function $omitIfEmpty(context: DecoratorContext, entity: Type, propertyName: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,EAKhB,KAAK,EACL,aAAa,EACb,OAAO,EACP,IAAI,EAGL,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,qBAAqB,EAA6B,MAAM,iBAAiB,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,KAAK,CA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gB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAM5E;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAMxE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAM7E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAMzE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAS5E;AAuBD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,QAgB9F;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,EACZ,YAAY,EAAE,IAAI,QAsBnB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,QAczF;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAMT;AAgBD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,GACtB,MAAM,EAAE,GAAG,SAAS,CAEtB;AAaD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,GAAG,gBAAgB,CAYvF"}
|
package/dist/src/resource.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $tag, $visibility, getKeyName, getTags, getTypeName, validateDecoratorParamType, validateDecoratorTarget, } from "@typespec/compiler";
|
|
1
|
+
import { $tag, $visibility, getKeyName, getTags, getTypeName, isGlobalNamespace, validateDecoratorParamType, validateDecoratorTarget, } from "@typespec/compiler";
|
|
2
2
|
import { $autoRoute, getParentResource, getSegment } from "@typespec/rest";
|
|
3
3
|
import { createStateSymbol, reportDiagnostic } from "./lib.js";
|
|
4
4
|
import { getArmProviderNamespace } from "./namespace.js";
|
|
@@ -235,6 +235,35 @@ export function $extensionResource(context, entity) {
|
|
|
235
235
|
}
|
|
236
236
|
setResourceBaseType(context.program, entity, "Extension");
|
|
237
237
|
}
|
|
238
|
+
export function $armProviderNameValue(context, entity) {
|
|
239
|
+
if (!validateDecoratorTarget(context, entity, "@armProviderNameValue", "Operation"))
|
|
240
|
+
return;
|
|
241
|
+
const armProvider = getServiceNamespace(context.program, entity);
|
|
242
|
+
if (armProvider === undefined)
|
|
243
|
+
return;
|
|
244
|
+
for (const [_, property] of entity.parameters.properties) {
|
|
245
|
+
const segment = getSegment(context.program, property);
|
|
246
|
+
if (segment === "providers" && property.type.kind === "String")
|
|
247
|
+
property.type.value = armProvider;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function getServiceNamespace(program, type) {
|
|
251
|
+
var _a, _b;
|
|
252
|
+
if (type === undefined)
|
|
253
|
+
return undefined;
|
|
254
|
+
switch (type.kind) {
|
|
255
|
+
case "Operation":
|
|
256
|
+
return ((_a = getServiceNamespace(program, type.namespace)) !== null && _a !== void 0 ? _a : getServiceNamespace(program, type.interface));
|
|
257
|
+
case "Interface":
|
|
258
|
+
return getServiceNamespace(program, type.namespace);
|
|
259
|
+
case "Namespace":
|
|
260
|
+
return ((_b = getArmProviderNamespace(program, type)) !== null && _b !== void 0 ? _b : (isGlobalNamespace(program, type)
|
|
261
|
+
? undefined
|
|
262
|
+
: getServiceNamespace(program, type.namespace)));
|
|
263
|
+
default:
|
|
264
|
+
return undefined;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
238
267
|
export function $resourceParameterBaseFor(context, entity, values) {
|
|
239
268
|
if (!validateDecoratorTarget(context, entity, "@resourceParameterBaseFor", "ModelProperty")) {
|
|
240
269
|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"}
|
|
@@ -79,7 +79,7 @@ const resourceOperationDecorators = {
|
|
|
79
79
|
get: ["$armResourceRead", "$armResourceList"],
|
|
80
80
|
patch: ["$armResourceUpdate"],
|
|
81
81
|
delete: ["$armResourceDelete"],
|
|
82
|
-
post: ["$armResourceAction"],
|
|
82
|
+
post: ["$armResourceAction", "$armResourceCollectionAction"],
|
|
83
83
|
head: [],
|
|
84
84
|
};
|
|
85
85
|
function checkPatchModel(program, operation, resourceType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-operations.js","sourceRoot":"","sources":["../../../src/rules/core-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EAEX,WAAW,EAKX,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAEhB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,iBAAiB;IACvB,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;oBAC3C,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,C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,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO;QACxE,OAAO,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/lib/arm.foundations.tsp
CHANGED
|
@@ -4,6 +4,9 @@ using TypeSpec.Versioning;
|
|
|
4
4
|
|
|
5
5
|
namespace Azure.ResourceManager.Foundations;
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
|
|
9
|
+
*/
|
|
7
10
|
@armCommonDefinition
|
|
8
11
|
@doc("""
|
|
9
12
|
A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
|
|
@@ -90,6 +93,9 @@ enum ActionType {
|
|
|
90
93
|
Internal,
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Localized display information for and operation.
|
|
98
|
+
*/
|
|
93
99
|
@armCommonDefinition
|
|
94
100
|
@doc("Localized display information for and operation.")
|
|
95
101
|
model OperationDisplay {
|
|
@@ -112,6 +118,9 @@ model OperationDisplay {
|
|
|
112
118
|
description?: string;
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The current status of an async operation.
|
|
123
|
+
*/
|
|
115
124
|
@armCommonDefinition
|
|
116
125
|
@doc("The current status of an async operation.")
|
|
117
126
|
model OperationStatusResult {
|
|
@@ -142,6 +151,9 @@ model OperationStatusResult {
|
|
|
142
151
|
error?: ErrorDetail;
|
|
143
152
|
}
|
|
144
153
|
|
|
154
|
+
/**
|
|
155
|
+
* The error detail.
|
|
156
|
+
*/
|
|
145
157
|
@armCommonDefinition
|
|
146
158
|
@doc("The error detail.")
|
|
147
159
|
model ErrorDetail {
|
|
@@ -168,6 +180,10 @@ model ErrorDetail {
|
|
|
168
180
|
additionalInfo?: ErrorAdditionalInfo[];
|
|
169
181
|
}
|
|
170
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Base parameters for a resource.
|
|
185
|
+
* @template TResource The type of the resource.
|
|
186
|
+
*/
|
|
171
187
|
@resourceBaseParametersOf(TResource)
|
|
172
188
|
model BaseParameters<TResource extends ArmResource> {
|
|
173
189
|
...ApiVersionParameter;
|
|
@@ -181,31 +197,44 @@ model BaseParameters<TResource extends ArmResource> {
|
|
|
181
197
|
...ResourceUriParameter;
|
|
182
198
|
}
|
|
183
199
|
|
|
184
|
-
|
|
200
|
+
/**
|
|
201
|
+
* The static parameters for a tenant-based resource
|
|
202
|
+
*/
|
|
185
203
|
model TenantBaseParameters {
|
|
186
204
|
...ApiVersionParameter;
|
|
187
205
|
}
|
|
188
206
|
|
|
189
|
-
|
|
207
|
+
/**
|
|
208
|
+
* The static parameters for a subscription based resource
|
|
209
|
+
*/
|
|
190
210
|
model SubscriptionBaseParameters is TenantBaseParameters {
|
|
191
211
|
...SubscriptionIdParameter;
|
|
192
212
|
}
|
|
193
213
|
|
|
194
|
-
|
|
214
|
+
/**
|
|
215
|
+
* The static parameters for a location-based resource
|
|
216
|
+
*/
|
|
195
217
|
model LocationBaseParameters is SubscriptionBaseParameters {
|
|
196
218
|
...LocationParameter;
|
|
197
219
|
}
|
|
198
220
|
|
|
199
|
-
|
|
221
|
+
/**
|
|
222
|
+
* The static parameters for a resource-group based resource
|
|
223
|
+
*/
|
|
200
224
|
model ResourceGroupBaseParameters is SubscriptionBaseParameters {
|
|
201
225
|
...ResourceGroupParameter;
|
|
202
226
|
}
|
|
203
227
|
|
|
204
|
-
|
|
228
|
+
/**
|
|
229
|
+
* The static parameters for an extension resource
|
|
230
|
+
*/
|
|
205
231
|
model ExtensionBaseParameters is TenantBaseParameters {
|
|
206
232
|
...ResourceUriParameter;
|
|
207
233
|
}
|
|
208
234
|
|
|
235
|
+
/**
|
|
236
|
+
* The resource management error additional info.
|
|
237
|
+
*/
|
|
209
238
|
@armCommonDefinition
|
|
210
239
|
@doc("The resource management error additional info.")
|
|
211
240
|
model ErrorAdditionalInfo {
|
|
@@ -229,6 +258,9 @@ model ArmTagsProperty {
|
|
|
229
258
|
tags?: Record<string>;
|
|
230
259
|
}
|
|
231
260
|
|
|
261
|
+
/**
|
|
262
|
+
* The kind of entity that created the resource.
|
|
263
|
+
*/
|
|
232
264
|
// NOTE: This is how the enum is named in types.json
|
|
233
265
|
@doc("The kind of entity that created the resource.")
|
|
234
266
|
enum createdByType {
|
|
@@ -238,6 +270,9 @@ enum createdByType {
|
|
|
238
270
|
Key,
|
|
239
271
|
}
|
|
240
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Metadata pertaining to creation and last modification of the resource.
|
|
275
|
+
*/
|
|
241
276
|
@armCommonDefinition("systemData")
|
|
242
277
|
@doc("Metadata pertaining to creation and last modification of the resource.")
|
|
243
278
|
model SystemData {
|
|
@@ -266,6 +301,9 @@ model SystemData {
|
|
|
266
301
|
lastModifiedAt?: plainDate;
|
|
267
302
|
}
|
|
268
303
|
|
|
304
|
+
/**
|
|
305
|
+
* The properties of the managed service identities assigned to this resource.
|
|
306
|
+
*/
|
|
269
307
|
@armCommonDefinition("ManagedServiceIdentity", "v4", "managedidentity.json")
|
|
270
308
|
@doc("The properties of the managed service identities assigned to this resource.")
|
|
271
309
|
model ManagedIdentityProperties {
|
|
@@ -284,6 +322,9 @@ model ManagedIdentityProperties {
|
|
|
284
322
|
userAssignedIdentities?: Record<UserAssignedIdentity>;
|
|
285
323
|
}
|
|
286
324
|
|
|
325
|
+
/**
|
|
326
|
+
* The properties of the service-assigned identity associated with this resource.
|
|
327
|
+
*/
|
|
287
328
|
@armCommonDefinition("SystemAssignedServiceIdentity", "v4", "managedidentity.json")
|
|
288
329
|
@doc("The properties of the service-assigned identity associated with this resource.")
|
|
289
330
|
model ManagedSystemIdentityProperties {
|
|
@@ -299,6 +340,9 @@ model ManagedSystemIdentityProperties {
|
|
|
299
340
|
type: ManagedSystemIdentityType;
|
|
300
341
|
}
|
|
301
342
|
|
|
343
|
+
/**
|
|
344
|
+
* A managed identity assigned by the user.
|
|
345
|
+
*/
|
|
302
346
|
@doc("A managed identity assigned by the user.")
|
|
303
347
|
model UserAssignedIdentity {
|
|
304
348
|
@doc("The active directory client identifier for this principal.")
|
|
@@ -308,6 +352,9 @@ model UserAssignedIdentity {
|
|
|
308
352
|
principalId?: string;
|
|
309
353
|
}
|
|
310
354
|
|
|
355
|
+
/**
|
|
356
|
+
* The kind of managed identity assigned to this resource.
|
|
357
|
+
*/
|
|
311
358
|
@doc("The kind of managed identity assigned to this resource.")
|
|
312
359
|
enum ManagedIdentityType {
|
|
313
360
|
None,
|
|
@@ -316,21 +363,32 @@ enum ManagedIdentityType {
|
|
|
316
363
|
SystemAndUserAssigned: "SystemAssigned, UserAssigned",
|
|
317
364
|
}
|
|
318
365
|
|
|
366
|
+
/**
|
|
367
|
+
* The kind of managemed identity assigned to this resource.
|
|
368
|
+
*/
|
|
319
369
|
@doc("The kind of managemed identity assigned to this resource.")
|
|
320
370
|
enum ManagedSystemIdentityType {
|
|
321
371
|
None,
|
|
322
372
|
SystemAssigned,
|
|
323
373
|
}
|
|
324
374
|
|
|
325
|
-
|
|
326
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Defines a properties type used to create named resource update models.
|
|
377
|
+
* This type is not used directly, it is referenced by ResourceUpdateModel.
|
|
378
|
+
* @template TResource The type of the resource.
|
|
379
|
+
* @template TProperties The type of the properties.
|
|
380
|
+
*/
|
|
327
381
|
@doc("The updatable properties of the {name}.", TResource)
|
|
328
382
|
@friendlyName("{name}UpdateProperties", TResource)
|
|
329
383
|
model ResourceUpdateModelProperties<TResource extends ArmResource, TProperties extends object>
|
|
330
384
|
is OptionalProperties<UpdateableProperties<TProperties>>;
|
|
331
385
|
|
|
332
|
-
|
|
333
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Defines a model type used to create named resource update models
|
|
388
|
+
* e.g. `model MyResourceUpdate is ResourceUpdate<MyResourceProperties> {}`
|
|
389
|
+
* @template TResource The type of the resource.
|
|
390
|
+
* @template TProperties The type of the properties.
|
|
391
|
+
*/
|
|
334
392
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
335
393
|
@friendlyName("{name}Update", TResource)
|
|
336
394
|
@omitIfEmpty("properties")
|
|
@@ -340,6 +398,10 @@ model ResourceUpdateModel<TResource extends ArmResource, TProperties extends obj
|
|
|
340
398
|
properties?: ResourceUpdateModelProperties<TResource, TProperties>;
|
|
341
399
|
}
|
|
342
400
|
|
|
401
|
+
/**
|
|
402
|
+
* The type used for updating tags in resources.
|
|
403
|
+
* @template TResource The type of the resource.
|
|
404
|
+
*/
|
|
343
405
|
@doc("The type used for updating tags in {name} resources.", TResource)
|
|
344
406
|
@friendlyName("{name}TagsUpdate", TResource)
|
|
345
407
|
model TagsUpdateModel<TResource extends ArmResource> {
|
|
@@ -350,25 +412,43 @@ model TagsUpdateModel<TResource extends ArmResource> {
|
|
|
350
412
|
|
|
351
413
|
alias TenantParentScope<TResource extends ArmResource> = TenantScope<TResource>;
|
|
352
414
|
|
|
353
|
-
|
|
415
|
+
/**
|
|
416
|
+
* Parameter model for listing a resource at the tenant scope
|
|
417
|
+
* @template TResource The type of the resource.
|
|
418
|
+
*/
|
|
354
419
|
model TenantScope<TResource extends ArmResource>
|
|
355
420
|
is ResourceParentParameters<TResource, TenantBaseParameters>;
|
|
356
421
|
|
|
357
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Parameter model for listing a resource at the subscription scope
|
|
424
|
+
* @template TResource The type of the resource.
|
|
425
|
+
*/
|
|
358
426
|
model SubscriptionScope<TResource extends ArmResource>
|
|
359
427
|
is ResourceParentParameters<TResource, SubscriptionBaseParameters>;
|
|
360
428
|
|
|
361
|
-
|
|
429
|
+
/**
|
|
430
|
+
* Parameter model for listing a resource at the location scope
|
|
431
|
+
* @template TResource The type of the resource.
|
|
432
|
+
*/
|
|
362
433
|
model LocationScope<TResource extends ArmResource>
|
|
363
434
|
is ResourceParentParameters<TResource, LocationBaseParameters>;
|
|
364
435
|
|
|
365
|
-
|
|
436
|
+
/**
|
|
437
|
+
* Parameter model for listing an extension resource
|
|
438
|
+
* @template TResource The type of the resource.
|
|
439
|
+
*/
|
|
366
440
|
model ExtensionScope<TResource extends ArmResource>
|
|
367
441
|
is ResourceParentParameters<TResource, ExtensionBaseParameters>;
|
|
368
442
|
|
|
369
|
-
|
|
443
|
+
/**
|
|
444
|
+
* Parameter model for listing a resource at the resource group scope
|
|
445
|
+
* @template TResource The type of the resource.
|
|
446
|
+
*/
|
|
370
447
|
model ResourceGroupScope<TResource extends ArmResource> is ResourceParentParameters<TResource>;
|
|
371
448
|
|
|
449
|
+
/**
|
|
450
|
+
* Details of the resource plan.
|
|
451
|
+
*/
|
|
372
452
|
@doc("Details of the resource plan.")
|
|
373
453
|
@armCommonDefinition("Plan")
|
|
374
454
|
model ResourcePlanType {
|
|
@@ -388,6 +468,9 @@ model ResourcePlanType {
|
|
|
388
468
|
version?: string;
|
|
389
469
|
}
|
|
390
470
|
|
|
471
|
+
/**
|
|
472
|
+
* The SKU (Stock Keeping Unit) assigned to this resource.
|
|
473
|
+
*/
|
|
391
474
|
@doc("The SKU (Stock Keeping Unit) assigned to this resource.")
|
|
392
475
|
@armCommonDefinition("Sku")
|
|
393
476
|
model ResourceSkuType {
|
|
@@ -407,6 +490,9 @@ model ResourceSkuType {
|
|
|
407
490
|
capacity?: int32;
|
|
408
491
|
}
|
|
409
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Available service tiers for the SKU.
|
|
495
|
+
*/
|
|
410
496
|
@doc("Available service tiers for the SKU.")
|
|
411
497
|
enum SkuTier {
|
|
412
498
|
Free,
|
|
@@ -415,6 +501,11 @@ enum SkuTier {
|
|
|
415
501
|
Premium,
|
|
416
502
|
}
|
|
417
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The type used for update operations of the resource.
|
|
506
|
+
* @template TResource The type of the resource.
|
|
507
|
+
* @template TProperties The type of the properties.
|
|
508
|
+
*/
|
|
418
509
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
419
510
|
@friendlyName("{name}Update", TResource)
|
|
420
511
|
model ProxyResourceUpdateModel<TResource extends ArmResource, TProperties extends object> {
|
|
@@ -455,6 +546,9 @@ model Operation {
|
|
|
455
546
|
actionType?: ActionType;
|
|
456
547
|
}
|
|
457
548
|
|
|
549
|
+
/**
|
|
550
|
+
* The default operationId parameter type.
|
|
551
|
+
*/
|
|
458
552
|
@doc("The default operationId parameter type.")
|
|
459
553
|
model OperationIdParameter {
|
|
460
554
|
@path
|
|
@@ -463,3 +557,79 @@ model OperationIdParameter {
|
|
|
463
557
|
@armCommonParameter("OperationIdParameter")
|
|
464
558
|
operationId: string;
|
|
465
559
|
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* The check availability request body.
|
|
563
|
+
*/
|
|
564
|
+
@armCommonDefinition
|
|
565
|
+
@doc("The check availability request body.")
|
|
566
|
+
model CheckNameAvailabilityRequest {
|
|
567
|
+
@doc("The name of the resource for which availability needs to be checked.")
|
|
568
|
+
name?: string;
|
|
569
|
+
|
|
570
|
+
@doc("The resource type.")
|
|
571
|
+
type?: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Possible reasons for a name not being available.
|
|
576
|
+
*/
|
|
577
|
+
@doc("Possible reasons for a name not being available.")
|
|
578
|
+
enum CheckNameAvailabilityReason {
|
|
579
|
+
Invalid,
|
|
580
|
+
AlreadyExists,
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* The check availability result.
|
|
585
|
+
*/
|
|
586
|
+
@armCommonDefinition
|
|
587
|
+
@doc("The check availability result.")
|
|
588
|
+
model CheckNameAvailabilityResponse {
|
|
589
|
+
@doc("Indicates if the resource name is available.")
|
|
590
|
+
nameAvailable?: boolean;
|
|
591
|
+
|
|
592
|
+
@doc("The reason why the given name is not available.")
|
|
593
|
+
reason?: CheckNameAvailabilityReason;
|
|
594
|
+
|
|
595
|
+
@doc("Detailed reason why the given name is not available.")
|
|
596
|
+
message?: string;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
alias DefaultProviderNamespace = {
|
|
600
|
+
@path
|
|
601
|
+
@TypeSpec.Rest.segment("providers")
|
|
602
|
+
@doc("The provider namespace for the resource.")
|
|
603
|
+
provider: "Microsoft.ThisWillBeReplaced";
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Adds check name availability operation, normally used if
|
|
608
|
+
* a resource name must be globally unique (for example, if the resource
|
|
609
|
+
* exposes an endpoint that uses the resource name in the url)
|
|
610
|
+
* @template TScopeParameters A parameter model with properties representing the scope of the resource
|
|
611
|
+
* @template TRequest The operation request body
|
|
612
|
+
* @template TResponse The operation response
|
|
613
|
+
* @template TAdditionalParams A parameter model with properties representing non-path parameters
|
|
614
|
+
*/
|
|
615
|
+
@TypeSpec.Rest.autoRoute
|
|
616
|
+
@armResourceCollectionAction
|
|
617
|
+
@armProviderNameValue
|
|
618
|
+
@doc("Implements global CheckNameAvailability operations")
|
|
619
|
+
@TypeSpec.Rest.action("checkNameAvailability")
|
|
620
|
+
@post
|
|
621
|
+
op checkNameAvailability<
|
|
622
|
+
TScopeParameters extends object,
|
|
623
|
+
TRequest extends object = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
624
|
+
TResponse extends object = CheckNameAvailabilityResponse,
|
|
625
|
+
TAdditionalParams extends object = {}
|
|
626
|
+
>(
|
|
627
|
+
...ApiVersionParameter,
|
|
628
|
+
...TScopeParameters,
|
|
629
|
+
...DefaultProviderNamespace,
|
|
630
|
+
...TAdditionalParams,
|
|
631
|
+
|
|
632
|
+
@doc("The CheckAvailability request")
|
|
633
|
+
@body
|
|
634
|
+
body: TRequest
|
|
635
|
+
): TResponse | ErrorResponse;
|
package/lib/arm.tsp
CHANGED
|
@@ -25,6 +25,9 @@ using Azure.ResourceManager.Foundations;
|
|
|
25
25
|
@versioned(Azure.ResourceManager.Versions)
|
|
26
26
|
namespace Azure.ResourceManager;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Supported versions of Azure.ResourceManager building blocks.
|
|
30
|
+
*/
|
|
28
31
|
enum Versions {
|
|
29
32
|
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
|
|
30
33
|
v1_0_Preview_1: "1.0-preview.1",
|
package/lib/decorators.tsp
CHANGED
|
@@ -85,3 +85,15 @@ extern dec resourceGroupResource(target: object);
|
|
|
85
85
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
86
86
|
*/
|
|
87
87
|
extern dec extensionResource(target: object);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* `@armResourceType` sets the value fo the decorated string
|
|
91
|
+
* property to the type of the ARM resource.
|
|
92
|
+
* @param resource The resource to get the type of
|
|
93
|
+
*/
|
|
94
|
+
extern dec armProviderNameValue(target: Operation | object);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Marks the operation as being a collection action
|
|
98
|
+
*/
|
|
99
|
+
extern dec armResourceCollectionAction(target: Operation | object);
|
package/lib/interfaces.tsp
CHANGED
|
@@ -75,6 +75,8 @@ interface TrackedResourceOperations<
|
|
|
75
75
|
* `/subscriptions/{id}/resourcegroups/{rg}/providers/Microsoft.XXX/...`
|
|
76
76
|
*
|
|
77
77
|
* This is the most common API pattern for Proxy Resources to use.
|
|
78
|
+
* @template TResource the ArmResource that provides these operations
|
|
79
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
78
80
|
*/
|
|
79
81
|
interface ProxyResourceOperations<
|
|
80
82
|
TResource extends ArmResource,
|
|
@@ -93,6 +95,8 @@ interface ProxyResourceOperations<
|
|
|
93
95
|
* `/providers/Microsoft.XXX/...`
|
|
94
96
|
*
|
|
95
97
|
* This is the most common API pattern for Tenant Resources to use.
|
|
98
|
+
* @template TResource the ArmResource that provides these operations
|
|
99
|
+
* @template TProperties RP-specific property bag for the resource
|
|
96
100
|
*/
|
|
97
101
|
interface TenantResourceOperations<TResource extends ArmResource, TProperties extends object>
|
|
98
102
|
extends TenantResourceRead<TResource>,
|
|
@@ -101,6 +105,13 @@ interface TenantResourceOperations<TResource extends ArmResource, TProperties ex
|
|
|
101
105
|
TenantResourceDelete<TResource>,
|
|
102
106
|
TenantResourceListByParent<TResource> {}
|
|
103
107
|
|
|
108
|
+
/**
|
|
109
|
+
* A composite interface for resources that have CRUD operations.
|
|
110
|
+
* @template TResource The ArmResource that provides these operations
|
|
111
|
+
* @template TProperties RP-specific property bag for the resource
|
|
112
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
113
|
+
* @template TPatchModel The model used for PATCH operations
|
|
114
|
+
*/
|
|
104
115
|
interface ResourceInstanceOperations<
|
|
105
116
|
TResource extends ArmResource,
|
|
106
117
|
TProperties extends object,
|
|
@@ -112,15 +123,31 @@ interface ResourceInstanceOperations<
|
|
|
112
123
|
ResourceUpdate<TResource, TProperties, TBaseParameters>,
|
|
113
124
|
ResourceDelete<TResource, TBaseParameters> {}
|
|
114
125
|
|
|
126
|
+
/**
|
|
127
|
+
* A composite interface for resource collections.
|
|
128
|
+
* @template TResource The ArmResource that provides these operations
|
|
129
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
130
|
+
*/
|
|
115
131
|
interface ResourceCollectionOperations<
|
|
116
132
|
TResource extends ArmResource,
|
|
117
133
|
TBaseParameters = BaseParameters<TResource>
|
|
118
134
|
> extends ResourceListByParent<TResource, TBaseParameters>, ResourceListBySubscription<TResource> {}
|
|
119
135
|
|
|
136
|
+
/**
|
|
137
|
+
* An interface for resources with can be listed by subscription.
|
|
138
|
+
* @template TResource The ArmResource that provides these operations
|
|
139
|
+
*/
|
|
120
140
|
interface ResourceListBySubscription<TResource extends ArmResource> {
|
|
121
141
|
listBySubscription is ArmListBySubscription<TResource>;
|
|
122
142
|
}
|
|
123
143
|
|
|
144
|
+
/**
|
|
145
|
+
* An interface for resources which can be listed by parent.
|
|
146
|
+
* @template TResource The ArmResource that provides these operations
|
|
147
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
148
|
+
* @template TParentName The name of the parent resource
|
|
149
|
+
* @template TParentFriendlyName The friendly name of the parent resource
|
|
150
|
+
*/
|
|
124
151
|
interface ResourceListByParent<
|
|
125
152
|
TResource extends ArmResource,
|
|
126
153
|
TBaseParameters = BaseParameters<TResource>,
|
|
@@ -135,10 +162,20 @@ interface ResourceListByParent<
|
|
|
135
162
|
>;
|
|
136
163
|
}
|
|
137
164
|
|
|
165
|
+
/**
|
|
166
|
+
* A composite interface for resources that include a GET operation.
|
|
167
|
+
* @template TResource The ArmResource that provides these operations
|
|
168
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
169
|
+
*/
|
|
138
170
|
interface ResourceRead<TResource extends ArmResource, TBaseParameters = BaseParameters<TResource>> {
|
|
139
171
|
get is ArmResourceRead<TResource, TBaseParameters>;
|
|
140
172
|
}
|
|
141
173
|
|
|
174
|
+
/**
|
|
175
|
+
* A composite interface for resources that include a synchronous create or update operation.
|
|
176
|
+
* @template TResource The ArmResource that provides these operations
|
|
177
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
178
|
+
*/
|
|
142
179
|
interface ResourceCreateSync<
|
|
143
180
|
TResource extends ArmResource,
|
|
144
181
|
TBaseParameters = BaseParameters<TResource>
|
|
@@ -146,6 +183,11 @@ interface ResourceCreateSync<
|
|
|
146
183
|
createOrUpdate is ArmResourceCreateOrUpdateSync<TResource, TBaseParameters>;
|
|
147
184
|
}
|
|
148
185
|
|
|
186
|
+
/**
|
|
187
|
+
* A composite interface for resources that include a long-running create or update operation.
|
|
188
|
+
* @template TResource The ArmResource that provides these operations
|
|
189
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
190
|
+
*/
|
|
149
191
|
interface ResourceCreateAsync<
|
|
150
192
|
TResource extends ArmResource,
|
|
151
193
|
TBaseParameters = BaseParameters<TResource>
|
|
@@ -153,6 +195,11 @@ interface ResourceCreateAsync<
|
|
|
153
195
|
createOrUpdate is ArmResourceCreateOrUpdateAsync<TResource, TBaseParameters>;
|
|
154
196
|
}
|
|
155
197
|
|
|
198
|
+
/**
|
|
199
|
+
* A composite interface for resources that include a long-running delete operation.
|
|
200
|
+
* @template TResource The ArmResource that provides these operations
|
|
201
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
202
|
+
*/
|
|
156
203
|
@doc("Delete a resource using the asynchronous call pattern")
|
|
157
204
|
interface ResourceDeleteAsync<
|
|
158
205
|
TResource extends ArmResource,
|
|
@@ -161,6 +208,11 @@ interface ResourceDeleteAsync<
|
|
|
161
208
|
delete is ArmResourceDeleteAsync<TResource, TBaseParameters>;
|
|
162
209
|
}
|
|
163
210
|
|
|
211
|
+
/**
|
|
212
|
+
* A composite interface for resources that include a synchronous delete operation.
|
|
213
|
+
* @template TResource The ArmResource that provides these operations
|
|
214
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
215
|
+
*/
|
|
164
216
|
@doc("Delete a resource")
|
|
165
217
|
interface ResourceDeleteSync<
|
|
166
218
|
TResource extends ArmResource,
|
|
@@ -169,6 +221,12 @@ interface ResourceDeleteSync<
|
|
|
169
221
|
delete is ArmResourceDeleteSync<TResource, TBaseParameters>;
|
|
170
222
|
}
|
|
171
223
|
|
|
224
|
+
/**
|
|
225
|
+
* A composite interface for resources that include a long-running update operation.
|
|
226
|
+
* @template TResource The ArmResource that provides these operations
|
|
227
|
+
* @template TProperties RP-specific property bag for the resource
|
|
228
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
229
|
+
*/
|
|
172
230
|
@doc("Asynchronous resource update")
|
|
173
231
|
interface ResourceUpdateAsync<
|
|
174
232
|
TResource extends ArmResource,
|
|
@@ -182,6 +240,12 @@ interface ResourceUpdateAsync<
|
|
|
182
240
|
>;
|
|
183
241
|
}
|
|
184
242
|
|
|
243
|
+
/**
|
|
244
|
+
* A composite interface for resources that include a synchronous update operation.
|
|
245
|
+
* @template TResource The ArmResource that provides these operations
|
|
246
|
+
* @template TProperties RP-specific property bag for the resource
|
|
247
|
+
* @template TBaseParameters The http parameters that are part of the request
|
|
248
|
+
*/
|
|
185
249
|
@doc("Synchronous resource update")
|
|
186
250
|
interface ResourceUpdateSync<
|
|
187
251
|
TResource extends ArmResource,
|
|
@@ -195,6 +259,11 @@ interface ResourceUpdateSync<
|
|
|
195
259
|
>;
|
|
196
260
|
}
|
|
197
261
|
|
|
262
|
+
/**
|
|
263
|
+
* A composite interface for resources that includes CRUD operations.
|
|
264
|
+
* @template TResource The ArmResource that provides these operations
|
|
265
|
+
* @template TProperties RP-specific property bag for the resource
|
|
266
|
+
*/
|
|
198
267
|
interface ExtensionResourceInstanceOperations<
|
|
199
268
|
TResource extends ArmResource,
|
|
200
269
|
TProperties extends object
|
|
@@ -204,9 +273,18 @@ interface ExtensionResourceInstanceOperations<
|
|
|
204
273
|
ExtensionResourceUpdate<TResource, TProperties>,
|
|
205
274
|
ExtensionResourceDelete<TResource> {}
|
|
206
275
|
|
|
276
|
+
/**
|
|
277
|
+
* A composite interface for resource collections that include a paginated list operation.
|
|
278
|
+
* @template TResource The ArmResource that provides these operations
|
|
279
|
+
*/
|
|
207
280
|
interface ExtensionResourceCollectionOperations<TResource extends ArmResource>
|
|
208
281
|
extends ExtensionResourceList<TResource> {}
|
|
209
282
|
|
|
283
|
+
/**
|
|
284
|
+
* A composite interface for resources that include CRUD and list operations.
|
|
285
|
+
* @template TResource The ArmResource that provides these operations
|
|
286
|
+
* @template TProperties RP-specific property bag for the resource
|
|
287
|
+
*/
|
|
210
288
|
interface ExtensionResourceOperations<TResource extends ArmResource, TProperties extends object>
|
|
211
289
|
extends ExtensionResourceInstanceOperations<TResource, TProperties>,
|
|
212
290
|
ExtensionResourceCollectionOperations<TResource> {}
|
package/lib/models.tsp
CHANGED
|
@@ -10,6 +10,7 @@ namespace Azure.ResourceManager;
|
|
|
10
10
|
* Concrete tracked resource types can be created by aliasing this type using a specific property type.
|
|
11
11
|
*
|
|
12
12
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
13
|
+
* @template TProperties A model containing the provider-specific properties for this resource
|
|
13
14
|
*/
|
|
14
15
|
@doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.")
|
|
15
16
|
@armResourceInternal(TProperties)
|
|
@@ -25,6 +26,7 @@ model TrackedResource<TProperties> extends TrackedResourceBase {
|
|
|
25
26
|
* Concrete proxy resource types can be created by aliasing this type using a specific property type.
|
|
26
27
|
*
|
|
27
28
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
29
|
+
* @template TProperties A model containing the provider-specific properties for this resource
|
|
28
30
|
*/
|
|
29
31
|
@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.")
|
|
30
32
|
@armResourceInternal(TProperties)
|
|
@@ -40,6 +42,7 @@ model ProxyResource<TProperties> extends ProxyResourceBase {
|
|
|
40
42
|
* Concrete extension resource types can be created by aliasing this type using a specific property type.
|
|
41
43
|
*
|
|
42
44
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
45
|
+
* @template TProperties A model containing the provider-specific properties for this resource
|
|
43
46
|
*/
|
|
44
47
|
@extensionResource
|
|
45
48
|
@doc("Concrete extension resource types can be created by aliasing this type using a specific property type.")
|
|
@@ -54,12 +57,25 @@ model ExtensionResource<TProperties> extends ExtensionResourceBase {
|
|
|
54
57
|
//#region
|
|
55
58
|
|
|
56
59
|
//#region Standard extraction models
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Extracts the key (path) parameters from a resource and its parents
|
|
63
|
+
* @template TResource The resource to extract properties from
|
|
64
|
+
*/
|
|
57
65
|
@copyResourceKeyParameters
|
|
58
66
|
model KeysOf<TResource> {}
|
|
59
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Extracts the key (path) parameters from the parent(s) of the given resource
|
|
70
|
+
* @template TResource The resource to extract properties from
|
|
71
|
+
*/
|
|
60
72
|
@copyResourceKeyParameters("parent")
|
|
61
73
|
model ParentKeysOf<TResource> {}
|
|
62
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Model describing the provider namespace.
|
|
77
|
+
* @template TResource The resource provided by the namespace.
|
|
78
|
+
*/
|
|
63
79
|
model ProviderNamespace<TResource> {
|
|
64
80
|
@path
|
|
65
81
|
@segment("providers")
|
|
@@ -78,6 +94,7 @@ model ProviderNamespace<TResource> {
|
|
|
78
94
|
* otherArmId: ResourceIdentifier;
|
|
79
95
|
* networkId: ResourceIdentifier<[{type:"\\Microsoft.Network\\vnet"}]>
|
|
80
96
|
* vmIds: ResourceIdentifier<[{type:"\\Microsoft.Compute\\vm", scopes["*"]}]>
|
|
97
|
+
* @template T An array of allowed resource types for the resource reference
|
|
81
98
|
*/
|
|
82
99
|
@doc("A type definition that refers the id to an ARM resource.")
|
|
83
100
|
@format("arm-id")
|
|
@@ -157,12 +174,27 @@ model ManagedServiceIdentity {
|
|
|
157
174
|
identity?: ManagedIdentityProperties;
|
|
158
175
|
}
|
|
159
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Standard ARM definition of ManagedServiceIdentity for services
|
|
179
|
+
* that only support system-defined identities
|
|
180
|
+
*/
|
|
160
181
|
@doc("Managed identity for services that are constrained to system-assigned managed identities.")
|
|
161
182
|
model ManagedSystemAssignedIdentity {
|
|
162
183
|
@doc("The managed service identities assigned to this resource.")
|
|
163
184
|
identity?: ManagedSystemIdentityProperties;
|
|
164
185
|
}
|
|
165
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Model used only to spread in the standard `eTag` envelope property for a resource
|
|
189
|
+
* @example
|
|
190
|
+
*
|
|
191
|
+
* ```typespec
|
|
192
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
193
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
194
|
+
* ...EntityTag;
|
|
195
|
+
* }
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
166
198
|
@doc("The eTag property envelope.")
|
|
167
199
|
model EntityTag {
|
|
168
200
|
@doc("If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.")
|
|
@@ -170,6 +202,17 @@ model EntityTag {
|
|
|
170
202
|
eTag?: string;
|
|
171
203
|
}
|
|
172
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Model used only to spread in the standard `kind` envelope property for a resource
|
|
207
|
+
* @example
|
|
208
|
+
*
|
|
209
|
+
* ```typespec
|
|
210
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
211
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
212
|
+
* ...ResourceKind;
|
|
213
|
+
* }
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
173
216
|
@doc("The resource kind property envelope.")
|
|
174
217
|
model ResourceKind {
|
|
175
218
|
@doc("Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.")
|
|
@@ -178,22 +221,59 @@ model ResourceKind {
|
|
|
178
221
|
kind?: string;
|
|
179
222
|
}
|
|
180
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Paged response containing resources
|
|
226
|
+
* @template TResource The type of the values returned in the paged response (must be a resource)
|
|
227
|
+
*/
|
|
181
228
|
@doc("The response of a {name} list operation.", TResource)
|
|
182
229
|
@friendlyName("{name}ListResult", TResource)
|
|
183
230
|
model ResourceListResult<TResource extends ArmResource> is Azure.Core.Page<TResource>;
|
|
184
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Model used only to spread in the standard `plan` envelope property for a resource
|
|
234
|
+
* @example
|
|
235
|
+
*
|
|
236
|
+
* ```typespec
|
|
237
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
238
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
239
|
+
* ...ResourcePlan;
|
|
240
|
+
* }
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
185
243
|
@doc("The resource plan property envelope.")
|
|
186
244
|
model ResourcePlan {
|
|
187
245
|
@doc("Details of the resource plan.")
|
|
188
246
|
plan?: ResourcePlanType;
|
|
189
247
|
}
|
|
190
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Model used only to spread in the standard `sku` envelope property for a resource
|
|
251
|
+
* @example
|
|
252
|
+
*
|
|
253
|
+
* ```typespec
|
|
254
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
255
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
256
|
+
* ...ResourceSku;
|
|
257
|
+
* }
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
191
260
|
@doc("The SKU (Stock Keeping Unit) assigned to this resource.")
|
|
192
261
|
model ResourceSku {
|
|
193
262
|
@doc("The SKU (Stock Keeping Unit) assigned to this resource.")
|
|
194
263
|
sku?: ResourceSkuType;
|
|
195
264
|
}
|
|
196
265
|
|
|
266
|
+
/**
|
|
267
|
+
* Model used only to spread in the standard `managedBy` envelope property for a resource
|
|
268
|
+
* @example
|
|
269
|
+
*
|
|
270
|
+
* ```typespec
|
|
271
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
272
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
273
|
+
* ...ManagedBy;
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
197
277
|
@doc("The managedBy property envelope.")
|
|
198
278
|
model ManagedBy {
|
|
199
279
|
@doc("The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.")
|
package/lib/operations.tsp
CHANGED
|
@@ -10,7 +10,7 @@ namespace Azure.ResourceManager;
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A resource list operation, at the subscription scope
|
|
13
|
-
* @
|
|
13
|
+
* @template TResource the resource being patched
|
|
14
14
|
*/
|
|
15
15
|
@autoRoute
|
|
16
16
|
@doc("List {name} resources by subscription ID", TResource)
|
|
@@ -24,7 +24,10 @@ op ArmListBySubscription<TResource extends ArmResource>(
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* A resource list operation, at the scope of the resource's parent
|
|
27
|
-
* @
|
|
27
|
+
* @template TResource the resource being patched
|
|
28
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
29
|
+
* @template TParentName Optional. The name of the parent resource
|
|
30
|
+
* @template TParentFriendlyName Optional. The friendly name of the parent resource
|
|
28
31
|
*/
|
|
29
32
|
@get
|
|
30
33
|
@autoRoute
|
|
@@ -43,8 +46,8 @@ op ArmResourceListByParent<
|
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
48
|
* A resource list operation, with scope determined by TBaseParameters
|
|
46
|
-
* @
|
|
47
|
-
* @
|
|
49
|
+
* @template TResource the resource being patched
|
|
50
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
48
51
|
*/
|
|
49
52
|
@get
|
|
50
53
|
@autoRoute
|
|
@@ -61,8 +64,8 @@ op ArmResourceListAtScope<
|
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
66
|
* A resource GET operation
|
|
64
|
-
* @
|
|
65
|
-
* @
|
|
67
|
+
* @template TResource the resource being patched
|
|
68
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
66
69
|
*/
|
|
67
70
|
@autoRoute
|
|
68
71
|
@doc("Get a {name}", TResource)
|
|
@@ -74,8 +77,8 @@ op ArmResourceRead<TResource extends ArmResource, TBaseParameters = BaseParamete
|
|
|
74
77
|
|
|
75
78
|
/**
|
|
76
79
|
* A long-running resource CreateOrUpdate (PUT)
|
|
77
|
-
* @
|
|
78
|
-
* @
|
|
80
|
+
* @template TResource the resource being patched
|
|
81
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
79
82
|
*/
|
|
80
83
|
@autoRoute
|
|
81
84
|
@doc("Create a {name}", TResource)
|
|
@@ -101,8 +104,8 @@ op ArmResourceCreateOrUpdateAsync<
|
|
|
101
104
|
|
|
102
105
|
/**
|
|
103
106
|
* A resource CreateOrUpdate (PUT)
|
|
104
|
-
* @
|
|
105
|
-
* @
|
|
107
|
+
* @template TResource the resource being patched
|
|
108
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
106
109
|
*/
|
|
107
110
|
@autoRoute
|
|
108
111
|
@doc("Create a {name}", TResource)
|
|
@@ -121,8 +124,8 @@ op ArmResourceCreateOrUpdateSync<
|
|
|
121
124
|
|
|
122
125
|
/**
|
|
123
126
|
* A long-running resource update that only allows updating resource tags (the minimum)
|
|
124
|
-
* @
|
|
125
|
-
* @
|
|
127
|
+
* @template TResource the resource being patched
|
|
128
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
126
129
|
*/
|
|
127
130
|
alias ArmTagsPatchAsync<
|
|
128
131
|
TResource extends ArmResource,
|
|
@@ -132,9 +135,9 @@ alias ArmTagsPatchAsync<
|
|
|
132
135
|
|
|
133
136
|
/**
|
|
134
137
|
* A long-running resource update using the items from the resource marked with visibility "update"
|
|
135
|
-
* @
|
|
136
|
-
* @
|
|
137
|
-
* @
|
|
138
|
+
* @template TResource the resource being patched
|
|
139
|
+
* @template TProperties The model type of the resource properties
|
|
140
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
138
141
|
*/
|
|
139
142
|
alias ArmResourcePatchAsync<
|
|
140
143
|
TResource extends ArmResource,
|
|
@@ -144,9 +147,9 @@ alias ArmResourcePatchAsync<
|
|
|
144
147
|
|
|
145
148
|
/**
|
|
146
149
|
* A long-running resource update using a custom PATCH payload (Asynchronous)
|
|
147
|
-
* @
|
|
148
|
-
* @
|
|
149
|
-
* @
|
|
150
|
+
* @template TResource the resource being patched
|
|
151
|
+
* @template TPatchModel The input model for the PATCH request
|
|
152
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
150
153
|
*/
|
|
151
154
|
@autoRoute
|
|
152
155
|
@doc("Update a {name}", TResource)
|
|
@@ -173,8 +176,8 @@ op ArmCustomPatchAsync<
|
|
|
173
176
|
|
|
174
177
|
/**
|
|
175
178
|
* A resource update that only allows updating resource tags (the minimum)
|
|
176
|
-
* @
|
|
177
|
-
* @
|
|
179
|
+
* @template TResource the resource being patched
|
|
180
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
178
181
|
*/
|
|
179
182
|
alias ArmTagsPatchSync<
|
|
180
183
|
TResource extends ArmResource,
|
|
@@ -183,9 +186,9 @@ alias ArmTagsPatchSync<
|
|
|
183
186
|
|
|
184
187
|
/**
|
|
185
188
|
* A resource update using the items from the resource marked with visibility "update"
|
|
186
|
-
* @
|
|
187
|
-
* @
|
|
188
|
-
* @
|
|
189
|
+
* @template TResource the resource being patched
|
|
190
|
+
* @template TProperties The model type of the resource properties
|
|
191
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
189
192
|
*/
|
|
190
193
|
alias ArmResourcePatchSync<
|
|
191
194
|
TResource extends ArmResource,
|
|
@@ -195,9 +198,9 @@ alias ArmResourcePatchSync<
|
|
|
195
198
|
|
|
196
199
|
/**
|
|
197
200
|
* A resource update using a custom PATCH payload (synchronous)
|
|
198
|
-
* @
|
|
199
|
-
* @
|
|
200
|
-
* @
|
|
201
|
+
* @template TResource the resource being patched
|
|
202
|
+
* @template TPatchModel The input model for the PATCH request
|
|
203
|
+
* @template TBaseParameters Optional. Allows overriding the operation parameters
|
|
201
204
|
*/
|
|
202
205
|
@autoRoute
|
|
203
206
|
@doc("Update a {name}", TResource)
|
|
@@ -217,8 +220,8 @@ op ArmCustomPatchSync<
|
|
|
217
220
|
|
|
218
221
|
/**
|
|
219
222
|
* Delete a resource Asynchronously
|
|
220
|
-
* @
|
|
221
|
-
* @
|
|
223
|
+
* @template TResource The resource being deleted
|
|
224
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
222
225
|
*/
|
|
223
226
|
@autoRoute
|
|
224
227
|
@doc("Delete a {name}", TResource)
|
|
@@ -240,6 +243,11 @@ op ArmResourceDeleteAsync<
|
|
|
240
243
|
| ArmDeletedNoContentResponse
|
|
241
244
|
| ErrorResponse;
|
|
242
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Delete a resource synchronously
|
|
248
|
+
* @template TResource The resource being deleted
|
|
249
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
250
|
+
*/
|
|
243
251
|
@autoRoute
|
|
244
252
|
@doc("Delete a {name}", TResource)
|
|
245
253
|
@armResourceDelete(TResource)
|
|
@@ -251,6 +259,13 @@ op ArmResourceDeleteSync<
|
|
|
251
259
|
...ResourceInstanceParameters<TResource, TBaseParameters>
|
|
252
260
|
): ArmDeletedResponse | ArmDeletedNoContentResponse | ErrorResponse;
|
|
253
261
|
|
|
262
|
+
/**
|
|
263
|
+
* A long-running resource action.
|
|
264
|
+
* @template TResource The resource being acted upon
|
|
265
|
+
* @template TRequest The request model for the action
|
|
266
|
+
* @template TResponse The response model for the action
|
|
267
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
268
|
+
*/
|
|
254
269
|
@autoRoute
|
|
255
270
|
@extension("x-ms-long-running-operation", true)
|
|
256
271
|
@extension(
|
|
@@ -274,6 +289,13 @@ op ArmResourceActionAsync<
|
|
|
274
289
|
body: TRequest
|
|
275
290
|
): ArmAcceptedLroResponse | ArmResponse<TResponse> | ErrorResponse;
|
|
276
291
|
|
|
292
|
+
/**
|
|
293
|
+
* A synchronous resource action.
|
|
294
|
+
* @template TResource The resource being acted upon
|
|
295
|
+
* @template TRequest The request model for the action
|
|
296
|
+
* @template TResponse The response model for the action
|
|
297
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
298
|
+
*/
|
|
277
299
|
@autoRoute
|
|
278
300
|
@armResourceAction(TResource)
|
|
279
301
|
@post
|
|
@@ -290,6 +312,12 @@ op ArmResourceActionSync<
|
|
|
290
312
|
body: TRequest
|
|
291
313
|
): ArmResponse<TResponse> | ErrorResponse;
|
|
292
314
|
|
|
315
|
+
/**
|
|
316
|
+
* A long-running resource action that returns no content.
|
|
317
|
+
* @template TResource The resource being acted upon
|
|
318
|
+
* @template TRequest The request model for the action
|
|
319
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
320
|
+
*/
|
|
293
321
|
@autoRoute
|
|
294
322
|
@extension("x-ms-long-running-operation", true)
|
|
295
323
|
@extension(
|
|
@@ -312,6 +340,12 @@ op ArmResourceActionNoContentAsync<
|
|
|
312
340
|
body: TRequest
|
|
313
341
|
): ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
|
|
314
342
|
|
|
343
|
+
/**
|
|
344
|
+
* A synchronous resource action that returns no content.
|
|
345
|
+
* @template TResource The resource being acted upon
|
|
346
|
+
* @template TRequest The request model for the action
|
|
347
|
+
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
348
|
+
*/
|
|
315
349
|
@autoRoute
|
|
316
350
|
@armResourceAction(TResource)
|
|
317
351
|
@post
|
|
@@ -326,3 +360,36 @@ op ArmResourceActionNoContentSync<
|
|
|
326
360
|
@body
|
|
327
361
|
body: TRequest
|
|
328
362
|
): ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Adds check global name availability operation, normally used if
|
|
366
|
+
* a resource name must be globally unique (for example, if the resource
|
|
367
|
+
* exposes and endpoint that uses the resource name in the url)
|
|
368
|
+
* @template TRequest the availability request, defaults to the standard request, contsining name and tesource type
|
|
369
|
+
* @template TResponse the availability response, default to the standard response
|
|
370
|
+
* @template TAdditionalParams A model specifying additiional non-path parameters to the availability request
|
|
371
|
+
*/
|
|
372
|
+
alias checkGlobalNameAvailability<
|
|
373
|
+
TRequest extends object = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
374
|
+
TResponse extends object = CheckNameAvailabilityResponse,
|
|
375
|
+
TAdditionalParams extends object = {}
|
|
376
|
+
> = checkNameAvailability<SubscriptionIdParameter, TRequest, TResponse, TAdditionalParams>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Adds check location-specific name availability operation, normally used if
|
|
380
|
+
* a resource name must be globally unique (for example, if the resource
|
|
381
|
+
* exposes and endpoint that uses the resource name in the url)
|
|
382
|
+
* @template TRequest the availability request, defaults to the standard request, contsining name and tesource type
|
|
383
|
+
* @template TResponse the availability response, default to the standard response
|
|
384
|
+
* @template TAdditionalParams A model specifying additiional non-path parameters to the availability request
|
|
385
|
+
*/
|
|
386
|
+
alias checkLocalNameAvailability<
|
|
387
|
+
TRequest extends object = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
388
|
+
TResponse extends object = CheckNameAvailabilityResponse,
|
|
389
|
+
TAdditionalParams extends object = {}
|
|
390
|
+
> = checkNameAvailability<
|
|
391
|
+
SubscriptionIdParameter & LocationParameter,
|
|
392
|
+
TRequest,
|
|
393
|
+
TResponse,
|
|
394
|
+
TAdditionalParams
|
|
395
|
+
>;
|
package/lib/parameters.tsp
CHANGED
|
@@ -86,6 +86,8 @@ model ResourceUriParameter {
|
|
|
86
86
|
/**
|
|
87
87
|
* The dynamic parameters of a resource instance - pass in the proper base type to indicate
|
|
88
88
|
* where the resource is based. The default is in a resource group
|
|
89
|
+
* @template TResource The resource to get parameters for
|
|
90
|
+
* @template TBaseParameters The parameters representing the base Uri of the resource
|
|
89
91
|
*/
|
|
90
92
|
model ResourceInstanceParameters<
|
|
91
93
|
TResource extends ArmResource,
|
|
@@ -99,6 +101,8 @@ model ResourceInstanceParameters<
|
|
|
99
101
|
/**
|
|
100
102
|
* The dynamic parameters of a list call for a resource instance - pass in the proper base type to indicate
|
|
101
103
|
* where the list should take place. The default is in a resource group
|
|
104
|
+
* @template TResource The resource to get parameters for
|
|
105
|
+
* @template TBaseParameters The parameters representing the base Uri of the resource
|
|
102
106
|
*/
|
|
103
107
|
model ResourceParentParameters<
|
|
104
108
|
TResource extends ArmResource,
|
|
@@ -111,6 +115,7 @@ model ResourceParentParameters<
|
|
|
111
115
|
|
|
112
116
|
/**
|
|
113
117
|
* The dynamic parameters of a list call for an extension resource instance.
|
|
118
|
+
* @template TResource The extension resource
|
|
114
119
|
*/
|
|
115
120
|
alias ExtensionResourceInstanceParameters<TResource extends ArmResource> = ResourceInstanceParameters<
|
|
116
121
|
TResource,
|
|
@@ -119,6 +124,7 @@ alias ExtensionResourceInstanceParameters<TResource extends ArmResource> = Resou
|
|
|
119
124
|
|
|
120
125
|
/**
|
|
121
126
|
* The dynamic parameters of a list call for a tenant resource instance.
|
|
127
|
+
* @template TResource the tenant resource
|
|
122
128
|
*/
|
|
123
129
|
alias TenantInstanceParameters<TResource extends ArmResource> = ResourceInstanceParameters<
|
|
124
130
|
TResource,
|
package/lib/responses.tsp
CHANGED
|
@@ -7,6 +7,7 @@ namespace Azure.ResourceManager;
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The ARM synchronous OK response
|
|
10
|
+
* @template T The contents of the response body
|
|
10
11
|
*/
|
|
11
12
|
@doc("ARM operation completed successfully.")
|
|
12
13
|
model ArmResponse<T> {
|
|
@@ -16,6 +17,7 @@ model ArmResponse<T> {
|
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* The ARM 201 response for a resource
|
|
20
|
+
* @template T The contents of the response body
|
|
19
21
|
*/
|
|
20
22
|
@doc("ARM create operation completed successfully.")
|
|
21
23
|
model ArmCreatedResponse<T> {
|
|
@@ -37,8 +39,15 @@ model ArmDeletedResponse {
|
|
|
37
39
|
*/
|
|
38
40
|
model ArmDeleteAcceptedLroResponse is ArmAcceptedLroResponse<"Resource deletion accepted.">;
|
|
39
41
|
|
|
42
|
+
/**
|
|
43
|
+
* The response for synchronous ARM delete ACCEPTED
|
|
44
|
+
*/
|
|
40
45
|
model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accepted.">;
|
|
41
46
|
|
|
47
|
+
/**
|
|
48
|
+
* The standard ACCEPTED response
|
|
49
|
+
* @template TMessage The description of the response status (defaults to `Resource operation accepted`)
|
|
50
|
+
*/
|
|
42
51
|
@doc(TMessage)
|
|
43
52
|
model ArmAcceptedResponse<TMessage extends string = "Resource operation accepted."> {
|
|
44
53
|
...AcceptedResponse;
|
|
@@ -47,6 +56,7 @@ model ArmAcceptedResponse<TMessage extends string = "Resource operation accepted
|
|
|
47
56
|
|
|
48
57
|
/**
|
|
49
58
|
* The standard ARM response for asynchronous PATCH, POST, and DELETE operations
|
|
59
|
+
* @template TMessage The description of the response status (defaults to `Resource operation accepted`)
|
|
50
60
|
*/
|
|
51
61
|
model ArmAcceptedLroResponse<TMessage extends string = "Resource operation accepted.">
|
|
52
62
|
is ArmAcceptedResponse<TMessage> {
|
|
@@ -62,6 +72,7 @@ model ArmDeletedNoContentResponse is ArmNoContentResponse<"Resource deleted succ
|
|
|
62
72
|
|
|
63
73
|
/**
|
|
64
74
|
* Standard ARM NoContent (204) response
|
|
75
|
+
* @template TMessage The description of the response status (defaults to `Operation completed successfully`)
|
|
65
76
|
*/
|
|
66
77
|
@doc(TMessage)
|
|
67
78
|
model ArmNoContentResponse<TMessage extends string = "Operation completed successfully."> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.30.0-dev.
|
|
3
|
+
"version": "0.30.0-dev.7",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|