Skip to content

Commit 0067522

Browse files
mgmt, update resources policy to 2023-04-01 (Azure#44686)
1 parent 5da7808 commit 0067522

File tree

93 files changed

+10243
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+10243
-694
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"dir": "azure-resourcemanager-resources",
195195
"source": "specification/resources/resource-manager/readme.md",
196196
"package": "com.azure.resourcemanager.resources",
197-
"args": "--tag=package-policy-2022-06-java --graalvm-config-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue",
197+
"args": "--tag=package-policy-2023-04-java --graalvm-config-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue",
198198
"note": "Remove policyVariables.json and policyVariableValues.json from tag, as they are still in preview."
199199
},
200200
"policy-hybrid": {

sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66

77
### Breaking Changes
88

9+
- `managementGroupId` is moved to the 1st parameter in APIs in `PolicyDefinitionsClient`.
10+
911
### Bugs Fixed
1012

1113
### Other Changes
1214

15+
- Updated `api-version` of policy to `2023-04-01`.
16+
1317
## 2.48.0 (2025-02-28)
1418

1519
### Other Changes

sdk/resourcemanager/azure-resourcemanager-resources/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/resourcemanager/azure-resourcemanager-resources",
5-
"Tag": "java/resourcemanager/azure-resourcemanager-resources_f8b2a080f4"
5+
"Tag": "java/resourcemanager/azure-resourcemanager-resources_953c74acc9"
66
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java

Lines changed: 42 additions & 14 deletions
Large diffs are not rendered by default.

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
public interface PolicyClient {
1414
/**
15-
* Gets The ID of the target subscription.
15+
* Gets The ID of the target subscription. The value must be an UUID.
1616
*
1717
* @return the subscriptionId value.
1818
*/
@@ -53,13 +53,27 @@ public interface PolicyClient {
5353
*/
5454
PolicyDefinitionsClient getPolicyDefinitions();
5555

56+
/**
57+
* Gets the PolicyDefinitionVersionsClient object to access its operations.
58+
*
59+
* @return the PolicyDefinitionVersionsClient object.
60+
*/
61+
PolicyDefinitionVersionsClient getPolicyDefinitionVersions();
62+
5663
/**
5764
* Gets the PolicySetDefinitionsClient object to access its operations.
5865
*
5966
* @return the PolicySetDefinitionsClient object.
6067
*/
6168
PolicySetDefinitionsClient getPolicySetDefinitions();
6269

70+
/**
71+
* Gets the PolicySetDefinitionVersionsClient object to access its operations.
72+
*
73+
* @return the PolicySetDefinitionVersionsClient object.
74+
*/
75+
PolicySetDefinitionVersionsClient getPolicySetDefinitionVersions();
76+
6377
/**
6478
* Gets the PolicyAssignmentsClient object to access its operations.
6579
*

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionVersionsClient.java

Lines changed: 869 additions & 0 deletions
Large diffs are not rendered by default.

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -255,42 +255,42 @@ Response<PolicyDefinitionInner> createOrUpdateWithResponse(String policyDefiniti
255255
*
256256
* This operation creates or updates a policy definition in the given management group with the given name.
257257
*
258-
* @param policyDefinitionName The name of the policy definition to create.
259258
* @param managementGroupId The ID of the management group.
259+
* @param policyDefinitionName The name of the policy definition to create.
260260
* @param parameters The policy definition properties.
261261
* @throws IllegalArgumentException thrown if parameters fail the validation.
262262
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
263263
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
264264
* @return the policy definition along with {@link Response} on successful completion of {@link Mono}.
265265
*/
266266
@ServiceMethod(returns = ReturnType.SINGLE)
267-
Mono<Response<PolicyDefinitionInner>> createOrUpdateAtManagementGroupWithResponseAsync(String policyDefinitionName,
268-
String managementGroupId, PolicyDefinitionInner parameters);
267+
Mono<Response<PolicyDefinitionInner>> createOrUpdateAtManagementGroupWithResponseAsync(String managementGroupId,
268+
String policyDefinitionName, PolicyDefinitionInner parameters);
269269

270270
/**
271271
* Creates or updates a policy definition in a management group.
272272
*
273273
* This operation creates or updates a policy definition in the given management group with the given name.
274274
*
275-
* @param policyDefinitionName The name of the policy definition to create.
276275
* @param managementGroupId The ID of the management group.
276+
* @param policyDefinitionName The name of the policy definition to create.
277277
* @param parameters The policy definition properties.
278278
* @throws IllegalArgumentException thrown if parameters fail the validation.
279279
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
280280
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
281281
* @return the policy definition on successful completion of {@link Mono}.
282282
*/
283283
@ServiceMethod(returns = ReturnType.SINGLE)
284-
Mono<PolicyDefinitionInner> createOrUpdateAtManagementGroupAsync(String policyDefinitionName,
285-
String managementGroupId, PolicyDefinitionInner parameters);
284+
Mono<PolicyDefinitionInner> createOrUpdateAtManagementGroupAsync(String managementGroupId,
285+
String policyDefinitionName, PolicyDefinitionInner parameters);
286286

287287
/**
288288
* Creates or updates a policy definition in a management group.
289289
*
290290
* This operation creates or updates a policy definition in the given management group with the given name.
291291
*
292-
* @param policyDefinitionName The name of the policy definition to create.
293292
* @param managementGroupId The ID of the management group.
293+
* @param policyDefinitionName The name of the policy definition to create.
294294
* @param parameters The policy definition properties.
295295
* @param context The context to associate with this operation.
296296
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -299,150 +299,150 @@ Mono<PolicyDefinitionInner> createOrUpdateAtManagementGroupAsync(String policyDe
299299
* @return the policy definition along with {@link Response}.
300300
*/
301301
@ServiceMethod(returns = ReturnType.SINGLE)
302-
Response<PolicyDefinitionInner> createOrUpdateAtManagementGroupWithResponse(String policyDefinitionName,
303-
String managementGroupId, PolicyDefinitionInner parameters, Context context);
302+
Response<PolicyDefinitionInner> createOrUpdateAtManagementGroupWithResponse(String managementGroupId,
303+
String policyDefinitionName, PolicyDefinitionInner parameters, Context context);
304304

305305
/**
306306
* Creates or updates a policy definition in a management group.
307307
*
308308
* This operation creates or updates a policy definition in the given management group with the given name.
309309
*
310-
* @param policyDefinitionName The name of the policy definition to create.
311310
* @param managementGroupId The ID of the management group.
311+
* @param policyDefinitionName The name of the policy definition to create.
312312
* @param parameters The policy definition properties.
313313
* @throws IllegalArgumentException thrown if parameters fail the validation.
314314
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
315315
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
316316
* @return the policy definition.
317317
*/
318318
@ServiceMethod(returns = ReturnType.SINGLE)
319-
PolicyDefinitionInner createOrUpdateAtManagementGroup(String policyDefinitionName, String managementGroupId,
319+
PolicyDefinitionInner createOrUpdateAtManagementGroup(String managementGroupId, String policyDefinitionName,
320320
PolicyDefinitionInner parameters);
321321

322322
/**
323323
* Deletes a policy definition in a management group.
324324
*
325325
* This operation deletes the policy definition in the given management group with the given name.
326326
*
327-
* @param policyDefinitionName The name of the policy definition to delete.
328327
* @param managementGroupId The ID of the management group.
328+
* @param policyDefinitionName The name of the policy definition to delete.
329329
* @throws IllegalArgumentException thrown if parameters fail the validation.
330330
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
331331
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
332332
* @return the {@link Response} on successful completion of {@link Mono}.
333333
*/
334334
@ServiceMethod(returns = ReturnType.SINGLE)
335-
Mono<Response<Void>> deleteAtManagementGroupWithResponseAsync(String policyDefinitionName,
336-
String managementGroupId);
335+
Mono<Response<Void>> deleteAtManagementGroupWithResponseAsync(String managementGroupId,
336+
String policyDefinitionName);
337337

338338
/**
339339
* Deletes a policy definition in a management group.
340340
*
341341
* This operation deletes the policy definition in the given management group with the given name.
342342
*
343-
* @param policyDefinitionName The name of the policy definition to delete.
344343
* @param managementGroupId The ID of the management group.
344+
* @param policyDefinitionName The name of the policy definition to delete.
345345
* @throws IllegalArgumentException thrown if parameters fail the validation.
346346
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
347347
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
348348
* @return A {@link Mono} that completes when a successful response is received.
349349
*/
350350
@ServiceMethod(returns = ReturnType.SINGLE)
351-
Mono<Void> deleteAtManagementGroupAsync(String policyDefinitionName, String managementGroupId);
351+
Mono<Void> deleteAtManagementGroupAsync(String managementGroupId, String policyDefinitionName);
352352

353353
/**
354354
* Deletes a policy definition in a management group.
355355
*
356356
* This operation deletes the policy definition in the given management group with the given name.
357357
*
358-
* @param policyDefinitionName The name of the policy definition to delete.
359358
* @param managementGroupId The ID of the management group.
359+
* @param policyDefinitionName The name of the policy definition to delete.
360360
* @param context The context to associate with this operation.
361361
* @throws IllegalArgumentException thrown if parameters fail the validation.
362362
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
363363
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
364364
* @return the {@link Response}.
365365
*/
366366
@ServiceMethod(returns = ReturnType.SINGLE)
367-
Response<Void> deleteAtManagementGroupWithResponse(String policyDefinitionName, String managementGroupId,
367+
Response<Void> deleteAtManagementGroupWithResponse(String managementGroupId, String policyDefinitionName,
368368
Context context);
369369

370370
/**
371371
* Deletes a policy definition in a management group.
372372
*
373373
* This operation deletes the policy definition in the given management group with the given name.
374374
*
375-
* @param policyDefinitionName The name of the policy definition to delete.
376375
* @param managementGroupId The ID of the management group.
376+
* @param policyDefinitionName The name of the policy definition to delete.
377377
* @throws IllegalArgumentException thrown if parameters fail the validation.
378378
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
379379
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
380380
*/
381381
@ServiceMethod(returns = ReturnType.SINGLE)
382-
void deleteAtManagementGroup(String policyDefinitionName, String managementGroupId);
382+
void deleteAtManagementGroup(String managementGroupId, String policyDefinitionName);
383383

384384
/**
385385
* Retrieve a policy definition in a management group.
386386
*
387387
* This operation retrieves the policy definition in the given management group with the given name.
388388
*
389-
* @param policyDefinitionName The name of the policy definition to get.
390389
* @param managementGroupId The ID of the management group.
390+
* @param policyDefinitionName The name of the policy definition to get.
391391
* @throws IllegalArgumentException thrown if parameters fail the validation.
392392
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
393393
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
394394
* @return the policy definition along with {@link Response} on successful completion of {@link Mono}.
395395
*/
396396
@ServiceMethod(returns = ReturnType.SINGLE)
397-
Mono<Response<PolicyDefinitionInner>> getAtManagementGroupWithResponseAsync(String policyDefinitionName,
398-
String managementGroupId);
397+
Mono<Response<PolicyDefinitionInner>> getAtManagementGroupWithResponseAsync(String managementGroupId,
398+
String policyDefinitionName);
399399

400400
/**
401401
* Retrieve a policy definition in a management group.
402402
*
403403
* This operation retrieves the policy definition in the given management group with the given name.
404404
*
405-
* @param policyDefinitionName The name of the policy definition to get.
406405
* @param managementGroupId The ID of the management group.
406+
* @param policyDefinitionName The name of the policy definition to get.
407407
* @throws IllegalArgumentException thrown if parameters fail the validation.
408408
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
409409
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
410410
* @return the policy definition on successful completion of {@link Mono}.
411411
*/
412412
@ServiceMethod(returns = ReturnType.SINGLE)
413-
Mono<PolicyDefinitionInner> getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId);
413+
Mono<PolicyDefinitionInner> getAtManagementGroupAsync(String managementGroupId, String policyDefinitionName);
414414

415415
/**
416416
* Retrieve a policy definition in a management group.
417417
*
418418
* This operation retrieves the policy definition in the given management group with the given name.
419419
*
420-
* @param policyDefinitionName The name of the policy definition to get.
421420
* @param managementGroupId The ID of the management group.
421+
* @param policyDefinitionName The name of the policy definition to get.
422422
* @param context The context to associate with this operation.
423423
* @throws IllegalArgumentException thrown if parameters fail the validation.
424424
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
425425
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
426426
* @return the policy definition along with {@link Response}.
427427
*/
428428
@ServiceMethod(returns = ReturnType.SINGLE)
429-
Response<PolicyDefinitionInner> getAtManagementGroupWithResponse(String policyDefinitionName,
430-
String managementGroupId, Context context);
429+
Response<PolicyDefinitionInner> getAtManagementGroupWithResponse(String managementGroupId,
430+
String policyDefinitionName, Context context);
431431

432432
/**
433433
* Retrieve a policy definition in a management group.
434434
*
435435
* This operation retrieves the policy definition in the given management group with the given name.
436436
*
437-
* @param policyDefinitionName The name of the policy definition to get.
438437
* @param managementGroupId The ID of the management group.
438+
* @param policyDefinitionName The name of the policy definition to get.
439439
* @throws IllegalArgumentException thrown if parameters fail the validation.
440440
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
441441
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
442442
* @return the policy definition.
443443
*/
444444
@ServiceMethod(returns = ReturnType.SINGLE)
445-
PolicyDefinitionInner getAtManagementGroup(String policyDefinitionName, String managementGroupId);
445+
PolicyDefinitionInner getAtManagementGroup(String managementGroupId, String policyDefinitionName);
446446

447447
/**
448448
* Retrieves policy definitions in a subscription

0 commit comments

Comments
 (0)