@azure-tools/typespec-azure-resource-manager 0.61.0-dev.4 → 0.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -24
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts +42 -0
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts +26 -12
- package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
- package/dist/src/operations.d.ts +30 -3
- package/dist/src/operations.d.ts.map +1 -1
- package/dist/src/operations.js +97 -28
- package/dist/src/operations.js.map +1 -1
- package/dist/src/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +177 -3
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource.d.ts +30 -16
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +75 -89
- package/dist/src/resource.js.map +1 -1
- package/dist/src/tsp-index.d.ts.map +1 -1
- package/dist/src/tsp-index.js +2 -1
- package/dist/src/tsp-index.js.map +1 -1
- package/lib/decorators.tsp +45 -12
- package/lib/extension/operations.tsp +116 -31
- package/lib/legacy-types/extension-operations.tsp +31 -10
- package/lib/legacy-types/extension.tsp +51 -24
- package/lib/legacy-types/operations.tsp +61 -26
- package/lib/legacy-types/resource.tsp +25 -3
- package/lib/operations.tsp +1 -0
- package/lib/private-endpoints.tsp +47 -21
- package/lib/private-links.tsp +17 -7
- package/lib/private.decorators.tsp +88 -0
- package/package.json +16 -16
package/lib/operations.tsp
CHANGED
|
@@ -36,6 +36,7 @@ model PrivateEndpointConnectionResource<Description extends valueof string = "A
|
|
|
36
36
|
/**
|
|
37
37
|
* Operations over private endpoint connection resources.
|
|
38
38
|
* @template PrivateEndpointResource The type of the private endpoint connection resource. You must declare a private endpoint connection resource type in your provider namespace.
|
|
39
|
+
* @template ResourceName Optional. The name of the private endpoint connection resource in this context, by default, this is `{targetResourceName}PrivateEndpointConnection`.
|
|
39
40
|
*
|
|
40
41
|
* @example
|
|
41
42
|
* ```ts
|
|
@@ -49,7 +50,10 @@ model PrivateEndpointConnectionResource<Description extends valueof string = "A
|
|
|
49
50
|
* }
|
|
50
51
|
* ```
|
|
51
52
|
*/
|
|
52
|
-
interface PrivateEndpoints<
|
|
53
|
+
interface PrivateEndpoints<
|
|
54
|
+
PrivateEndpointResource extends PrivateEndpointConnectionResource,
|
|
55
|
+
ResourceName extends valueof string = string("")
|
|
56
|
+
> {
|
|
53
57
|
/**
|
|
54
58
|
* @dev List the private endpoint connections over a resource
|
|
55
59
|
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
@@ -60,6 +64,7 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
60
64
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
61
65
|
* @template Response Optional. The success response for the list operation
|
|
62
66
|
* @template Error Optional. The error response, if non-standard.
|
|
67
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
63
68
|
*/
|
|
64
69
|
@doc("List {name} PrivateEndpointConnections", ParentResource)
|
|
65
70
|
@get
|
|
@@ -67,7 +72,7 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
67
72
|
@list
|
|
68
73
|
@listsResource(Resource)
|
|
69
74
|
@segmentOf(PrivateEndpointConnectionParameter)
|
|
70
|
-
@
|
|
75
|
+
@builtInResourceOperation(ParentResource, Resource, "list", OverrideResourceName)
|
|
71
76
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
72
77
|
ListByParent<
|
|
73
78
|
ParentResource extends Foundations.SimpleResource,
|
|
@@ -75,7 +80,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
75
80
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
76
81
|
Parameters extends {} = {},
|
|
77
82
|
Response extends {} = ArmResponse<ResourceListResult<Resource>>,
|
|
78
|
-
Error extends {} = ErrorResponse
|
|
83
|
+
Error extends {} = ErrorResponse,
|
|
84
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
79
85
|
> is ArmReadOperation<
|
|
80
86
|
ResourceInstanceParameters<ParentResource, BaseParameters> & Parameters,
|
|
81
87
|
Response,
|
|
@@ -90,18 +96,20 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
90
96
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
91
97
|
* @template Response Optional. The success response for the read operation
|
|
92
98
|
* @template Error Optional. The error response, if non-standard.
|
|
99
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
93
100
|
*/
|
|
94
101
|
@autoRoute
|
|
95
102
|
@doc("Get a {name} PrivateEndpointConnection", ParentResource)
|
|
96
103
|
@get
|
|
97
|
-
@
|
|
104
|
+
@builtInResourceOperation(ParentResource, Resource, "read", OverrideResourceName)
|
|
98
105
|
Read<
|
|
99
106
|
ParentResource extends Foundations.SimpleResource,
|
|
100
107
|
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
101
108
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
102
109
|
Parameters extends {} = {},
|
|
103
110
|
Response extends {} = ArmResponse<Resource>,
|
|
104
|
-
Error extends {} = ErrorResponse
|
|
111
|
+
Error extends {} = ErrorResponse,
|
|
112
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
105
113
|
> is ArmReadOperation<
|
|
106
114
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
107
115
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -119,10 +127,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
119
127
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
120
128
|
* @template Response Optional. The success response for the createOrUpdate operation
|
|
121
129
|
* @template Error Optional. The error response, if non-standard.
|
|
130
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
122
131
|
*/
|
|
123
132
|
@autoRoute
|
|
124
133
|
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
125
|
-
@
|
|
134
|
+
@builtInResourceOperation(ParentResource, Resource, "createOrUpdate", OverrideResourceName)
|
|
126
135
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
127
136
|
@Azure.Core.Foundations.Private.defaultFinalStateVia(#["location", "azure-async-operation"])
|
|
128
137
|
@put
|
|
@@ -137,7 +146,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
137
146
|
Resource,
|
|
138
147
|
LroHeaders
|
|
139
148
|
>,
|
|
140
|
-
Error extends {} = ErrorResponse
|
|
149
|
+
Error extends {} = ErrorResponse,
|
|
150
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
141
151
|
> is ArmCreateOperation<
|
|
142
152
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
143
153
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -155,10 +165,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
155
165
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
156
166
|
* @template Response Optional. The success response for the createOrUpdate operation
|
|
157
167
|
* @template Error Optional. The error response, if non-standard.
|
|
168
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
158
169
|
*/
|
|
159
170
|
@autoRoute
|
|
160
171
|
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
161
|
-
@
|
|
172
|
+
@builtInResourceOperation(ParentResource, Resource, "createOrUpdate", OverrideResourceName)
|
|
162
173
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
163
174
|
@put
|
|
164
175
|
CreateOrReplaceSync<
|
|
@@ -167,7 +178,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
167
178
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
168
179
|
Parameters extends {} = {},
|
|
169
180
|
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedSyncResponse<Resource>,
|
|
170
|
-
Error extends {} = ErrorResponse
|
|
181
|
+
Error extends {} = ErrorResponse,
|
|
182
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
171
183
|
> is ArmCreateOperation<
|
|
172
184
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
173
185
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -186,6 +198,7 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
186
198
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
187
199
|
* @template Response Optional. The success response for the createOrReplace operation
|
|
188
200
|
* @template Error Optional. The error response, if non-standard.
|
|
201
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
189
202
|
*/
|
|
190
203
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
191
204
|
CreateOrReplaceAsync<
|
|
@@ -199,7 +212,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
199
212
|
Resource,
|
|
200
213
|
LroHeaders
|
|
201
214
|
>,
|
|
202
|
-
Error extends {} = ErrorResponse
|
|
215
|
+
Error extends {} = ErrorResponse,
|
|
216
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
203
217
|
> is PrivateEndpoints.CreateOrUpdateAsync<
|
|
204
218
|
ParentResource,
|
|
205
219
|
Resource,
|
|
@@ -207,7 +221,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
207
221
|
LroHeaders,
|
|
208
222
|
Parameters,
|
|
209
223
|
Response,
|
|
210
|
-
Error
|
|
224
|
+
Error,
|
|
225
|
+
OverrideResourceName
|
|
211
226
|
>;
|
|
212
227
|
|
|
213
228
|
/**
|
|
@@ -220,10 +235,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
220
235
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
221
236
|
* @template Response Optional. The success response for the patch operation
|
|
222
237
|
* @template Error Optional. The error response, if non-standard.
|
|
238
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
223
239
|
*/
|
|
224
240
|
@autoRoute
|
|
225
241
|
@doc("Update a {name} PrivateEndpointConnection", ParentResource)
|
|
226
|
-
@
|
|
242
|
+
@builtInResourceOperation(ParentResource, Resource, "update", OverrideResourceName)
|
|
227
243
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
228
244
|
@patch(#{ implicitOptionality: false })
|
|
229
245
|
CustomPatchAsync<
|
|
@@ -242,7 +258,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
242
258
|
"Resource update request accepted.",
|
|
243
259
|
LroHeaders
|
|
244
260
|
>,
|
|
245
|
-
Error extends {} = ErrorResponse
|
|
261
|
+
Error extends {} = ErrorResponse,
|
|
262
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
246
263
|
> is ArmUpdateOperation<
|
|
247
264
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
248
265
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -261,10 +278,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
261
278
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
262
279
|
* @template Response Optional. The success response for the patch operation
|
|
263
280
|
* @template Error Optional. The error response, if non-standard.
|
|
281
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
264
282
|
*/
|
|
265
283
|
@autoRoute
|
|
266
284
|
@doc("Update a {name PrivateEndpointConnection}", ParentResource)
|
|
267
|
-
@
|
|
285
|
+
@builtInResourceOperation(ParentResource, Resource, "update", OverrideResourceName)
|
|
268
286
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
269
287
|
@patch(#{ implicitOptionality: false })
|
|
270
288
|
CustomPatchSync<
|
|
@@ -274,7 +292,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
274
292
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
275
293
|
Parameters extends {} = {},
|
|
276
294
|
Response extends {} = ArmResponse<Resource>,
|
|
277
|
-
Error extends {} = ErrorResponse
|
|
295
|
+
Error extends {} = ErrorResponse,
|
|
296
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
278
297
|
> is ArmUpdateOperation<
|
|
279
298
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
280
299
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -293,6 +312,7 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
293
312
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
294
313
|
* @template Response Optional. The success response(s) for the delete operation
|
|
295
314
|
* @template Error Optional. The error response, if non-standard.
|
|
315
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
296
316
|
*/
|
|
297
317
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
298
318
|
DeleteAsync<
|
|
@@ -303,14 +323,16 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
303
323
|
Azure.Core.Foundations.RetryAfterHeader,
|
|
304
324
|
Parameters extends {} = {},
|
|
305
325
|
Response extends {} = ArmDeleteAcceptedLroResponse<LroHeaders> | ArmDeletedNoContentResponse,
|
|
306
|
-
Error extends {} = ErrorResponse
|
|
326
|
+
Error extends {} = ErrorResponse,
|
|
327
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
307
328
|
> is PrivateEndpoints.DeleteAsyncBase<
|
|
308
329
|
ParentResource,
|
|
309
330
|
Response,
|
|
310
331
|
Resource,
|
|
311
332
|
BaseParameters,
|
|
312
333
|
Parameters,
|
|
313
|
-
Error
|
|
334
|
+
Error,
|
|
335
|
+
OverrideResourceName
|
|
314
336
|
>;
|
|
315
337
|
|
|
316
338
|
/**
|
|
@@ -321,10 +343,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
321
343
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
322
344
|
* @template Response Optional. The success response(s) for the delete operation
|
|
323
345
|
* @template Error Optional. The error response, if non-standard.
|
|
346
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
324
347
|
*/
|
|
325
348
|
@autoRoute
|
|
326
349
|
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
327
|
-
@
|
|
350
|
+
@builtInResourceOperation(ParentResource, Resource, "delete", OverrideResourceName)
|
|
328
351
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
329
352
|
@delete
|
|
330
353
|
DeleteSync<
|
|
@@ -333,7 +356,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
333
356
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
334
357
|
Parameters extends {} = {},
|
|
335
358
|
Response extends {} = ArmDeletedResponse | ArmDeletedNoContentResponse,
|
|
336
|
-
Error = ErrorResponse
|
|
359
|
+
Error = ErrorResponse,
|
|
360
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
337
361
|
>(
|
|
338
362
|
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
339
363
|
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
@@ -348,10 +372,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
348
372
|
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
349
373
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
350
374
|
* @template Error Optional. The error response, if non-standard.
|
|
375
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
351
376
|
*/
|
|
352
377
|
@autoRoute
|
|
353
378
|
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
354
|
-
@
|
|
379
|
+
@builtInResourceOperation(ParentResource, Resource, "delete", OverrideResourceName)
|
|
355
380
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
356
381
|
@delete
|
|
357
382
|
DeleteAsyncBase<
|
|
@@ -360,7 +385,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
360
385
|
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
361
386
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
362
387
|
Parameters extends {} = {},
|
|
363
|
-
Error extends {} = ErrorResponse
|
|
388
|
+
Error extends {} = ErrorResponse,
|
|
389
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
364
390
|
>(
|
|
365
391
|
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
366
392
|
...KeysOf<PrivateEndpointConnectionParameter>,
|
package/lib/private-links.tsp
CHANGED
|
@@ -36,6 +36,7 @@ model PrivateLink<Description extends valueof string = "A private link resource.
|
|
|
36
36
|
/**
|
|
37
37
|
* Operations over private link resources.
|
|
38
38
|
* @template PrivateLinkResourceModel The type of the private link resource. You must declare a private link resource type in your provider namespace.
|
|
39
|
+
* @template ResourceName Optional. The name of the private link resource in this context, by default, this is `{targetResourceName}PrivateLink`.
|
|
39
40
|
*
|
|
40
41
|
* @example
|
|
41
42
|
* ```ts
|
|
@@ -49,7 +50,10 @@ model PrivateLink<Description extends valueof string = "A private link resource.
|
|
|
49
50
|
* }
|
|
50
51
|
* ```
|
|
51
52
|
*/
|
|
52
|
-
interface PrivateLinks<
|
|
53
|
+
interface PrivateLinks<
|
|
54
|
+
PrivateLinkResourceModel extends PrivateLink,
|
|
55
|
+
ResourceName extends valueof string = string("")
|
|
56
|
+
> {
|
|
53
57
|
/**
|
|
54
58
|
* @dev List the private links to a resource
|
|
55
59
|
* @template ParentResource the parent resource of the PrivateLink
|
|
@@ -60,6 +64,7 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
60
64
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
61
65
|
* @template Response Optional. The success response for the list operation
|
|
62
66
|
* @template Error Optional. The error response, if non-standard.
|
|
67
|
+
* @template OverrideResourceName Optional. The name of the private link resource being operated on.
|
|
63
68
|
*/
|
|
64
69
|
@doc("List {name} PrivateLinks", ParentResource)
|
|
65
70
|
@get
|
|
@@ -67,7 +72,7 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
67
72
|
@list
|
|
68
73
|
@listsResource(Resource)
|
|
69
74
|
@segmentOf(PrivateLinkResourceParameter)
|
|
70
|
-
@
|
|
75
|
+
@builtInResourceOperation(ParentResource, Resource, "list", OverrideResourceName)
|
|
71
76
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
72
77
|
ListByParent<
|
|
73
78
|
ParentResource extends Foundations.SimpleResource,
|
|
@@ -75,7 +80,8 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
75
80
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
76
81
|
Parameters extends {} = {},
|
|
77
82
|
Response extends {} = ArmResponse<ResourceListResult<Resource>>,
|
|
78
|
-
Error extends {} = ErrorResponse
|
|
83
|
+
Error extends {} = ErrorResponse,
|
|
84
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
79
85
|
> is ArmReadOperation<
|
|
80
86
|
ResourceInstanceParameters<ParentResource, BaseParameters> & Parameters,
|
|
81
87
|
Response,
|
|
@@ -92,6 +98,7 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
92
98
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
93
99
|
* @template Response Optional. The success response for the list operation
|
|
94
100
|
* @template Error Optional. The error response, if non-standard.
|
|
101
|
+
* @template OverrideResourceName Optional. The name of the private link resource being operated on.
|
|
95
102
|
*/
|
|
96
103
|
@Private.legacyType
|
|
97
104
|
@doc("List {name} PrivateLinks", ParentResource)
|
|
@@ -99,7 +106,7 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
99
106
|
@autoRoute
|
|
100
107
|
@listsResource(Resource)
|
|
101
108
|
@segmentOf(PrivateLinkResourceParameter)
|
|
102
|
-
@
|
|
109
|
+
@builtInResourceOperation(ParentResource, Resource, "list", OverrideResourceName)
|
|
103
110
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
104
111
|
ListSinglePageByParent<
|
|
105
112
|
ParentResource extends Foundations.SimpleResource,
|
|
@@ -107,7 +114,8 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
107
114
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
108
115
|
Parameters extends {} = {},
|
|
109
116
|
Response extends {} = ArmResponse<ResourceListResult<Resource>>,
|
|
110
|
-
Error extends {} = ErrorResponse
|
|
117
|
+
Error extends {} = ErrorResponse,
|
|
118
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
111
119
|
> is ArmReadOperation<
|
|
112
120
|
ResourceInstanceParameters<ParentResource, BaseParameters> & Parameters,
|
|
113
121
|
Response,
|
|
@@ -122,18 +130,20 @@ interface PrivateLinks<PrivateLinkResourceModel extends PrivateLink> {
|
|
|
122
130
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
123
131
|
* @template Response Optional. The success response for the read operation
|
|
124
132
|
* @template Error Optional. The error response, if non-standard.
|
|
133
|
+
* @template OverrideResourceName Optional. The name of the private link resource being operated on.
|
|
125
134
|
*/
|
|
126
135
|
@autoRoute
|
|
127
136
|
@doc("Get a {name} PrivateLink", ParentResource)
|
|
128
137
|
@get
|
|
129
|
-
@
|
|
138
|
+
@builtInResourceOperation(ParentResource, Resource, "read", OverrideResourceName)
|
|
130
139
|
Read<
|
|
131
140
|
ParentResource extends Foundations.SimpleResource,
|
|
132
141
|
Resource extends PrivateLink = PrivateLinkResourceModel,
|
|
133
142
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
134
143
|
Parameters extends {} = {},
|
|
135
144
|
Response extends {} = ArmResponse<Resource>,
|
|
136
|
-
Error extends {} = ErrorResponse
|
|
145
|
+
Error extends {} = ErrorResponse,
|
|
146
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
137
147
|
> is ArmReadOperation<
|
|
138
148
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
139
149
|
KeysOf<PrivateLinkResourceParameter> &
|
|
@@ -137,3 +137,91 @@ extern dec resourceParentType(
|
|
|
137
137
|
target: Model,
|
|
138
138
|
parentType: valueof "Subscription" | "ResourceGroup" | "Tenant" | "Extension"
|
|
139
139
|
);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Marks a resource operation with the associated resource, operation type, and name. If no name is provided, the name is calculated by resource type.
|
|
143
|
+
* @param target The operation to associate the resourceType with
|
|
144
|
+
* @param resourceType The resource model
|
|
145
|
+
* @param operationType The type of operation being performed
|
|
146
|
+
* @param resourceName Optional. The name of the resource. If not provided, the resource type will be used
|
|
147
|
+
*/
|
|
148
|
+
extern dec legacyResourceOperation(
|
|
149
|
+
target: Operation,
|
|
150
|
+
resourceType: Model,
|
|
151
|
+
operationType: valueof
|
|
152
|
+
| "read"
|
|
153
|
+
| "createOrUpdate"
|
|
154
|
+
| "update"
|
|
155
|
+
| "delete"
|
|
156
|
+
| "list"
|
|
157
|
+
| "action"
|
|
158
|
+
| "checkExistence",
|
|
159
|
+
resourceName?: valueof string
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Marks an extension resource operation with the associated resource, operation type, and name. If no name is provided, the name is calculated by resource type.
|
|
164
|
+
* @param target The operation to associate the resourceType with
|
|
165
|
+
* @param targetResourceType The resource model for the target resource
|
|
166
|
+
* @param extensionResourceType The resource model for the extension resource
|
|
167
|
+
* @param operationType The type of operation being performed
|
|
168
|
+
* @param resourceName Optional. The name of the resource. If not provided, the scope and resource name will be used
|
|
169
|
+
*/
|
|
170
|
+
extern dec extensionResourceOperation(
|
|
171
|
+
target: Operation,
|
|
172
|
+
targetResourceType: Model,
|
|
173
|
+
extensionResourceType: Model,
|
|
174
|
+
operationType: valueof
|
|
175
|
+
| "read"
|
|
176
|
+
| "createOrUpdate"
|
|
177
|
+
| "update"
|
|
178
|
+
| "delete"
|
|
179
|
+
| "list"
|
|
180
|
+
| "action"
|
|
181
|
+
| "checkExistence",
|
|
182
|
+
resourceName?: valueof string
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Marks an extension resource operation with the associated resource, operation type, and name. If no name is provided, the name is calculated by resource type.
|
|
187
|
+
* @param target The operation to associate the resourceType with
|
|
188
|
+
* @param targetResourceType The resource model for the target resource
|
|
189
|
+
* @param extensionResourceType The resource model for the extension resource
|
|
190
|
+
* @param operationType The type of operation being performed
|
|
191
|
+
* @param resourceName Optional. The name of the resource. If not provided, the scope and resource name will be used
|
|
192
|
+
*/
|
|
193
|
+
extern dec builtInResourceOperation(
|
|
194
|
+
target: Operation,
|
|
195
|
+
parentResourceType: Model,
|
|
196
|
+
builtInResourceType: Model,
|
|
197
|
+
operationType: valueof
|
|
198
|
+
| "read"
|
|
199
|
+
| "createOrUpdate"
|
|
200
|
+
| "update"
|
|
201
|
+
| "delete"
|
|
202
|
+
| "list"
|
|
203
|
+
| "action"
|
|
204
|
+
| "checkExistence",
|
|
205
|
+
resourceName?: valueof string
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Marks a resource operation with the associated resource, operation type, and name. If no name is provided, the name is calculated by resource type.
|
|
210
|
+
* @param target The operation to associate the resourceType with
|
|
211
|
+
* @param resourceType The resource model
|
|
212
|
+
* @param operationType The type of operation being performed
|
|
213
|
+
* @param resourceName Optional. The name of the resource. If not provided, the resource type will be used
|
|
214
|
+
*/
|
|
215
|
+
extern dec legacyExtensionResourceOperation(
|
|
216
|
+
target: Operation,
|
|
217
|
+
resourceType: Model,
|
|
218
|
+
operationType: valueof
|
|
219
|
+
| "read"
|
|
220
|
+
| "createOrUpdate"
|
|
221
|
+
| "update"
|
|
222
|
+
| "delete"
|
|
223
|
+
| "list"
|
|
224
|
+
| "action"
|
|
225
|
+
| "checkExistence",
|
|
226
|
+
resourceName?: valueof string
|
|
227
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -47,30 +47,30 @@
|
|
|
47
47
|
"pluralize": "^8.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@azure-tools/typespec-azure-core": "^0.
|
|
51
|
-
"@typespec/compiler": "^1.
|
|
52
|
-
"@typespec/http": "^1.
|
|
53
|
-
"@typespec/openapi": "^1.
|
|
54
|
-
"@typespec/rest": "^0.
|
|
55
|
-
"@typespec/versioning": "^0.
|
|
50
|
+
"@azure-tools/typespec-azure-core": "^0.61.0",
|
|
51
|
+
"@typespec/compiler": "^1.5.0",
|
|
52
|
+
"@typespec/http": "^1.5.0",
|
|
53
|
+
"@typespec/openapi": "^1.5.0",
|
|
54
|
+
"@typespec/rest": "^0.75.0",
|
|
55
|
+
"@typespec/versioning": "^0.75.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@azure-tools/typespec-azure-core": "^0.60.0 || >=0.61.0-dev <0.61.0",
|
|
59
58
|
"@types/node": "~24.3.0",
|
|
60
59
|
"@types/pluralize": "^0.0.33",
|
|
61
|
-
"@typespec/compiler": "^1.4.0",
|
|
62
|
-
"@typespec/http": "^1.4.0",
|
|
63
|
-
"@typespec/library-linter": "^0.74.0 || >=0.75.0-dev <0.75.0",
|
|
64
|
-
"@typespec/openapi": "^1.4.0",
|
|
65
|
-
"@typespec/rest": "^0.74.0 || >=0.75.0-dev <0.75.0",
|
|
66
|
-
"@typespec/tspd": "^0.73.0 || >=0.74.0-dev <0.74.0",
|
|
67
|
-
"@typespec/versioning": "^0.74.0 || >=0.75.0-dev <0.75.0",
|
|
68
60
|
"@vitest/coverage-v8": "^3.1.2",
|
|
69
61
|
"@vitest/ui": "^3.1.2",
|
|
70
62
|
"c8": "^10.1.3",
|
|
71
63
|
"rimraf": "~6.0.1",
|
|
72
64
|
"typescript": "~5.9.2",
|
|
73
|
-
"vitest": "^3.1.2"
|
|
65
|
+
"vitest": "^3.1.2",
|
|
66
|
+
"@azure-tools/typespec-azure-core": "^0.61.0",
|
|
67
|
+
"@typespec/compiler": "^1.5.0",
|
|
68
|
+
"@typespec/library-linter": "^0.75.0",
|
|
69
|
+
"@typespec/openapi": "^1.5.0",
|
|
70
|
+
"@typespec/http": "^1.5.0",
|
|
71
|
+
"@typespec/rest": "^0.75.0",
|
|
72
|
+
"@typespec/tspd": "^0.73.0",
|
|
73
|
+
"@typespec/versioning": "^0.75.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"clean": "rimraf ./dist ./temp",
|