@azure-tools/typespec-azure-resource-manager 0.64.0-dev.2 → 0.64.0-dev.4

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.
@@ -40,6 +40,22 @@ model NspConfigurationResource<
40
40
  Description extends valueof string = "A network security perimeter configuration resource."
41
41
  > is NetworkSecurityPerimeterConfiguration;
42
42
 
43
+ /**
44
+ * The name parameter for a network security perimeter configuration.
45
+ * @template KeyName The name of the network security perimeter configuration resource name parameter.
46
+ */
47
+ @Versioning.added(Versions.v5)
48
+ @Http.Private.includeInapplicableMetadataInPayload(false)
49
+ model NspConfigurationNameParameter<KeyName extends valueof string = "networkSecurityPerimeterConfigurationName"> {
50
+ /** The name for a network security perimeter configuration */
51
+ @path
52
+ @segment("networkSecurityPerimeterConfigurations")
53
+ @key(KeyName)
54
+ @minLength(1)
55
+ @maxLength(512)
56
+ networkSecurityPerimeterConfigurationName: string;
57
+ }
58
+
43
59
  /**
44
60
  * Operations over network security perimeter resources.
45
61
  * @template NspConfigurationResourceModel The type of the network security perimeter configuration resource. You must declare a network security perimeter configuration resource type in your provider namespace.
@@ -145,6 +161,7 @@ interface NspConfigurationOperations<
145
161
  * @template Error Optional. The error response, if non-standard.
146
162
  * @template OverrideResourceName Optional. The name of the network security perimeter configuration resource being operated on.
147
163
  */
164
+ #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Metching legacy API"
148
165
  @Versioning.added(Versions.v5)
149
166
  @autoRoute
150
167
  @doc("Get a {name} NetworkSecurityPerimeterConfiguration", ParentResource)
@@ -154,16 +171,109 @@ interface NspConfigurationOperations<
154
171
  ParentResource extends Foundations.SimpleResource,
155
172
  Resource extends NetworkSecurityPerimeterConfiguration = NspConfigurationResourceModel,
156
173
  BaseParameters = DefaultBaseParameters<ParentResource>,
157
- KeyName extends valueof string = NspConfigurationKeyName,
174
+ KeyName extends valueof string = "${NspConfigurationKeyName}",
158
175
  Parameters extends {} = {},
159
176
  Response extends {} = ArmResponse<Resource>,
160
177
  Error extends {} = ErrorResponse,
161
178
  OverrideResourceName extends valueof string = "${ResourceName}"
162
179
  > is ArmReadOperation<
163
180
  ResourceInstanceParameters<ParentResource, BaseParameters> &
164
- KeysOf<NetworkSecurityPerimeterConfigurationNameParameter> &
181
+ KeysOf<NspConfigurationNameParameter<KeyName>> &
165
182
  Parameters,
166
183
  Response,
167
184
  Error
168
185
  >;
