@azure-tools/typespec-azure-resource-manager 0.60.0-dev.0 → 0.60.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/README.md +28 -8
- package/dist/generated-defs/Azure.ResourceManager.CommonTypes.Private.d.ts +5 -0
- package/dist/generated-defs/Azure.ResourceManager.CommonTypes.Private.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.Legacy.d.ts +13 -1
- package/dist/generated-defs/Azure.ResourceManager.Legacy.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts +11 -0
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts +2 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
- package/dist/src/common-types.d.ts +1 -1
- package/dist/src/common-types.js +1 -1
- package/dist/src/commontypes.private.decorators.d.ts +3 -1
- package/dist/src/commontypes.private.decorators.d.ts.map +1 -1
- package/dist/src/commontypes.private.decorators.js +5 -0
- package/dist/src/commontypes.private.decorators.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/namespace.d.ts.map +1 -1
- package/dist/src/namespace.js +3 -3
- package/dist/src/namespace.js.map +1 -1
- package/dist/src/private.decorators.d.ts +1 -1
- package/dist/src/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +54 -34
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource.d.ts +7 -3
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +18 -6
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/arm-resource-operation-response.js +14 -14
- package/dist/src/rules/arm-resource-operation-response.js.map +1 -1
- package/dist/src/state.d.ts +2 -0
- package/dist/src/state.d.ts.map +1 -1
- package/dist/src/state.js +2 -0
- package/dist/src/state.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/arm.tsp +2 -1
- package/lib/common-types/commontypes.private.decorators.tsp +5 -0
- package/lib/common-types/types.tsp +6 -2
- package/lib/decorators.tsp +2 -1
- package/lib/interfaces.tsp +3 -0
- package/lib/{Legacy → legacy-types}/arm.legacy.tsp +3 -1
- package/lib/{Legacy → legacy-types}/extension-operations.tsp +37 -1
- package/lib/{Legacy → legacy-types}/extension.tsp +33 -8
- package/lib/{Legacy/decorator.tsp → legacy-types/legacy.decorators.tsp} +15 -1
- package/lib/{Legacy → legacy-types}/operations.tsp +156 -11
- package/lib/legacy-types/private-endpoints.tsp +196 -0
- package/lib/legacy-types/resource.tsp +92 -0
- package/lib/operations.tsp +8 -8
- package/lib/private-endpoints.tsp +379 -0
- package/lib/private.decorators.tsp +15 -0
- package/package.json +1 -1
- /package/lib/{Legacy → legacy-types}/interfaces.tsp +0 -0
- /package/lib/{Legacy → legacy-types}/managed-identity.tsp +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "@typespec/rest";
|
|
2
|
+
import "@typespec/http";
|
|
3
|
+
|
|
4
|
+
namespace Azure.ResourceManager.Legacy;
|
|
5
|
+
|
|
6
|
+
using Azure.ResourceManager.Private;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This type uses an optional location property, only used by legacy APIs.
|
|
10
|
+
* Concrete tracked resource types can be created by aliasing this type using a specific property type.
|
|
11
|
+
*
|
|
12
|
+
* See more details on [different Azure Resource Manager resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
13
|
+
* @template Properties A model containing the provider-specific properties for this resource
|
|
14
|
+
* @template PropertiesOptional A boolean flag indicating whether the resource `Properties` field is marked as optional or required. Default true is optional and recommended.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typespec
|
|
18
|
+
* model Employee is TrackedResourceWithOptionalLocation<EmployeeProperties> {
|
|
19
|
+
* ...ResourceNameParameter<Employee>
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
@doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.")
|
|
24
|
+
@armResourceInternal(Properties)
|
|
25
|
+
@Http.Private.includeInapplicableMetadataInPayload(false)
|
|
26
|
+
model TrackedResourceWithOptionalLocation<
|
|
27
|
+
Properties extends {},
|
|
28
|
+
PropertiesOptional extends valueof boolean = true
|
|
29
|
+
> extends LegacyTrackedResource {
|
|
30
|
+
@doc("The resource-specific properties for this resource.")
|
|
31
|
+
@conditionalClientFlatten
|
|
32
|
+
@armResourcePropertiesOptionality(PropertiesOptional)
|
|
33
|
+
properties?: Properties;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A tracked resource with the 'location' property optional
|
|
38
|
+
*/
|
|
39
|
+
@friendlyName("TrackedResource")
|
|
40
|
+
model LegacyTrackedResource extends CommonTypes.Resource {
|
|
41
|
+
/** Resource tags. */
|
|
42
|
+
tags?: Record<string>;
|
|
43
|
+
|
|
44
|
+
/** The geo-location where the resource lives */
|
|
45
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
46
|
+
location?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Model used only to spread in the standard `etag` envelope property for a resource
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* ```typespec
|
|
55
|
+
* model Foo is TrackedResource<FooProperties> {
|
|
56
|
+
* // Only have standard Succeeded, Failed, Cancelled states
|
|
57
|
+
* ...ETagProperty;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
alias EntityTagProperty = {
|
|
62
|
+
/** "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.") */
|
|
63
|
+
@visibility(Lifecycle.Read)
|
|
64
|
+
etag?: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Legacy. Model representing a non-standard `extendedLocation` envelope property with all properties optional.
|
|
69
|
+
* Spread this model into a Resource Model, if you are converting a BrownField API with extended location that has optional properties
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typespec
|
|
73
|
+
* model Employee is TrackedResource<EmployeeProperties> {
|
|
74
|
+
* ...ResourceNameParameter<Employee>;
|
|
75
|
+
* ...ExtendedLocationOptionalProperty;
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
model ExtendedLocationOptionalProperty {
|
|
80
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
81
|
+
extendedLocation?: ExtendedLocationOptional;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The complex type of the extended location. */
|
|
85
|
+
@friendlyName("ExtendedLocation")
|
|
86
|
+
model ExtendedLocationOptional {
|
|
87
|
+
/** The name of the extended location. */
|
|
88
|
+
name?: string;
|
|
89
|
+
|
|
90
|
+
/** The type of the extended location. */
|
|
91
|
+
type?: Azure.ResourceManager.Foundations.ExtendedLocationType;
|
|
92
|
+
}
|
package/lib/operations.tsp
CHANGED
|
@@ -495,8 +495,8 @@ op ArmResourceDeleteSync<
|
|
|
495
495
|
@post
|
|
496
496
|
op ArmResourceActionAsyncBase<
|
|
497
497
|
Resource extends Foundations.SimpleResource,
|
|
498
|
-
Request
|
|
499
|
-
Response extends
|
|
498
|
+
Request,
|
|
499
|
+
Response extends {} | void,
|
|
500
500
|
BaseParameters extends TypeSpec.Reflection.Model,
|
|
501
501
|
Parameters extends {} = {},
|
|
502
502
|
Error extends {} = ErrorResponse,
|
|
@@ -525,8 +525,8 @@ op ArmResourceActionAsyncBase<
|
|
|
525
525
|
@Private.enforceConstraint(Resource, Foundations.Resource)
|
|
526
526
|
op ArmResourceActionAsync<
|
|
527
527
|
Resource extends Foundations.SimpleResource,
|
|
528
|
-
Request
|
|
529
|
-
Response extends
|
|
528
|
+
Request,
|
|
529
|
+
Response extends {} | void,
|
|
530
530
|
BaseParameters extends TypeSpec.Reflection.Model = DefaultBaseParameters<Resource>,
|
|
531
531
|
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
|
|
532
532
|
Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
|
|
@@ -564,8 +564,8 @@ op ArmResourceActionAsync<
|
|
|
564
564
|
@returnsDoc("Azure operation completed successfully.")
|
|
565
565
|
op ArmResourceActionSync<
|
|
566
566
|
Resource extends Foundations.SimpleResource,
|
|
567
|
-
Request
|
|
568
|
-
Response
|
|
567
|
+
Request,
|
|
568
|
+
Response,
|
|
569
569
|
BaseParameters = DefaultBaseParameters<Resource>,
|
|
570
570
|
Parameters extends {} = {},
|
|
571
571
|
Error extends {} = ErrorResponse,
|
|
@@ -625,7 +625,7 @@ op ArmResourceActionNoContentAsync<
|
|
|
625
625
|
@Private.enforceConstraint(Resource, Foundations.Resource)
|
|
626
626
|
op ArmResourceActionNoResponseContentAsync<
|
|
627
627
|
Resource extends Foundations.SimpleResource,
|
|
628
|
-
Request
|
|
628
|
+
Request,
|
|
629
629
|
BaseParameters extends TypeSpec.Reflection.Model = DefaultBaseParameters<Resource>,
|
|
630
630
|
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
|
|
631
631
|
Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
|
|
@@ -661,7 +661,7 @@ op ArmResourceActionNoResponseContentAsync<
|
|
|
661
661
|
@post
|
|
662
662
|
op ArmResourceActionNoContentSync<
|
|
663
663
|
Resource extends Foundations.SimpleResource,
|
|
664
|
-
Request
|
|
664
|
+
Request,
|
|
665
665
|
BaseParameters = DefaultBaseParameters<Resource>,
|
|
666
666
|
Parameters extends {} = {},
|
|
667
667
|
Error extends {} = ErrorResponse,
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
using Http;
|
|
2
|
+
using Rest;
|
|
3
|
+
using Azure.ResourceManager.Foundations;
|
|
4
|
+
using Azure.ResourceManager.Private;
|
|
5
|
+
|
|
6
|
+
namespace Azure.ResourceManager;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A private endpoint connection resource.
|
|
10
|
+
* Resource providers must declare a private endpoint connection resource type in their provider namespace if
|
|
11
|
+
* they support private endpoint connections
|
|
12
|
+
* @template Description Optional. The documentary description of the private endpoint connection resource name parameter.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* namespace Microsoft.Contoso;
|
|
17
|
+
* model PrivateEndpointConnection is PrivateEndpointConnectionResource {}
|
|
18
|
+
* alias EmployeeConnectionOps is PrivateEndpoints<PrivateEndpointConnection>;
|
|
19
|
+
* @armResourceOperations
|
|
20
|
+
* interface Employees {
|
|
21
|
+
* @doc("get a private endpoint connection for resource employee")
|
|
22
|
+
* getPrivateEndpointConnection is EmployeeConnectionOps.Read<Employee>;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
@doc(Description)
|
|
27
|
+
@armResourceWithParameter(
|
|
28
|
+
CommonTypes.PrivateEndpointConnectionProperties,
|
|
29
|
+
"privateEndpointConnections",
|
|
30
|
+
"privateEndpointConnectionName"
|
|
31
|
+
)
|
|
32
|
+
@Http.Private.includeInapplicableMetadataInPayload(false)
|
|
33
|
+
model PrivateEndpointConnectionResource<Description extends valueof string = "A private endpoint connection resource">
|
|
34
|
+
is CommonTypes.PrivateEndpointConnection;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Operations over private endpoint connection resources.
|
|
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
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* namespace Microsoft.Contoso;
|
|
43
|
+
* model PrivateEndpointConnection is PrivateEndpointConnectionResource {}
|
|
44
|
+
* alias EmployeeConnectionOps is PrivateEndpoints<PrivateEndpointConnection>;
|
|
45
|
+
* @armResourceOperations
|
|
46
|
+
* interface Employees {
|
|
47
|
+
* @doc("get a private endpoint connection for resource employee")
|
|
48
|
+
* getPrivateEndpointConnection is EmployeeConnectionOps.Read<Employee>;
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
interface PrivateEndpoints<PrivateEndpointResource extends PrivateEndpointConnectionResource> {
|
|
53
|
+
/**
|
|
54
|
+
* @dev List the private endpoint connections over a resource
|
|
55
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
56
|
+
* @template Resource Optional. The PrivateEndpointConnection resource being listed
|
|
57
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
58
|
+
* @template ParentName Optional. The name of the parent resource
|
|
59
|
+
* @template ParentFriendlyName Optional. The friendly name of the parent resource
|
|
60
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
61
|
+
* @template Response Optional. The success response for the list operation
|
|
62
|
+
* @template Error Optional. The error response, if non-standard.
|
|
63
|
+
*/
|
|
64
|
+
@doc("List {name} PrivateEndpointConnections", ParentResource)
|
|
65
|
+
@get
|
|
66
|
+
@autoRoute
|
|
67
|
+
@list
|
|
68
|
+
@listsResource(Resource)
|
|
69
|
+
@segmentOf(PrivateEndpointConnectionParameter)
|
|
70
|
+
@armResourceList(Resource)
|
|
71
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
72
|
+
ListByParent<
|
|
73
|
+
ParentResource extends Foundations.SimpleResource,
|
|
74
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
75
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
76
|
+
Parameters extends {} = {},
|
|
77
|
+
Response extends {} = ArmResponse<ResourceListResult<Resource>>,
|
|
78
|
+
Error extends {} = ErrorResponse
|
|
79
|
+
> is ArmReadOperation<
|
|
80
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> & Parameters,
|
|
81
|
+
Response,
|
|
82
|
+
Error
|
|
83
|
+
>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @dev GET the a private endpoint connection for a particular resource
|
|
87
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
88
|
+
* @template Resource the PrivateEndpointConnection resource being read
|
|
89
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
90
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
91
|
+
* @template Response Optional. The success response for the read operation
|
|
92
|
+
* @template Error Optional. The error response, if non-standard.
|
|
93
|
+
*/
|
|
94
|
+
@autoRoute
|
|
95
|
+
@doc("Get a {name} PrivateEndpointConnection", ParentResource)
|
|
96
|
+
@get
|
|
97
|
+
@armResourceRead(Resource)
|
|
98
|
+
Read<
|
|
99
|
+
ParentResource extends Foundations.SimpleResource,
|
|
100
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
101
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
102
|
+
Parameters extends {} = {},
|
|
103
|
+
Response extends {} = ArmResponse<Resource>,
|
|
104
|
+
Error extends {} = ErrorResponse
|
|
105
|
+
> is ArmReadOperation<
|
|
106
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
107
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
108
|
+
Parameters,
|
|
109
|
+
Response,
|
|
110
|
+
Error
|
|
111
|
+
>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @dev A long-running resource CreateOrUpdate (PUT) for a PrivateEndpointConnection to a resource
|
|
115
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
116
|
+
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
117
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
118
|
+
* @template LroHeaders Optional. Allows overriding the lro headers returned on resource create
|
|
119
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
120
|
+
* @template Response Optional. The success response for the createOrUpdate operation
|
|
121
|
+
* @template Error Optional. The error response, if non-standard.
|
|
122
|
+
*/
|
|
123
|
+
@autoRoute
|
|
124
|
+
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
125
|
+
@armResourceCreateOrUpdate(Resource)
|
|
126
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
127
|
+
@Azure.Core.Foundations.Private.defaultFinalStateVia(#["location", "azure-async-operation"])
|
|
128
|
+
@put
|
|
129
|
+
CreateOrUpdateAsync<
|
|
130
|
+
ParentResource extends Foundations.SimpleResource,
|
|
131
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
132
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
133
|
+
LroHeaders extends TypeSpec.Reflection.Model = ArmAsyncOperationHeader<FinalResult = Resource> &
|
|
134
|
+
Azure.Core.Foundations.RetryAfterHeader,
|
|
135
|
+
Parameters extends {} = {},
|
|
136
|
+
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedResponse<
|
|
137
|
+
Resource,
|
|
138
|
+
LroHeaders
|
|
139
|
+
>,
|
|
140
|
+
Error extends {} = ErrorResponse
|
|
141
|
+
> is ArmCreateOperation<
|
|
142
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
143
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
144
|
+
Parameters,
|
|
145
|
+
Resource,
|
|
146
|
+
Response,
|
|
147
|
+
Error
|
|
148
|
+
>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @dev Synchronous PUT operation for a Private endpoint connection to a resource
|
|
152
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
153
|
+
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
154
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
155
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
156
|
+
* @template Response Optional. The success response for the createOrUpdate operation
|
|
157
|
+
* @template Error Optional. The error response, if non-standard.
|
|
158
|
+
*/
|
|
159
|
+
@autoRoute
|
|
160
|
+
@doc("Create a {name} PrivateEndpointConnection", ParentResource)
|
|
161
|
+
@armResourceCreateOrUpdate(Resource)
|
|
162
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
163
|
+
@put
|
|
164
|
+
CreateOrReplaceSync<
|
|
165
|
+
ParentResource extends Foundations.SimpleResource,
|
|
166
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
167
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
168
|
+
Parameters extends {} = {},
|
|
169
|
+
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedSyncResponse<Resource>,
|
|
170
|
+
Error extends {} = ErrorResponse
|
|
171
|
+
> is ArmCreateOperation<
|
|
172
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
173
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
174
|
+
Parameters,
|
|
175
|
+
Resource,
|
|
176
|
+
Response,
|
|
177
|
+
Error
|
|
178
|
+
>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @dev A long-running resource CreateOrUpdate (PUT) for a PrivateEndpointConnection to a resource
|
|
182
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
183
|
+
* @template Resource the PrivateEndpointConnection resource being created or updated
|
|
184
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
185
|
+
* @template LroHeaders Optional. Allows overriding the lro headers returned on resource create
|
|
186
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
187
|
+
* @template Response Optional. The success response for the createOrReplace operation
|
|
188
|
+
* @template Error Optional. The error response, if non-standard.
|
|
189
|
+
*/
|
|
190
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
191
|
+
CreateOrReplaceAsync<
|
|
192
|
+
ParentResource extends Foundations.SimpleResource,
|
|
193
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
194
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
195
|
+
LroHeaders extends TypeSpec.Reflection.Model = ArmAsyncOperationHeader<FinalResult = Resource> &
|
|
196
|
+
Azure.Core.Foundations.RetryAfterHeader,
|
|
197
|
+
Parameters extends {} = {},
|
|
198
|
+
Response extends {} = ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedResponse<
|
|
199
|
+
Resource,
|
|
200
|
+
LroHeaders
|
|
201
|
+
>,
|
|
202
|
+
Error extends {} = ErrorResponse
|
|
203
|
+
> is PrivateEndpoints.CreateOrUpdateAsync<
|
|
204
|
+
ParentResource,
|
|
205
|
+
Resource,
|
|
206
|
+
BaseParameters,
|
|
207
|
+
LroHeaders,
|
|
208
|
+
Parameters,
|
|
209
|
+
Response,
|
|
210
|
+
Error
|
|
211
|
+
>;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A long-running resource update using a custom PATCH payload (Asynchronous) to update a PrivateEndpointConnection to a resource.
|
|
215
|
+
* @template ParentResource the parent resource of the PrivateEndpointConnection
|
|
216
|
+
* @template Resource the PrivateEndpointConnection resource being updated
|
|
217
|
+
* @template PatchModel The input model for the PATCH request
|
|
218
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
219
|
+
* @template LroHeaders Optional. Allows overriding the lro headers returned in the Accepted response
|
|
220
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
221
|
+
* @template Response Optional. The success response for the patch operation
|
|
222
|
+
* @template Error Optional. The error response, if non-standard.
|
|
223
|
+
*/
|
|
224
|
+
@autoRoute
|
|
225
|
+
@doc("Update a {name} PrivateEndpointConnection", ParentResource)
|
|
226
|
+
@armResourceUpdate(Resource)
|
|
227
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
228
|
+
@patch(#{ implicitOptionality: false })
|
|
229
|
+
CustomPatchAsync<
|
|
230
|
+
ParentResource extends Foundations.SimpleResource,
|
|
231
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
232
|
+
PatchModel extends TypeSpec.Reflection.Model = PrivateEndpointConnectionUpdate,
|
|
233
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
234
|
+
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
|
|
235
|
+
Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
|
|
236
|
+
Resource,
|
|
237
|
+
string
|
|
238
|
+
> &
|
|
239
|
+
Azure.Core.Foundations.RetryAfterHeader,
|
|
240
|
+
Parameters extends {} = {},
|
|
241
|
+
Response extends {} = ArmResponse<Resource> | ArmAcceptedLroResponse<
|
|
242
|
+
"Resource update request accepted.",
|
|
243
|
+
LroHeaders
|
|
244
|
+
>,
|
|
245
|
+
Error extends {} = ErrorResponse
|
|
246
|
+
> is ArmUpdateOperation<
|
|
247
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
248
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
249
|
+
Parameters,
|
|
250
|
+
PatchModel,
|
|
251
|
+
Response,
|
|
252
|
+
Error
|
|
253
|
+
>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @dev A resource update using a custom PATCH payload (synchronous) to update a PrivateEndpointConnection to a resource
|
|
257
|
+
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
258
|
+
* @template Resource Optional. The PrivateEndpointConnection resource being patched
|
|
259
|
+
* @template PatchModel The input model for the PATCH request
|
|
260
|
+
* @template BaseParameters Optional. Allows overriding the operation parameters
|
|
261
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
262
|
+
* @template Response Optional. The success response for the patch operation
|
|
263
|
+
* @template Error Optional. The error response, if non-standard.
|
|
264
|
+
*/
|
|
265
|
+
@autoRoute
|
|
266
|
+
@doc("Update a {name PrivateEndpointConnection}", ParentResource)
|
|
267
|
+
@armResourceUpdate(Resource)
|
|
268
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
269
|
+
@patch(#{ implicitOptionality: false })
|
|
270
|
+
CustomPatchSync<
|
|
271
|
+
ParentResource extends Foundations.SimpleResource,
|
|
272
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
273
|
+
PatchModel extends TypeSpec.Reflection.Model = PrivateEndpointConnectionUpdate,
|
|
274
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
275
|
+
Parameters extends {} = {},
|
|
276
|
+
Response extends {} = ArmResponse<Resource>,
|
|
277
|
+
Error extends {} = ErrorResponse
|
|
278
|
+
> is ArmUpdateOperation<
|
|
279
|
+
ResourceInstanceParameters<ParentResource, BaseParameters> &
|
|
280
|
+
KeysOf<PrivateEndpointConnectionParameter> &
|
|
281
|
+
Parameters,
|
|
282
|
+
PatchModel,
|
|
283
|
+
Response,
|
|
284
|
+
Error
|
|
285
|
+
>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @dev Delete a PrivateEndpointConnection to a resource asynchronously
|
|
289
|
+
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
290
|
+
* @template Resource Optional. The PrivateEndpointConnection resource being deleted
|
|
291
|
+
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
292
|
+
* @template LroHeaders Optional. Allows overriding the headers returned in the Accepted response
|
|
293
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
294
|
+
* @template Response Optional. The success response(s) for the delete operation
|
|
295
|
+
* @template Error Optional. The error response, if non-standard.
|
|
296
|
+
*/
|
|
297
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
298
|
+
DeleteAsync<
|
|
299
|
+
ParentResource extends Foundations.SimpleResource,
|
|
300
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
301
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
302
|
+
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader &
|
|
303
|
+
Azure.Core.Foundations.RetryAfterHeader,
|
|
304
|
+
Parameters extends {} = {},
|
|
305
|
+
Response extends {} = ArmDeleteAcceptedLroResponse<LroHeaders> | ArmDeletedNoContentResponse,
|
|
306
|
+
Error extends {} = ErrorResponse
|
|
307
|
+
> is PrivateEndpoints.DeleteAsyncBase<
|
|
308
|
+
ParentResource,
|
|
309
|
+
Response,
|
|
310
|
+
Resource,
|
|
311
|
+
BaseParameters,
|
|
312
|
+
Parameters,
|
|
313
|
+
Error
|
|
314
|
+
>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @dev Delete a PrivateEndpointConnection to a resource synchronously
|
|
318
|
+
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
319
|
+
* @template Resource The PrivateEndpointConnection resource being deleted
|
|
320
|
+
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
321
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
322
|
+
* @template Response Optional. The success response(s) for the delete operation
|
|
323
|
+
* @template Error Optional. The error response, if non-standard.
|
|
324
|
+
*/
|
|
325
|
+
@autoRoute
|
|
326
|
+
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
327
|
+
@armResourceDelete(Resource)
|
|
328
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
329
|
+
@delete
|
|
330
|
+
DeleteSync<
|
|
331
|
+
ParentResource extends Foundations.SimpleResource,
|
|
332
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
333
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
334
|
+
Parameters extends {} = {},
|
|
335
|
+
Response extends {} = ArmDeletedResponse | ArmDeletedNoContentResponse,
|
|
336
|
+
Error = ErrorResponse
|
|
337
|
+
>(
|
|
338
|
+
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
339
|
+
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
340
|
+
...Parameters,
|
|
341
|
+
): Response | Error;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @dev Delete a PrivateEndpointConnection to a resource asynchronously
|
|
345
|
+
* @template ParentResource The parent resource of the PrivateEndpointConnection
|
|
346
|
+
* @template Response The response type for the operation
|
|
347
|
+
* @template Resource Optional. The PrivateEndpointConnection resource being deleted
|
|
348
|
+
* @template BaseParameters Optional. Allows overriding the parameters for the operation
|
|
349
|
+
* @template Parameters Optional. Additional parameters after the path parameters
|
|
350
|
+
* @template Error Optional. The error response, if non-standard.
|
|
351
|
+
*/
|
|
352
|
+
@autoRoute
|
|
353
|
+
@doc("Delete a {name} PrivateEndpointConnection", ParentResource)
|
|
354
|
+
@armResourceDelete(Resource)
|
|
355
|
+
@Private.enforceConstraint(ParentResource, Foundations.Resource)
|
|
356
|
+
@delete
|
|
357
|
+
DeleteAsyncBase<
|
|
358
|
+
ParentResource extends Foundations.SimpleResource,
|
|
359
|
+
Response,
|
|
360
|
+
Resource extends PrivateEndpointConnectionResource = PrivateEndpointResource,
|
|
361
|
+
BaseParameters = DefaultBaseParameters<ParentResource>,
|
|
362
|
+
Parameters extends {} = {},
|
|
363
|
+
Error extends {} = ErrorResponse
|
|
364
|
+
>(
|
|
365
|
+
...ResourceInstanceParameters<ParentResource, BaseParameters>,
|
|
366
|
+
...KeysOf<PrivateEndpointConnectionParameter>,
|
|
367
|
+
...Parameters,
|
|
368
|
+
): Response | Error;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** PATCH model for private endpoint connections */
|
|
372
|
+
model PrivateEndpointConnectionUpdate
|
|
373
|
+
is OptionalProperties<UpdateableProperties<OmitProperties<
|
|
374
|
+
CommonTypes.PrivateEndpointConnection,
|
|
375
|
+
"properties"
|
|
376
|
+
>>> {
|
|
377
|
+
/** The private endpoint connection properties */
|
|
378
|
+
properties?: OptionalProperties<UpdateableProperties<CommonTypes.PrivateEndpointConnectionProperties>>;
|
|
379
|
+
}
|
|
@@ -34,6 +34,21 @@ extern dec assignUniqueProviderNameValue(target: ModelProperty, resource: Model)
|
|
|
34
34
|
*/
|
|
35
35
|
extern dec armResourceInternal(target: Model, properties: Model);
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* This decorator identifies Azure Resource Manager resource types that do not define
|
|
39
|
+
* the name identifier parameter and type
|
|
40
|
+
* @param target Azure Resource Manager resource type
|
|
41
|
+
* @param properties Azure Resource Manager resource properties
|
|
42
|
+
* @param type The resource type name, e.g. "virtualMachines"
|
|
43
|
+
* @param nameParameter The name of the resource name parameter, e.g. "virtualMachineName"
|
|
44
|
+
*/
|
|
45
|
+
extern dec armResourceWithParameter(
|
|
46
|
+
target: Model,
|
|
47
|
+
properties: Model,
|
|
48
|
+
type: valueof string,
|
|
49
|
+
nameParameter: valueof string
|
|
50
|
+
);
|
|
51
|
+
|
|
37
52
|
/**
|
|
38
53
|
* Omit a property in the target model.
|
|
39
54
|
* @internal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.60.0-dev.
|
|
3
|
+
"version": "0.60.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",
|
|
File without changes
|
|
File without changes
|