@azure-tools/typespec-azure-resource-manager 0.62.0-dev.3 → 0.62.0-dev.5
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 +51 -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/linter.d.ts.map +1 -1
- package/dist/src/linter.js +2 -0
- package/dist/src/linter.js.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/rules/secret-prop.d.ts +4 -0
- package/dist/src/rules/secret-prop.d.ts.map +1 -0
- package/dist/src/rules/secret-prop.js +57 -0
- package/dist/src/rules/secret-prop.js.map +1 -0
- 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 +69 -113
- package/lib/private-links.tsp +17 -7
- package/lib/private.decorators.tsp +88 -0
- package/package.json +1 -1
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,13 +146,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
137
146
|
Resource,
|
|
138
147
|
LroHeaders
|
|
139
148
|
>,
|
|
140
|
-
Error extends {} = ErrorResponse
|
|
141
|
-
|
|
142
|
-
|
|
149
|
+
Error extends {} = ErrorResponse,
|
|
150
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
151
|
+
> is ArmCreateOperation<
|
|
152
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
153
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
154
|
+
Parameters,
|
|
143
155
|
Resource,
|
|
144
|
-
BaseParameters,
|
|
145
|
-
LroHeaders,
|
|
146
|
-
Parameters,
|
|
147
156
|
Response,
|
|
148
157
|
Error
|
|
149
158
|
>;
|
|
@@ -156,10 +165,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
156
165
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
157
166
|
* @template Response Optional. The success response for the createOrUpdate operation
|
|
158
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.
|
|
159
169
|
*/
|
|
160
170
|
@autoRoute
|
|
161
171
|
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
162
|
-
@
|
|
172
|
+
@builtInResourceOperation(ParentResource, Resource, "createOrUpdate", OverrideResourceName)
|
|
163
173
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
164
174
|
@put
|
|
165
175
|
CreateOrReplaceSync<
|
|
@@ -168,7 +178,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
168
178
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
169
179
|
Parameters extends {} = {},
|
|
170
180
|
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedSyncResponse<Resource>,
|
|
171
|
-
Error extends {} = ErrorResponse
|
|
181
|
+
Error extends {} = ErrorResponse,
|
|
182
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
172
183
|
> is ArmCreateOperation<
|
|
173
184
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
174
185
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -187,8 +198,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
187
198
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
188
199
|
* @template Response Optional. The success response for the createOrReplace operation
|
|
189
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.
|
|
190
202
|
*/
|
|
203
|
+
@autoRoute
|
|
204
|
+
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
205
|
+
@builtInResourceOperation(ParentResource, Resource, "createOrUpdate", OverrideResourceName)
|
|
191
206
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
207
|
+
@put
|
|
192
208
|
CreateOrReplaceAsync<
|
|
193
209
|
ParentResource extends Foundations.SimpleResource,
|
|
194
210
|
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
@@ -200,13 +216,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
200
216
|
Resource,
|
|
201
217
|
LroHeaders
|
|
202
218
|
>,
|
|
203
|
-
Error extends {} = ErrorResponse
|
|
204
|
-
|
|
205
|
-
|
|
219
|
+
Error extends {} = ErrorResponse,
|
|
220
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
221
|
+
> is ArmCreateOperation<
|
|
222
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
223
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
224
|
+
Parameters,
|
|
206
225
|
Resource,
|
|
207
|
-
BaseParameters,
|
|
208
|
-
LroHeaders,
|
|
209
|
-
Parameters,
|
|
210
226
|
Response,
|
|
211
227
|
Error
|
|
212
228
|
>;
|
|
@@ -221,10 +237,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
221
237
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
222
238
|
* @template Response Optional. The success response for the patch operation
|
|
223
239
|
* @template Error Optional. The error response, if non-standard.
|
|
240
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
224
241
|
*/
|
|
225
242
|
@autoRoute
|
|
226
243
|
@doc("Update a {name} PrivateEndpointConnection", ParentResource)
|
|
227
|
-
@
|
|
244
|
+
@builtInResourceOperation(ParentResource, Resource, "update", OverrideResourceName)
|
|
228
245
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
229
246
|
@patch(#{ implicitOptionality: false })
|
|
230
247
|
CustomPatchAsync<
|
|
@@ -243,7 +260,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
243
260
|
"Resource update request accepted.",
|
|
244
261
|
LroHeaders
|
|
245
262
|
>,
|
|
246
|
-
Error extends {} = ErrorResponse
|
|
263
|
+
Error extends {} = ErrorResponse,
|
|
264
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
247
265
|
> is ArmUpdateOperation<
|
|
248
266
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
249
267
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -262,10 +280,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
262
280
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
263
281
|
* @template Response Optional. The success response for the patch operation
|
|
264
282
|
* @template Error Optional. The error response, if non-standard.
|
|
283
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
265
284
|
*/
|
|
266
285
|
@autoRoute
|
|
267
286
|
@doc("Update a {name PrivateEndpointConnection}", ParentResource)
|
|
268
|
-
@
|
|
287
|
+
@builtInResourceOperation(ParentResource, Resource, "update", OverrideResourceName)
|
|
269
288
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
270
289
|
@patch(#{ implicitOptionality: false })
|
|
271
290
|
CustomPatchSync<
|
|
@@ -275,7 +294,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
275
294
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
276
295
|
Parameters extends {} = {},
|
|
277
296
|
Response extends {} = ArmResponse<Resource>,
|
|
278
|
-
Error extends {} = ErrorResponse
|
|
297
|
+
Error extends {} = ErrorResponse,
|
|
298
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
279
299
|
> is ArmUpdateOperation<
|
|
280
300
|
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
281
301
|
KeysOf<PrivateEndpointConnectionParameter> &
|
|
@@ -294,8 +314,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
294
314
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
295
315
|
* @template Response Optional. The success response(s) for the delete operation
|
|
296
316
|
* @template Error Optional. The error response, if non-standard.
|
|
317
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
297
318
|
*/
|
|
319
|
+
@autoRoute
|
|
320
|
+
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
321
|
+
@builtInResourceOperation(ParentResource, Resource, "delete", OverrideResourceName)
|
|
298
322
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
323
|
+
@delete
|
|
299
324
|
DeleteAsync<
|
|
300
325
|
ParentResource extends Foundations.SimpleResource,
|
|
301
326
|
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
@@ -304,15 +329,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
304
329
|
Azure.Core.Foundations.RetryAfterHeader,
|
|
305
330
|
Parameters extends {} = {},
|
|
306
331
|
Response extends {} = ArmDeleteAcceptedLroResponse<LroHeaders> | ArmDeletedNoContentResponse,
|
|
307
|
-
Error extends {} = ErrorResponse
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
Error
|
|
315
|
-
>;
|
|
332
|
+
Error extends {} = ErrorResponse,
|
|
333
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
334
|
+
>(
|
|
335
|
+
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
336
|
+
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
337
|
+
...Parameters,
|
|
338
|
+
): Response | Error;
|
|
316
339
|
|
|
317
340
|
/**
|
|
318
341
|
* @dev Delete a PrivateEndpointConnection to a resource synchronously
|
|
@@ -322,10 +345,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
322
345
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
323
346
|
* @template Response Optional. The success response(s) for the delete operation
|
|
324
347
|
* @template Error Optional. The error response, if non-standard.
|
|
348
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
325
349
|
*/
|
|
326
350
|
@autoRoute
|
|
327
351
|
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
328
|
-
@
|
|
352
|
+
@builtInResourceOperation(ParentResource, Resource, "delete", OverrideResourceName)
|
|
329
353
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
330
354
|
@delete
|
|
331
355
|
DeleteSync<
|
|
@@ -334,7 +358,8 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
334
358
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
335
359
|
Parameters extends {} = {},
|
|
336
360
|
Response extends {} = ArmDeletedResponse | ArmDeletedNoContentResponse,
|
|
337
|
-
Error = ErrorResponse
|
|
361
|
+
Error = ErrorResponse,
|
|
362
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
338
363
|
>(
|
|
339
364
|
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
340
365
|
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
@@ -349,10 +374,11 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
349
374
|
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
350
375
|
* @template Parameters Optional. Additional parameters after the path parameters
|
|
351
376
|
* @template Error Optional. The error response, if non-standard.
|
|
377
|
+
* @template OverrideResourceName Optional. The name of the private endpoint connection resource being operated on.
|
|
352
378
|
*/
|
|
353
379
|
@autoRoute
|
|
354
380
|
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
355
|
-
@
|
|
381
|
+
@builtInResourceOperation(ParentResource, Resource, "delete", OverrideResourceName)
|
|
356
382
|
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
357
383
|
@delete
|
|
358
384
|
DeleteAsyncBase<
|
|
@@ -361,15 +387,13 @@ interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnec
|
|
|
361
387
|
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
362
388
|
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
363
389
|
Parameters extends {} = {},
|
|
364
|
-
Error extends {} = ErrorResponse
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
Error
|
|
372
|
-
>;
|
|
390
|
+
Error extends {} = ErrorResponse,
|
|
391
|
+
OverrideResourceName extends valueof string = "${ResourceName}"
|
|
392
|
+
>(
|
|
393
|
+
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
394
|
+
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
395
|
+
...Parameters,
|
|
396
|
+
): Response | Error;
|
|
373
397
|
}
|
|
374
398
|
|
|
375
399
|
/** PATCH model for private endpoint connections */
|
|
@@ -381,71 +405,3 @@ model PrivateEndpointConnectionUpdate
|
|
|
381
405
|
/** The private endpoint connection properties */
|
|
382
406
|
properties?: OptionalProperties<UpdateableProperties<CommonTypes.PrivateEndpointConnectionProperties>>;
|
|
383
407
|
}
|
|
384
|
-
|
|
385
|
-
namespace Private {
|
|
386
|
-
namespace PrivateEndpoints {
|
|
387
|
-
/**
|
|
388
|
-
* @dev Delete a PrivateEndpointConnection to a resource asynchronously
|
|
389
|
-
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
390
|
-
* @template Response The response type for the operation
|
|
391
|
-
* @template Resource Optional. The PrivateEndpointConnection resource being deleted
|
|
392
|
-
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
393
|
-
* @template Parameters Optional. Additional parameters after the path parameters
|
|
394
|
-
* @template Error Optional. The error response, if non-standard.
|
|
395
|
-
*/
|
|
396
|
-
@autoRoute
|
|
397
|
-
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
398
|
-
@armResourceDelete(Resource)
|
|
399
|
-
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
400
|
-
@delete
|
|
401
|
-
op DeleteAsyncBase<
|
|
402
|
-
ParentResource extends Foundations.SimpleResource,
|
|
403
|
-
Response,
|
|
404
|
-
Resource extends PrivateEndpointConnectionResource,
|
|
405
|
-
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
406
|
-
Parameters extends {} = {},
|
|
407
|
-
Error extends {} = ErrorResponse
|
|
408
|
-
>(
|
|
409
|
-
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
410
|
-
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
411
|
-
...Parameters,
|
|
412
|
-
): Response | Error;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* @dev A long-running resource CreateOrUpdate (PUT) for a PrivateEndpointConnection to a resource
|
|
416
|
-
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
417
|
-
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
418
|
-
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
419
|
-
* @template LroHeaders Optional. Allows overriding the lro headers returned on resource create
|
|
420
|
-
* @template Parameters Optional. Additional parameters after the path parameters
|
|
421
|
-
* @template Response Optional. The success response for the createOrUpdate operation
|
|
422
|
-
* @template Error Optional. The error response, if non-standard.
|
|
423
|
-
*/
|
|
424
|
-
@autoRoute
|
|
425
|
-
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
426
|
-
@armResourceCreateOrUpdate(Resource)
|
|
427
|
-
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
428
|
-
@Azure.Core.Foundations.Private.defaultFinalStateVia(#["location", "azure-async-operation"])
|
|
429
|
-
@put
|
|
430
|
-
op CreateOrUpdateAsync<
|
|
431
|
-
ParentResource extends Foundations.SimpleResource,
|
|
432
|
-
Resource extends PrivateEndpointConnectionResource,
|
|
433
|
-
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
434
|
-
LroHeaders extends TypeSpec.Reflection.Model = ArmAsyncOperationHeader<FinalResult = Resource> &
|
|
435
|
-
Azure.Core.Foundations.RetryAfterHeader,
|
|
436
|
-
Parameters extends {} = {},
|
|
437
|
-
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedResponse<
|
|
438
|
-
Resource,
|
|
439
|
-
LroHeaders
|
|
440
|
-
>,
|
|
441
|
-
Error extends {} = ErrorResponse
|
|
442
|
-
> is ArmCreateOperation<
|
|
443
|
-
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
444
|
-
KeysOf<PrivateEndpointConnectionParameter> &
|
|
445
|
-
Parameters,
|
|
446
|
-
Resource,
|
|
447
|
-
Response,
|
|
448
|
-
Error
|
|
449
|
-
>;
|
|
450
|
-
}
|
|
451
|
-
}
|
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.62.0-dev.
|
|
3
|
+
"version": "0.62.0-dev.5",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|