186
+
187
+ /**
188
+ * @dev GET a network security perimeter configuration for a particular resource
189
+ * @template ParentResource the parent resource of the NspConfiguration
190
+ * @template Request The request body type
191
+ * @template Response The success response for the read operation
192
+ * @template Resource the NspConfiguration resource being read
193
+ * @template BaseParameters Optional. Allows overriding the operation parameters
194
+
195
+ * @template KeyName Optional. The NSP configuration resource name parameter. By default, this is `networkSecurityPerimeterConfigurationName`
196
+ * @template Parameters Optional. Additional parameters after the path parameters
197
+
198
+ * @template Error Optional. The error response, if non-standard.
199
+ * @template OverrideResourceName Optional. The name of the network security perimeter configuration resource being operated on.
200
+ * @template OptionalRequestBody Optional. Indicates if the request body is optional.
201
+ */
202
+ #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Metching legacy API"
203
+ @Versioning.added(Versions.v5)
204
+ @autoRoute
205
+ @Azure.ResourceManager.Private.enforceConstraint(ParentResource, Foundations.Resource)
206
+ @post
207
+ @returnsDoc("Azure operation completed successfully.")
208
+ @doc("Perform an action over {name} NetworkSecurityPerimeterConfiguration", ParentResource)
209
+ @builtInResourceOperation(ParentResource, Resource, "action", OverrideResourceName)
210
+ Action<
211
+ ParentResource extends Foundations.SimpleResource,
212
+ Request,
213
+ Response,
214
+ Resource extends NetworkSecurityPerimeterConfiguration = NspConfigurationResourceModel,
215
+ BaseParameters = DefaultBaseParameters<ParentResource>,
216
+ KeyName extends valueof string = "${NspConfigurationKeyName}",
217
+ Parameters extends TypeSpec.Reflection.Model = {},
218
+ Error extends TypeSpec.Reflection.Model = ErrorResponse,
219
+ OverrideResourceName extends valueof string = "${ResourceName}",
220
+ OptionalRequestBody extends valueof boolean = false
221
+ >(
222
+ ...ResourceInstanceParameters<ParentResource, BaseParameters>,
223
+ ...KeysOf<NspConfigurationNameParameter<KeyName>>,
224
+ ...Parameters,
225
+
226
+ @doc("The content of the action request")
227
+ @armBodyRoot(OptionalRequestBody)
228
+ body: Request,
229
+ ): Response | Error;
230
+
231
+ /**
232
+ * @dev GET a network security perimeter configuration for a particular resource
233
+ * @template ParentResource the parent resource of the NspConfiguration
234
+ * @template Request The request body type
235
+ * @template Response The success response for the read operation
236
+ * @template Resource the NspConfiguration resource being read
237
+ * @template BaseParameters Optional. Allows overriding the operation parameters
238
+ * @template KeyName Optional. The NSP configuration resource name parameter. By default, this is `networkSecurityPerimeterConfigurationName`
239
+ * @template Parameters Optional. Additional parameters after the path parameters
240
+ * @template LroHeaders Optional. The LRO headers for the accepted response
241
+ * @template Error Optional. The error response, if non-standard.
242
+ * @template OverrideResourceName Optional. The name of the network security perimeter configuration resource being operated on.
243
+ * @template OptionalRequestBody Optional. Indicates if the request body is optional.
244
+ */
245
+ #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Metching legacy API"
246
+ @Versioning.added(Versions.v5)
247
+ @autoRoute
248
+ @Azure.ResourceManager.Private.enforceConstraint(ParentResource, Foundations.Resource)
249
+ @post
250
+ @returnsDoc("Azure operation completed successfully.")
251
+ @doc("Perform an action over {name} NetworkSecurityPerimeterConfiguration", ParentResource)
252
+ @builtInResourceOperation(ParentResource, Resource, "action", OverrideResourceName)
253
+ ActionAsync<
254
+ ParentResource extends Foundations.SimpleResource,
255
+ Request extends TypeSpec.Reflection.Model,
256
+ Response extends TypeSpec.Reflection.Model,
257
+ Resource extends NetworkSecurityPerimeterConfiguration = NspConfigurationResourceModel,
258
+ BaseParameters = DefaultBaseParameters<ParentResource>,
259
+ KeyName extends valueof string = "${NspConfigurationKeyName}",
260
+ Parameters extends {} = {},
261
+ LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
262
+ Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
263
+ Response,
264
+ string
265
+ > &
266
+ Azure.Core.Foundations.RetryAfterHeader,
267
+ Error extends {} = ErrorResponse,
268
+ OverrideResourceName extends valueof string = "${ResourceName}",
269
+ OptionalRequestBody extends valueof boolean = false
270
+ >(
271
+ ...ResourceInstanceParameters<ParentResource, BaseParameters>,
272
+ ...KeysOf<NspConfigurationNameParameter<KeyName>>,
273
+ ...Parameters,
274
+
275
+ @doc("The content of the action request")
276
+ @armBodyRoot(OptionalRequestBody)
277
+ body: Request,
278
+ ): ArmAcceptedLroResponse<"Resource operation accepted.", LroHeaders> | Response | Error;
169
279
  }
