@azure-tools/typespec-azure-resource-manager 0.43.0-dev.0 → 0.43.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.
Files changed (68) hide show
  1. package/README.md +35 -35
  2. package/dist/src/common-types.d.ts +14 -3
  3. package/dist/src/common-types.d.ts.map +1 -1
  4. package/dist/src/common-types.js +133 -3
  5. package/dist/src/common-types.js.map +1 -1
  6. package/dist/src/commontypes.private.decorators.d.ts +44 -0
  7. package/dist/src/commontypes.private.decorators.d.ts.map +1 -0
  8. package/dist/src/commontypes.private.decorators.js +77 -0
  9. package/dist/src/commontypes.private.decorators.js.map +1 -0
  10. package/dist/src/index.d.ts +2 -1
  11. package/dist/src/index.d.ts.map +1 -1
  12. package/dist/src/index.js +5 -1
  13. package/dist/src/index.js.map +1 -1
  14. package/dist/src/lib.d.ts +17 -2
  15. package/dist/src/lib.d.ts.map +1 -1
  16. package/dist/src/lib.js +6 -0
  17. package/dist/src/lib.js.map +1 -1
  18. package/dist/src/namespace.d.ts.map +1 -1
  19. package/dist/src/namespace.js +35 -0
  20. package/dist/src/namespace.js.map +1 -1
  21. package/dist/src/private.decorators.d.ts +1 -22
  22. package/dist/src/private.decorators.d.ts.map +1 -1
  23. package/dist/src/private.decorators.js +0 -149
  24. package/dist/src/private.decorators.js.map +1 -1
  25. package/dist/src/rules/arm-common-types-version.d.ts.map +1 -1
  26. package/dist/src/rules/arm-common-types-version.js +2 -3
  27. package/dist/src/rules/arm-common-types-version.js.map +1 -1
  28. package/dist/src/rules/arm-post-response-codes.d.ts.map +1 -1
  29. package/dist/src/rules/arm-post-response-codes.js.map +1 -1
  30. package/dist/src/rules/arm-resource-operation-response.d.ts.map +1 -1
  31. package/dist/src/rules/arm-resource-operation-response.js +3 -3
  32. package/dist/src/rules/arm-resource-operation-response.js.map +1 -1
  33. package/dist/src/rules/arm-resource-patch.d.ts.map +1 -1
  34. package/dist/src/rules/arm-resource-patch.js +2 -2
  35. package/dist/src/rules/arm-resource-patch.js.map +1 -1
  36. package/dist/src/rules/core-operations.js +1 -1
  37. package/dist/src/rules/core-operations.js.map +1 -1
  38. package/dist/src/rules/missing-x-ms-identifiers.js +1 -1
  39. package/dist/src/rules/missing-x-ms-identifiers.js.map +1 -1
  40. package/dist/src/rules/unsupported-type.d.ts.map +1 -1
  41. package/dist/src/rules/unsupported-type.js +4 -2
  42. package/dist/src/rules/unsupported-type.js.map +1 -1
  43. package/lib/arm.tsp +2 -9
  44. package/lib/backcompat.tsp +27 -0
  45. package/lib/common-types/common-types.tsp +11 -1
  46. package/lib/common-types/commontypes.private.decorators.tsp +43 -0
  47. package/lib/common-types/customer-managed-keys-ref.tsp +27 -0
  48. package/lib/common-types/customer-managed-keys.tsp +37 -46
  49. package/lib/common-types/extended-location-ref.tsp +1 -0
  50. package/lib/common-types/extended-location.tsp +15 -16
  51. package/lib/common-types/internal.tsp +24 -0
  52. package/lib/common-types/managed-identity-ref.tsp +79 -0
  53. package/lib/common-types/managed-identity.tsp +50 -72
  54. package/lib/common-types/private-links-ref.tsp +159 -0
  55. package/lib/common-types/private-links.tsp +55 -117
  56. package/lib/common-types/types-ref.tsp +414 -0
  57. package/lib/common-types/types.tsp +324 -202
  58. package/lib/decorators.tsp +1 -1
  59. package/lib/{arm.foundations.tsp → foundations/arm.foundations.tsp} +23 -21
  60. package/lib/foundations/backcompat.tsp +39 -0
  61. package/lib/{common-types/backcompat.tsp → foundations/deprecation.tsp} +11 -0
  62. package/lib/interfaces.tsp +0 -1
  63. package/lib/models.tsp +25 -2
  64. package/lib/operations.tsp +5 -32
  65. package/lib/parameters.tsp +14 -67
  66. package/lib/private.decorators.tsp +0 -38
  67. package/lib/responses.tsp +8 -17
  68. package/package.json +5 -7
