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

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
  }
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.3",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",