@azure-tools/typespec-azure-resource-manager 0.41.0 → 0.42.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/dist/src/common-types.js +1 -1
- package/dist/src/common-types.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +0 -2
- package/dist/src/linter.js.map +1 -1
- package/dist/src/operations.js +2 -4
- package/dist/src/operations.js.map +1 -1
- package/dist/src/private.decorators.js +11 -15
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource.js +7 -8
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/arm-no-record.js +1 -1
- package/dist/src/rules/arm-no-record.js.map +1 -1
- package/dist/src/rules/arm-resource-action-no-segment.js +1 -2
- package/dist/src/rules/arm-resource-action-no-segment.js.map +1 -1
- package/dist/src/rules/arm-resource-duplicate-property.js +1 -2
- package/dist/src/rules/arm-resource-duplicate-property.js.map +1 -1
- package/dist/src/rules/arm-resource-invalid-version-format.js +1 -2
- package/dist/src/rules/arm-resource-invalid-version-format.js.map +1 -1
- package/dist/src/rules/arm-resource-key-invalid-chars.js +1 -2
- package/dist/src/rules/arm-resource-key-invalid-chars.js.map +1 -1
- package/dist/src/rules/arm-resource-name-pattern.js +1 -1
- package/dist/src/rules/arm-resource-patch.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-patch.js +3 -2
- package/dist/src/rules/arm-resource-patch.js.map +1 -1
- package/dist/src/rules/arm-resource-path-invalid-chars.js +1 -2
- package/dist/src/rules/arm-resource-path-invalid-chars.js.map +1 -1
- package/dist/src/rules/arm-resource-provisioning-state-rule.js +1 -2
- package/dist/src/rules/arm-resource-provisioning-state-rule.js.map +1 -1
- package/dist/src/rules/core-operations.js +1 -1
- package/dist/src/rules/core-operations.js.map +1 -1
- package/dist/src/rules/envelope-properties.js +4 -5
- package/dist/src/rules/envelope-properties.js.map +1 -1
- package/dist/src/rules/list-operation.js +1 -1
- package/dist/src/rules/list-operation.js.map +1 -1
- package/dist/src/rules/missing-x-ms-identifiers.d.ts +1 -1
- package/dist/src/rules/missing-x-ms-identifiers.js +3 -3
- package/dist/src/rules/missing-x-ms-identifiers.js.map +1 -1
- package/dist/src/rules/patch-envelope-properties.js +3 -4
- package/dist/src/rules/patch-envelope-properties.js.map +1 -1
- package/dist/src/rules/retry-after.js +1 -1
- package/dist/src/rules/retry-after.js.map +1 -1
- package/dist/src/rules/utils.js +3 -4
- package/dist/src/rules/utils.js.map +1 -1
- package/lib/arm.foundations.tsp +47 -29
- package/lib/customer-managed-keys.tsp +10 -3
- package/lib/models.tsp +13 -11
- package/lib/operations.tsp +3 -3
- package/lib/private-links.tsp +10 -8
- package/lib/responses.tsp +11 -5
- package/package.json +25 -27
|
@@ -32,7 +32,7 @@ export const coreOperationsRule = createRule({
|
|
|
32
32
|
}
|
|
33
33
|
if (verb) {
|
|
34
34
|
const requiredDecorators = resourceOperationDecorators[verb];
|
|
35
|
-
if (
|
|
35
|
+
if (requiredDecorators?.length > 0) {
|
|
36
36
|
const decorator = operation.decorators.find((d) => requiredDecorators.indexOf(d.decorator.name) >= 0);
|
|
37
37
|
if (!decorator) {
|
|
38
38
|
context.reportDiagnostic({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-operations.js","sourceRoot":"","sources":["../../../src/rules/core-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAY,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,mCAAmC;IAChD,QAAQ,E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AAO,KAAK,CAAC;IAC3C,MAAM,WAAW,GAAsB,cAAc,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC/E,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,CACL,WAAW,CAAC,IAAI,KAAK,qBAAqB;QAC1C,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,uBAAuB,CACnE,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,OAAgB,EAAE,KAAY;IACrD,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAChF,MAAM,gBAAgB,GAAoB,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACpF,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAC3B,CAAC;IACF,OAAO,gBAAgB,KAAK,IAAI,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -14,24 +14,23 @@ export const envelopePropertiesRules = createRule({
|
|
|
14
14
|
create(context) {
|
|
15
15
|
return {
|
|
16
16
|
model: (model) => {
|
|
17
|
-
var _a, _b, _c;
|
|
18
17
|
const resources = getArmResources(context.program);
|
|
19
18
|
const armResource = resources.find((re) => re.typespecType === model);
|
|
20
19
|
if (armResource &&
|
|
21
20
|
armResource.operations.lifecycle.update &&
|
|
22
21
|
armResource.operations.lifecycle.createOrUpdate) {
|
|
23
|
-
const updateOperationProperties =
|
|
24
|
-
if (
|
|
22
|
+
const updateOperationProperties = armResource.operations.lifecycle.update.httpOperation.parameters.body?.type;
|
|
23
|
+
if (updateOperationProperties?.kind === "Model") {
|
|
25
24
|
if (getProperties(updateOperationProperties).length < 1) {
|
|
26
25
|
context.reportDiagnostic({
|
|
27
26
|
target: model,
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
const updateablePropertiesBag = getProperty(updateOperationProperties, "properties");
|
|
31
|
-
if (
|
|
30
|
+
if (updateablePropertiesBag?.type.kind === "Model" &&
|
|
32
31
|
getProperties(updateablePropertiesBag.type).length === 0) {
|
|
33
32
|
context.reportDiagnostic({
|
|
34
|
-
target:
|
|
33
|
+
target: model.properties.get("properties")?.type ?? model,
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope-properties.js","sourceRoot":"","sources":["../../../src/rules/envelope-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;IAChD,IAAI,EAAE,6BAA6B;IACnC,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,oCAAoC;IACjD,QAAQ,EAAE;QACR,OAAO,EAAE,oRAAoR;KAC9R;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"envelope-properties.js","sourceRoot":"","sources":["../../../src/rules/envelope-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;IAChD,IAAI,EAAE,6BAA6B;IACnC,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,oCAAoC;IACjD,QAAQ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@@ -24,7 +24,7 @@ export const listBySubscriptionRule = createRule({
|
|
|
24
24
|
if (listOperation.path.includes("{subscriptionId}")) {
|
|
25
25
|
const resourceInterface = getInterface(armResource);
|
|
26
26
|
context.reportDiagnostic({
|
|
27
|
-
target: resourceInterface
|
|
27
|
+
target: resourceInterface ?? armResource.typespecType,
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-operation.js","sourceRoot":"","sources":["../../../src/rules/list-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE,sCAAsC;IAC5C,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,oFAAoF;IACjG,QAAQ,EAAE;QACR,OAAO,EAAE,oFAAoF;KAC9F;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,IAAI,EAAE,CAAC,OAAgB,EAAE,EAAE;gBACzB,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC3C,KAAK,MAAM,WAAW,IAAI,SAAS,EAAE,CAAC;oBACpC,IAAI,WAAW,IAAI,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;wBAChD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;wBAChF,IAAI,QAAQ,KAAK,gBAAgB,CAAC,SAAS,IAAI,QAAQ,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;4BACpF,KAAK,MAAM,iBAAiB,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW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AAK,MAAM,iBAAiB,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;gCAC1E,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;gCACtE,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;oCACpD,MAAM,iBAAiB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;oCACpD,OAAO,CAAC,gBAAgB,CAAC;wCACvB,MAAM,EAAE,iBAAiB,IAAI,WAAW,CAAC,YAAY;qCACtD,CAAC,CAAC;gCACL,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const missingXmsIdentifiersRule: import("@typespec/compiler").LinterRuleDefinition<"missing-x-ms-identifiers", {
|
|
2
|
-
readonly default: "Missing identifying properties of objects in the array item, please add @extension(\"x-ms-identifiers\", [<prop>]) to specify it. If there are no appropriate identifying properties, please add @extension(\"x-ms-identifiers\",[]).";
|
|
2
|
+
readonly default: "Missing identifying properties of objects in the array item, please add @OpenAPI.extension(\"x-ms-identifiers\", [<prop>]) to specify it. If there are no appropriate identifying properties, please add @OpenAPI.extension(\"x-ms-identifiers\",[]).";
|
|
3
3
|
readonly notArray: import("@typespec/compiler").CallableMessage<[string]>;
|
|
4
4
|
readonly missingProperty: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
5
5
|
}>;
|
|
@@ -7,8 +7,8 @@ export const missingXmsIdentifiersRule = createRule({
|
|
|
7
7
|
severity: "warning",
|
|
8
8
|
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/missing-x-ms-identifiers",
|
|
9
9
|
messages: {
|
|
10
|
-
default: `Missing identifying properties of objects in the array item, please add @extension("x-ms-identifiers", [<prop>]) to specify it. If there are no appropriate identifying properties, please add @extension("x-ms-identifiers",[]).`,
|
|
11
|
-
notArray: paramMessage `Value passed to @extension("x-ms-identifiers",...) was a "${"valueType"}". Pass an array of property name.`,
|
|
10
|
+
default: `Missing identifying properties of objects in the array item, please add @OpenAPI.extension("x-ms-identifiers", [<prop>]) to specify it. If there are no appropriate identifying properties, please add @OpenAPI.extension("x-ms-identifiers",[]).`,
|
|
11
|
+
notArray: paramMessage `Value passed to @OpenAPI.extension("x-ms-identifiers",...) was a "${"valueType"}". Pass an array of property name.`,
|
|
12
12
|
missingProperty: paramMessage `Property "${"propertyName"}" is not found in "${"targetModelName"}". Make sure value of x-ms-identifiers extension are valid property name of the array element.`,
|
|
13
13
|
},
|
|
14
14
|
create(context) {
|
|
@@ -35,7 +35,7 @@ export const missingXmsIdentifiersRule = createRule({
|
|
|
35
35
|
if (getProperty(elementType, "id")) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
|
-
const xmsIdentifiers = getExtensions(program, property
|
|
38
|
+
const xmsIdentifiers = getExtensions(program, property ?? array).get("x-ms-identifiers");
|
|
39
39
|
if (xmsIdentifiers === undefined) {
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-x-ms-identifiers.js","sourceRoot":"","sources":["../../../src/rules/missing-x-ms-identifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,6GAA6G;IAClH,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cAAc,EAAE;oBAC5C,MAAM,EAAE,QAAQ;iBACjB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -11,13 +11,12 @@ export const patchEnvelopePropertiesRules = createRule({
|
|
|
11
11
|
const patchEnvelopeProperties = ["identity", "managedBy", "plan", "sku", "tags"];
|
|
12
12
|
return {
|
|
13
13
|
model: (model) => {
|
|
14
|
-
var _a;
|
|
15
14
|
const resources = getArmResources(context.program);
|
|
16
15
|
const armResource = resources.find((re) => re.typespecType === model);
|
|
17
16
|
if (armResource &&
|
|
18
17
|
armResource.operations.lifecycle.update &&
|
|
19
18
|
armResource.operations.lifecycle.createOrUpdate) {
|
|
20
|
-
const updateOperationProperties =
|
|
19
|
+
const updateOperationProperties = armResource.operations.lifecycle.update.httpOperation.parameters.body?.type;
|
|
21
20
|
const missingProperties = [];
|
|
22
21
|
for (const property of patchEnvelopeProperties) {
|
|
23
22
|
if (!checkForPatchProperty(property, model, updateOperationProperties)) {
|
|
@@ -27,7 +26,7 @@ export const patchEnvelopePropertiesRules = createRule({
|
|
|
27
26
|
if (missingProperties.length > 0) {
|
|
28
27
|
context.reportDiagnostic({
|
|
29
28
|
format: { resourceName: model.name, propertyName: missingProperties.join(", ") },
|
|
30
|
-
target:
|
|
29
|
+
target: updateOperationProperties?.kind === "Model"
|
|
31
30
|
? updateOperationProperties
|
|
32
31
|
: armResource.operations.lifecycle.update.operation,
|
|
33
32
|
});
|
|
@@ -39,6 +38,6 @@ export const patchEnvelopePropertiesRules = createRule({
|
|
|
39
38
|
});
|
|
40
39
|
function checkForPatchProperty(propertyName, resourceModel, patchModel) {
|
|
41
40
|
return (getProperty(resourceModel, propertyName) === undefined ||
|
|
42
|
-
(
|
|
41
|
+
(patchModel?.kind === "Model" && getProperty(patchModel, propertyName) !== undefined));
|
|
43
42
|
}
|
|
44
43
|
//# sourceMappingURL=patch-envelope-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-envelope-properties.js","sourceRoot":"","sources":["../../../src/rules/patch-envelope-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,iEAAiE;IAC9E,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,4CAA4C,cAAc,uCAAuC,cAAc,iGAAiG;KACtO;IACD,MAAM,CAAC,OAAO;QACZ,MAAM,uBAAuB,GAAa,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3F,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"patch-envelope-properties.js","sourceRoot":"","sources":["../../../src/rules/patch-envelope-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,iEAAiE;IAC9E,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,4CAA4C,cAAc,uCAAuC,cAAc,iGAAiG;KACtO;IACD,MAAM,CAAC,OAAO;QACZ,MAAM,uBAAuB,GAAa,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3F,OAAO;YACL,KAAK,EAAE,CAAC,KA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B;IAE5B,OAAO,CACL,WAAW,CAAC,aAAa,EAAE,YAAY,CAAC,KAAK,SAAS;QACtD,CAAC,UAAU,EAAE,IAAI,KAAK,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,KAAK,SAAS,CAAC,CACtF,CAAC;AACJ,CAAC"}
|
|
@@ -29,6 +29,6 @@ export const retryAfterRule = createRule({
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
function hasRetryAfterHeader(program, op) {
|
|
32
|
-
return !!getResponsesForOperation(program, op)[0].find((re) => re.responses.find((res) =>
|
|
32
|
+
return !!getResponsesForOperation(program, op)[0].find((re) => re.responses.find((res) => res.headers?.["Retry-After"]));
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=retry-after.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry-after.js","sourceRoot":"","sources":["../../../src/rules/retry-after.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE;QACR,OAAO,EAAE,0MAA0M;KACpN;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,SAAS,EAAE,CAAC,EAAa,EAAE,EAAE;gBAC3B,IAAI,6BAA6B,CAAC,EAAE,CAAC,EAAE,CAAC;oBACtC,OAAO;gBACT,CAAC;gBACD,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,6BA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ACpF,IAAI,KAAK,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;oBACvD,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,EAAE;qBACX,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,mBAAmB,CAAC,OAAgB,EAAE,EAAa;IAC1D,OAAO,CAAC,CAAC,wBAAwB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAC5D,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC"}
|
package/dist/src/rules/utils.js
CHANGED
|
@@ -7,8 +7,7 @@ import { getArmResourceKind } from "../resource.js";
|
|
|
7
7
|
*@returns true if the operation is defined on a templated interface which hasn't had args filled in
|
|
8
8
|
*/
|
|
9
9
|
export function isTemplatedInterfaceOperation(target) {
|
|
10
|
-
|
|
11
|
-
return (((_a = target.node) === null || _a === void 0 ? void 0 : _a.kind) === SyntaxKind.OperationStatement &&
|
|
10
|
+
return (target.node?.kind === SyntaxKind.OperationStatement &&
|
|
12
11
|
target.interface &&
|
|
13
12
|
isTemplateDeclaration(target.interface));
|
|
14
13
|
}
|
|
@@ -47,14 +46,14 @@ export function getSourceModel(property) {
|
|
|
47
46
|
while (currProperty.sourceProperty !== undefined) {
|
|
48
47
|
currProperty = currProperty.sourceProperty;
|
|
49
48
|
}
|
|
50
|
-
return currProperty
|
|
49
|
+
return currProperty?.model;
|
|
51
50
|
}
|
|
52
51
|
export function getSourceProperty(property) {
|
|
53
52
|
let currProperty = property;
|
|
54
53
|
while (currProperty.sourceProperty !== undefined) {
|
|
55
54
|
currProperty = currProperty.sourceProperty;
|
|
56
55
|
}
|
|
57
|
-
return currProperty
|
|
56
|
+
return currProperty ?? property;
|
|
58
57
|
}
|
|
59
58
|
export function isInternalTypeSpec(program, type) {
|
|
60
59
|
const namespace = getNamespaceName(program, type);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/rules/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,oBAAoB,EAEpB,qBAAqB,EAMrB,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAsB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAExE;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAiB
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/rules/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,oBAAoB,EAEpB,qBAAqB,EAMrB,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAsB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAExE;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,OAAO,CACL,MAAM,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,kBAAkB;QACnD,MAAM,CAAC,SAAS;QAChB,qBAAqB,CAAC,MAAM,CAAC,SAAS,CAAC,CACxC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,YAAmB;IACnD,MAAM,UAAU,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACpD,OAAO,UAAU,KAAK,SAAS,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,YAAmB;IAC5C,MAAM,UAAU,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACpD,OAAO,CAAC,CAAC,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,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,MAAM,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACnF,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;IAC7D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,IAA2B,EAC3B,IAAY;IAEZ,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACtC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/lib/arm.foundations.tsp
CHANGED
|
@@ -99,26 +99,30 @@ enum ResourceHome {
|
|
|
99
99
|
@doc("""
|
|
100
100
|
The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
|
|
101
101
|
""")
|
|
102
|
-
|
|
102
|
+
union Origin {
|
|
103
103
|
@doc("Indicates the operation is initiated by a user.")
|
|
104
|
-
user,
|
|
104
|
+
user: "user",
|
|
105
105
|
|
|
106
106
|
@doc("Indicates the operation is initiated by a system.")
|
|
107
|
-
system,
|
|
107
|
+
system: "system",
|
|
108
108
|
|
|
109
109
|
@doc("Indicates the operation is initiated by a user or system.")
|
|
110
|
-
`user,system
|
|
110
|
+
`user,system`: "user,system",
|
|
111
|
+
|
|
112
|
+
string,
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
/**
|
|
114
|
-
*
|
|
116
|
+
* Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
|
115
117
|
*/
|
|
116
118
|
@doc("""
|
|
117
|
-
|
|
119
|
+
Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
|
118
120
|
""")
|
|
119
|
-
|
|
121
|
+
union ActionType {
|
|
120
122
|
@doc("Actions are for internal-only APIs.")
|
|
121
|
-
Internal,
|
|
123
|
+
Internal: "Internal",
|
|
124
|
+
|
|
125
|
+
string,
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
/**
|
|
@@ -308,20 +312,22 @@ model ArmTagsProperty {
|
|
|
308
312
|
/**
|
|
309
313
|
* The kind of entity that created the resource.
|
|
310
314
|
*/
|
|
311
|
-
// NOTE: This is how the enum is named in types.json
|
|
315
|
+
// NOTE: This is how the extensible enum is named in types.json
|
|
312
316
|
@doc("The kind of entity that created the resource.")
|
|
313
|
-
|
|
317
|
+
union createdByType {
|
|
314
318
|
@doc("The entity was created by a user.")
|
|
315
|
-
User,
|
|
319
|
+
User: "User",
|
|
316
320
|
|
|
317
321
|
@doc("The entity was created by an application.")
|
|
318
|
-
Application,
|
|
322
|
+
Application: "Application",
|
|
319
323
|
|
|
320
324
|
@doc("The entity was created by a managed identity.")
|
|
321
|
-
ManagedIdentity,
|
|
325
|
+
ManagedIdentity: "ManagedIdentity",
|
|
322
326
|
|
|
323
327
|
@doc("The entity was created by a key.")
|
|
324
|
-
Key,
|
|
328
|
+
Key: "Key",
|
|
329
|
+
|
|
330
|
+
string,
|
|
325
331
|
}
|
|
326
332
|
|
|
327
333
|
/**
|
|
@@ -384,7 +390,7 @@ model ManagedIdentityProperties {
|
|
|
384
390
|
principalId?: string;
|
|
385
391
|
|
|
386
392
|
@doc("The type of managed identity assigned to this resource.")
|
|
387
|
-
type:
|
|
393
|
+
type: ManagedServiceIdentityType;
|
|
388
394
|
|
|
389
395
|
@doc("The identities assigned to this resource by the user.")
|
|
390
396
|
userAssignedIdentities?: Record<UserAssignedIdentity>;
|
|
@@ -417,9 +423,12 @@ model ManagedSystemIdentityProperties {
|
|
|
417
423
|
principalId?: string;
|
|
418
424
|
|
|
419
425
|
@doc("The type of managed identity assigned to this resource.")
|
|
420
|
-
type:
|
|
426
|
+
type: SystemAssignedServiceIdentityType;
|
|
421
427
|
}
|
|
422
428
|
|
|
429
|
+
/** Alias of ManagedServiceIdentityType for back compatability. Please change to ManagedServiceIdentityType. */
|
|
430
|
+
#deprecated "Please change to ManagedServiceIdentityType."
|
|
431
|
+
alias ManagedIdentityType = ManagedServiceIdentityType;
|
|
423
432
|
/**
|
|
424
433
|
* A managed identity assigned by the user.
|
|
425
434
|
*/
|
|
@@ -436,30 +445,37 @@ model UserAssignedIdentity {
|
|
|
436
445
|
* The kind of managed identity assigned to this resource.
|
|
437
446
|
*/
|
|
438
447
|
@doc("The kind of managed identity assigned to this resource.")
|
|
439
|
-
|
|
448
|
+
union ManagedServiceIdentityType {
|
|
440
449
|
@doc("No managed identity.")
|
|
441
|
-
None,
|
|
450
|
+
None: "None",
|
|
442
451
|
|
|
443
452
|
@doc("System assigned managed identity.")
|
|
444
|
-
SystemAssigned,
|
|
453
|
+
SystemAssigned: "SystemAssigned",
|
|
445
454
|
|
|
446
455
|
@doc("User assigned managed identity.")
|
|
447
|
-
UserAssigned,
|
|
456
|
+
UserAssigned: "UserAssigned",
|
|
448
457
|
|
|
449
458
|
@doc("System and user assigned managed identity.")
|
|
450
459
|
SystemAndUserAssigned: "SystemAssigned, UserAssigned",
|
|
460
|
+
|
|
461
|
+
string,
|
|
451
462
|
}
|
|
452
463
|
|
|
464
|
+
/** Alias of SystemAssignedServiceIdentityType for back compatability. Please change to SystemAssignedServiceIdentityType. */
|
|
465
|
+
alias ManagedSystemIdentityType = SystemAssignedServiceIdentityType;
|
|
466
|
+
|
|
453
467
|
/**
|
|
454
468
|
* The kind of managemed identity assigned to this resource.
|
|
455
469
|
*/
|
|
456
470
|
@doc("The kind of managemed identity assigned to this resource.")
|
|
457
|
-
|
|
471
|
+
union SystemAssignedServiceIdentityType {
|
|
458
472
|
@doc("No managed system identity.")
|
|
459
|
-
None,
|
|
473
|
+
None: "None",
|
|
460
474
|
|
|
461
475
|
@doc("System assigned managed system identity.")
|
|
462
|
-
SystemAssigned,
|
|
476
|
+
SystemAssigned: "SystemAssigned",
|
|
477
|
+
|
|
478
|
+
string,
|
|
463
479
|
}
|
|
464
480
|
|
|
465
481
|
/**
|
|
@@ -651,7 +667,7 @@ model Operation {
|
|
|
651
667
|
origin?: Origin;
|
|
652
668
|
|
|
653
669
|
@doc("""
|
|
654
|
-
|
|
670
|
+
Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
|
655
671
|
""")
|
|
656
672
|
actionType?: ActionType;
|
|
657
673
|
}
|
|
@@ -689,12 +705,14 @@ model CheckNameAvailabilityRequest {
|
|
|
689
705
|
* Possible reasons for a name not being available.
|
|
690
706
|
*/
|
|
691
707
|
@doc("Possible reasons for a name not being available.")
|
|
692
|
-
|
|
708
|
+
union CheckNameAvailabilityReason {
|
|
693
709
|
@doc("Name is invalid.")
|
|
694
|
-
Invalid,
|
|
710
|
+
Invalid: "Invalid",
|
|
695
711
|
|
|
696
712
|
@doc("Name already exists.")
|
|
697
|
-
AlreadyExists,
|
|
713
|
+
AlreadyExists: "AlreadyExists",
|
|
714
|
+
|
|
715
|
+
string,
|
|
698
716
|
}
|
|
699
717
|
|
|
700
718
|
/**
|
|
@@ -776,7 +794,7 @@ op ArmCreateOperation<
|
|
|
776
794
|
ErrorResponse extends {}
|
|
777
795
|
>(
|
|
778
796
|
...HttpParameters,
|
|
779
|
-
@doc("Resource create parameters.") @
|
|
797
|
+
@doc("Resource create parameters.") @bodyRoot resource: BodyParameter,
|
|
780
798
|
): Response | ErrorResponse;
|
|
781
799
|
|
|
782
800
|
/**
|
|
@@ -793,5 +811,5 @@ op ArmUpdateOperation<
|
|
|
793
811
|
ErrorResponse extends {}
|
|
794
812
|
>(
|
|
795
813
|
...HttpParameters,
|
|
796
|
-
@doc("The resource properties to be updated.") @
|
|
814
|
+
@doc("The resource properties to be updated.") @bodyRoot properties: BodyParameter,
|
|
797
815
|
): Response | ErrorResponse;
|
|
@@ -4,16 +4,21 @@ using Azure.ResourceManager.Private;
|
|
|
4
4
|
namespace Azure.ResourceManager;
|
|
5
5
|
|
|
6
6
|
@doc("(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.")
|
|
7
|
-
|
|
7
|
+
union InfrastructureEncryption {
|
|
8
8
|
@doc("Encryption is enabled")
|
|
9
9
|
Enabled: "enabled",
|
|
10
10
|
|
|
11
11
|
@doc("Encryption is disabled")
|
|
12
12
|
Disabled: "disabled",
|
|
13
|
+
|
|
14
|
+
string,
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
/** Alias of keyEncryptionKeyIdentity for back compatibility. Please change to keyEncryptionKeyIdentity. */
|
|
18
|
+
alias KeyEncryptionIdentity = KeyEncryptionKeyIdentity;
|
|
19
|
+
|
|
15
20
|
@doc("The type of identity to use.")
|
|
16
|
-
|
|
21
|
+
union KeyEncryptionKeyIdentity {
|
|
17
22
|
@doc("System assigned identity")
|
|
18
23
|
SystemAssignedIdentity: "systemAssignedIdentity",
|
|
19
24
|
|
|
@@ -22,12 +27,14 @@ enum KeyEncryptionIdentity {
|
|
|
22
27
|
|
|
23
28
|
@doc("Delegated identity")
|
|
24
29
|
DelegatedResourceIdentity: "delegatedResourceIdentity",
|
|
30
|
+
|
|
31
|
+
string,
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
@doc("Customer-managed key encryption properties for the resource.")
|
|
28
35
|
model CustomerManagedKeyEncryption {
|
|
29
36
|
@doc("The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity.")
|
|
30
|
-
|
|
37
|
+
keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity;
|
|
31
38
|
|
|
32
39
|
@doc("User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity.")
|
|
33
40
|
userAssignedIdentityResourceId?: Azure.Core.armResourceIdentifier<[
|
package/lib/models.tsp
CHANGED
|
@@ -99,32 +99,34 @@ alias ResourceIdentifier<AllowedResourceTypes extends ArmResourceIdentifierAllow
|
|
|
99
99
|
alias ResourceIdentifierAllowedResource = ArmResourceIdentifierAllowedResource;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* Standard terminal provisioning state of resource type. You can
|
|
102
|
+
* Standard terminal provisioning state of resource type. You can include in your
|
|
103
103
|
* custom provision state to avoid duplication and ensure consistency
|
|
104
104
|
*
|
|
105
105
|
* @example
|
|
106
106
|
*
|
|
107
107
|
* ```typespec
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* starting,
|
|
111
|
-
* started,
|
|
112
|
-
* stopping,
|
|
113
|
-
* stopped,
|
|
108
|
+
* union FooProvisioningState {
|
|
109
|
+
* ResourceProvisioningState, // include standard provisioning states
|
|
110
|
+
* starting: "starting",
|
|
111
|
+
* started: "started",
|
|
112
|
+
* stopping: "stopping",
|
|
113
|
+
* stopped: "stopped",
|
|
114
114
|
* }
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
117
|
@doc("The provisioning state of a resource type.")
|
|
118
118
|
@Azure.Core.lroStatus
|
|
119
|
-
|
|
119
|
+
union ResourceProvisioningState {
|
|
120
120
|
@doc("Resource has been created.")
|
|
121
|
-
Succeeded,
|
|
121
|
+
Succeeded: "Succeeded",
|
|
122
122
|
|
|
123
123
|
@doc("Resource creation failed.")
|
|
124
|
-
Failed,
|
|
124
|
+
Failed: "Failed",
|
|
125
125
|
|
|
126
126
|
@doc("Resource creation was canceled.")
|
|
127
|
-
Canceled,
|
|
127
|
+
Canceled: "Canceled",
|
|
128
|
+
|
|
129
|
+
string,
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
/**
|
package/lib/operations.tsp
CHANGED
|
@@ -519,7 +519,7 @@ op ArmResourceActionAsyncBase<
|
|
|
519
519
|
...Parameters,
|
|
520
520
|
|
|
521
521
|
@doc("The content of the action request")
|
|
522
|
-
@
|
|
522
|
+
@bodyRoot
|
|
523
523
|
body: Request,
|
|
524
524
|
): Response | Error;
|
|
525
525
|
|
|
@@ -581,7 +581,7 @@ op ArmResourceActionSync<
|
|
|
581
581
|
...Parameters,
|
|
582
582
|
|
|
583
583
|
@doc("The content of the action request")
|
|
584
|
-
@
|
|
584
|
+
@bodyRoot
|
|
585
585
|
body: Request,
|
|
586
586
|
): Response | Error;
|
|
587
587
|
|
|
@@ -666,7 +666,7 @@ op ArmResourceActionNoContentSync<
|
|
|
666
666
|
...Parameters,
|
|
667
667
|
|
|
668
668
|
@doc("The content of the action request")
|
|
669
|
-
@
|
|
669
|
+
@bodyRoot
|
|
670
670
|
body: Request,
|
|
671
671
|
): ArmNoContentResponse<"Action completed successfully."> | Error;
|
|
672
672
|
|
package/lib/private-links.tsp
CHANGED
|
@@ -96,26 +96,28 @@ model PrivateLinkServiceConnectionState {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/** The provisioning state of the connection */
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
union PrivateEndpointConnectionProvisioningState {
|
|
100
|
+
ResourceProvisioningState,
|
|
101
101
|
|
|
102
102
|
/** Connection is being created */
|
|
103
|
-
Creating,
|
|
103
|
+
Creating: "Creating",
|
|
104
104
|
|
|
105
105
|
/** Connection is being deleted */
|
|
106
|
-
Deleting,
|
|
106
|
+
Deleting: "Deleting",
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/** The private endpoint connection status */
|
|
110
|
-
|
|
110
|
+
union PrivateEndpointServiceConnectionStatus {
|
|
111
111
|
/** Connectionaiting for approval or rejection */
|
|
112
|
-
Pending,
|
|
112
|
+
Pending: "Pending",
|
|
113
113
|
|
|
114
114
|
/** Connection approved */
|
|
115
|
-
Approved,
|
|
115
|
+
Approved: "Approved",
|
|
116
116
|
|
|
117
117
|
/** Connection Rejected */
|
|
118
|
-
Rejected,
|
|
118
|
+
Rejected: "Rejected",
|
|
119
|
+
|
|
120
|
+
string,
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
model PrivateLinkResource extends Azure.ResourceManager.Foundations.ProxyResourceBase {
|
package/lib/responses.tsp
CHANGED
|
@@ -13,7 +13,10 @@ namespace Azure.ResourceManager;
|
|
|
13
13
|
@doc("Azure operation completed successfully.")
|
|
14
14
|
model ArmResponse<ResponseBody> {
|
|
15
15
|
...OkResponse;
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
@doc("The body type of the operation request or response.")
|
|
18
|
+
@bodyRoot
|
|
19
|
+
body: ResponseBody;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
/**
|
|
@@ -88,7 +91,7 @@ model ArmAcceptedLroResponse<
|
|
|
88
91
|
*/
|
|
89
92
|
model ArmOperationStatus<
|
|
90
93
|
Properties extends {} = never,
|
|
91
|
-
StatusValues extends TypeSpec.Reflection.
|
|
94
|
+
StatusValues extends TypeSpec.Reflection.Union = ResourceProvisioningState
|
|
92
95
|
> is ArmResourceBase {
|
|
93
96
|
/** RP-specific properties for the operationStatus resource, only appears when operation ended with Succeeded status */
|
|
94
97
|
@visibility("read")
|
|
@@ -219,7 +222,7 @@ model ArmResourceCreatedResponse<
|
|
|
219
222
|
|
|
220
223
|
@Azure.Core.pollingLocation(Azure.Core.StatusMonitorPollingOptions<Resource>)
|
|
221
224
|
@doc("The resource body")
|
|
222
|
-
@
|
|
225
|
+
@bodyRoot
|
|
223
226
|
body: Resource;
|
|
224
227
|
}
|
|
225
228
|
|
|
@@ -228,9 +231,12 @@ model ArmResourceCreatedResponse<
|
|
|
228
231
|
* @template Resource The resource being updated
|
|
229
232
|
*/
|
|
230
233
|
@doc("Resource '{name}' create operation succeeded", Resource)
|
|
231
|
-
model ArmResourceCreatedSyncResponse<Resource extends Azure.ResourceManager.Foundations.ArmResource>
|
|
232
|
-
is Body<Resource> {
|
|
234
|
+
model ArmResourceCreatedSyncResponse<Resource extends Azure.ResourceManager.Foundations.ArmResource> {
|
|
233
235
|
...CreatedResponse;
|
|
236
|
+
|
|
237
|
+
@doc("The body type of the operation request or response.")
|
|
238
|
+
@bodyRoot
|
|
239
|
+
body: Resource;
|
|
234
240
|
}
|
|
235
241
|
|
|
236
242
|
/**
|