@@ -0,0 +1,159 @@
1
+ import "./private-links.tsp";
2
+
3
+ using Azure.ResourceManager.CommonTypes.Private;
4
+
5
+ namespace Azure.ResourceManager.CommonTypes;
6
+
7
+ /** The private endpoint */
8
+ @@armCommonDefinition(PrivateEndpoint,
9
+ "PrivateEndpoint",
10
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
11
+ "privatelinks.json"
12
+ );
13
+ @@armCommonDefinition(PrivateEndpoint,
14
+ "PrivateEndpoint",
15
+ Azure.ResourceManager.CommonTypes.Versions.v4,
16
+ "privatelinks.json"
17
+ );
18
+ @@armCommonDefinition(PrivateEndpoint,
19
+ "PrivateEndpoint",
20
+ Azure.ResourceManager.CommonTypes.Versions.v5,
21
+ "privatelinks.json"
22
+ );
23
+
24
+ /** The private endpoint resource */
25
+ @@armCommonDefinition(PrivateLinkResource,
26
+ "PrivateLinkResource",
27
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
28
+ "privatelinks.json"
29
+ );
30
+ @@armCommonDefinition(PrivateLinkResource,
31
+ "PrivateLinkResource",
32
+ Azure.ResourceManager.CommonTypes.Versions.v4,
33
+ "privatelinks.json"
34
+ );
35
+ @@armCommonDefinition(PrivateLinkResource,
36
+ "PrivateLinkResource",
37
+ Azure.ResourceManager.CommonTypes.Versions.v5,
38
+ "privatelinks.json"
39
+ );
40
+
41
+ /** PrivateEndpointConnection */
42
+ @@armCommonDefinition(PrivateEndpointConnection,
43
+ "PrivateEndpointConnection",
44
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
45
+ "privatelinks.json"
46
+ );
47
+ @@armCommonDefinition(PrivateEndpointConnection,
48
+ "PrivateEndpointConnection",
49
+ Azure.ResourceManager.CommonTypes.Versions.v4,
50
+ "privatelinks.json"
51
+ );
52
+ @@armCommonDefinition(PrivateEndpointConnection,
53
+ "PrivateEndpointConnection",
54
+ Azure.ResourceManager.CommonTypes.Versions.v5,
55
+ "privatelinks.json"
56
+ );
57
+
58
+ /** Properties of he private endpoint connection resource */
59
+ @@armCommonDefinition(PrivateEndpointConnectionProperties,
60
+ "PrivateEndpointConnectionProperties",
61
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
62
+ "privatelinks.json"
63
+ );
64
+ @@armCommonDefinition(PrivateEndpointConnectionProperties,
65
+ "PrivateEndpointConnectionProperties",
66
+ Azure.ResourceManager.CommonTypes.Versions.v4,
67
+ "privatelinks.json"
68
+ );
69
+ @@armCommonDefinition(PrivateEndpointConnectionProperties,
70
+ "PrivateEndpointConnectionProperties",
71
+ Azure.ResourceManager.CommonTypes.Versions.v5,
72
+ "privatelinks.json"
73
+ );
74
+
75
+ /** A collection of information about the state of the connection between service consumer and provider. */
76
+ @@armCommonDefinition(PrivateLinkServiceConnectionState,
77
+ "PrivateLinkServiceConnectionState",
78
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
79
+ "privatelinks.json"
80
+ );
81
+ @@armCommonDefinition(PrivateLinkServiceConnectionState,
82
+ "PrivateLinkServiceConnectionState",
83
+ Azure.ResourceManager.CommonTypes.Versions.v4,
84
+ "privatelinks.json"
85
+ );
86
+ @@armCommonDefinition(PrivateLinkServiceConnectionState,
87
+ "PrivateLinkServiceConnectionState",
88
+ Azure.ResourceManager.CommonTypes.Versions.v5,
89
+ "privatelinks.json"
90
+ );
91
+
92
+ /** Properties of a private link resource. */
93
+ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "Matches current common code"
94
+ @@armCommonDefinition(PrivateLinkResourceProperties,
95
+ "PrivateLinkResourceProperties",
96
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
97
+ "privatelinks.json"
98
+ );
99
+ @@armCommonDefinition(PrivateLinkResourceProperties,
100
+ "PrivateLinkResourceProperties",
101
+ Azure.ResourceManager.CommonTypes.Versions.v4,
102
+ "privatelinks.json"
103
+ );
104
+ @@armCommonDefinition(PrivateLinkResourceProperties,
105
+ "PrivateLinkResourceProperties",
106
+ Azure.ResourceManager.CommonTypes.Versions.v5,
107
+ "privatelinks.json"
108
+ );
109
+
110
+ /** PrivateEndpointConnectionListResult */
111
+ @@armCommonDefinition(PrivateEndpointConnectionListResult,
112
+ "PrivateEndpointConnectionListResult",
113
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
114
+ "privatelinks.json"
115
+ );
116
+ @@armCommonDefinition(PrivateEndpointConnectionListResult,
117
+ "PrivateEndpointConnectionListResult",
118
+ Azure.ResourceManager.CommonTypes.Versions.v4,
119
+ "privatelinks.json"
120
+ );
121
+ @@armCommonDefinition(PrivateEndpointConnectionListResult,
122
+ "PrivateEndpointConnectionListResult",
123
+ Azure.ResourceManager.CommonTypes.Versions.v5,
124
+ "privatelinks.json"
125
+ );
126
+
127
+ /** PrivateLinkResourceListResult */
128
+ @@armCommonDefinition(PrivateLinkResourceListResult,
129
+ "PrivateLinkResourceListResult",
130
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
131
+ "privatelinks.json"
132
+ );
133
+ @@armCommonDefinition(PrivateLinkResourceListResult,
134
+ "PrivateLinkResourceListResult",
135
+ Azure.ResourceManager.CommonTypes.Versions.v4,
136
+ "privatelinks.json"
137
+ );
138
+ @@armCommonDefinition(PrivateLinkResourceListResult,
139
+ "PrivateLinkResourceListResult",
140
+ Azure.ResourceManager.CommonTypes.Versions.v5,
141
+ "privatelinks.json"
142
+ );
143
+
144
+ /** PrivateEndpointConnectionParameter */
145
+ @@CommonTypes.Private.armCommonParameter(PrivateEndpointConnectionParameter.name,
146
+ "PrivateEndpointConnectionName",
147
+ #{ version: Azure.ResourceManager.CommonTypes.Versions.v3, isDefault: true },
148
+ "privatelinks.json"
149
+ );
150
+ @@CommonTypes.Private.armCommonParameter(PrivateEndpointConnectionParameter.name,
151
+ "PrivateEndpointConnectionName",
152
+ Azure.ResourceManager.CommonTypes.Versions.v4,
153
+ "privatelinks.json"
154
+ );
155
+ @@CommonTypes.Private.armCommonParameter(PrivateEndpointConnectionParameter.name,
156
+ "PrivateEndpointConnectionName",
157
+ Azure.ResourceManager.CommonTypes.Versions.v5,
158
+ "privatelinks.json"
159
+ );
@@ -1,33 +1,13 @@
1
- import "@typespec/openapi";
2
- import "@typespec/http";
3
- import "@typespec/rest";
4
- import "@typespec/versioning";
5
- import "@azure-tools/typespec-autorest";
6
- import "@azure-tools/typespec-azure-core";
7
-
8
1
  using TypeSpec.Http;
