@azure-tools/typespec-azure-resource-manager 0.52.0-dev.1 → 0.52.0-dev.2
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/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +5 -2
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/rules/arm-resource-provisioning-state-rule.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-provisioning-state-rule.js +3 -4
- package/dist/src/rules/arm-resource-provisioning-state-rule.js.map +1 -1
- package/dist/src/rules/resource-name.d.ts.map +1 -1
- package/dist/src/rules/resource-name.js +4 -7
- package/dist/src/rules/resource-name.js.map +1 -1
- package/lib/Legacy/managed-identity.tsp +2 -2
- package/lib/common-types/managed-identity.tsp +6 -6
- package/lib/common-types/mobo.tsp +1 -1
- package/lib/common-types/network-security-perimeter.tsp +10 -10
- package/lib/common-types/private-links.tsp +7 -7
- package/lib/common-types/types.tsp +26 -26
- package/lib/models.tsp +4 -4
- package/lib/operations.tsp +2 -2
- package/lib/parameters.tsp +2 -2
- package/lib/responses.tsp +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private.decorators.d.ts","sourceRoot":"","sources":["../../src/private.decorators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"private.decorators.d.ts","sourceRoot":"","sources":["../../src/private.decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACT,KAAK,EACL,aAAa,EAEb,OAAO,EAUR,MAAM,oBAAoB,CAAC;AAsB5B,OAAO,EACL,kBAAkB,EAOnB,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,SAAS,kCAAkC,CAAC;AAsGzD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,GACtB,MAAM,EAAE,GAAG,SAAS,CAEtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAMT;AAyED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAWvF;AAyGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,EAAE,CAEvE;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,KAAK,GAClB,kBAAkB,GAAG,SAAS,CAEhC;AAwBD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,GAAG,OAAO,CAG9E;AAeD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAGzF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $key,
|
|
1
|
+
import { $key, addVisibilityModifiers, clearVisibilityModifiersForClass, getKeyName, getLifecycleVisibilityEnum, getTypeName, sealVisibilityModifiers, } from "@typespec/compiler";
|
|
2
2
|
import { $segment, getSegment } from "@typespec/rest";
|
|
3
3
|
import { camelCase } from "change-case";
|
|
4
4
|
import pluralize from "pluralize";
|
|
@@ -193,7 +193,10 @@ const $armResourceInternal = (context, resourceType, propertiesType) => {
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
// Set the name property to be read only
|
|
196
|
-
|
|
196
|
+
const Lifecycle = getLifecycleVisibilityEnum(program);
|
|
197
|
+
clearVisibilityModifiersForClass(program, nameProperty, Lifecycle, context);
|
|
198
|
+
addVisibilityModifiers(program, nameProperty, [Lifecycle.members.get("Read")], context);
|
|
199
|
+
sealVisibilityModifiers(program, nameProperty, Lifecycle);
|
|
197
200
|
const keyName = getKeyName(program, nameProperty);
|
|
198
201
|
if (!keyName) {
|
|
199
202
|
reportDiagnostic(program, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private.decorators.js","sourceRoot":"","sources":["../../src/private.decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"private.decorators.js","sourceRoot":"","sources":["../../src/private.decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAUJ,sBAAsB,EACtB,gCAAgC,EAChC,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,SAAS,MAAM,WAAW,CAAC;AAgBlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAGL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,+BAA+B,CAAC;AAEzD,gBAAgB;AAChB,MAAM,YAAY,GAAyB,CACzC,OAAyB,EACzB,MAAa,EACb,YAAoB,EACpB,EAAE;IACF,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEpD,IACE,SAAS;QACT,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO;QAC/B,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,EAC7C,CAAC;QACD,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;AAC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wB,EAAE,yBAAyB;QACnD,uBAAuB,EAAE,wBAAwB;QACjD,0BAA0B,EAAE,2BAA2B;QACvD,mBAAmB,EAAE,oBAAoB;QACzC,6BAA6B,EAAE,8BAA8B;QAC7D,iBAAiB,EAAE,kBAAkB;QACrC,wBAAwB,EAAE,yBAAyB;QACnD,gCAAgC,EAAE,iCAAiC;KACpB;CAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arm-resource-provisioning-state-rule.d.ts","sourceRoot":"","sources":["../../../src/rules/arm-resource-provisioning-state-rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arm-resource-provisioning-state-rule.d.ts","sourceRoot":"","sources":["../../../src/rules/arm-resource-provisioning-state-rule.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gCAAgC;;;;;EA2G3C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createRule, getProperty,
|
|
1
|
+
import { createRule, getProperty, paramMessage } from "@typespec/compiler";
|
|
2
2
|
import { getUnionAsEnum } from "@azure-tools/typespec-azure-core";
|
|
3
|
+
import { isReadonlyProperty } from "@typespec/openapi";
|
|
3
4
|
import { getArmResource } from "../resource.js";
|
|
4
5
|
import { getSourceProperty } from "./utils.js";
|
|
5
6
|
export const armResourceProvisioningStateRule = createRule({
|
|
@@ -94,9 +95,7 @@ export const armResourceProvisioningStateRule = createRule({
|
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
// validate it must has a read only visibility
|
|
97
|
-
|
|
98
|
-
const visibilities = getVisibility(context.program, provisioning);
|
|
99
|
-
if (!(visibilities !== undefined && visibilities.length === 1 && visibilities[0] === "read")) {
|
|
98
|
+
if (!isReadonlyProperty(context.program, provisioning)) {
|
|
100
99
|
context.reportDiagnostic({
|
|
101
100
|
messageId: "missingReadOnlyVisibility",
|
|
102
101
|
target: provisioning,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arm-resource-provisioning-state-rule.js","sourceRoot":"","sources":["../../../src/rules/arm-resource-provisioning-state-rule.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"arm-resource-provisioning-state-rule.js","sourceRoot":"","sources":["../../../src/rules/arm-resource-provisioning-state-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,gCAAgC,GAAG,UAAU,CAAC;IACzD,IAAI,EAAE,iCAAiC;IACvC,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,2DAA2D;IACxE,QAAQ,EAAE;QACR,OAAO,EACL,0QAA0Q;QAC5Q,aAAa,EAAE,YAAY,CAAA,8JAA8J,eAAe,IAAI;QAC5M,yBAAyB,EAAE,oEAAoE;QAC/F,cAAc,EAAE,kDAAkD;KACnE;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC7D,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBAChC,OAAO;gBACT,CAAC;gBACD,MAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,IAAI,CAAC;gBAClE,IAAI,kBAAkB,KAAK,SAAS,IAAI,kBAAkB,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBAC5E,OAAO;gBACT,CAAC;gBAED,IAAI,YAAY,GAAG,WAAW,CAAC,kBAAkB,EAAE,m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,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC;wBACvD,OAAO,CAAC,gBAAgB,CAAC;4BACvB,SAAS,EAAE,2BAA2B;4BACtC,MAAM,EAAE,YAAY;yBACrB,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-name.d.ts","sourceRoot":"","sources":["../../../src/rules/resource-name.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"resource-name.d.ts","sourceRoot":"","sources":["../../../src/rules/resource-name.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;EA4C3B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createRule, getProperty,
|
|
1
|
+
import { createRule, getProperty, } from "@typespec/compiler";
|
|
2
2
|
import * as http from "@typespec/http";
|
|
3
|
+
import { isReadonlyProperty } from "@typespec/openapi";
|
|
3
4
|
import { getArmResources } from "../resource.js";
|
|
4
5
|
/**
|
|
5
6
|
* The resource 'name' field should be marked with 'read' visibility and an @path decorator.
|
|
@@ -33,12 +34,8 @@ export const resourceNameRule = createRule({
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
function checkResourceName(nameProp) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (!http.isPathParam(context.program, nameProp) ||
|
|
39
|
-
!visibilities ||
|
|
40
|
-
visibilities.length !== 1 ||
|
|
41
|
-
visibilities[0] !== "read");
|
|
37
|
+
return !(http.isPathParam(context.program, nameProp) &&
|
|
38
|
+
isReadonlyProperty(context.program, nameProp));
|
|
42
39
|
}
|
|
43
40
|
function checkResourceModelName(name) {
|
|
44
41
|
const matches = name.match(/^[A-Z][0-9A-Za-z]+$/);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-name.js","sourceRoot":"","sources":["../../../src/rules/resource-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,WAAW,
|
|
1
|
+
{"version":3,"file":"resource-name.js","sourceRoot":"","sources":["../../../src/rules/resource-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,0BAA0B;IACvC,QAAQ,EAAE;QACR,OAAO,EAAE,2FAA2F;QACpG,WAAW,EAAE,8DAA8D;KAC5E;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACnD,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,KAAK,KAAK,CAAC,CAAC;gBAEtE,IAAI,WAAW,EAAE,CAAC;oBAChB,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;wBACxC,OAAO,CAAC,gBAAgB,CAAC;4BACvB,SAAS,EAAE,aAAa;4BACxB,MAAM,EAAE,KAAK;yBACd,CAAC,CAAC;oBACL,CAAC;oBACD,sDAAsD;oBACtD,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;oBACxC,IAAI,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;wBACpC,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,IAAI;yBACb,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBAED,SAAS,iBAAiB,CAAC,QAAuB;oBAChD,OAAO,CAAC,CACN,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;wBAC3C,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAC9C,CAAC;gBACJ,CAAC;gBAED,SAAS,sBAAsB,CAAC,IAAY;oBAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBAClD,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;gBAClD,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -40,11 +40,11 @@ model ManagedServiceIdentityV4Property {
|
|
|
40
40
|
)
|
|
41
41
|
model ManagedServiceIdentityV4 {
|
|
42
42
|
/** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
43
|
-
@visibility(
|
|
43
|
+
@visibility(Lifecycle.Read)
|
|
44
44
|
principalId?: uuid;
|
|
45
45
|
|
|
46
46
|
/** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
47
|
-
@visibility(
|
|
47
|
+
@visibility(Lifecycle.Read)
|
|
48
48
|
tenantId?: uuid;
|
|
49
49
|
|
|
50
50
|
/** The type of managed identity assigned to this resource. */
|
|
@@ -13,11 +13,11 @@ model UserAssignedIdentities is Record<UserAssignedIdentity | null>;
|
|
|
13
13
|
*/
|
|
14
14
|
model ManagedServiceIdentity {
|
|
15
15
|
/** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
16
|
-
@visibility(
|
|
16
|
+
@visibility(Lifecycle.Read)
|
|
17
17
|
principalId?: uuid;
|
|
18
18
|
|
|
19
19
|
/** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
20
|
-
@visibility(
|
|
20
|
+
@visibility(Lifecycle.Read)
|
|
21
21
|
tenantId?: uuid;
|
|
22
22
|
|
|
23
23
|
/** The type of managed identity assigned to this resource. */
|
|
@@ -33,11 +33,11 @@ model ManagedServiceIdentity {
|
|
|
33
33
|
*/
|
|
34
34
|
model SystemAssignedServiceIdentity {
|
|
35
35
|
/** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
36
|
-
@visibility(
|
|
36
|
+
@visibility(Lifecycle.Read)
|
|
37
37
|
principalId?: uuid;
|
|
38
38
|
|
|
39
39
|
/** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|
40
|
-
@visibility(
|
|
40
|
+
@visibility(Lifecycle.Read)
|
|
41
41
|
tenantId?: uuid;
|
|
42
42
|
|
|
43
43
|
/** The type of managed identity assigned to this resource. */
|
|
@@ -49,11 +49,11 @@ model SystemAssignedServiceIdentity {
|
|
|
49
49
|
*/
|
|
50
50
|
model UserAssignedIdentity {
|
|
51
51
|
/** The client ID of the assigned identity. */
|
|
52
|
-
@visibility(
|
|
52
|
+
@visibility(Lifecycle.Read)
|
|
53
53
|
clientId?: uuid;
|
|
54
54
|
|
|
55
55
|
/** The principal ID of the assigned identity. */
|
|
56
|
-
@visibility(
|
|
56
|
+
@visibility(Lifecycle.Read)
|
|
57
57
|
principalId?: uuid;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -139,7 +139,7 @@ model NetworkSecurityPerimeter {
|
|
|
139
139
|
perimeterGuid?: uuid;
|
|
140
140
|
|
|
141
141
|
/** Location of the network security perimeter */
|
|
142
|
-
@visibility(
|
|
142
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
143
143
|
location?: string;
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -152,11 +152,11 @@ model NetworkSecurityPerimeterConfiguration extends ProxyResource {
|
|
|
152
152
|
/** Network security configuration properties. */
|
|
153
153
|
@added(Versions.v5)
|
|
154
154
|
model NetworkSecurityPerimeterConfigurationProperties {
|
|
155
|
-
@visibility(
|
|
155
|
+
@visibility(Lifecycle.Read)
|
|
156
156
|
provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState;
|
|
157
157
|
|
|
158
158
|
/** List of provisioning issues, if any */
|
|
159
|
-
@visibility(
|
|
159
|
+
@visibility(Lifecycle.Read)
|
|
160
160
|
@OpenAPI.extension("x-ms-identifiers", #[])
|
|
161
161
|
provisioningIssues?: ProvisioningIssue[];
|
|
162
162
|
|
|
@@ -169,10 +169,10 @@ model NetworkSecurityPerimeterConfigurationProperties {
|
|
|
169
169
|
@added(Versions.v5)
|
|
170
170
|
model ProvisioningIssue {
|
|
171
171
|
/** Name of the issue */
|
|
172
|
-
@visibility(
|
|
172
|
+
@visibility(Lifecycle.Read)
|
|
173
173
|
name?: string;
|
|
174
174
|
|
|
175
|
-
@visibility(
|
|
175
|
+
@visibility(Lifecycle.Read)
|
|
176
176
|
properties?: ProvisioningIssueProperties;
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -180,23 +180,23 @@ model ProvisioningIssue {
|
|
|
180
180
|
@added(Versions.v5)
|
|
181
181
|
model ProvisioningIssueProperties {
|
|
182
182
|
/** Type of issue */
|
|
183
|
-
@visibility(
|
|
183
|
+
@visibility(Lifecycle.Read)
|
|
184
184
|
issueType?: IssueType;
|
|
185
185
|
|
|
186
186
|
/** Severity of the issue. */
|
|
187
|
-
@visibility(
|
|
187
|
+
@visibility(Lifecycle.Read)
|
|
188
188
|
severity?: Severity;
|
|
189
189
|
|
|
190
190
|
/** Description of the issue */
|
|
191
|
-
@visibility(
|
|
191
|
+
@visibility(Lifecycle.Read)
|
|
192
192
|
description?: string;
|
|
193
193
|
|
|
194
194
|
/** Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter (NSP) to remediate the issue. */
|
|
195
|
-
@visibility(
|
|
195
|
+
@visibility(Lifecycle.Read)
|
|
196
196
|
suggestedResourceIds?: Azure.Core.armResourceIdentifier[];
|
|
197
197
|
|
|
198
198
|
/** Access rules that can be added to the network security profile (NSP) to remediate the issue. */
|
|
199
|
-
@visibility(
|
|
199
|
+
@visibility(Lifecycle.Read)
|
|
200
200
|
@OpenAPI.extension("x-ms-identifiers", #[])
|
|
201
201
|
suggestedAccessRules?: AccessRule[];
|
|
202
202
|
}
|
|
@@ -9,7 +9,7 @@ namespace Azure.ResourceManager.CommonTypes;
|
|
|
9
9
|
/** The Private Endpoint resource. */
|
|
10
10
|
model PrivateEndpoint {
|
|
11
11
|
/** The resource identifier for private endpoint */
|
|
12
|
-
@visibility(
|
|
12
|
+
@visibility(Lifecycle.Read)
|
|
13
13
|
@typeChangedFrom(CommonTypes.Versions.v4, string)
|
|
14
14
|
id?: Azure.Core.armResourceIdentifier;
|
|
15
15
|
}
|
|
@@ -23,11 +23,11 @@ model PrivateLinkResource extends Resource {
|
|
|
23
23
|
/** Properties of a private link resource. */
|
|
24
24
|
model PrivateLinkResourceProperties {
|
|
25
25
|
/** The private link resource group id. */
|
|
26
|
-
@visibility(
|
|
26
|
+
@visibility(Lifecycle.Read)
|
|
27
27
|
groupId?: string;
|
|
28
28
|
|
|
29
29
|
/** The private link resource required member names. */
|
|
30
|
-
@visibility(
|
|
30
|
+
@visibility(Lifecycle.Read)
|
|
31
31
|
requiredMembers?: string[];
|
|
32
32
|
|
|
33
33
|
/** The private link resource private link DNS zone name. */
|
|
@@ -42,7 +42,7 @@ model PrivateLinkResourceListResult {
|
|
|
42
42
|
value?: PrivateLinkResource[];
|
|
43
43
|
|
|
44
44
|
/** URL to get the next set of operation list results (if there are any). */
|
|
45
|
-
@visibility(
|
|
45
|
+
@visibility(Lifecycle.Read)
|
|
46
46
|
nextLink?: string;
|
|
47
47
|
}
|
|
48
48
|
//#region
|
|
@@ -60,14 +60,14 @@ model PrivateEndpointConnectionListResult {
|
|
|
60
60
|
value?: PrivateEndpointConnection[];
|
|
61
61
|
|
|
62
62
|
/** URL to get the next set of operation list results (if there are any). */
|
|
63
|
-
@visibility(
|
|
63
|
+
@visibility(Lifecycle.Read)
|
|
64
64
|
nextLink?: string;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/** Properties of the private endpoint connection. */
|
|
68
68
|
model PrivateEndpointConnectionProperties {
|
|
69
69
|
/** The group ids for the private endpoint resource. */
|
|
70
|
-
@visibility(
|
|
70
|
+
@visibility(Lifecycle.Read)
|
|
71
71
|
@added(Versions.v4)
|
|
72
72
|
groupIds?: string[];
|
|
73
73
|
|
|
@@ -78,7 +78,7 @@ model PrivateEndpointConnectionProperties {
|
|
|
78
78
|
privateLinkServiceConnectionState: PrivateLinkServiceConnectionState;
|
|
79
79
|
|
|
80
80
|
/** The provisioning state of the private endpoint connection resource. */
|
|
81
|
-
@visibility(
|
|
81
|
+
@visibility(Lifecycle.Read)
|
|
82
82
|
provisioningState?: PrivateEndpointConnectionProvisioningState;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -10,26 +10,26 @@ namespace Azure.ResourceManager.CommonTypes;
|
|
|
10
10
|
model Resource {
|
|
11
11
|
/** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */
|
|
12
12
|
@typeChangedFrom(Versions.v4, string)
|
|
13
|
-
@visibility(
|
|
13
|
+
@visibility(Lifecycle.Read)
|
|
14
14
|
id?: armResourceIdentifier;
|
|
15
15
|
|
|
16
16
|
/** The name of the resource */
|
|
17
|
-
@visibility(
|
|
17
|
+
@visibility(Lifecycle.Read)
|
|
18
18
|
name?: string;
|
|
19
19
|
|
|
20
20
|
/** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */
|
|
21
|
-
@visibility(
|
|
21
|
+
@visibility(Lifecycle.Read)
|
|
22
22
|
type?: armResourceType;
|
|
23
23
|
|
|
24
24
|
/** Azure Resource Manager metadata containing createdBy and modifiedBy information. */
|
|
25
|
-
@visibility(
|
|
25
|
+
@visibility(Lifecycle.Read)
|
|
26
26
|
systemData?: SystemData;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/** The resource model definition for an Azure Resource Manager resource with an etag. */
|
|
30
30
|
model AzureEntityResource extends Resource {
|
|
31
31
|
/** Resource Etag. */
|
|
32
|
-
@visibility(
|
|
32
|
+
@visibility(Lifecycle.Read)
|
|
33
33
|
etag?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@ model TrackedResource extends Resource {
|
|
|
41
41
|
tags?: Record<string>;
|
|
42
42
|
|
|
43
43
|
/** The geo-location where the resource lives */
|
|
44
|
-
@visibility(
|
|
44
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
45
45
|
location: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -67,13 +67,13 @@ model ResourceModelWithAllowedPropertySet extends TrackedResource {
|
|
|
67
67
|
/** 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.
|
|
68
68
|
* If supported, the resource provider must validate and persist this value. */
|
|
69
69
|
@pattern("^[-\\w\\._,\\(\\)]+$")
|
|
70
|
-
@visibility(
|
|
70
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
71
71
|
kind?: string;
|
|
72
72
|
|
|
73
73
|
/** The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention.
|
|
74
74
|
* 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),
|
|
75
75
|
* If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. */
|
|
76
|
-
@visibility(
|
|
76
|
+
@visibility(Lifecycle.Read)
|
|
77
77
|
etag?: string;
|
|
78
78
|
|
|
79
79
|
@typeChangedFrom(Versions.v6, Identity)
|
|
@@ -133,13 +133,13 @@ model Operation {
|
|
|
133
133
|
/**
|
|
134
134
|
The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
|
|
135
135
|
*/
|
|
136
|
-
@visibility(
|
|
136
|
+
@visibility(Lifecycle.Read)
|
|
137
137
|
name?: string;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations.
|
|
141
141
|
*/
|
|
142
|
-
@visibility(
|
|
142
|
+
@visibility(Lifecycle.Read)
|
|
143
143
|
isDataAction?: boolean;
|
|
144
144
|
|
|
145
145
|
/** Localized display information for this particular operation. */
|
|
@@ -148,13 +148,13 @@ model Operation {
|
|
|
148
148
|
/**
|
|
149
149
|
The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
|
|
150
150
|
*/
|
|
151
|
-
@visibility(
|
|
151
|
+
@visibility(Lifecycle.Read)
|
|
152
152
|
origin?: Origin;
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
|
156
156
|
*/
|
|
157
|
-
@visibility(
|
|
157
|
+
@visibility(Lifecycle.Read)
|
|
158
158
|
actionType?: ActionType;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -165,23 +165,23 @@ model OperationDisplay {
|
|
|
165
165
|
/**
|
|
166
166
|
The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
|
|
167
167
|
*/
|
|
168
|
-
@visibility(
|
|
168
|
+
@visibility(Lifecycle.Read)
|
|
169
169
|
provider?: string;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
|
|
173
173
|
*/
|
|
174
|
-
@visibility(
|
|
174
|
+
@visibility(Lifecycle.Read)
|
|
175
175
|
resource?: string;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
|
|
179
179
|
*/
|
|
180
|
-
@visibility(
|
|
180
|
+
@visibility(Lifecycle.Read)
|
|
181
181
|
operation?: string;
|
|
182
182
|
|
|
183
183
|
/** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */
|
|
184
|
-
@visibility(
|
|
184
|
+
@visibility(Lifecycle.Read)
|
|
185
185
|
description?: string;
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -217,7 +217,7 @@ model OperationStatusResult {
|
|
|
217
217
|
error?: ErrorDetail;
|
|
218
218
|
|
|
219
219
|
/** Fully qualified ID of the resource against which the original async operation was started. */
|
|
220
|
-
@visibility(
|
|
220
|
+
@visibility(Lifecycle.Read)
|
|
221
221
|
@format("arm-id")
|
|
222
222
|
@added(Versions.v5)
|
|
223
223
|
resourceId?: string;
|
|
@@ -254,23 +254,23 @@ union Origin {
|
|
|
254
254
|
*/
|
|
255
255
|
model ErrorDetail {
|
|
256
256
|
/** The error code. */
|
|
257
|
-
@visibility(
|
|
257
|
+
@visibility(Lifecycle.Read)
|
|
258
258
|
code?: string;
|
|
259
259
|
|
|
260
260
|
/** The error message. */
|
|
261
|
-
@visibility(
|
|
261
|
+
@visibility(Lifecycle.Read)
|
|
262
262
|
message?: string;
|
|
263
263
|
|
|
264
264
|
/** The error target. */
|
|
265
|
-
@visibility(
|
|
265
|
+
@visibility(Lifecycle.Read)
|
|
266
266
|
target?: string;
|
|
267
267
|
|
|
268
268
|
/** The error details. */
|
|
269
|
-
@visibility(
|
|
269
|
+
@visibility(Lifecycle.Read)
|
|
270
270
|
details?: ErrorDetail[];
|
|
271
271
|
|
|
272
272
|
/** The error additional info. */
|
|
273
|
-
@visibility(
|
|
273
|
+
@visibility(Lifecycle.Read)
|
|
274
274
|
additionalInfo?: ErrorAdditionalInfo[];
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -288,11 +288,11 @@ model ErrorResponse {
|
|
|
288
288
|
*/
|
|
289
289
|
model ErrorAdditionalInfo {
|
|
290
290
|
/** The additional info type. */
|
|
291
|
-
@visibility(
|
|
291
|
+
@visibility(Lifecycle.Read)
|
|
292
292
|
type?: string;
|
|
293
293
|
|
|
294
294
|
/** The additional info. */
|
|
295
|
-
@visibility(
|
|
295
|
+
@visibility(Lifecycle.Read)
|
|
296
296
|
info?: {};
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -349,13 +349,13 @@ model Identity {
|
|
|
349
349
|
/** The principal ID of resource identity. The value must be an UUID. */
|
|
350
350
|
@removed(Versions.v6)
|
|
351
351
|
@typeChangedFrom(Versions.v4, string)
|
|
352
|
-
@visibility(
|
|
352
|
+
@visibility(Lifecycle.Read)
|
|
353
353
|
principalId?: uuid;
|
|
354
354
|
|
|
355
355
|
/** The tenant ID of resource. The value must be an UUID. */
|
|
356
356
|
@removed(Versions.v6)
|
|
357
357
|
@typeChangedFrom(Versions.v4, string)
|
|
358
|
-
@visibility(
|
|
358
|
+
@visibility(Lifecycle.Read)
|
|
359
359
|
tenantId?: uuid;
|
|
360
360
|
|
|
361
361
|
/** The identity type. */
|
package/lib/models.tsp
CHANGED
|
@@ -178,7 +178,7 @@ union ResourceProvisioningState {
|
|
|
178
178
|
@doc("Contains a default provisioningState property to be spread into resource property types")
|
|
179
179
|
model DefaultProvisioningStateProperty {
|
|
180
180
|
@doc("The provisioning state of the resource.")
|
|
181
|
-
@visibility(
|
|
181
|
+
@visibility(Lifecycle.Read)
|
|
182
182
|
provisioningState?: ResourceProvisioningState;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -195,7 +195,7 @@ model DefaultProvisioningStateProperty {
|
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
197
|
model ExtendedLocationProperty {
|
|
198
|
-
@visibility(
|
|
198
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
199
199
|
extendedLocation?: Foundations.ExtendedLocation;
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -260,7 +260,7 @@ alias EntityTag = EntityTagProperty;
|
|
|
260
260
|
@doc("The eTag property envelope.")
|
|
261
261
|
model EntityTagProperty {
|
|
262
262
|
@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.")
|
|
263
|
-
@visibility(
|
|
263
|
+
@visibility(Lifecycle.Read)
|
|
264
264
|
eTag?: string;
|
|
265
265
|
}
|
|
266
266
|
|
|
@@ -283,7 +283,7 @@ alias ResourceKind = ResourceKindProperty;
|
|
|
283
283
|
model ResourceKindProperty {
|
|
284
284
|
@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.")
|
|
285
285
|
@pattern("^[-\\w\\._,\\(\\\\\\)]+$")
|
|
286
|
-
@visibility(
|
|
286
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
287
287
|
kind?: string;
|
|
288
288
|
}
|
|
289
289
|
|
package/lib/operations.tsp
CHANGED
|
@@ -276,7 +276,7 @@ op ArmTagsPatchAsync<
|
|
|
276
276
|
>;
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
|
-
* @dev A long-running resource update using the items from the resource marked with visibility
|
|
279
|
+
* @dev A long-running resource update using the items from the resource marked with Lifecycle.Update visibility
|
|
280
280
|
* @template Resource the resource being patched
|
|
281
281
|
* @template Properties The model type of the resource properties
|
|
282
282
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
@@ -349,7 +349,7 @@ op ArmTagsPatchSync<
|
|
|
349
349
|
> is ArmCustomPatchSync<Resource, TagsUpdateModel<Resource>, BaseParameters, Parameters>;
|
|
350
350
|
|
|
351
351
|
/**
|
|
352
|
-
* @dev A resource update using the items from the resource marked with visibility
|
|
352
|
+
* @dev A resource update using the items from the resource marked with Lifecycle.Update visibility
|
|
353
353
|
* @template Resource the resource being patched
|
|
354
354
|
* @template Properties The model type of the resource properties
|
|
355
355
|
* @template BaseParameters Optional. Allows overriding the operation parameters
|
package/lib/parameters.tsp
CHANGED
|
@@ -145,7 +145,7 @@ alias TenantInstanceParameters<Resource extends Foundations.Resource> = Resource
|
|
|
145
145
|
model SubscriptionActionScope {
|
|
146
146
|
@doc("Symbolic name of scope")
|
|
147
147
|
@path
|
|
148
|
-
@visibility(
|
|
148
|
+
@visibility(Lifecycle.Read)
|
|
149
149
|
@key
|
|
150
150
|
@segment("subscription")
|
|
151
151
|
name: string;
|
|
@@ -159,7 +159,7 @@ model SubscriptionActionScope {
|
|
|
159
159
|
model TenantActionScope {
|
|
160
160
|
@doc("Symbolic name of scope")
|
|
161
161
|
@path
|
|
162
|
-
@visibility(
|
|
162
|
+
@visibility(Lifecycle.Read)
|
|
163
163
|
@key
|
|
164
164
|
@segment("tenant")
|
|
165
165
|
name: string;
|
package/lib/responses.tsp
CHANGED
|
@@ -95,7 +95,7 @@ model ArmOperationStatus<
|
|
|
95
95
|
StatusValues extends TypeSpec.Reflection.Union = ResourceProvisioningState
|
|
96
96
|
> {
|
|
97
97
|
/** RP-specific properties for the operationStatus resource, only appears when operation ended with Succeeded status */
|
|
98
|
-
@visibility(
|
|
98
|
+
@visibility(Lifecycle.Read)
|
|
99
99
|
properties?: Properties;
|
|
100
100
|
|
|
101
101
|
/** The operation status */
|
|
@@ -109,23 +109,23 @@ model ArmOperationStatus<
|
|
|
109
109
|
id: string;
|
|
110
110
|
|
|
111
111
|
/** The name of the operationStatus resource */
|
|
112
|
-
@visibility(
|
|
112
|
+
@visibility(Lifecycle.Read)
|
|
113
113
|
name?: string;
|
|
114
114
|
|
|
115
115
|
/** Operation start time */
|
|
116
|
-
@visibility(
|
|
116
|
+
@visibility(Lifecycle.Read)
|
|
117
117
|
startTime?: utcDateTime;
|
|
118
118
|
|
|
119
119
|
/** Operation complete time */
|
|
120
|
-
@visibility(
|
|
120
|
+
@visibility(Lifecycle.Read)
|
|
121
121
|
endTime?: utcDateTime;
|
|
122
122
|
|
|
123
123
|
/** The progress made toward completing the operation */
|
|
124
|
-
@visibility(
|
|
124
|
+
@visibility(Lifecycle.Read)
|
|
125
125
|
percentComplete?: float64;
|
|
126
126
|
|
|
127
127
|
/** Errors that occurred if the operation ended with Canceled or Failed status */
|
|
128
|
-
@visibility(
|
|
128
|
+
@visibility(Lifecycle.Read)
|
|
129
129
|
error?: ErrorDetail;
|
|
130
130
|
}
|
|
131
131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.52.0-dev.
|
|
3
|
+
"version": "0.52.0-dev.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|