@@ -456,7 +456,7 @@ op ArmResourceDeleteAsync<
456
456
  op ArmResourceDeleteWithoutOkAsync<
457
457
  Resource extends Foundations.SimpleResource,
458
458
  BaseParameters = DefaultBaseParameters<Resource>,
459
- LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader &
459
+ LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<FinalResult = void> &
460
460
  Azure.Core.Foundations.RetryAfterHeader,
461
461
  Parameters extends {} = {},
462
462
  Response extends {} = ArmDeleteAcceptedLroResponse<LroHeaders> | ArmDeletedNoContentResponse,
@@ -501,7 +501,7 @@ op ArmResourceDeleteSync<
501
501
  op ArmResourceActionAsyncBase<
502
502
  Resource extends Foundations.SimpleResource,
503
503
  Request,
504
- Response extends {} | void,
504
+ Response extends TypeSpec.Reflection.Model | unknown | void,
505
505
  BaseParameters extends TypeSpec.Reflection.Model,
506
506
  Parameters extends {} = {},
507
507
  Error extends {} = ErrorResponse,
@@ -531,7 +531,7 @@ op ArmResourceActionAsyncBase<
531
531
  op ArmResourceActionAsync<
532
532
  Resource extends Foundations.SimpleResource,
533
533
  Request,
534
- Response extends {} | void,
534
+ Response extends TypeSpec.Reflection.Model | unknown | void,
535
535
  BaseParameters extends TypeSpec.Reflection.Model = DefaultBaseParameters<Resource>,
536
536
  LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
537
537
  Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
@@ -766,7 +766,7 @@ op ArmProviderActionSync<
766
766
  @Private.armUpdateProviderNamespace
767
767
  op ArmProviderActionAsync<
768
768
  Request extends {} | void = void,
769
- Response extends {} | void = void,
769
+ Response extends TypeSpec.Reflection.Model | unknown | void = void,
770
770
  Scope extends {} = TenantActionScope,
771
771
  Parameters extends {} = {},
772
772
  LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
package/lib/responses.tsp CHANGED
@@ -198,7 +198,7 @@ model ArmOperationStatus<
198
198
  model ArmAsyncOperationHeader<
199
199
  StatusMonitor extends {} = ArmOperationStatus,
200
200
  UrlValue extends string = string,
201
- FinalResult extends {} | void = never
201
+ FinalResult extends TypeSpec.Reflection.Model | unknown | void = never
202
202
  > {
203
203
  /** A link to the status monitor */
204
204
  @header("Azure-AsyncOperation")
@@ -228,7 +228,7 @@ model ArmAsyncOperationHeader<
228
228
  */
229
229
  model ArmLroLocationHeader<
230
230
  LroPollingOptions extends Azure.Core.PollingOptions = Azure.Core.StatusMonitorPollingOptions<PollingModel = ArmOperationStatus>,
231
- FinalResult extends {} | void = void,
231
+ FinalResult extends TypeSpec.Reflection.Model | unknown | void = void,
232
232
  UrlValue extends string = string
233
233
  > {
234
234
  /** The Location header contains the URL where the status of the long running operation can be checked. */
@@ -255,7 +255,7 @@ model ArmLroLocationHeader<
255
255
  */
256
256
  model ArmCombinedLroHeaders<
257
257
  StatusMonitor extends {} = ArmOperationStatus,
258
- FinalResult extends {} | void = void,
258
+ FinalResult extends TypeSpec.Reflection.Model | unknown | void = void,
259
259
  PollingUrlValue extends string = ResourceLocation<StatusMonitor>,
260
260
  FinalUrlValue extends string = string
261
261
  > {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.64.0-dev.2",
3
+ "version": "0.64.0-dev.4",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",