9
- using TypeSpec.OpenAPI;
10
2
  using TypeSpec.Versioning;
11
- using Azure.ResourceManager.Private;
12
-
13
- namespace Azure.ResourceManager;
14
-
15
- /** The private endpoint resource */
16
- @armCommonDefinition(
17
- "PrivateEndpoint",
18
- {
19
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
20
- isDefault: true,
21
- },
22
- "privatelinks.json"
23
- )
24
- @armCommonDefinition(
25
- "PrivateEndpoint",
26
- Azure.ResourceManager.CommonTypes.Versions.v5,
27
- "privatelinks.json"
28
- )
3
+ using OpenAPI;
4
+
5
+ namespace Azure.ResourceManager.CommonTypes;
6
+
7
+ /** The Private Endpoint resource. */
29
8
  model PrivateEndpoint {
30
9
  /** The resource identifier for private endpoint */
10
+ @visibility("read")
31
11
  id?: Azure.Core.armResourceIdentifier<[
32
12
  {
33
13
  type: "Microsoft.Network/privateEndpoints";
@@ -35,55 +15,65 @@ model PrivateEndpoint {
35
15
  ]>;
36
16
  }
37
17
 
18
+ /** A private link resource. */
19
+ model PrivateLinkResource extends Resource {
20
+ /** Resource properties. */
21
+ @extension("x-ms-client-flatten", true)
22
+ properties?: PrivateLinkResourceProperties;
23
+ }
24
+
25
+ /** Properties of a private link resource. */
26
+ model PrivateLinkResourceProperties {
27
+ /** The private link resource group id. */
28
+ @visibility("read")
29
+ groupId?: string;
30
+
31
+ /** The private link resource required member names. */
32
+ @visibility("read")
33
+ requiredMembers?: string[];
34
+
35
+ /** The private link resource private link DNS zone name. */
36
+ requiredZoneNames?: string[];
37
+ }
38
+
39
+ /** A list of private link resources. */
40
+ model PrivateLinkResourceListResult {
41
+ /** Array of private link resources */
42
+ value?: PrivateLinkResource[];
43
+ }
44
+ //#region
38
45
  /** The private endpoint connection resource */
39
- model PrivateEndpointConnection extends Azure.ResourceManager.Foundations.ProxyResource {
46
+ model PrivateEndpointConnection extends Resource {
40
47
  /** The private endpoint connection properties */
48
+ @extension("x-ms-client-flatten", true)
41
49
  properties?: PrivateEndpointConnectionProperties;
42
50
  }
43
51
 
44
- /** Properties of he private endpoint connection resource */
45
- @armCommonDefinition(
46
- "PrivateEndpointConnectionProperties",
47
- {
48
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
49
- isDefault: true,
50
- },
51
- "privatelinks.json"
52
- )
53
- @armCommonDefinition(
54
- "PrivateEndpointConnectionProperties",
55
- Azure.ResourceManager.CommonTypes.Versions.v5,
56
- "privatelinks.json"
57
- )
52
+ /** List of private endpoint connections associated with the specified resource. */
53
+ model PrivateEndpointConnectionListResult {
54
+ /** Array of private endpoint connections. */
55
+ value?: PrivateEndpointConnection[];
56
+ }
57
+
58
+ /** Properties of the private endpoint connection. */
58
59
  model PrivateEndpointConnectionProperties {
59
- /** The group identifiers for the private endpoint resource */
60
+ /** The group ids for the private endpoint resource. */
60
61
  @visibility("read")
62
+ @added(Versions.v4)
61
63
  groupIds?: string[];
62
64
 
63
- /** The private endpoint resource */
65
+ /** The private endpoint resource. */
64
66
  privateEndpoint?: PrivateEndpoint;
65
67
 
66
68
  /** A collection of information about the state of the connection between service consumer and provider. */
67
69
  privateLinkServiceConnectionState: PrivateLinkServiceConnectionState;
68
70
 
69
71
  /** The provisioning state of the private endpoint connection resource. */
72
+ @visibility("read")
70
73
  provisioningState?: PrivateEndpointConnectionProvisioningState;
71
74
  }
72
75
 
73
76
  /** A collection of information about the state of the connection between service consumer and provider. */
74
- @armCommonDefinition(
75
- "PrivateLinkServiceConnectionState",
76
- {
77
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
78
- isDefault: true,
79
- },
80
- "privatelinks.json"
81
- )
82
- @armCommonDefinition(
83
- "PrivateLinkServiceConnectionState",
84
- Azure.ResourceManager.CommonTypes.Versions.v5,
85
- "privatelinks.json"
86
- )
87
77
  model PrivateLinkServiceConnectionState {
88
78
  /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */
89
79
  status?: PrivateEndpointServiceConnectionStatus;
@@ -95,18 +85,24 @@ model PrivateLinkServiceConnectionState {
95
85
  actionsRequired?: string;
96
86
  }
97
87
 
98
- /** The provisioning state of the connection */
88
+ /** The current provisioning state. */
99
89
  union PrivateEndpointConnectionProvisioningState {
100
- ResourceProvisioningState,
90
+ string,
91
+
92
+ /** Connection has been provisioned */
93
+ Succeeded: "Succeeded",
101
94
 
102
95
  /** Connection is being created */
103
96
  Creating: "Creating",
104
97
 
105
98
  /** Connection is being deleted */
106
99
  Deleting: "Deleting",
100
+
101
+ /** Connection provisioning has failed */
102
+ Failed: "Failed",
107
103
  }
108
104
 
109
- /** The private endpoint connection status */
105
+ /** The private endpoint connection status. */
110
106
  union PrivateEndpointServiceConnectionStatus {
111
107
  /** Connectionaiting for approval or rejection */
112
108
  Pending: "Pending",
@@ -120,51 +116,6 @@ union PrivateEndpointServiceConnectionStatus {
120
116
  string,
121
117
  }
122
118
 
123
- model PrivateLinkResource extends Azure.ResourceManager.Foundations.ProxyResource {
124
- /** Properties of the private link resource. */
125
- properties?: PrivateLinkResourceProperties;
126
- }
127
-
128
- /** Properties of a private link resource. */
129
- #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "Matches current common code"
130
- @armCommonDefinition(
131
- "PrivateLinkResourceProperties",
132
- {
133
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
134
- isDefault: true,
135
- },
136
- "privatelinks.json"
137
- )
138
- @armCommonDefinition(
139
- "PrivateLinkResourceProperties",
140
- Azure.ResourceManager.CommonTypes.Versions.v5,
141
- "privatelinks.json"
142
- )
143
- model PrivateLinkResourceProperties {
144
- /** The private link resource group id. */
145
- @visibility("read")
146
- groupId?: string;
147
-
148
- /** The private link resource required member names. */
149
- @visibility("read")
150
- requiredMembers?: string[];
151
-
152
- /** The private link resource private link DNS zone name. */
153
- requiredZoneNames?: string[];
154
- }
155
-
156
- /** List of private endpoint connections associated with the specified resource. */
157
- model PrivateEndpointConnectionResourceListResult {
158
- /** Array of private endpoint connections */
159
- value?: PrivateEndpointConnection[];
160
- }
161
-
162
- /** A list of private link resources. */
163
- model PrivateLinkResourceListResult {
164
- /** Array of private link resources */
165
- value?: PrivateLinkResource[];
166
- }
167
-
168
119
  /**
169
120
  * The name of the private endpoint connection associated with the Azure resource.
170
121
  * @template Segment The resource type name for private endpoint connections (default is privateEndpointConnections)
@@ -172,19 +123,6 @@ model PrivateLinkResourceListResult {
172
123
  model PrivateEndpointConnectionParameter<Segment extends valueof string = "privateEndpointConnections"> {
173
124
  /** The name of the private endpoint connection associated with the Azure resource. */
174
125
  @path
175
- @armCommonParameter(
176
- "PrivateEndpointConnectionName",
177
- {
178
- version: Azure.ResourceManager.CommonTypes.Versions.v4,
179
- isDefault: true,
180
- },
181
- "privatelinks.json"
182
- )
183
- @armCommonParameter(
184
- "PrivateEndpointConnectionName",
185
- Azure.ResourceManager.CommonTypes.Versions.v5,
186
- "privatelinks.json"
187
- )
188
126
  @TypeSpec.Rest.segment(Segment)
189
127
  @key("privateEndpointConnectionName")
190
128
  name: string;