From 068816862ad937d0c088e72e3cbef32c9d51c396 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 10:28:03 +0800 Subject: [PATCH 01/16] update sdk version --- eng/versioning/version_client.txt | 2 +- sdk/resources/azure-resourcemanager-resources/CHANGELOG.md | 4 +++- sdk/resources/azure-resourcemanager-resources/README.md | 2 +- sdk/resources/azure-resourcemanager-resources/pom.xml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e1790914a4e0..22e7fe35a795 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -291,7 +291,7 @@ com.azure.resourcemanager:azure-resourcemanager-msi;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-network;2.57.1;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.6;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-resources;2.53.6;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-resources;2.53.6;2.54.0 com.azure.resourcemanager:azure-resourcemanager-redis;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-search;2.54.5;2.55.0-beta.1 diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 6808d1a1f578..169443d146b3 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.54.0-beta.1 (Unreleased) +## 2.54.0 (2026-02-06) ### Features Added @@ -10,6 +10,8 @@ ### Other Changes +- Updated `api-version` of policy to `2025-03-01`. + ## 2.53.6 (2026-01-29) ### Other Changes diff --git a/sdk/resources/azure-resourcemanager-resources/README.md b/sdk/resources/azure-resourcemanager-resources/README.md index 28acacb1e9ad..a7e13f342df5 100644 --- a/sdk/resources/azure-resourcemanager-resources/README.md +++ b/sdk/resources/azure-resourcemanager-resources/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-resources - 2.53.5 + 2.54.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resources/azure-resourcemanager-resources/pom.xml b/sdk/resources/azure-resourcemanager-resources/pom.xml index fcc40421009b..1442350fce20 100644 --- a/sdk/resources/azure-resourcemanager-resources/pom.xml +++ b/sdk/resources/azure-resourcemanager-resources/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0-beta.1 + 2.54.0 jar Microsoft Azure SDK for Resource Management From d0f25722ce6ef009c4a12aa7e25c0f3e4d42de6d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 10:38:40 +0800 Subject: [PATCH 02/16] update tag for policy --- sdk/resourcemanager/api-specs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 69a2cfc8c354..865cef8821fc 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -115,7 +115,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-policy-2023-04-java --metadata-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", + "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", "note": "Remove policyVariables.json and policyVariableValues.json from tag, as they are still in preview." }, "privatedns": { From 31d19b1d36a8f4c7c88e5213a514c4d1a300b581 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 10:41:18 +0800 Subject: [PATCH 03/16] update swagger path for resources lib --- sdk/resourcemanager/api-specs.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 865cef8821fc..1bc4effe5427 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -74,7 +74,7 @@ }, "features": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Features/features/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-features-2021-07 --metadata-suffix=feature --enable-sync-stack=false" }, @@ -94,7 +94,7 @@ }, "locks": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Authorization/locks/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-locks-2017-04 --metadata-suffix=lock --enable-sync-stack=false" }, @@ -113,7 +113,7 @@ }, "policy": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Authorization/policy/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", "note": "Remove policyVariables.json and policyVariableValues.json from tag, as they are still in preview." @@ -139,7 +139,7 @@ }, "resources": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Resources/resources/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-resources-2025-04 --enable-sync-stack=false", "note": "Remove `final` from `ResourceReference`, as it is used as superclass in deploymentstacks." @@ -184,7 +184,7 @@ }, "subscriptions": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Resources/subscriptions/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-subscriptions-2022-12 --metadata-suffix=subscription --modelerfour.lenient-model-deduplication --name-for-ungrouped-operations=ResourceName --remove-operation-group=Operations --enable-sync-stack=false" }, @@ -202,13 +202,13 @@ }, "changes": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Resources/changes/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-changes-2022-05 --metadata-suffix=change --rename-model=ChangeType:ResourceChangeType,PropertyChangeType:ResourcePropertyChangeType --enable-sync-stack=false" }, "databoundaries": { "dir": "../resources/azure-resourcemanager-resources", - "source": "specification/resources/resource-manager/readme.md", + "source": "specification/resources/resource-manager/Microsoft.Resources/databoundaries/readme.md", "package": "com.azure.resourcemanager.resources", "args": "--tag=package-databoundaries-2024-08 --title=DataBoundariesManagementClient --metadata-suffix=databoundary --remove-operation-group=Operations --enable-sync-stack=false" } From 5e70c0e8057884cfb2ad597e08826fd3003e1bd9 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:08:14 +0800 Subject: [PATCH 04/16] ignore duplicate in policy --- sdk/resourcemanager/api-specs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 1bc4effe5427..21d871fd4858 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -115,7 +115,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Authorization/policy/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", + "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", "note": "Remove policyVariables.json and policyVariableValues.json from tag, as they are still in preview." }, "privatedns": { From a63bf541ed12c521e74333b2bf47a175b6270c58 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:22:48 +0800 Subject: [PATCH 05/16] set deploymentStacks to tag with input-file before TypeSpec conversion --- sdk/resourcemanager/api-specs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 21d871fd4858..cd3c6837f88d 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -154,7 +154,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-2024-03 --metadata-suffix=deploymentstacks --enable-sync-stack=false" + "args": "--tag=package-2024-03-java --metadata-suffix=deploymentstacks --enable-sync-stack=false" }, "search": { "dir": "../search/azure-resourcemanager-search", From 055ff10f41bae64b6c7313fab7fdf4b07f824a2e Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:25:47 +0800 Subject: [PATCH 06/16] regen --- eng/versioning/version_client.txt | 1 + .../azure-resourcemanager/pom.xml | 2 +- .../AuthorizationOperationsListSamples.java | 3 +- .../generated/ChangesGetSamples.java | 2 +- .../generated/ChangesListSamples.java | 2 +- .../DataBoundariesGetScopeSamples.java | 4 +- .../DataBoundariesGetTenantSamples.java | 4 +- .../generated/DataBoundariesPutSamples.java | 3 +- ...PolicyManifestsGetByPolicyModeSamples.java | 4 +- .../DataPolicyManifestsListSamples.java | 6 +- ...reateOrUpdateAtManagementGroupSamples.java | 62 ++ ...sCreateOrUpdateAtResourceGroupSamples.java | 62 ++ ...ksCreateOrUpdateAtSubscriptionSamples.java | 62 ++ ...tStacksDeleteAtManagementGroupSamples.java | 29 + ...mentStacksDeleteAtSubscriptionSamples.java | 28 + .../DeploymentStacksDeleteSamples.java | 29 + ...xportTemplateAtManagementGroupSamples.java | 30 + ...sExportTemplateAtResourceGroupSamples.java | 30 + ...ksExportTemplateAtSubscriptionSamples.java | 29 + ...mentStacksGetAtManagementGroupSamples.java | 28 + ...loymentStacksGetAtSubscriptionSamples.java | 28 + ...oymentStacksGetByResourceGroupSamples.java | 29 + ...entStacksListAtManagementGroupSamples.java | 28 + ...ymentStacksListByResourceGroupSamples.java | 28 + .../DeploymentStacksListSamples.java | 28 + ...ValidateStackAtManagementGroupSamples.java | 64 ++ ...ksValidateStackAtResourceGroupSamples.java | 63 ++ ...cksValidateStackAtSubscriptionSamples.java | 64 ++ .../generated/FeaturesGetSamples.java | 2 +- .../generated/FeaturesListAllSamples.java | 4 +- .../generated/FeaturesListSamples.java | 3 +- .../generated/FeaturesRegisterSamples.java | 3 +- .../generated/FeaturesUnregisterSamples.java | 3 +- ...teOrUpdateAtResourceGroupLevelSamples.java | 3 +- ...sCreateOrUpdateAtResourceLevelSamples.java | 3 +- ...ateOrUpdateAtSubscriptionLevelSamples.java | 3 +- ...mentLocksCreateOrUpdateByScopeSamples.java | 3 +- ...mentLocksDeleteAtResourceLevelSamples.java | 3 +- ...LocksDeleteAtSubscriptionLevelSamples.java | 3 +- .../ManagementLocksDeleteByScopeSamples.java | 3 +- .../ManagementLocksDeleteSamples.java | 3 +- ...agementLocksGetAtResourceLevelSamples.java | 3 +- ...entLocksGetAtSubscriptionLevelSamples.java | 3 +- ...agementLocksGetByResourceGroupSamples.java | 3 +- .../ManagementLocksGetByScopeSamples.java | 3 +- ...gementLocksListAtResourceLevelSamples.java | 3 +- ...gementLocksListByResourceGroupSamples.java | 3 +- .../ManagementLocksListByScopeSamples.java | 3 +- .../generated/ManagementLocksListSamples.java | 3 +- .../PolicyAssignmentsCreateByIdSamples.java | 10 +- .../PolicyAssignmentsCreateSamples.java | 84 ++- .../PolicyAssignmentsDeleteByIdSamples.java | 5 +- .../PolicyAssignmentsDeleteSamples.java | 5 +- .../PolicyAssignmentsGetByIdSamples.java | 14 +- .../PolicyAssignmentsGetSamples.java | 24 +- ...AssignmentsListByResourceGroupSamples.java | 5 +- ...ignmentsListForManagementGroupSamples.java | 5 +- ...licyAssignmentsListForResourceSamples.java | 5 +- .../PolicyAssignmentsListSamples.java | 4 +- .../PolicyAssignmentsUpdateByIdSamples.java | 5 +- .../PolicyAssignmentsUpdateSamples.java | 20 +- ...reateOrUpdateAtManagementGroupSamples.java | 5 +- ...finitionVersionsCreateOrUpdateSamples.java | 5 +- ...ersionsDeleteAtManagementGroupSamples.java | 5 +- ...PolicyDefinitionVersionsDeleteSamples.java | 5 +- ...onVersionsGetAtManagementGroupSamples.java | 5 +- ...cyDefinitionVersionsGetBuiltInSamples.java | 5 +- .../PolicyDefinitionVersionsGetSamples.java | 5 +- ...rsionsListAllAtManagementGroupSamples.java | 5 +- ...initionVersionsListAllBuiltinsSamples.java | 5 +- ...olicyDefinitionVersionsListAllSamples.java | 5 +- ...yDefinitionVersionsListBuiltInSamples.java | 5 +- ...nVersionsListByManagementGroupSamples.java | 5 +- .../PolicyDefinitionVersionsListSamples.java | 5 +- ...reateOrUpdateAtManagementGroupSamples.java | 5 +- ...olicyDefinitionsCreateOrUpdateSamples.java | 48 +- ...nitionsDeleteAtManagementGroupSamples.java | 5 +- .../PolicyDefinitionsDeleteSamples.java | 5 +- ...efinitionsGetAtManagementGroupSamples.java | 5 +- .../PolicyDefinitionsGetBuiltInSamples.java | 5 +- .../PolicyDefinitionsGetSamples.java | 4 +- .../PolicyDefinitionsListBuiltInSamples.java | 5 +- ...finitionsListByManagementGroupSamples.java | 5 +- .../PolicyDefinitionsListSamples.java | 4 +- ...PolicyExemptionsCreateOrUpdateSamples.java | 8 +- .../PolicyExemptionsDeleteSamples.java | 4 +- .../generated/PolicyExemptionsGetSamples.java | 8 +- ...yExemptionsListByResourceGroupSamples.java | 4 +- ...emptionsListForManagementGroupSamples.java | 4 +- ...olicyExemptionsListForResourceSamples.java | 4 +- .../PolicyExemptionsListSamples.java | 4 +- .../PolicyExemptionsUpdateSamples.java | 4 +- ...reateOrUpdateAtManagementGroupSamples.java | 5 +- ...finitionVersionsCreateOrUpdateSamples.java | 5 +- ...ersionsDeleteAtManagementGroupSamples.java | 5 +- ...icySetDefinitionVersionsDeleteSamples.java | 5 +- ...onVersionsGetAtManagementGroupSamples.java | 5 +- ...etDefinitionVersionsGetBuiltInSamples.java | 5 +- ...PolicySetDefinitionVersionsGetSamples.java | 5 +- ...rsionsListAllAtManagementGroupSamples.java | 5 +- ...initionVersionsListAllBuiltinsSamples.java | 5 +- ...cySetDefinitionVersionsListAllSamples.java | 5 +- ...tDefinitionVersionsListBuiltInSamples.java | 5 +- ...nVersionsListByManagementGroupSamples.java | 5 +- ...olicySetDefinitionVersionsListSamples.java | 5 +- ...reateOrUpdateAtManagementGroupSamples.java | 10 +- ...cySetDefinitionsCreateOrUpdateSamples.java | 10 +- ...nitionsDeleteAtManagementGroupSamples.java | 5 +- .../PolicySetDefinitionsDeleteSamples.java | 5 +- ...efinitionsGetAtManagementGroupSamples.java | 5 +- ...PolicySetDefinitionsGetBuiltInSamples.java | 5 +- .../PolicySetDefinitionsGetSamples.java | 5 +- ...olicySetDefinitionsListBuiltInSamples.java | 5 +- ...finitionsListByManagementGroupSamples.java | 5 +- .../PolicySetDefinitionsListSamples.java | 5 +- ...TokensAcquireAtManagementGroupSamples.java | 35 + .../generated/PolicyTokensAcquireSamples.java | 33 + .../ProviderResourceTypesListSamples.java | 4 +- .../ProvidersGetAtTenantScopeSamples.java | 4 +- .../generated/ProvidersGetSamples.java | 3 +- .../generated/ProvidersListSamples.java | 3 +- .../ProvidersProviderPermissionsSamples.java | 4 +- .../ResourceGroupsCreateOrUpdateSamples.java | 3 +- .../ResourceGroupsDeleteSamples.java | 6 +- .../ResourceGroupsExportTemplateSamples.java | 9 +- .../ResourceNameCheckResourceNameSamples.java | 3 +- ...ureRegistrationsCreateOrUpdateSamples.java | 4 +- ...tionFeatureRegistrationsDeleteSamples.java | 4 +- ...riptionFeatureRegistrationsGetSamples.java | 4 +- ...egistrationsListBySubscriptionSamples.java | 4 +- ...iptionFeatureRegistrationsListSamples.java | 4 +- .../SubscriptionsCheckZonePeersSamples.java | 3 +- .../generated/SubscriptionsGetSamples.java | 3 +- .../SubscriptionsListLocationsSamples.java | 6 +- .../generated/SubscriptionsListSamples.java | 3 +- ...perationCreateOrUpdateAtScopeSamples.java} | 14 +- ...=> TagsOperationDeleteAtScopeSamples.java} | 15 +- ...va => TagsOperationGetAtScopeSamples.java} | 14 +- ...=> TagsOperationUpdateAtScopeSamples.java} | 15 +- .../generated/TenantsListSamples.java | 3 +- .../fluent/PolicyAssignmentsClient.java | 8 +- .../resources/fluent/PolicyClient.java | 13 +- .../resources/fluent/PolicyTokensClient.java | 141 ++++ .../fluent/ResourceManagementClient.java | 6 +- ...sClient.java => TagsOperationsClient.java} | 4 +- .../fluent/models/PolicyAssignmentInner.java | 44 +- .../models/PolicyAssignmentProperties.java | 61 +- .../fluent/models/PolicyDefinitionInner.java | 27 + .../models/PolicyDefinitionProperties.java | 36 + .../models/PolicyDefinitionVersionInner.java | 27 + .../PolicyDefinitionVersionProperties.java | 36 + .../models/PolicyTokenResponseInner.java | 310 +++++++++ .../models/WhatIfOperationResultInner.java | 88 +-- .../resources/fluent/models/package-info.java | 2 +- .../resources/fluent/package-info.java | 2 +- .../AuthorizationOperationsClientImpl.java | 2 +- .../implementation/ChangesClientImpl.java | 2 +- .../DataBoundariesClientImpl.java | 2 +- .../DataPolicyManifestsClientImpl.java | 6 +- .../DeploymentOperationsClientImpl.java | 32 +- .../DeploymentStacksClientImpl.java | 2 +- .../implementation/DeploymentsClientImpl.java | 32 +- .../implementation/FeaturesClientImpl.java | 14 +- .../ManagementLocksClientImpl.java | 26 +- .../implementation/OperationsClientImpl.java | 2 +- .../PolicyAssignmentsClientImpl.java | 97 +-- .../implementation/PolicyClientImpl.java | 30 +- .../PolicyDefinitionVersionsClientImpl.java | 66 +- .../PolicyDefinitionsClientImpl.java | 54 +- .../PolicyExemptionsClientImpl.java | 18 +- ...PolicySetDefinitionVersionsClientImpl.java | 66 +- .../PolicySetDefinitionsClientImpl.java | 54 +- .../PolicyTokensClientImpl.java | 330 +++++++++ .../ProviderResourceTypesClientImpl.java | 2 +- .../implementation/ProvidersClientImpl.java | 14 +- .../ResourceGroupsClientImpl.java | 8 +- .../ResourceManagementClientImpl.java | 16 +- .../ResourceNamesClientImpl.java | 2 +- .../implementation/ResourcesClientImpl.java | 14 +- ...riptionFeatureRegistrationsClientImpl.java | 2 +- .../SubscriptionsClientImpl.java | 8 +- ...mpl.java => TagsOperationsClientImpl.java} | 26 +- .../implementation/TenantsClientImpl.java | 6 +- .../resources/models/AssignmentType.java | 61 ++ .../resources/models/EnforcementMode.java | 7 +- .../models/ExternalEndpointResult.java | 51 ++ ...nalEvaluationEndpointInvocationResult.java | 251 +++++++ .../ExternalEvaluationEndpointSettings.java | 124 ++++ ...ExternalEvaluationEnforcementSettings.java | 195 ++++++ .../resources/models/OverrideKind.java | 5 + .../resources/models/PolicyLogInfo.java | 658 ++++++++++++++++++ .../models/PolicyTokenOperation.java | 164 +++++ .../resources/models/PolicyTokenRequest.java | 131 ++++ .../resources/models/PolicyTokenResult.java | 51 ++ .../resources/models/ResourceReference.java | 2 +- .../models/UserAssignedIdentity.java | 15 +- .../models/WhatIfOperationProperties.java | 4 +- .../resources/models/package-info.java | 2 +- .../resources/package-info.java | 2 +- .../proxy-config.json | 2 +- .../proxy-config.json | 2 +- ...azure-resourcemanager-resources.properties | 25 - 202 files changed, 4374 insertions(+), 641 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireAtManagementGroupSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireSamples.java rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagOperationsCreateOrUpdateAtScopeSamples.java => TagsOperationCreateOrUpdateAtScopeSamples.java} (88%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagOperationsDeleteAtScopeSamples.java => TagsOperationDeleteAtScopeSamples.java} (82%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagOperationsGetAtScopeSamples.java => TagsOperationGetAtScopeSamples.java} (83%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagOperationsUpdateAtScopeSamples.java => TagsOperationUpdateAtScopeSamples.java} (89%) create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyTokensClient.java rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/{TagOperationsClient.java => TagsOperationsClient.java} (99%) create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyTokenResponseInner.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyTokensClientImpl.java rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/{TagOperationsClientImpl.java => TagsOperationsClientImpl.java} (99%) create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentType.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEndpointResult.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointInvocationResult.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointSettings.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEnforcementSettings.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyLogInfo.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenOperation.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenRequest.java create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenResult.java rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{fluent => }/models/WhatIfOperationProperties.java (96%) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 22e7fe35a795..1de14cbc5029 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -553,6 +553,7 @@ unreleased_com.azure.v2:azure-core;2.0.0-beta.1 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 +unreleased_com.azure.resourcemanager:azure-resourcemanager-resources;2.54.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 162d6d50c93f..024c04e1bc19 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -92,7 +92,7 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.53.6 + 2.54.0 com.azure.resourcemanager diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java index 579798e41842..1db0d8d7eb18 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java @@ -9,7 +9,8 @@ */ public final class AuthorizationOperationsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ListProviderOperations.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java index 3c3541670073..cb59d14ec80e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java @@ -10,7 +10,7 @@ public final class ChangesGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/GetChange.json + * specification/resources/resource-manager/Microsoft.Resources/changes/stable/2022-05-01/examples/GetChange.json */ /** * Sample code: GetChange. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java index a6e857e51612..c6a58c05beb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java @@ -10,7 +10,7 @@ public final class ChangesListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/ListChanges.json + * specification/resources/resource-manager/Microsoft.Resources/changes/stable/2022-05-01/examples/ListChanges.json */ /** * Sample code: ListChanges. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetScopeSamples.java index 8bac11580317..5502ef86853f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetScopeSamples.java @@ -12,8 +12,8 @@ public final class DataBoundariesGetScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetScopedDataBoundary. - * json + * specification/resources/resource-manager/Microsoft.Resources/databoundaries/stable/2024-08-01/examples/ + * GetScopedDataBoundary.json */ /** * Sample code: Get data boundary at scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetTenantSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetTenantSamples.java index 4c35310e6806..5c61aece4fb5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetTenantSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetTenantSamples.java @@ -12,8 +12,8 @@ public final class DataBoundariesGetTenantSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetTenantDataBoundary. - * json + * specification/resources/resource-manager/Microsoft.Resources/databoundaries/stable/2024-08-01/examples/ + * GetTenantDataBoundary.json */ /** * Sample code: Get data boundary for tenant. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesPutSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesPutSamples.java index 69a7e55a14b8..0a867a996a43 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesPutSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesPutSamples.java @@ -15,7 +15,8 @@ public final class DataBoundariesPutSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/PutDataBoundary.json + * specification/resources/resource-manager/Microsoft.Resources/databoundaries/stable/2024-08-01/examples/ + * PutDataBoundary.json */ /** * Sample code: Opt-in to data boundary. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java index 1c60139c82f2..ccdd73651c97 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java @@ -10,8 +10,8 @@ public final class DataPolicyManifestsGetByPolicyModeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/getDataPolicyManifest - * .json + * specification/resources/resource-manager/Microsoft.Authorization/policy/stable/2020-09-01/examples/ + * getDataPolicyManifest.json */ /** * Sample code: Retrieve a data policy manifest by policy mode. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java index 01b3e5eb74a5..04891cc94c47 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java @@ -9,7 +9,8 @@ */ public final class DataPolicyManifestsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/policy/stable/2020-09-01/examples/ * listDataPolicyManifests.json */ /** @@ -26,7 +27,8 @@ public static void listDataPolicyManifests(com.azure.resourcemanager.AzureResour } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/policy/stable/2020-09-01/examples/ * listDataPolicyManifestsNamespaceFilter.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java new file mode 100644 index 000000000000..259276f59380 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks CreateOrUpdateAtManagementGroup. + */ +public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupCreate.json + */ + /** + * Sample code: DeploymentStacksManagementGroupCreateOrUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksManagementGroupCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java new file mode 100644 index 000000000000..ecc0eb47a6ff --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks CreateOrUpdateAtResourceGroup. + */ +public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupCreate.json + */ + /** + * Sample code: DeploymentStacksResourceGroupCreateOrUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksResourceGroupCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .createOrUpdateAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java new file mode 100644 index 000000000000..57e56a35aaab --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks CreateOrUpdateAtSubscription. + */ +public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionCreate.json + */ + /** + * Sample code: DeploymentStacksSubscriptionCreateOrUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksSubscriptionCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .createOrUpdateAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java new file mode 100644 index 000000000000..73f97659dddd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks DeleteAtManagementGroup. + */ +public final class DeploymentStacksDeleteAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupDelete.json + */ + /** + * Sample code: DeploymentStacksManagementGroupDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksManagementGroupDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java new file mode 100644 index 000000000000..04326f2e5831 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks DeleteAtSubscription. + */ +public final class DeploymentStacksDeleteAtSubscriptionSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionDelete.json + */ + /** + * Sample code: DeploymentStacksSubscriptionDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksSubscriptionDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java new file mode 100644 index 000000000000..82dc3fdecd8c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks Delete. + */ +public final class DeploymentStacksDeleteSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupDelete.json + */ + /** + * Sample code: DeploymentStacksResourceGroupDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksResourceGroupDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java new file mode 100644 index 000000000000..b8ec1882ec2c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks ExportTemplateAtManagementGroup. + */ +public final class DeploymentStacksExportTemplateAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupExportTemplate.json + */ + /** + * Sample code: DeploymentStacksManagementGroupExportTemplate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksManagementGroupExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .exportTemplateAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java new file mode 100644 index 000000000000..bc4c45006e4b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks ExportTemplateAtResourceGroup. + */ +public final class DeploymentStacksExportTemplateAtResourceGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackExportTemplate.json + */ + /** + * Sample code: DeploymentStacksResourceGroupExportTemplate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksResourceGroupExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .exportTemplateAtResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java new file mode 100644 index 000000000000..3d6060725da7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks ExportTemplateAtSubscription. + */ +public final class DeploymentStacksExportTemplateAtSubscriptionSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionExportTemplate.json + */ + /** + * Sample code: DeploymentStacksSubscriptionExportTemplate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deploymentStacksSubscriptionExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .exportTemplateAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java new file mode 100644 index 000000000000..51fcda706270 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks GetAtManagementGroup. + */ +public final class DeploymentStacksGetAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupGet.json + */ + /** + * Sample code: DeploymentStacksManagementGroupGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksManagementGroupGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .getAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java new file mode 100644 index 000000000000..393a46e1b2d5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks GetAtSubscription. + */ +public final class DeploymentStacksGetAtSubscriptionSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionGet.json + */ + /** + * Sample code: DeploymentStacksSubscriptionGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksSubscriptionGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .getAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java new file mode 100644 index 000000000000..02984b8180f0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks GetByResourceGroup. + */ +public final class DeploymentStacksGetByResourceGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupGet.json + */ + /** + * Sample code: DeploymentStacksResourceGroupGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksResourceGroupGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .getByResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java new file mode 100644 index 000000000000..26d5cce6cac5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks ListAtManagementGroup. + */ +public final class DeploymentStacksListAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupList.json + */ + /** + * Sample code: DeploymentStacksManagementGroupList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksManagementGroupList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .listAtManagementGroup("myMg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java new file mode 100644 index 000000000000..5d447e141ff8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks ListByResourceGroup. + */ +public final class DeploymentStacksListByResourceGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupList.json + */ + /** + * Sample code: DeploymentStacksResourceGroupList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksResourceGroupList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .listByResourceGroup("deploymentStacksRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java new file mode 100644 index 000000000000..b2d009a410ca --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +/** + * Samples for DeploymentStacks List. + */ +public final class DeploymentStacksListSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionList.json + */ + /** + * Sample code: DeploymentStacksSubscriptionList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksSubscriptionList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java new file mode 100644 index 000000000000..c03679ef3653 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks ValidateStackAtManagementGroup. + */ +public final class DeploymentStacksValidateStackAtManagementGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupValidate.json + */ + /** + * Sample code: DeploymentStacksManagementGroupValidate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksManagementGroupValidate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java new file mode 100644 index 000000000000..9eb5a2ce2f31 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks ValidateStackAtResourceGroup. + */ +public final class DeploymentStacksValidateStackAtResourceGroupSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupValidate.json + */ + /** + * Sample code: DeploymentStacksResourceGroupValidate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksResourceGroupValidate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", + new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java new file mode 100644 index 000000000000..41d75df15f50 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.models.DenySettings; +import com.azure.resourcemanager.resources.models.DenySettingsMode; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacks ValidateStackAtSubscription. + */ +public final class DeploymentStacksValidateStackAtSubscriptionSamples { + /* + * x-ms-original-file: + * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ + * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionValidate.json + */ + /** + * Sample code: DeploymentStacksSubscriptionValidate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deploymentStacksSubscriptionValidate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .deploymentClient() + .getDeploymentStacks() + .validateStackAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java index 200d4ddb711a..619ddce05764 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java @@ -10,7 +10,7 @@ public final class FeaturesGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/getFeature.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/getFeature.json */ /** * Sample code: Get feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java index c500fe3df762..9b2610c490d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java @@ -10,8 +10,8 @@ public final class FeaturesListAllSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listSubscriptionFeatures. - * json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * listSubscriptionFeatures.json */ /** * Sample code: List subscription Features. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java index 4f1a77fd8387..29f151bf3b44 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java @@ -10,7 +10,8 @@ public final class FeaturesListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listProviderFeatures.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * listProviderFeatures.json */ /** * Sample code: List provider Features. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java index a1480c6340bb..0e62f61e8178 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java @@ -10,7 +10,8 @@ public final class FeaturesRegisterSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/registerFeature.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/registerFeature. + * json */ /** * Sample code: Register feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java index 2b122e119923..19266402c3cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java @@ -10,7 +10,8 @@ public final class FeaturesUnregisterSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/unregisterFeature.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/unregisterFeature + * .json */ /** * Sample code: Register feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java index b3d425a79712..0cd56f8568c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_CreateOrUpdateAtResourceGroupLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java index 4422d51156fc..d7b55d0983c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_CreateOrUpdateAtResourceLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java index 1f6b592808c2..c3fa718a11c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_CreateOrUpdateAtSubscriptionLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java index 55927636099c..ed7c8b284ece 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_CreateOrUpdateAtScope.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java index abbc09448cd6..2c3545e69bc6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_DeleteAtResourceLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java index eee3953db7f8..6a531479c281 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_DeleteAtSubscriptionLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java index f04a90755277..62fe5cc7b469 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_DeleteAtScope.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java index 9dfff17327dd..6f77ebc6126f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_DeleteAtResourceGroupLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java index 251b73ea92d1..88d2564e90f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_GetAtResourceLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java index 6570d9448972..9155c1be86f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_GetAtSubscriptionLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java index 82758782129e..e1113cc702fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_GetAtResourceGroupLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java index b78a074446d7..f5b196a25dc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_GetAtScope.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java index dd15ade02072..3b9e46c1e0a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_ListAtResourceLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java index 9943904ed3f3..e752aa0f4d37 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_ListAtResourceGroupLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java index ae2e8a281455..a1e03c0d54ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_ListAtScope.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java index 793794ec1fdd..0cd62747d784 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/locks/stable/2017-04-01/examples/ * ManagementLocks_ListAtSubscriptionLevel.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java index d6c87905f168..d39115d8fcb2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java @@ -20,8 +20,9 @@ */ public final class PolicyAssignmentsCreateByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentById.json */ /** * Sample code: Create or update policy assignment by ID. @@ -51,8 +52,9 @@ public static void createOrUpdatePolicyAssignmentByID(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithIdentityById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithIdentityById.json */ /** * Sample code: Create or update policy assignment with a managed identity by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java index b383dae5d2fc..c61e2441eea8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java @@ -28,8 +28,9 @@ */ public final class PolicyAssignmentsCreateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Create or update a policy assignment with resource selectors. @@ -56,8 +57,40 @@ public static void createOrUpdateAPolicyAssignmentWithResourceSelectors( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignment.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithEnrollEnforcement.json + */ + /** + * Sample code: Create or update a policy assignment to enforce policy effect only on enrolled resources during + * resource creation or update. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + createOrUpdateAPolicyAssignmentToEnforcePolicyEffectOnlyOnEnrolledResourcesDuringResourceCreationOrUpdate( + com.azure.resourcemanager.AzureResourceManager azure) throws IOException { + azure.genericResources() + .manager() + .policyClient() + .getPolicyAssignments() + .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNamingEnroll", + new PolicyAssignmentInner().withDisplayName("Enforce resource naming rules") + .withPolicyDefinitionId( + "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming") + .withParameters(mapOf("prefix", new ParameterValuesValue().withValue("DeptA"), "suffix", + new ParameterValuesValue().withValue("-LC"))) + .withDescription("Force resource names to begin with given DeptA and end with -LC") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"assignedBy\":\"Special Someone\"}", Object.class, SerializerEncoding.JSON)) + .withEnforcementMode(EnforcementMode.ENROLL), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignment.json */ /** * Sample code: Create or update a policy assignment. @@ -85,8 +118,9 @@ public static void createOrUpdateAPolicyAssignment(com.azure.resourcemanager.Azu } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithIdentity.json */ /** * Sample code: Create or update a policy assignment with a system assigned identity. @@ -115,8 +149,9 @@ public static void createOrUpdateAPolicyAssignmentWithASystemAssignedIdentity( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentNonComplianceMessages.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentNonComplianceMessages.json */ /** * Sample code: Create or update a policy assignment with multiple non-compliance messages. @@ -144,8 +179,9 @@ public static void createOrUpdateAPolicyAssignmentWithMultipleNonComplianceMessa } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Create or update a policy assignment with a user assigned identity. @@ -177,8 +213,9 @@ public static void createOrUpdateAPolicyAssignmentWithAUserAssignedIdentity( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithOverrides.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithOverrides.json */ /** * Sample code: Create or update a policy assignment with overrides. @@ -195,20 +232,29 @@ public static void createOrUpdateAPolicyAssignmentWithOverrides( new PolicyAssignmentInner().withDisplayName("Limit the resource location and resource SKU") .withPolicyDefinitionId( "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement") + .withDefinitionVersion("1.*.*") .withDescription("Limit the resource location and resource SKU") .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"assignedBy\":\"Special Someone\"}", Object.class, SerializerEncoding.JSON)) - .withOverrides(Arrays.asList(new OverrideModel().withKind(OverrideKind.POLICY_EFFECT) - .withValue("Audit") - .withSelectors( - Arrays.asList(new Selector().withKind(SelectorKind.POLICY_DEFINITION_REFERENCE_ID) - .withIn(Arrays.asList("Limit_Skus", "Limit_Locations")))))), + .withOverrides( + Arrays + .asList( + new OverrideModel().withKind(OverrideKind.POLICY_EFFECT) + .withValue("Audit") + .withSelectors(Arrays + .asList(new Selector().withKind(SelectorKind.POLICY_DEFINITION_REFERENCE_ID) + .withIn(Arrays.asList("Limit_Skus", "Limit_Locations")))), + new OverrideModel().withKind(OverrideKind.DEFINITION_VERSION) + .withValue("2.*.*") + .withSelectors(Arrays.asList(new Selector().withKind(SelectorKind.RESOURCE_LOCATION) + .withIn(Arrays.asList("eastUSEuap", "centralUSEuap")))))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createPolicyAssignmentWithoutEnforcement.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createPolicyAssignmentWithoutEnforcement.json */ /** * Sample code: Create or update a policy assignment without enforcing policy effect during resource creation or diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java index ba10accdc456..50fb01705db6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsDeleteByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyAssignmentById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyAssignmentById.json */ /** * Sample code: Delete a policy assignment by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java index 30421e6fb5e6..c3425666a26d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyAssignment.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyAssignment.json */ /** * Sample code: Delete a policy assignment. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java index 1dfa34dbca76..f359d3ca3350 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsGetByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentById.json */ /** * Sample code: Retrieve a policy assignment by ID. @@ -24,12 +25,13 @@ public static void retrieveAPolicyAssignmentByID(com.azure.resourcemanager.Azure .getPolicyAssignments() .getByIdWithResponse( "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage", - null, com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentWithIdentityById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentWithIdentityById.json */ /** * Sample code: Retrieve a policy assignment with a managed identity by ID. @@ -44,6 +46,6 @@ public static void retrieveAPolicyAssignmentByID(com.azure.resourcemanager.Azure .getPolicyAssignments() .getByIdWithResponse( "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage", - null, com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java index f845b0eb423f..77e263de6493 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentWithOverrides.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentWithOverrides.json */ /** * Sample code: Retrieve a policy assignment with overrides. @@ -27,8 +28,9 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Retrieve a policy assignment with a user assigned identity. @@ -46,8 +48,9 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Retrieve a policy assignment with resource selectors. @@ -66,8 +69,8 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/getPolicyAssignment. - * json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignment.json */ /** * Sample code: Retrieve a policy assignment. @@ -84,8 +87,9 @@ public static void retrieveAPolicyAssignment(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyAssignmentWithIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyAssignmentWithIdentity.json */ /** * Sample code: Retrieve a policy assignment with a system assigned identity. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java index 8be4b18e4397..d692c7663368 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyAssignmentsForResourceGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyAssignmentsForResourceGroup.json */ /** * Sample code: List policy assignments that apply to a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java index 51f49ffa02be..c7de0473bdf3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsListForManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyAssignmentsForManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyAssignmentsForManagementGroup.json */ /** * Sample code: List policy assignments that apply to a management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java index eec05747756b..112647522810 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyAssignmentsListForResourceSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyAssignmentsForResource.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyAssignmentsForResource.json */ /** * Sample code: List all policy assignments that apply to a resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java index 8d87f7ae9960..daa66315c9af 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java @@ -10,8 +10,8 @@ public final class PolicyAssignmentsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/listPolicyAssignments - * .json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyAssignments.json */ /** * Sample code: List policy assignments that apply to a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java index ee338b27c142..8217bdef3656 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java @@ -13,8 +13,9 @@ */ public final class PolicyAssignmentsUpdateByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * updatePolicyAssignmentWithIdentityById.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/updatePolicyAssignmentWithIdentityById.json */ /** * Sample code: Update policy assignment with a managed identity by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java index ce6eeba1d879..40d36ec27d30 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java @@ -22,8 +22,9 @@ */ public final class PolicyAssignmentsUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * updatePolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/updatePolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Update a policy assignment with resource selectors. @@ -45,8 +46,9 @@ public final class PolicyAssignmentsUpdateSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * updatePolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/updatePolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Update a policy assignment with a user assigned identity. @@ -69,8 +71,9 @@ public final class PolicyAssignmentsUpdateSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * updatePolicyAssignmentWithOverrides.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/updatePolicyAssignmentWithOverrides.json */ /** * Sample code: Update a policy assignment with overrides. @@ -92,8 +95,9 @@ public static void updateAPolicyAssignmentWithOverrides(com.azure.resourcemanage } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * updatePolicyAssignmentWithIdentity.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/updatePolicyAssignmentWithIdentity.json */ /** * Sample code: Update a policy assignment with a system assigned identity. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java index 3dba6f20d6b9..c5954d160fbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java @@ -19,8 +19,9 @@ */ public final class PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicyDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinitionVersionAtManagementGroup.json */ /** * Sample code: Create or update a policy definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java index dd57fd21fea3..50a0ec8b86d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java @@ -19,8 +19,9 @@ */ public final class PolicyDefinitionVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicyDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinitionVersion.json */ /** * Sample code: Create or update a policy definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java index 51440d0c00a5..b1d74c55183c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyDefinitionVersionAtManagementGroup.json */ /** * Sample code: Delete a policy definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteSamples.java index 370191abf6f8..496fa92d9664 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyDefinitionVersion.json */ /** * Sample code: Delete a policy definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetAtManagementGroupSamples.java index 586b6f45f552..c1631f2bfa2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyDefinitionVersionAtManagementGroup.json */ /** * Sample code: Retrieve a policy definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetBuiltInSamples.java index 473dd611bf53..a79124dc9840 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getBuiltinPolicyDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getBuiltinPolicyDefinitionVersion.json */ /** * Sample code: Retrieve a built-in policy definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetSamples.java index e1769c6da400..985af078d8db 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyDefinitionVersion.json */ /** * Sample code: Retrieve a policy definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllAtManagementGroupSamples.java index 56128a1f607e..3a2967b97062 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListAllAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllPolicyDefinitionVersionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllPolicyDefinitionVersionsByManagementGroup.json */ /** * Sample code: List all policy definition versions at management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllBuiltinsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllBuiltinsSamples.java index 9640334bc6cd..937eb36ff0d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllBuiltinsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllBuiltinsSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListAllBuiltinsSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllBuiltInPolicyDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllBuiltInPolicyDefinitionVersions.json */ /** * Sample code: List all built-in policy definition versions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllSamples.java index 0a2624968701..99d0684dc274 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListAllSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllPolicyDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllPolicyDefinitionVersions.json */ /** * Sample code: List all policy definition versions at subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListBuiltInSamples.java index 3f1630aa6785..abcb8913c1d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listBuiltInPolicyDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listBuiltInPolicyDefinitionVersions.json */ /** * Sample code: List built-in policy definition versions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListByManagementGroupSamples.java index 2c26dcbeb15f..5077bde26d9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListByManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyDefinitionVersionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyDefinitionVersionsByManagementGroup.json */ /** * Sample code: List policy definition versions by management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListSamples.java index be72badeeca0..52b324100ed4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionVersionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyDefinitionVersions.json */ /** * Sample code: List policy definition versions by subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java index 69c1966a3475..91980c3998aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java @@ -19,8 +19,9 @@ */ public final class PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicyDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinitionAtManagementGroup.json */ /** * Sample code: Create or update a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java index 4acc4c4f5e7c..056195db62ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java @@ -7,6 +7,8 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEndpointSettings; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEnforcementSettings; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata; import com.azure.resourcemanager.resources.models.ParameterType; @@ -20,8 +22,9 @@ */ public final class PolicyDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicyDefinitionAdvancedParams.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinitionAdvancedParams.json */ /** * Sample code: Create or update a policy definition with advanced parameters. @@ -55,8 +58,45 @@ public static void createOrUpdateAPolicyDefinitionWithAdvancedParameters( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicyDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinitionExternalEvaluationEnforcementSettings.json + */ + /** + * Sample code: Create or update a policy definition with external evaluation enforcement settings. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void createOrUpdateAPolicyDefinitionWithExternalEvaluationEnforcementSettings( + com.azure.resourcemanager.AzureResourceManager azure) throws IOException { + azure.genericResources() + .manager() + .policyClient() + .getPolicyDefinitions() + .createOrUpdateWithResponse("RandomizeVMAllocation", new PolicyDefinitionInner().withMode("Indexed") + .withDisplayName("Randomize VM Allocation") + .withDescription( + "Randomly disable VM allocation in eastus by having policy rule reference the outcome of invoking an external endpoint using the CoinFlip endpoint that returns random values.") + .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize( + "{\"if\":{\"allOf\":[{\"equals\":\"Microsoft.Compute/virtualMachines\",\"field\":\"type\"},{\"equals\":\"eastus\",\"field\":\"location\"},{\"equals\":\"false\",\"value\":\"[claims().isValid]\"}]},\"then\":{\"effect\":\"deny\"}}", + Object.class, SerializerEncoding.JSON)) + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"category\":\"VM\"}", Object.class, SerializerEncoding.JSON)) + .withExternalEvaluationEnforcementSettings(new ExternalEvaluationEnforcementSettings() + .withMissingTokenAction("fakeTokenPlaceholder") + .withEndpointSettings(new ExternalEvaluationEndpointSettings().withKind("CoinFlip") + .withDetails(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"successProbability\":0.5}", Object.class, SerializerEncoding.JSON))) + .withRoleDefinitionIds(Arrays.asList( + "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/roleDefinitions/f0cc2aea-b517-48f6-8f9e-0c01c687907b"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicyDefinition.json */ /** * Sample code: Create or update a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java index 3d44f77601c9..da5aca95ed51 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyDefinitionAtManagementGroup.json */ /** * Sample code: Delete a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java index e1510c1be657..2158a82d61a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicyDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicyDefinition.json */ /** * Sample code: Delete a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java index 8a35808c451c..bad98ba99d07 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicyDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyDefinitionAtManagementGroup.json */ /** * Sample code: Retrieve a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java index 3793506ff734..8428fe9f1b63 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getBuiltinPolicyDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getBuiltinPolicyDefinition.json */ /** * Sample code: Retrieve a built-in policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java index 3a314cc5eb41..13e34e02f93e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java @@ -10,8 +10,8 @@ public final class PolicyDefinitionsGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/getPolicyDefinition. - * json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicyDefinition.json */ /** * Sample code: Retrieve a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java index d0adfd3350cd..1738f5129fff 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listBuiltInPolicyDefinitions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listBuiltInPolicyDefinitions.json */ /** * Sample code: List built-in policy definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java index 5ab1244ee8ab..e81ac02b6dc2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicyDefinitionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicyDefinitionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyDefinitionsByManagementGroup.json */ /** * Sample code: List policy definitions by management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java index 3557f5a237e0..41b05890966e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java @@ -10,8 +10,8 @@ public final class PolicyDefinitionsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/listPolicyDefinitions - * .json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicyDefinitions.json */ /** * Sample code: List policy definitions by subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java index ed5964d39caa..8a3bb70e9b76 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java @@ -21,8 +21,8 @@ public final class PolicyExemptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * createOrUpdatePolicyExemption.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/createOrUpdatePolicyExemption.json */ /** * Sample code: Create or update a policy exemption. @@ -51,8 +51,8 @@ public static void createOrUpdateAPolicyExemption(com.azure.resourcemanager.Azur /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * createOrUpdatePolicyExemptionWithResourceSelectors.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/createOrUpdatePolicyExemptionWithResourceSelectors.json */ /** * Sample code: Create or update a policy exemption with resource selectors. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java index 54b10313d942..a0966d2d603a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsDeleteSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * deletePolicyExemption.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/deletePolicyExemption.json */ /** * Sample code: Delete a policy exemption. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java index 9982f49a9b66..ddc97fe9b717 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * getPolicyExemptionWithResourceSelectors.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/getPolicyExemptionWithResourceSelectors.json */ /** * Sample code: Retrieve a policy exemption with resource selectors. @@ -30,8 +30,8 @@ public final class PolicyExemptionsGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * getPolicyExemption.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/getPolicyExemption.json */ /** * Sample code: Retrieve a policy exemption. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java index 11280371ebfb..11cffb0ae836 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * listPolicyExemptionsForResourceGroup.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/listPolicyExemptionsForResourceGroup.json */ /** * Sample code: List policy exemptions that apply to a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java index fcc7123fab5f..d1a0fde118a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsListForManagementGroupSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * listPolicyExemptionsForManagementGroup.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/listPolicyExemptionsForManagementGroup.json */ /** * Sample code: List policy exemptions that apply to a management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java index 773f344b809a..01fac6efe5ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsListForResourceSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * listPolicyExemptionsForResource.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/listPolicyExemptionsForResource.json */ /** * Sample code: List all policy exemptions that apply to a resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java index ea90b7f25579..f0144e402462 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java @@ -10,8 +10,8 @@ public final class PolicyExemptionsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * listPolicyExemptionsForSubscription.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/listPolicyExemptionsForSubscription.json */ /** * Sample code: List policy exemptions that apply to a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java index 3611cb93928a..0187b484f68a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java @@ -17,8 +17,8 @@ public final class PolicyExemptionsUpdateSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ - * updatePolicyExemptionWithResourceSelectors.json + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * preview/2022-07-01-preview/examples/updatePolicyExemptionWithResourceSelectors.json */ /** * Sample code: Update a policy exemption with resource selectors. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java index d3ead9dfa8c0..7f6e951cb40f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java @@ -19,8 +19,9 @@ */ public final class PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinitionVersionAtManagementGroup.json */ /** * Sample code: Create or update a policy set definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java index b63c127d03a6..276554ae8e61 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java @@ -22,8 +22,9 @@ */ public final class PolicySetDefinitionVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinitionVersion.json */ /** * Sample code: Create or update a policy set definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java index aa939e50ae54..9bcb11acd610 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicySetDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicySetDefinitionVersionAtManagementGroup.json */ /** * Sample code: Delete a policy set definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteSamples.java index dfcd8d6dd6a4..3298b64350ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicySetDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicySetDefinitionVersion.json */ /** * Sample code: Delete a policy set definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetAtManagementGroupSamples.java index f72a182c06c1..1f5f343ecb19 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicySetDefinitionVersionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicySetDefinitionVersionAtManagementGroup.json */ /** * Sample code: Retrieve a policy set definition version at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetBuiltInSamples.java index f392df3a14c4..3b00b6959c01 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getBuiltInPolicySetDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getBuiltInPolicySetDefinitionVersion.json */ /** * Sample code: Retrieve a built-in policy set definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetSamples.java index a6844d06597e..0b7e46a1d444 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicySetDefinitionVersion.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicySetDefinitionVersion.json */ /** * Sample code: Retrieve a policy set definition version. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllAtManagementGroupSamples.java index d38c04b69e4f..d7852a4bc983 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListAllAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllPolicySetDefinitionVersionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllPolicySetDefinitionVersionsByManagementGroup.json */ /** * Sample code: List all policy definition versions at management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllBuiltinsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllBuiltinsSamples.java index 2d44dc25c0a8..bb8b33807943 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllBuiltinsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllBuiltinsSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListAllBuiltinsSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllBuiltInPolicySetDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllBuiltInPolicySetDefinitionVersions.json */ /** * Sample code: List all built-in policy definition versions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllSamples.java index 4075029ddb7e..31fccee440d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListAllSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listAllPolicySetDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listAllPolicySetDefinitionVersions.json */ /** * Sample code: List all policy definition versions at subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListBuiltInSamples.java index cfc4bc8eabda..a708e87e4308 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listBuiltInPolicySetDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listBuiltInPolicySetDefinitionVersions.json */ /** * Sample code: List built-in policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListByManagementGroupSamples.java index 8e2de045c209..ce9b0c444373 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListByManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicySetDefinitionVersionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicySetDefinitionVersionsByManagementGroup.json */ /** * Sample code: List policy set definitions at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListSamples.java index 7fbfcd96d274..048406314dad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionVersionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicySetDefinitionVersions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicySetDefinitionVersions.json */ /** * Sample code: List policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java index 8a837573b922..c0b3a99a104e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java @@ -20,8 +20,9 @@ */ public final class PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinitionWithGroupsAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinitionWithGroupsAtManagementGroup.json */ /** * Sample code: Create or update a policy set definition with groups at management group level. @@ -66,8 +67,9 @@ public static void createOrUpdateAPolicySetDefinitionWithGroupsAtManagementGroup } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Create or update a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java index c392c970ff88..12c65bf45f9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java @@ -23,8 +23,9 @@ */ public final class PolicySetDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinitionWithGroups.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinitionWithGroups.json */ /** * Sample code: Create or update a policy set definition with groups. @@ -69,8 +70,9 @@ public static void createOrUpdateAPolicySetDefinitionWithGroups( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * createOrUpdatePolicySetDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/createOrUpdatePolicySetDefinition.json */ /** * Sample code: Create or update a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java index cf5afe1d88a1..10d5f68f736d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Delete a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java index 2b0780f69ffd..ef31dbb723d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * deletePolicySetDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/deletePolicySetDefinition.json */ /** * Sample code: Delete a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java index 099a53bda690..c43cc8c3d978 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Retrieve a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java index 8aac011535a8..83a04089e9d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getBuiltInPolicySetDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getBuiltInPolicySetDefinition.json */ /** * Sample code: Retrieve a built-in policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java index 4b56c6eec4df..c277031c4c32 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * getPolicySetDefinition.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/getPolicySetDefinition.json */ /** * Sample code: Retrieve a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java index 0b10fa5125d1..3cc6dcfbf59c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listBuiltInPolicySetDefinitions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listBuiltInPolicySetDefinitions.json */ /** * Sample code: List built-in policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java index 1326a99f7ad7..700383977995 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicySetDefinitionsByManagementGroup.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicySetDefinitionsByManagementGroup.json */ /** * Sample code: List policy set definitions at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java index c54724dd780a..9fcbc023951d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java @@ -9,8 +9,9 @@ */ public final class PolicySetDefinitionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/ - * listPolicySetDefinitions.json + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/listPolicySetDefinitions.json */ /** * Sample code: List policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireAtManagementGroupSamples.java new file mode 100644 index 000000000000..6a3fb8ea3275 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireAtManagementGroupSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.models.PolicyTokenOperation; +import com.azure.resourcemanager.resources.models.PolicyTokenRequest; + +/** + * Samples for PolicyTokens AcquireAtManagementGroup. + */ +public final class PolicyTokensAcquireAtManagementGroupSamples { + /* + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/acquirePolicyTokenAtManagementGroup.json + */ + /** + * Sample code: Acquire a policy token at management group level. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void acquireAPolicyTokenAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .policyClient() + .getPolicyTokens() + .acquireAtManagementGroupWithResponse("MyManagementGroup", + new PolicyTokenRequest().withOperation(new PolicyTokenOperation().withUri( + "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000?api-version=2022-04-01") + .withHttpMethod("delete")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireSamples.java new file mode 100644 index 000000000000..68d8549c4bce --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyTokensAcquireSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.generated; + +import com.azure.resourcemanager.resources.models.PolicyTokenOperation; +import com.azure.resourcemanager.resources.models.PolicyTokenRequest; + +/** + * Samples for PolicyTokens Acquire. + */ +public final class PolicyTokensAcquireSamples { + /* + * x-ms-original-file: + * 2b3c430bff9474d80080498090d71caf3fafcb75/specification/resources/resource-manager/Microsoft.Authorization/policy/ + * stable/2025-03-01/examples/acquirePolicyToken.json + */ + /** + * Sample code: Acquire a policy token. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void acquireAPolicyToken(com.azure.resourcemanager.AzureResourceManager azure) { + azure.genericResources() + .manager() + .policyClient() + .getPolicyTokens() + .acquireWithResponse(new PolicyTokenRequest().withOperation(new PolicyTokenOperation().withUri( + "https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testVM?api-version=2024-01-01") + .withHttpMethod("delete")), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java index 54ac9b478581..2d0e02fc7ac7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java @@ -10,8 +10,8 @@ public final class ProviderResourceTypesListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviderResourceTypes. - * json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * GetProviderResourceTypes.json */ /** * Sample code: Get provider resource types. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java index bcf5069a599a..5cd27f31f768 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java @@ -10,8 +10,8 @@ public final class ProvidersGetAtTenantScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetNamedProviderAtTenant. - * json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * GetNamedProviderAtTenant.json */ /** * Sample code: Get a resource provider at tenant scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java index b4c33e88cedb..afe90ac2372e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java @@ -10,7 +10,8 @@ public final class ProvidersGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProvider.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/GetProvider. + * json */ /** * Sample code: Get provider. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java index 826ded4286c2..0740defc69e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java @@ -10,7 +10,8 @@ public final class ProvidersListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviders.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/GetProviders. + * json */ /** * Sample code: Get providers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java index 9d719d3f173b..afd85e07d294 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java @@ -10,8 +10,8 @@ public final class ProvidersProviderPermissionsSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviderPermissions. - * json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * GetProviderPermissions.json */ /** * Sample code: Get provider resource types. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java index 8932bc869064..5b3284102b0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java @@ -12,7 +12,8 @@ public final class ResourceGroupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/CreateResourceGroup.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * CreateResourceGroup.json */ /** * Sample code: Create or update a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java index 98fe980a93a5..92ac932024ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class ResourceGroupsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ * ForceDeleteVMsInResourceGroup.json */ /** @@ -27,7 +28,8 @@ public final class ResourceGroupsDeleteSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ * ForceDeleteVMsAndVMSSInResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java index a19a0455c69b..6385cac4ec03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java @@ -13,7 +13,8 @@ */ public final class ResourceGroupsExportTemplateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ * ExportResourceGroupAsBicep.json */ /** @@ -35,7 +36,8 @@ public static void exportAResourceGroupAsBicep(com.azure.resourcemanager.AzureRe /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ExportResourceGroup.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * ExportResourceGroup.json */ /** * Sample code: Export a resource group. @@ -52,7 +54,8 @@ public static void exportAResourceGroup(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ * ExportResourceGroupWithFiltering.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java index 58290cee0e9c..89e5e7785e44 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java @@ -12,7 +12,8 @@ public final class ResourceNameCheckResourceNameSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/CheckResourceName.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ + * CheckResourceName.json */ /** * Sample code: CheckValidityForAResourceName. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java index ceacd4b66959..ae29c11b59b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java @@ -13,8 +13,8 @@ public final class SubscriptionFeatureRegistrationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ - * SubscriptionFeatureRegistrationPUT.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * FeatureRegistration/SubscriptionFeatureRegistrationPUT.json */ /** * Sample code: Creates a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java index 35b1094795a1..93a628737955 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java @@ -10,8 +10,8 @@ public final class SubscriptionFeatureRegistrationsDeleteSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ - * SubscriptionFeatureRegistrationDELETE.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * FeatureRegistration/SubscriptionFeatureRegistrationDELETE.json */ /** * Sample code: Deletes a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java index d21cbc8d70bd..8ab4772724c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java @@ -10,8 +10,8 @@ public final class SubscriptionFeatureRegistrationsGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ - * SubscriptionFeatureRegistrationGET.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * FeatureRegistration/SubscriptionFeatureRegistrationGET.json */ /** * Sample code: Gets a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java index 50d9043ba036..1017f220a946 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java @@ -10,8 +10,8 @@ public final class SubscriptionFeatureRegistrationsListBySubscriptionSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ - * SubscriptionFeatureRegistrationLIST.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * FeatureRegistration/SubscriptionFeatureRegistrationLIST.json */ /** * Sample code: Gets a list of feature registrations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java index e2bd6675a864..9b277f7b37e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java @@ -10,8 +10,8 @@ public final class SubscriptionFeatureRegistrationsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ - * SubscriptionFeatureRegistrationLISTALL.json + * specification/resources/resource-manager/Microsoft.Features/features/stable/2021-07-01/examples/ + * FeatureRegistration/SubscriptionFeatureRegistrationLISTALL.json */ /** * Sample code: Gets a list of feature registrations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java index 5325c8fcd199..65b5ee9c5173 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java @@ -13,7 +13,8 @@ public final class SubscriptionsCheckZonePeersSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/PostCheckZonePeers.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ + * PostCheckZonePeers.json */ /** * Sample code: GetLogicalZoneMapping. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java index b4103fd39c51..30658d674eeb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java @@ -10,7 +10,8 @@ public final class SubscriptionsGetSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscription.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ + * GetSubscription.json */ /** * Sample code: GetASingleSubscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java index b27e73159edf..d7bb72165de0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java @@ -9,7 +9,8 @@ */ public final class SubscriptionsListLocationsSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/ + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ * GetLocationsWithExtendedLocations.json */ /** @@ -27,7 +28,8 @@ public static void getLocationsWithExtendedLocations(com.azure.resourcemanager.A /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetLocations.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ + * GetLocations.json */ /** * Sample code: GetLocationsWithASubscriptionId. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java index bd4ddcc1c5a3..032f226ea19a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java @@ -10,7 +10,8 @@ public final class SubscriptionsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscriptions.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/ + * GetSubscriptions.json */ /** * Sample code: GetAllSubscriptions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java similarity index 88% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java index e96fd7ca5145..307b43673fdb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java @@ -10,12 +10,13 @@ import java.util.Map; /** - * Samples for TagOperations CreateOrUpdateAtScope. + * Samples for TagsOperation CreateOrUpdateAtScope. */ -public final class TagOperationsCreateOrUpdateAtScopeSamples { +public final class TagsOperationCreateOrUpdateAtScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PutTagsResource.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/PutTagsResource + * .json */ /** * Sample code: Update tags on a resource. @@ -26,7 +27,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .createOrUpdateAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", new TagsResourceInner().withProperties( @@ -36,7 +37,8 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PutTagsSubscription.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * PutTagsSubscription.json */ /** * Sample code: Update tags on a subscription. @@ -47,7 +49,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .createOrUpdateAtScope("subscriptions/00000000-0000-0000-0000-000000000000", new TagsResourceInner().withProperties( new Tags().withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))), diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java similarity index 82% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java index b61aa8d8d94b..b3199eade13c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java @@ -5,12 +5,13 @@ package com.azure.resourcemanager.resources.generated; /** - * Samples for TagOperations DeleteAtScope. + * Samples for TagsOperation DeleteAtScope. */ -public final class TagOperationsDeleteAtScopeSamples { +public final class TagsOperationDeleteAtScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/DeleteTagsResource.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * DeleteTagsResource.json */ /** * Sample code: Update tags on a resource. @@ -21,7 +22,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .deleteAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", com.azure.core.util.Context.NONE); @@ -29,8 +30,8 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/DeleteTagsSubscription. - * json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * DeleteTagsSubscription.json */ /** * Sample code: Update tags on a subscription. @@ -41,7 +42,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .deleteAtScope("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java similarity index 83% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java index b5d8e49c3d35..3bffc85fe34d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java @@ -5,12 +5,13 @@ package com.azure.resourcemanager.resources.generated; /** - * Samples for TagOperations GetAtScope. + * Samples for TagsOperation GetAtScope. */ -public final class TagOperationsGetAtScopeSamples { +public final class TagsOperationGetAtScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetTagsResource.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/GetTagsResource + * .json */ /** * Sample code: Get tags on a resource. @@ -21,7 +22,7 @@ public static void getTagsOnAResource(com.azure.resourcemanager.AzureResourceMan azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .getAtScopeWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", com.azure.core.util.Context.NONE); @@ -29,7 +30,8 @@ public static void getTagsOnAResource(com.azure.resourcemanager.AzureResourceMan /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetTagsSubscription.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * GetTagsSubscription.json */ /** * Sample code: Get tags on a subscription. @@ -40,7 +42,7 @@ public static void getTagsOnASubscription(com.azure.resourcemanager.AzureResourc azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .getAtScopeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java similarity index 89% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java index bf7cd4c431a6..42b9ff7adf0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java @@ -11,12 +11,13 @@ import java.util.Map; /** - * Samples for TagOperations UpdateAtScope. + * Samples for TagsOperation UpdateAtScope. */ -public final class TagOperationsUpdateAtScopeSamples { +public final class TagsOperationUpdateAtScopeSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PatchTagsResource.json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * PatchTagsResource.json */ /** * Sample code: Update tags on a resource. @@ -27,7 +28,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .updateAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE) @@ -38,8 +39,8 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PatchTagsSubscription. - * json + * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ + * PatchTagsSubscription.json */ /** * Sample code: Update tags on a subscription. @@ -50,7 +51,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagOperations() + .getTagsOperations() .updateAtScope("subscriptions/00000000-0000-0000-0000-000000000000", new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE) .withProperties(new Tags() diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java index 525cd08b2cc0..780223749379 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java @@ -10,7 +10,8 @@ public final class TenantsListSamples { /* * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetTenants.json + * specification/resources/resource-manager/Microsoft.Resources/subscriptions/stable/2022-12-01/examples/GetTenants. + * json */ /** * Sample code: GetAllTenants. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java index d22f77d4bc4e..b3152b3a9a81 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java @@ -1068,15 +1068,13 @@ Response createByIdWithResponse(String policyAssignmentId * * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. - * @param expand Comma-separated list of additional properties to be included in the response. Supported values are - * 'LatestDefinitionVersion, EffectiveDefinitionVersion'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the policy assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByIdWithResponseAsync(String policyAssignmentId, String expand); + Mono> getByIdWithResponseAsync(String policyAssignmentId); /** * Retrieves the policy assignment with the given ID. @@ -1110,8 +1108,6 @@ Response createByIdWithResponse(String policyAssignmentId * * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. - * @param expand Comma-separated list of additional properties to be included in the response. Supported values are - * 'LatestDefinitionVersion, EffectiveDefinitionVersion'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1119,7 +1115,7 @@ Response createByIdWithResponse(String policyAssignmentId * @return the policy assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByIdWithResponse(String policyAssignmentId, String expand, Context context); + Response getByIdWithResponse(String policyAssignmentId, Context context); /** * Retrieves the policy assignment with the given ID. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java index 9dba8774ee8f..33fa1a339aab 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyClient.java @@ -46,6 +46,13 @@ public interface PolicyClient { */ DataPolicyManifestsClient getDataPolicyManifests(); + /** + * Gets the PolicyAssignmentsClient object to access its operations. + * + * @return the PolicyAssignmentsClient object. + */ + PolicyAssignmentsClient getPolicyAssignments(); + /** * Gets the PolicyDefinitionsClient object to access its operations. * @@ -75,11 +82,11 @@ public interface PolicyClient { PolicySetDefinitionVersionsClient getPolicySetDefinitionVersions(); /** - * Gets the PolicyAssignmentsClient object to access its operations. + * Gets the PolicyTokensClient object to access its operations. * - * @return the PolicyAssignmentsClient object. + * @return the PolicyTokensClient object. */ - PolicyAssignmentsClient getPolicyAssignments(); + PolicyTokensClient getPolicyTokens(); /** * Gets the PolicyExemptionsClient object to access its operations. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyTokensClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyTokensClient.java new file mode 100644 index 000000000000..4948143fbfe2 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyTokensClient.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.resources.fluent.models.PolicyTokenResponseInner; +import com.azure.resourcemanager.resources.models.PolicyTokenRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PolicyTokensClient. + */ +public interface PolicyTokensClient { + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> acquireWithResponseAsync(PolicyTokenRequest parameters); + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono acquireAsync(PolicyTokenRequest parameters); + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response acquireWithResponse(PolicyTokenRequest parameters, Context context); + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PolicyTokenResponseInner acquire(PolicyTokenRequest parameters); + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> acquireAtManagementGroupWithResponseAsync(String managementGroupName, + PolicyTokenRequest parameters); + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono acquireAtManagementGroupAsync(String managementGroupName, + PolicyTokenRequest parameters); + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response acquireAtManagementGroupWithResponse(String managementGroupName, + PolicyTokenRequest parameters, Context context); + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PolicyTokenResponseInner acquireAtManagementGroup(String managementGroupName, PolicyTokenRequest parameters); +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java index 9cee3c904b92..6791eac19572 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java @@ -82,9 +82,9 @@ public interface ResourceManagementClient { ResourceGroupsClient getResourceGroups(); /** - * Gets the TagOperationsClient object to access its operations. + * Gets the TagsOperationsClient object to access its operations. * - * @return the TagOperationsClient object. + * @return the TagsOperationsClient object. */ - TagOperationsClient getTagOperations(); + TagsOperationsClient getTagsOperations(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java similarity index 99% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java index 54be725b5782..5fd089e7ac9f 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java @@ -22,9 +22,9 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TagOperationsClient. + * An instance of this class provides access to all the operations defined in TagsOperationsClient. */ -public interface TagOperationsClient { +public interface TagsOperationsClient { /** * Deletes a predefined tag value for a predefined tag name. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java index 119dae45a9a9..2df1da39adc9 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.AssignmentType; import com.azure.resourcemanager.resources.models.EnforcementMode; import com.azure.resourcemanager.resources.models.Identity; import com.azure.resourcemanager.resources.models.NonComplianceMessage; @@ -347,8 +348,8 @@ public PolicyAssignmentInner withMetadata(Object metadata) { } /** - * Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and - * DoNotEnforce. + * Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default, + * DoNotEnforce, and Enroll. * * @return the enforcementMode value. */ @@ -357,8 +358,8 @@ public EnforcementMode enforcementMode() { } /** - * Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and - * DoNotEnforce. + * Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default, + * DoNotEnforce, and Enroll. * * @param enforcementMode the enforcementMode value to set. * @return the PolicyAssignmentInner object itself. @@ -442,6 +443,41 @@ public PolicyAssignmentInner withOverrides(List overrides) { return this; } + /** + * Get the assignmentType property: The type of policy assignment. Possible values are NotSpecified, System, + * SystemHidden, and Custom. Immutable. + * + * @return the assignmentType value. + */ + public AssignmentType assignmentType() { + return this.innerProperties() == null ? null : this.innerProperties().assignmentType(); + } + + /** + * Set the assignmentType property: The type of policy assignment. Possible values are NotSpecified, System, + * SystemHidden, and Custom. Immutable. + * + * @param assignmentType the assignmentType value to set. + * @return the PolicyAssignmentInner object itself. + */ + public PolicyAssignmentInner withAssignmentType(AssignmentType assignmentType) { + if (this.innerProperties() == null) { + this.innerProperties = new PolicyAssignmentProperties(); + } + this.innerProperties().withAssignmentType(assignmentType); + return this; + } + + /** + * Get the instanceId property: The instance ID of the policy assignment. This ID only and always changes when the + * assignment is deleted and recreated. + * + * @return the instanceId value. + */ + public String instanceId() { + return this.innerProperties() == null ? null : this.innerProperties().instanceId(); + } + /** * Validates the instance. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java index 238b1e8ce874..c618162b7eab 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.AssignmentType; import com.azure.resourcemanager.resources.models.EnforcementMode; import com.azure.resourcemanager.resources.models.NonComplianceMessage; import com.azure.resourcemanager.resources.models.OverrideModel; @@ -77,7 +78,7 @@ public final class PolicyAssignmentProperties implements JsonSerializable overrides; + /* + * The type of policy assignment. Possible values are NotSpecified, System, SystemHidden, and Custom. Immutable. + */ + private AssignmentType assignmentType; + + /* + * The instance ID of the policy assignment. This ID only and always changes when the assignment is deleted and + * recreated. + */ + private String instanceId; + /** * Creates an instance of PolicyAssignmentProperties class. */ @@ -274,8 +286,8 @@ public PolicyAssignmentProperties withMetadata(Object metadata) { } /** - * Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and - * DoNotEnforce. + * Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default, + * DoNotEnforce, and Enroll. * * @return the enforcementMode value. */ @@ -284,8 +296,8 @@ public EnforcementMode enforcementMode() { } /** - * Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and - * DoNotEnforce. + * Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default, + * DoNotEnforce, and Enroll. * * @param enforcementMode the enforcementMode value to set. * @return the PolicyAssignmentProperties object itself. @@ -357,6 +369,38 @@ public PolicyAssignmentProperties withOverrides(List overrides) { return this; } + /** + * Get the assignmentType property: The type of policy assignment. Possible values are NotSpecified, System, + * SystemHidden, and Custom. Immutable. + * + * @return the assignmentType value. + */ + public AssignmentType assignmentType() { + return this.assignmentType; + } + + /** + * Set the assignmentType property: The type of policy assignment. Possible values are NotSpecified, System, + * SystemHidden, and Custom. Immutable. + * + * @param assignmentType the assignmentType value to set. + * @return the PolicyAssignmentProperties object itself. + */ + public PolicyAssignmentProperties withAssignmentType(AssignmentType assignmentType) { + this.assignmentType = assignmentType; + return this; + } + + /** + * Get the instanceId property: The instance ID of the policy assignment. This ID only and always changes when the + * assignment is deleted and recreated. + * + * @return the instanceId value. + */ + public String instanceId() { + return this.instanceId; + } + /** * Validates the instance. * @@ -403,6 +447,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("resourceSelectors", this.resourceSelectors, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("overrides", this.overrides, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("assignmentType", + this.assignmentType == null ? null : this.assignmentType.toString()); return jsonWriter.writeEndObject(); } @@ -458,6 +504,11 @@ public static PolicyAssignmentProperties fromJson(JsonReader jsonReader) throws } else if ("overrides".equals(fieldName)) { List overrides = reader.readArray(reader1 -> OverrideModel.fromJson(reader1)); deserializedPolicyAssignmentProperties.overrides = overrides; + } else if ("assignmentType".equals(fieldName)) { + deserializedPolicyAssignmentProperties.assignmentType + = AssignmentType.fromString(reader.getString()); + } else if ("instanceId".equals(fieldName)) { + deserializedPolicyAssignmentProperties.instanceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java index 6a3ac98dfccc..5d194fdaa9fa 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEnforcementSettings; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; import java.io.IOException; @@ -313,6 +314,32 @@ public PolicyDefinitionInner withVersions(List versions) { return this; } + /** + * Get the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @return the externalEvaluationEnforcementSettings value. + */ + public ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings() { + return this.innerProperties() == null ? null : this.innerProperties().externalEvaluationEnforcementSettings(); + } + + /** + * Set the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @param externalEvaluationEnforcementSettings the externalEvaluationEnforcementSettings value to set. + * @return the PolicyDefinitionInner object itself. + */ + public PolicyDefinitionInner withExternalEvaluationEnforcementSettings( + ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new PolicyDefinitionProperties(); + } + this.innerProperties().withExternalEvaluationEnforcementSettings(externalEvaluationEnforcementSettings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java index 8a4341cebab3..6304a5fa83f3 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEnforcementSettings; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; import java.io.IOException; @@ -66,6 +67,11 @@ public final class PolicyDefinitionProperties implements JsonSerializable versions; + /* + * The details of the source of external evaluation results required by the policy during enforcement evaluation. + */ + private ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings; + /** * Creates an instance of PolicyDefinitionProperties class. */ @@ -258,6 +264,29 @@ public PolicyDefinitionProperties withVersions(List versions) { return this; } + /** + * Get the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @return the externalEvaluationEnforcementSettings value. + */ + public ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings() { + return this.externalEvaluationEnforcementSettings; + } + + /** + * Set the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @param externalEvaluationEnforcementSettings the externalEvaluationEnforcementSettings value to set. + * @return the PolicyDefinitionProperties object itself. + */ + public PolicyDefinitionProperties withExternalEvaluationEnforcementSettings( + ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings) { + this.externalEvaluationEnforcementSettings = externalEvaluationEnforcementSettings; + return this; + } + /** * Validates the instance. * @@ -271,6 +300,9 @@ public void validate() { } }); } + if (externalEvaluationEnforcementSettings() != null) { + externalEvaluationEnforcementSettings().validate(); + } } /** @@ -292,6 +324,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("version", this.version); jsonWriter.writeArrayField("versions", this.versions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("externalEvaluationEnforcementSettings", this.externalEvaluationEnforcementSettings); return jsonWriter.writeEndObject(); } @@ -331,6 +364,9 @@ public static PolicyDefinitionProperties fromJson(JsonReader jsonReader) throws } else if ("versions".equals(fieldName)) { List versions = reader.readArray(reader1 -> reader1.getString()); deserializedPolicyDefinitionProperties.versions = versions; + } else if ("externalEvaluationEnforcementSettings".equals(fieldName)) { + deserializedPolicyDefinitionProperties.externalEvaluationEnforcementSettings + = ExternalEvaluationEnforcementSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionInner.java index ee8b78da9dfc..b655a86d71ad 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionInner.java @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEnforcementSettings; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; import java.io.IOException; @@ -289,6 +290,32 @@ public PolicyDefinitionVersionInner withVersion(String version) { return this; } + /** + * Get the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @return the externalEvaluationEnforcementSettings value. + */ + public ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings() { + return this.innerProperties() == null ? null : this.innerProperties().externalEvaluationEnforcementSettings(); + } + + /** + * Set the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @param externalEvaluationEnforcementSettings the externalEvaluationEnforcementSettings value to set. + * @return the PolicyDefinitionVersionInner object itself. + */ + public PolicyDefinitionVersionInner withExternalEvaluationEnforcementSettings( + ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new PolicyDefinitionVersionProperties(); + } + this.innerProperties().withExternalEvaluationEnforcementSettings(externalEvaluationEnforcementSettings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionProperties.java index f72856390763..ac6c1ddc5116 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionVersionProperties.java @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEnforcementSettings; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; import java.io.IOException; @@ -60,6 +61,11 @@ public final class PolicyDefinitionVersionProperties implements JsonSerializable */ private String version; + /* + * The details of the source of external evaluation results required by the policy during enforcement evaluation. + */ + private ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings; + /** * Creates an instance of PolicyDefinitionVersionProperties class. */ @@ -232,6 +238,29 @@ public PolicyDefinitionVersionProperties withVersion(String version) { return this; } + /** + * Get the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @return the externalEvaluationEnforcementSettings value. + */ + public ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings() { + return this.externalEvaluationEnforcementSettings; + } + + /** + * Set the externalEvaluationEnforcementSettings property: The details of the source of external evaluation results + * required by the policy during enforcement evaluation. + * + * @param externalEvaluationEnforcementSettings the externalEvaluationEnforcementSettings value to set. + * @return the PolicyDefinitionVersionProperties object itself. + */ + public PolicyDefinitionVersionProperties withExternalEvaluationEnforcementSettings( + ExternalEvaluationEnforcementSettings externalEvaluationEnforcementSettings) { + this.externalEvaluationEnforcementSettings = externalEvaluationEnforcementSettings; + return this; + } + /** * Validates the instance. * @@ -245,6 +274,9 @@ public void validate() { } }); } + if (externalEvaluationEnforcementSettings() != null) { + externalEvaluationEnforcementSettings().validate(); + } } /** @@ -265,6 +297,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("version", this.version); + jsonWriter.writeJsonField("externalEvaluationEnforcementSettings", this.externalEvaluationEnforcementSettings); return jsonWriter.writeEndObject(); } @@ -303,6 +336,9 @@ public static PolicyDefinitionVersionProperties fromJson(JsonReader jsonReader) deserializedPolicyDefinitionVersionProperties.parameters = parameters; } else if ("version".equals(fieldName)) { deserializedPolicyDefinitionVersionProperties.version = reader.getString(); + } else if ("externalEvaluationEnforcementSettings".equals(fieldName)) { + deserializedPolicyDefinitionVersionProperties.externalEvaluationEnforcementSettings + = ExternalEvaluationEnforcementSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyTokenResponseInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyTokenResponseInner.java new file mode 100644 index 000000000000..9b661ad049a7 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyTokenResponseInner.java @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.ExternalEvaluationEndpointInvocationResult; +import com.azure.resourcemanager.resources.models.PolicyTokenResult; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The policy token response properties. + */ +@Fluent +public final class PolicyTokenResponseInner implements JsonSerializable { + /* + * The result of the completed token acquisition operation. Possible values are Succeeded and Failed. + */ + private PolicyTokenResult result; + + /* + * Status message with additional details about the token acquisition operation result. + */ + private String message; + + /* + * The date and time after which the client can try to acquire a token again in the case of retry-able failures. + */ + private OffsetDateTime retryAfter; + + /* + * An array of external evaluation endpoint invocation results. + */ + private List results; + + /* + * The change reference associated with the operation for which the token is acquired. + */ + private String changeReference; + + /* + * The issued policy token. + */ + private String token; + + /* + * The unique Id assigned to the policy token. + */ + private String tokenId; + + /* + * The expiration of the policy token. + */ + private OffsetDateTime expiration; + + /** + * Creates an instance of PolicyTokenResponseInner class. + */ + public PolicyTokenResponseInner() { + } + + /** + * Get the result property: The result of the completed token acquisition operation. Possible values are Succeeded + * and Failed. + * + * @return the result value. + */ + public PolicyTokenResult result() { + return this.result; + } + + /** + * Set the result property: The result of the completed token acquisition operation. Possible values are Succeeded + * and Failed. + * + * @param result the result value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withResult(PolicyTokenResult result) { + this.result = result; + return this; + } + + /** + * Get the message property: Status message with additional details about the token acquisition operation result. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Status message with additional details about the token acquisition operation result. + * + * @param message the message value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the retryAfter property: The date and time after which the client can try to acquire a token again in the + * case of retry-able failures. + * + * @return the retryAfter value. + */ + public OffsetDateTime retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The date and time after which the client can try to acquire a token again in the + * case of retry-able failures. + * + * @param retryAfter the retryAfter value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withRetryAfter(OffsetDateTime retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the results property: An array of external evaluation endpoint invocation results. + * + * @return the results value. + */ + public List results() { + return this.results; + } + + /** + * Set the results property: An array of external evaluation endpoint invocation results. + * + * @param results the results value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withResults(List results) { + this.results = results; + return this; + } + + /** + * Get the changeReference property: The change reference associated with the operation for which the token is + * acquired. + * + * @return the changeReference value. + */ + public String changeReference() { + return this.changeReference; + } + + /** + * Set the changeReference property: The change reference associated with the operation for which the token is + * acquired. + * + * @param changeReference the changeReference value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withChangeReference(String changeReference) { + this.changeReference = changeReference; + return this; + } + + /** + * Get the token property: The issued policy token. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Set the token property: The issued policy token. + * + * @param token the token value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withToken(String token) { + this.token = token; + return this; + } + + /** + * Get the tokenId property: The unique Id assigned to the policy token. + * + * @return the tokenId value. + */ + public String tokenId() { + return this.tokenId; + } + + /** + * Set the tokenId property: The unique Id assigned to the policy token. + * + * @param tokenId the tokenId value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withTokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + /** + * Get the expiration property: The expiration of the policy token. + * + * @return the expiration value. + */ + public OffsetDateTime expiration() { + return this.expiration; + } + + /** + * Set the expiration property: The expiration of the policy token. + * + * @param expiration the expiration value to set. + * @return the PolicyTokenResponseInner object itself. + */ + public PolicyTokenResponseInner withExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (results() != null) { + results().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("result", this.result == null ? null : this.result.toString()); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("retryAfter", + this.retryAfter == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.retryAfter)); + jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("changeReference", this.changeReference); + jsonWriter.writeStringField("token", this.token); + jsonWriter.writeStringField("tokenId", this.tokenId); + jsonWriter.writeStringField("expiration", + this.expiration == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiration)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyTokenResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyTokenResponseInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PolicyTokenResponseInner. + */ + public static PolicyTokenResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyTokenResponseInner deserializedPolicyTokenResponseInner = new PolicyTokenResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("result".equals(fieldName)) { + deserializedPolicyTokenResponseInner.result = PolicyTokenResult.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedPolicyTokenResponseInner.message = reader.getString(); + } else if ("retryAfter".equals(fieldName)) { + deserializedPolicyTokenResponseInner.retryAfter = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("results".equals(fieldName)) { + List results + = reader.readArray(reader1 -> ExternalEvaluationEndpointInvocationResult.fromJson(reader1)); + deserializedPolicyTokenResponseInner.results = results; + } else if ("changeReference".equals(fieldName)) { + deserializedPolicyTokenResponseInner.changeReference = reader.getString(); + } else if ("token".equals(fieldName)) { + deserializedPolicyTokenResponseInner.token = reader.getString(); + } else if ("tokenId".equals(fieldName)) { + deserializedPolicyTokenResponseInner.tokenId = reader.getString(); + } else if ("expiration".equals(fieldName)) { + deserializedPolicyTokenResponseInner.expiration = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyTokenResponseInner; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java index 583df84a433c..c1a5f348155a 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java @@ -10,10 +10,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; -import com.azure.resourcemanager.resources.models.WhatIfChange; +import com.azure.resourcemanager.resources.models.WhatIfOperationProperties; import java.io.IOException; -import java.util.List; /** * Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of @@ -29,7 +27,7 @@ public final class WhatIfOperationResultInner implements JsonSerializable changes() { - return this.innerProperties() == null ? null : this.innerProperties().changes(); - } - - /** - * Set the changes property: List of resource changes predicted by What-If operation. - * - * @param changes the changes value to set. - * @return the WhatIfOperationResultInner object itself. - */ - public WhatIfOperationResultInner withChanges(List changes) { - if (this.innerProperties() == null) { - this.innerProperties = new WhatIfOperationProperties(); - } - this.innerProperties().withChanges(changes); - return this; - } - - /** - * Get the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @return the potentialChanges value. - */ - public List potentialChanges() { - return this.innerProperties() == null ? null : this.innerProperties().potentialChanges(); - } - - /** - * Set the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @param potentialChanges the potentialChanges value to set. - * @return the WhatIfOperationResultInner object itself. - */ - public WhatIfOperationResultInner withPotentialChanges(List potentialChanges) { - if (this.innerProperties() == null) { - this.innerProperties = new WhatIfOperationProperties(); - } - this.innerProperties().withPotentialChanges(potentialChanges); - return this; - } - - /** - * Get the diagnostics property: List of resource diagnostics detected by What-If operation. - * - * @return the diagnostics value. - */ - public List diagnostics() { - return this.innerProperties() == null ? null : this.innerProperties().diagnostics(); - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } @@ -164,7 +118,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -187,7 +141,7 @@ public static WhatIfOperationResultInner fromJson(JsonReader jsonReader) throws if ("status".equals(fieldName)) { deserializedWhatIfOperationResultInner.status = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedWhatIfOperationResultInner.innerProperties = WhatIfOperationProperties.fromJson(reader); + deserializedWhatIfOperationResultInner.properties = WhatIfOperationProperties.fromJson(reader); } else if ("error".equals(fieldName)) { deserializedWhatIfOperationResultInner.error = ManagementError.fromJson(reader); } else { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/package-info.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/package-info.java index d8020c66fff9..20fb92aad1d0 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the inner data models for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * ResourceManagement Client. */ package com.azure.resourcemanager.resources.fluent.models; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/package-info.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/package-info.java index 3a8d8d8dc08e..a92cb1758bec 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the service clients for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * ResourceManagement Client. */ package com.azure.resourcemanager.resources.fluent; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java index 19c46830117b..b7afdc59ba13 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java @@ -60,7 +60,7 @@ public final class AuthorizationOperationsClientImpl implements AuthorizationOpe * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ManagementLockClient") + @ServiceInterface(name = "ManagementLockClientAuthorizationOperations") public interface AuthorizationOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Authorization/operations") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java index 4d6ffb42e438..8d933ed1c623 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java @@ -59,7 +59,7 @@ public final class ChangesClientImpl implements ChangesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ChangesManagementCli") + @ServiceInterface(name = "ChangesManagementClientChanges") public interface ChangesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataBoundariesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataBoundariesClientImpl.java index c87b93f01283..d61d26785c1b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataBoundariesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataBoundariesClientImpl.java @@ -58,7 +58,7 @@ public final class DataBoundariesClientImpl implements DataBoundariesClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "DataBoundariesManage") + @ServiceInterface(name = "DataBoundariesManagementClientDataBoundaries") public interface DataBoundariesService { @Headers({ "Content-Type: application/json" }) @Put("/providers/Microsoft.Resources/dataBoundaries/{default}") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java index 079af00565d7..794311f399bf 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java @@ -60,7 +60,7 @@ public final class DataPolicyManifestsClientImpl implements DataPolicyManifestsC * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientDataPoli") + @ServiceInterface(name = "PolicyClientDataPolicyManifests") public interface DataPolicyManifestsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Authorization/dataPolicyManifests/{policyMode}") @@ -357,6 +357,8 @@ public PagedIterable list(String filter, Context contex } /** + * Retrieves data policy manifests + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -382,6 +384,8 @@ private Mono> listNextSinglePageAsync(Str } /** + * Retrieves data policy manifests + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java index 423a77a2685d..4b64ab928aa5 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java @@ -60,7 +60,7 @@ public final class DeploymentOperationsClientImpl implements DeploymentOperation * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "DeploymentsManagemen") + @ServiceInterface(name = "DeploymentsManagementClientDeploymentOperations") public interface DeploymentOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}") @@ -1571,7 +1571,8 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtScopeNextSinglePageAsync(String nextLink) { @@ -1598,7 +1599,8 @@ private Mono> listAtScopeNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtScopeNextSinglePageAsync(String nextLink, @@ -1624,7 +1626,8 @@ private Mono> listAtScopeNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink) { @@ -1651,7 +1654,8 @@ private Mono> listAtTenantScopeNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink, @@ -1677,7 +1681,8 @@ private Mono> listAtTenantScopeNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1706,7 +1711,8 @@ private Mono> listAtTenantScopeNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtManagementGroupScopeNextSinglePageAsync(String nextLink, @@ -1732,7 +1738,8 @@ private Mono> listAtManagementGroupScope * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionScopeNextSinglePageAsync(String nextLink) { @@ -1760,7 +1767,8 @@ private Mono> listAtSubscriptionScopeNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionScopeNextSinglePageAsync(String nextLink, @@ -1786,7 +1794,8 @@ private Mono> listAtSubscriptionScopeNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1812,7 +1821,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployment operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all deployments operations for a deployment along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java index 6a60e773beb4..a8068b7591d4 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java @@ -78,7 +78,7 @@ public final class DeploymentStacksClientImpl implements InnerSupportsGet> listAtScopeNextSinglePageAsync(String nextLink) { @@ -8201,7 +8202,8 @@ private Mono> listAtScopeNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments at the given scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtScopeNextSinglePageAsync(String nextLink, @@ -8227,7 +8229,8 @@ private Mono> listAtScopeNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments at the tenant scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink) { @@ -8254,7 +8257,8 @@ private Mono> listAtTenantScopeNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments at the tenant scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink, @@ -8280,7 +8284,8 @@ private Mono> listAtTenantScopeNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a management group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -8309,7 +8314,8 @@ private Mono> listAtTenantScopeNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a management group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtManagementGroupScopeNextSinglePageAsync(String nextLink, @@ -8335,7 +8341,8 @@ private Mono> listAtManagementGroupScopeN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionScopeNextSinglePageAsync(String nextLink) { @@ -8363,7 +8370,8 @@ private Mono> listAtSubscriptionScopeNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionScopeNextSinglePageAsync(String nextLink, @@ -8389,7 +8397,8 @@ private Mono> listAtSubscriptionScopeNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -8417,7 +8426,8 @@ private Mono> listByResourceGroupNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the deployments for a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java index a44fd6138103..cfdba14e2c51 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java @@ -60,7 +60,7 @@ public final class FeaturesClientImpl implements FeaturesClient { * calls. */ @Host("{$host}") - @ServiceInterface(name = "FeatureClientFeature") + @ServiceInterface(name = "FeatureClientFeatures") public interface FeaturesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Features/features") @@ -731,7 +731,8 @@ public FeatureResultInner unregister(String resourceProviderNamespace, String fe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of previewed features along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the preview features that are available through AFEC for the subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink) { @@ -758,7 +759,8 @@ private Mono> listAllNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of previewed features along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the preview features that are available through AFEC for the subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink, Context context) { @@ -783,7 +785,8 @@ private Mono> listAllNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of previewed features along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the preview features in a provider namespace that are available through AFEC for the subscription + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -809,7 +812,8 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of previewed features along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the preview features in a provider namespace that are available through AFEC for the subscription + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java index 162fe33c728a..8cf6c5b095ed 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java @@ -67,7 +67,7 @@ public final class ManagementLocksClientImpl implements InnerSupportsGet listByScope(String scope, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2700,7 +2701,8 @@ public PagedIterable listByScope(String scope, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtResourceGroupLevelNextSinglePageAsync(String nextLink, @@ -2726,7 +2728,8 @@ private Mono> listAtResourceGroupLevelN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a resource or any level below resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtResourceLevelNextSinglePageAsync(String nextLink) { @@ -2754,7 +2757,8 @@ private Mono> listAtResourceLevelNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a resource or any level below resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtResourceLevelNextSinglePageAsync(String nextLink, @@ -2780,7 +2784,8 @@ private Mono> listAtResourceLevelNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionLevelNextSinglePageAsync(String nextLink) { @@ -2808,7 +2813,8 @@ private Mono> listAtSubscriptionLevelNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionLevelNextSinglePageAsync(String nextLink, @@ -2834,7 +2840,8 @@ private Mono> listAtSubscriptionLevelNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByScopeNextSinglePageAsync(String nextLink) { @@ -2861,7 +2868,8 @@ private Mono> listByScopeNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of locks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the management locks for a scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByScopeNextSinglePageAsync(String nextLink, diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java index 8d56948aab5d..52314510f45b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java @@ -60,7 +60,7 @@ public final class OperationsClientImpl implements OperationsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementCl") + @ServiceInterface(name = "ResourceManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Resources/operations") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java index babe25f7a342..45d45ecde96c 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java @@ -68,7 +68,7 @@ public final class PolicyAssignmentsClientImpl implements InnerSupportsListing

> createById(@HostParam("$host") String endp @UnexpectedResponseExceptionType(ManagementException.class) Mono> getById(@HostParam("$host") String endpoint, @PathParam(value = "policyAssignmentId", encoded = true) String policyAssignmentId, - @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/{policyAssignmentId}") @@ -256,7 +255,7 @@ public Mono> deleteWithResponseAsync(String scop return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, @@ -297,7 +296,7 @@ private Mono> deleteWithResponseAsync(String sco return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, accept, context); @@ -412,7 +411,7 @@ public Mono> createWithResponseAsync(String scop } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, @@ -459,7 +458,7 @@ private Mono> createWithResponseAsync(String sco } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, parameters, accept, @@ -574,7 +573,7 @@ public Mono> getWithResponseAsync(String scope, return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), scope, policyAssignmentName, expand, @@ -615,7 +614,7 @@ private Mono> getWithResponseAsync(String scope, return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), scope, policyAssignmentName, expand, apiVersion, accept, context); @@ -729,7 +728,7 @@ public Mono> updateWithResponseAsync(String scop } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, @@ -776,7 +775,7 @@ private Mono> updateWithResponseAsync(String sco } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, parameters, accept, @@ -904,7 +903,7 @@ private Mono> listByResourceGroupSinglePage return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -960,7 +959,7 @@ private Mono> listByResourceGroupSinglePage return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1215,7 +1214,7 @@ private Mono> listForResourceSinglePageAsyn if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listForResource(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1302,7 +1301,7 @@ private Mono> listForResourceSinglePageAsyn if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1608,7 +1607,7 @@ private Mono> listForManagementGroupSingleP return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listForManagementGroup(this.client.getEndpoint(), managementGroupId, filter, @@ -1657,7 +1656,7 @@ private Mono> listForManagementGroupSingleP return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1861,7 +1860,7 @@ private Mono> listSinglePageAsync(String fi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), filter, expand, top, apiVersion, @@ -1912,7 +1911,7 @@ private Mono> listSinglePageAsync(String fi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2109,7 +2108,7 @@ public Mono> deleteByIdWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.deleteById(this.client.getEndpoint(), policyAssignmentId, apiVersion, accept, context)) @@ -2146,7 +2145,7 @@ private Mono> deleteByIdWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteById(this.client.getEndpoint(), policyAssignmentId, apiVersion, accept, context); @@ -2258,7 +2257,7 @@ public Mono> createByIdWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createById(this.client.getEndpoint(), policyAssignmentId, apiVersion, @@ -2303,7 +2302,7 @@ private Mono> createByIdWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createById(this.client.getEndpoint(), policyAssignmentId, apiVersion, parameters, accept, @@ -2400,15 +2399,13 @@ public PolicyAssignmentInner createById(String policyAssignmentId, PolicyAssignm * * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. - * @param expand Comma-separated list of additional properties to be included in the response. Supported values are - * 'LatestDefinitionVersion, EffectiveDefinitionVersion'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the policy assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByIdWithResponseAsync(String policyAssignmentId, String expand) { + public Mono> getByIdWithResponseAsync(String policyAssignmentId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2417,11 +2414,11 @@ public Mono> getByIdWithResponseAsync(String pol return Mono .error(new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getById(this.client.getEndpoint(), policyAssignmentId, expand, apiVersion, - accept, context)) + .withContext( + context -> service.getById(this.client.getEndpoint(), policyAssignmentId, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2437,8 +2434,6 @@ public Mono> getByIdWithResponseAsync(String pol * * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. - * @param expand Comma-separated list of additional properties to be included in the response. Supported values are - * 'LatestDefinitionVersion, EffectiveDefinitionVersion'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2446,8 +2441,7 @@ public Mono> getByIdWithResponseAsync(String pol * @return the policy assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByIdWithResponseAsync(String policyAssignmentId, String expand, - Context context) { + private Mono> getByIdWithResponseAsync(String policyAssignmentId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2456,10 +2450,10 @@ private Mono> getByIdWithResponseAsync(String po return Mono .error(new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getById(this.client.getEndpoint(), policyAssignmentId, expand, apiVersion, accept, context); + return service.getById(this.client.getEndpoint(), policyAssignmentId, apiVersion, accept, context); } /** @@ -2481,8 +2475,7 @@ private Mono> getByIdWithResponseAsync(String po */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getByIdAsync(String policyAssignmentId) { - final String expand = null; - return getByIdWithResponseAsync(policyAssignmentId, expand).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return getByIdWithResponseAsync(policyAssignmentId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2497,8 +2490,6 @@ public Mono getByIdAsync(String policyAssignmentId) { * * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. - * @param expand Comma-separated list of additional properties to be included in the response. Supported values are - * 'LatestDefinitionVersion, EffectiveDefinitionVersion'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2506,9 +2497,8 @@ public Mono getByIdAsync(String policyAssignmentId) { * @return the policy assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByIdWithResponse(String policyAssignmentId, String expand, - Context context) { - return getByIdWithResponseAsync(policyAssignmentId, expand, context).block(); + public Response getByIdWithResponse(String policyAssignmentId, Context context) { + return getByIdWithResponseAsync(policyAssignmentId, context).block(); } /** @@ -2530,8 +2520,7 @@ public Response getByIdWithResponse(String policyAssignme */ @ServiceMethod(returns = ReturnType.SINGLE) public PolicyAssignmentInner getById(String policyAssignmentId) { - final String expand = null; - return getByIdWithResponse(policyAssignmentId, expand, Context.NONE).getValue(); + return getByIdWithResponse(policyAssignmentId, Context.NONE).getValue(); } /** @@ -2570,7 +2559,7 @@ public Mono> updateByIdWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateById(this.client.getEndpoint(), policyAssignmentId, apiVersion, @@ -2615,7 +2604,7 @@ private Mono> updateByIdWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateById(this.client.getEndpoint(), policyAssignmentId, apiVersion, parameters, accept, @@ -2701,6 +2690,8 @@ public PolicyAssignmentInner updateById(String policyAssignmentId, PolicyAssignm } /** + * Retrieves all policy assignments that apply to a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2728,6 +2719,8 @@ private Mono> listForResourceGroupNextSingl } /** + * Retrieves all policy assignments that apply to a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2755,6 +2748,8 @@ private Mono> listForResourceGroupNextSingl } /** + * Retrieves all policy assignments that apply to a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2781,6 +2776,8 @@ private Mono> listForResourceNextSinglePage } /** + * Retrieves all policy assignments that apply to a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2808,6 +2805,8 @@ private Mono> listForResourceNextSinglePage } /** + * Retrieves all policy assignments that apply to a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2835,6 +2834,8 @@ private Mono> listForManagementGroupNextSin } /** + * Retrieves all policy assignments that apply to a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2862,6 +2863,8 @@ private Mono> listForManagementGroupNextSin } /** + * Retrieves all policy assignments that apply to a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2887,6 +2890,8 @@ private Mono> listNextSinglePageAsync(Strin } /** + * Retrieves all policy assignments that apply to a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyClientImpl.java index cbf56f84b24a..1ab2bbd7da45 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyClientImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.resources.fluent.PolicyExemptionsClient; import com.azure.resourcemanager.resources.fluent.PolicySetDefinitionVersionsClient; import com.azure.resourcemanager.resources.fluent.PolicySetDefinitionsClient; +import com.azure.resourcemanager.resources.fluent.PolicyTokensClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -108,6 +109,20 @@ public DataPolicyManifestsClient getDataPolicyManifests() { return this.dataPolicyManifests; } + /** + * The PolicyAssignmentsClient object to access its operations. + */ + private final PolicyAssignmentsClient policyAssignments; + + /** + * Gets the PolicyAssignmentsClient object to access its operations. + * + * @return the PolicyAssignmentsClient object. + */ + public PolicyAssignmentsClient getPolicyAssignments() { + return this.policyAssignments; + } + /** * The PolicyDefinitionsClient object to access its operations. */ @@ -165,17 +180,17 @@ public PolicySetDefinitionVersionsClient getPolicySetDefinitionVersions() { } /** - * The PolicyAssignmentsClient object to access its operations. + * The PolicyTokensClient object to access its operations. */ - private final PolicyAssignmentsClient policyAssignments; + private final PolicyTokensClient policyTokens; /** - * Gets the PolicyAssignmentsClient object to access its operations. + * Gets the PolicyTokensClient object to access its operations. * - * @return the PolicyAssignmentsClient object. + * @return the PolicyTokensClient object. */ - public PolicyAssignmentsClient getPolicyAssignments() { - return this.policyAssignments; + public PolicyTokensClient getPolicyTokens() { + return this.policyTokens; } /** @@ -211,11 +226,12 @@ public PolicyExemptionsClient getPolicyExemptions() { this.subscriptionId = subscriptionId; this.endpoint = endpoint; this.dataPolicyManifests = new DataPolicyManifestsClientImpl(this); + this.policyAssignments = new PolicyAssignmentsClientImpl(this); this.policyDefinitions = new PolicyDefinitionsClientImpl(this); this.policyDefinitionVersions = new PolicyDefinitionVersionsClientImpl(this); this.policySetDefinitions = new PolicySetDefinitionsClientImpl(this); this.policySetDefinitionVersions = new PolicySetDefinitionVersionsClientImpl(this); - this.policyAssignments = new PolicyAssignmentsClientImpl(this); + this.policyTokens = new PolicyTokensClientImpl(this); this.policyExemptions = new PolicyExemptionsClientImpl(this); } } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionVersionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionVersionsClientImpl.java index ccd377391435..5aeb15775e00 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionVersionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionVersionsClientImpl.java @@ -66,7 +66,7 @@ public final class PolicyDefinitionVersionsClientImpl * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientPolicyDe") + @ServiceInterface(name = "PolicyClientPolicyDefinitionVersions") public interface PolicyDefinitionVersionsService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.Authorization/listPolicyDefinitionVersions") @@ -233,7 +233,7 @@ public Mono> listAllBuiltinsWit return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllBuiltins(this.client.getEndpoint(), apiVersion, accept, context)) @@ -257,7 +257,7 @@ private Mono> listAllBuiltinsWi return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAllBuiltins(this.client.getEndpoint(), apiVersion, accept, context); @@ -329,7 +329,7 @@ public PolicyDefinitionVersionListResultInner listAllBuiltins() { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -360,7 +360,7 @@ public PolicyDefinitionVersionListResultInner listAllBuiltins() { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAllAtManagementGroup(this.client.getEndpoint(), managementGroupName, apiVersion, accept, @@ -437,7 +437,7 @@ public Mono> listAllWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -466,7 +466,7 @@ private Mono> listAllWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAll(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context); @@ -555,7 +555,7 @@ public Mono> createOrUpdateWithResponseAs } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -603,7 +603,7 @@ private Mono> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, @@ -705,7 +705,7 @@ public Mono> deleteWithResponseAsync(String policyDefinitionName, return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -746,7 +746,7 @@ private Mono> deleteWithResponseAsync(String policyDefinitionName return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, @@ -841,7 +841,7 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -883,7 +883,7 @@ private Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, @@ -976,7 +976,7 @@ public Mono> getBuiltInWithResponseAsync( return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBuiltIn(this.client.getEndpoint(), policyDefinitionName, @@ -1014,7 +1014,7 @@ private Mono> getBuiltInWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBuiltIn(this.client.getEndpoint(), policyDefinitionName, policyDefinitionVersion, apiVersion, @@ -1120,7 +1120,7 @@ public Mono> createOrUpdateAtManagementGr } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1171,7 +1171,7 @@ private Mono> createOrUpdateAtManagementG } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1279,7 +1279,7 @@ public Mono> deleteAtManagementGroupWithResponseAsync(String mana return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1321,7 +1321,7 @@ private Mono> deleteAtManagementGroupWithResponseAsync(String man return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupName, policyDefinitionName, @@ -1425,7 +1425,7 @@ public Mono> getAtManagementGroupWithResp return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1468,7 +1468,7 @@ private Mono> getAtManagementGroupWithRes return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAtManagementGroup(this.client.getEndpoint(), managementGroupName, policyDefinitionName, @@ -1567,7 +1567,7 @@ private Mono> listSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1606,7 +1606,7 @@ private Mono> listSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1731,7 +1731,7 @@ private Mono> listBuiltInSinglePageA return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBuiltIn(this.client.getEndpoint(), policyDefinitionName, apiVersion, @@ -1766,7 +1766,7 @@ private Mono> listBuiltInSinglePageA return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listBuiltIn(this.client.getEndpoint(), policyDefinitionName, apiVersion, top, accept, context) @@ -1896,7 +1896,7 @@ public PagedIterable listBuiltIn(String policyDefi return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1937,7 +1937,7 @@ private Mono> listByManagementGroupS return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2056,6 +2056,8 @@ public PagedIterable listByManagementGroup(String } /** + * Retrieves policy definition versions for a given policy definition in a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2082,6 +2084,8 @@ private Mono> listNextSinglePageAsyn } /** + * Retrieves policy definition versions for a given policy definition in a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2110,6 +2114,8 @@ private Mono> listNextSinglePageAsyn } /** + * Retrieve built-in policy definition versions + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2137,6 +2143,8 @@ private Mono> listBuiltInNextSingleP } /** + * Retrieve built-in policy definition versions + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2165,6 +2173,8 @@ private Mono> listBuiltInNextSingleP } /** + * Retrieve policy definition versions in a management group policy definition. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2194,6 +2204,8 @@ private Mono> listBuiltInNextSingleP } /** + * Retrieve policy definition versions in a management group policy definition. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java index 19787f9a2379..d52920f00fec 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java @@ -63,7 +63,7 @@ public final class PolicyDefinitionsClientImpl implements PolicyDefinitionsClien * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientPolicyDe") + @ServiceInterface(name = "PolicyClientPolicyDefinitions") public interface PolicyDefinitionsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}") @@ -214,7 +214,7 @@ public Mono> createOrUpdateWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -255,7 +255,7 @@ private Mono> createOrUpdateWithResponseAsync(St } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, @@ -342,7 +342,7 @@ public Mono> deleteWithResponseAsync(String policyDefinitionName) return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -376,7 +376,7 @@ private Mono> deleteWithResponseAsync(String policyDefinitionName return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, @@ -456,7 +456,7 @@ public Mono> getWithResponseAsync(String policyD return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -490,7 +490,7 @@ private Mono> getWithResponseAsync(String policy return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), policyDefinitionName, apiVersion, @@ -567,7 +567,7 @@ public Mono> getBuiltInWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.getBuiltIn(this.client.getEndpoint(), policyDefinitionName, apiVersion, accept, context)) @@ -597,7 +597,7 @@ private Mono> getBuiltInWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBuiltIn(this.client.getEndpoint(), policyDefinitionName, apiVersion, accept, context); @@ -685,7 +685,7 @@ public Mono> createOrUpdateAtManagementGroupWith } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), @@ -727,7 +727,7 @@ private Mono> createOrUpdateAtManagementGroupWit } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -822,7 +822,7 @@ public Mono> deleteAtManagementGroupWithResponseAsync(String mana return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -858,7 +858,7 @@ private Mono> deleteAtManagementGroupWithResponseAsync(String man return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupId, policyDefinitionName, @@ -945,7 +945,7 @@ public Mono> getAtManagementGroupWithResponseAsy return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -981,7 +981,7 @@ private Mono> getAtManagementGroupWithResponseAs return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAtManagementGroup(this.client.getEndpoint(), managementGroupId, policyDefinitionName, @@ -1079,7 +1079,7 @@ private Mono> listSinglePageAsync(String fi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1127,7 +1127,7 @@ private Mono> listSinglePageAsync(String fi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1308,7 +1308,7 @@ private Mono> listBuiltInSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1348,7 +1348,7 @@ private Mono> listBuiltInSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listBuiltIn(this.client.getEndpoint(), apiVersion, filter, top, accept, context) @@ -1520,7 +1520,7 @@ private Mono> listByManagementGroupSinglePa return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagementGroup(this.client.getEndpoint(), apiVersion, @@ -1569,7 +1569,7 @@ private Mono> listByManagementGroupSinglePa return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1736,6 +1736,8 @@ public PagedIterable listByManagementGroup(String managem } /** + * Retrieves policy definitions in a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1761,6 +1763,8 @@ private Mono> listNextSinglePageAsync(Strin } /** + * Retrieves policy definitions in a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1787,6 +1791,8 @@ private Mono> listNextSinglePageAsync(Strin } /** + * Retrieve built-in policy definitions + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1813,6 +1819,8 @@ private Mono> listBuiltInNextSinglePageAsyn } /** + * Retrieve built-in policy definitions + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1840,6 +1848,8 @@ private Mono> listBuiltInNextSinglePageAsyn } /** + * Retrieve policy definitions in a management group + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1867,6 +1877,8 @@ private Mono> listByManagementGroupNextSing } /** + * Retrieve policy definitions in a management group + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java index b627ff0d1f4a..2e11f424d331 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java @@ -68,7 +68,7 @@ public final class PolicyExemptionsClientImpl * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientPolicyEx") + @ServiceInterface(name = "PolicyClientPolicyExemptions") public interface PolicyExemptionsService { @Headers({ "Content-Type: application/json" }) @Delete("/{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}") @@ -1875,6 +1875,8 @@ public PagedIterable listForManagementGroup(String managem } /** + * Retrieves all policy exemptions that apply to a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1900,6 +1902,8 @@ private Mono> listNextSinglePageAsync(String } /** + * Retrieves all policy exemptions that apply to a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1926,6 +1930,8 @@ private Mono> listNextSinglePageAsync(String } /** + * Retrieves all policy exemptions that apply to a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1953,6 +1959,8 @@ private Mono> listForResourceGroupNextSingle } /** + * Retrieves all policy exemptions that apply to a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1980,6 +1988,8 @@ private Mono> listForResourceGroupNextSingle } /** + * Retrieves all policy exemptions that apply to a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2006,6 +2016,8 @@ private Mono> listForResourceNextSinglePageA } /** + * Retrieves all policy exemptions that apply to a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2033,6 +2045,8 @@ private Mono> listForResourceNextSinglePageA } /** + * Retrieves all policy exemptions that apply to a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2060,6 +2074,8 @@ private Mono> listForManagementGroupNextSing } /** + * Retrieves all policy exemptions that apply to a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionVersionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionVersionsClientImpl.java index f3426186fa1b..72663befee20 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionVersionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionVersionsClientImpl.java @@ -66,7 +66,7 @@ public final class PolicySetDefinitionVersionsClientImpl * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientPolicySe") + @ServiceInterface(name = "PolicyClientPolicySetDefinitionVersions") public interface PolicySetDefinitionVersionsService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.Authorization/listPolicySetDefinitionVersions") @@ -234,7 +234,7 @@ public Mono> listAllBuiltins return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllBuiltins(this.client.getEndpoint(), apiVersion, accept, context)) @@ -260,7 +260,7 @@ public Mono> listAllBuiltins return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAllBuiltins(this.client.getEndpoint(), apiVersion, accept, context); @@ -334,7 +334,7 @@ public PolicySetDefinitionVersionListResultInner listAllBuiltins() { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -367,7 +367,7 @@ public PolicySetDefinitionVersionListResultInner listAllBuiltins() { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAllAtManagementGroup(this.client.getEndpoint(), managementGroupName, apiVersion, accept, @@ -448,7 +448,7 @@ public Mono> listAllWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -478,7 +478,7 @@ private Mono> listAllWithRes return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAll(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context); @@ -567,7 +567,7 @@ public Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -616,7 +616,7 @@ private Mono> createOrUpdateWithRespon } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -723,7 +723,7 @@ public Mono> deleteWithResponseAsync(String policySetDefinitionNa return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -765,7 +765,7 @@ private Mono> deleteWithResponseAsync(String policySetDefinitionN return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), policySetDefinitionName, @@ -866,7 +866,7 @@ public Mono> getWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -910,7 +910,7 @@ private Mono> getWithResponseAsync(Str return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), policySetDefinitionName, @@ -1012,7 +1012,7 @@ public Mono> getBuiltInWithResponseAsy return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBuiltIn(this.client.getEndpoint(), policySetDefinitionName, @@ -1051,7 +1051,7 @@ private Mono> getBuiltInWithResponseAs return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBuiltIn(this.client.getEndpoint(), policySetDefinitionName, policyDefinitionVersion, expand, @@ -1151,7 +1151,7 @@ private Mono> listSinglePageAsync return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1192,7 +1192,7 @@ private Mono> listSinglePageAsync return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1330,7 +1330,7 @@ public PagedIterable list(String policySetDefin return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBuiltIn(this.client.getEndpoint(), policySetDefinitionName, apiVersion, @@ -1368,7 +1368,7 @@ public PagedIterable list(String policySetDefin return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1524,7 +1524,7 @@ public Mono> createOrUpdateAtManagemen } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1575,7 +1575,7 @@ private Mono> createOrUpdateAtManageme } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1687,7 +1687,7 @@ public Mono> deleteAtManagementGroupWithResponseAsync(String mana return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1730,7 +1730,7 @@ private Mono> deleteAtManagementGroupWithResponseAsync(String man return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupName, policySetDefinitionName, @@ -1839,7 +1839,7 @@ public Mono> getAtManagementGroupWithR return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -1885,7 +1885,7 @@ private Mono> getAtManagementGroupWith return Mono.error( new IllegalArgumentException("Parameter policyDefinitionVersion is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAtManagementGroup(this.client.getEndpoint(), managementGroupName, policySetDefinitionName, @@ -1995,7 +1995,7 @@ private Mono> listByManagementGro return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagementGroup(this.client.getEndpoint(), managementGroupName, @@ -2038,7 +2038,7 @@ private Mono> listByManagementGro return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2166,6 +2166,8 @@ public PagedIterable listByManagementGroup(Stri } /** + * Retrieves the policy set definition versions for a given policy set definition in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2192,6 +2194,8 @@ private Mono> listNextSinglePageA } /** + * Retrieves the policy set definition versions for a given policy set definition in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2220,6 +2224,8 @@ private Mono> listNextSinglePageA } /** + * Retrieves built-in policy set definition versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2247,6 +2253,8 @@ private Mono> listBuiltInNextSing } /** + * Retrieves built-in policy set definition versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2275,6 +2283,8 @@ private Mono> listBuiltInNextSing } /** + * Retrieves all policy set definition versions for a given policy set definition in a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2304,6 +2314,8 @@ private Mono> listBuiltInNextSing } /** + * Retrieves all policy set definition versions for a given policy set definition in a management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java index 2c8206941249..b747d635631b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java @@ -63,7 +63,7 @@ public final class PolicySetDefinitionsClientImpl implements PolicySetDefinition * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PolicyClientPolicySe") + @ServiceInterface(name = "PolicyClientPolicySetDefinitions") public interface PolicySetDefinitionsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}") @@ -215,7 +215,7 @@ public Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -256,7 +256,7 @@ private Mono> createOrUpdateWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -344,7 +344,7 @@ public Mono> deleteWithResponseAsync(String policySetDefinitionNa return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -378,7 +378,7 @@ private Mono> deleteWithResponseAsync(String policySetDefinitionN return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), policySetDefinitionName, @@ -461,7 +461,7 @@ public Mono> getWithResponseAsync(String poli return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -498,7 +498,7 @@ private Mono> getWithResponseAsync(String pol return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), policySetDefinitionName, expand, @@ -583,7 +583,7 @@ public Mono> getBuiltInWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBuiltIn(this.client.getEndpoint(), policySetDefinitionName, expand, @@ -616,7 +616,7 @@ private Mono> getBuiltInWithResponseAsync(Str return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBuiltIn(this.client.getEndpoint(), policySetDefinitionName, expand, apiVersion, accept, @@ -717,7 +717,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -767,7 +767,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -960,7 +960,7 @@ private Mono> listBuiltInSinglePageAsync return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.listBuiltIn(this.client.getEndpoint(), apiVersion, filter, expand, top, accept, context)) @@ -999,7 +999,7 @@ private Mono> listBuiltInSinglePageAsync return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listBuiltIn(this.client.getEndpoint(), apiVersion, filter, expand, top, accept, context) @@ -1166,7 +1166,7 @@ public Mono> createOrUpdateAtManagementGroupW } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), @@ -1209,7 +1209,7 @@ private Mono> createOrUpdateAtManagementGroup } else { parameters.validate(); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -1304,7 +1304,7 @@ public Mono> deleteAtManagementGroupWithResponseAsync(String mana return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -1340,7 +1340,7 @@ private Mono> deleteAtManagementGroupWithResponseAsync(String man return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteAtManagementGroup(this.client.getEndpoint(), managementGroupId, policySetDefinitionName, @@ -1429,7 +1429,7 @@ public Mono> getAtManagementGroupWithResponse return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -1467,7 +1467,7 @@ private Mono> getAtManagementGroupWithRespons return Mono.error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAtManagementGroup(this.client.getEndpoint(), managementGroupId, policySetDefinitionName, @@ -1575,7 +1575,7 @@ private Mono> listByManagementGroupSingl return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagementGroup(this.client.getEndpoint(), managementGroupId, @@ -1626,7 +1626,7 @@ private Mono> listByManagementGroupSingl return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2023-04-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1802,6 +1802,8 @@ public PagedIterable listByManagementGroup(String mana } /** + * Retrieves the policy set definitions for a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1827,6 +1829,8 @@ private Mono> listNextSinglePageAsync(St } /** + * Retrieves the policy set definitions for a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1853,6 +1857,8 @@ private Mono> listNextSinglePageAsync(St } /** + * Retrieves built-in policy set definitions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1879,6 +1885,8 @@ private Mono> listBuiltInNextSinglePageA } /** + * Retrieves built-in policy set definitions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1906,6 +1914,8 @@ private Mono> listBuiltInNextSinglePageA } /** + * Retrieves all policy set definitions in management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1933,6 +1943,8 @@ private Mono> listByManagementGroupNextS } /** + * Retrieves all policy set definitions in management group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyTokensClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyTokensClientImpl.java new file mode 100644 index 000000000000..5428b994d96f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyTokensClientImpl.java @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.resources.fluent.PolicyTokensClient; +import com.azure.resourcemanager.resources.fluent.models.PolicyTokenResponseInner; +import com.azure.resourcemanager.resources.models.PolicyTokenRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PolicyTokensClient. + */ +public final class PolicyTokensClientImpl implements PolicyTokensClient { + /** + * The proxy service used to perform REST calls. + */ + private final PolicyTokensService service; + + /** + * The service client containing this operation class. + */ + private final PolicyClientImpl client; + + /** + * Initializes an instance of PolicyTokensClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PolicyTokensClientImpl(PolicyClientImpl client) { + this.service + = RestProxy.create(PolicyTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PolicyClientPolicyTokens to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PolicyClientPolicyTokens") + public interface PolicyTokensService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/acquirePolicyToken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> acquire(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") PolicyTokenRequest parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/acquirePolicyToken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> acquireAtManagementGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupName") String managementGroupName, + @BodyParam("application/json") PolicyTokenRequest parameters, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireWithResponseAsync(PolicyTokenRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-03-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.acquire(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> acquireWithResponseAsync(PolicyTokenRequest parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-03-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.acquire(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), parameters, + accept, context); + } + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireAsync(PolicyTokenRequest parameters) { + return acquireWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response acquireWithResponse(PolicyTokenRequest parameters, Context context) { + return acquireWithResponseAsync(parameters, context).block(); + } + + /** + * Acquires a policy token. + * + * This operation acquires a policy token in the given subscription for the given request body. + * + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PolicyTokenResponseInner acquire(PolicyTokenRequest parameters) { + return acquireWithResponse(parameters, Context.NONE).getValue(); + } + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + acquireAtManagementGroupWithResponseAsync(String managementGroupName, PolicyTokenRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-03-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.acquireAtManagementGroup(this.client.getEndpoint(), apiVersion, + managementGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> acquireAtManagementGroupWithResponseAsync( + String managementGroupName, PolicyTokenRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-03-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.acquireAtManagementGroup(this.client.getEndpoint(), apiVersion, managementGroupName, parameters, + accept, context); + } + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireAtManagementGroupAsync(String managementGroupName, + PolicyTokenRequest parameters) { + return acquireAtManagementGroupWithResponseAsync(managementGroupName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response acquireAtManagementGroupWithResponse(String managementGroupName, + PolicyTokenRequest parameters, Context context) { + return acquireAtManagementGroupWithResponseAsync(managementGroupName, parameters, context).block(); + } + + /** + * Acquires a policy token at management group level. + * + * This operation acquires a policy token in the given management group for the given request body. + * + * @param managementGroupName The name of the management group. + * @param parameters The policy token properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the policy token response properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PolicyTokenResponseInner acquireAtManagementGroup(String managementGroupName, + PolicyTokenRequest parameters) { + return acquireAtManagementGroupWithResponse(managementGroupName, parameters, Context.NONE).getValue(); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProviderResourceTypesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProviderResourceTypesClientImpl.java index 717a93b26f4f..c6b41054200f 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProviderResourceTypesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProviderResourceTypesClientImpl.java @@ -55,7 +55,7 @@ public final class ProviderResourceTypesClientImpl implements ProviderResourceTy * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementCl") + @ServiceInterface(name = "ResourceManagementClientProviderResourceTypes") public interface ProviderResourceTypesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/resourceTypes") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java index e8b976c82b36..f17baa27e7de 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java @@ -64,7 +64,7 @@ public final class ProvidersClientImpl implements ProvidersClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementCl") + @ServiceInterface(name = "ResourceManagementClientProviders") public interface ProvidersService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister") @@ -1102,7 +1102,8 @@ public ProviderInner getAtTenantScope(String resourceProviderNamespace) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource providers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all resource providers for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1128,7 +1129,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource providers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all resource providers for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1153,7 +1155,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource providers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all resource providers for the tenant along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink) { @@ -1180,7 +1183,8 @@ private Mono> listAtTenantScopeNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource providers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all resource providers for the tenant along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtTenantScopeNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java index 5dfa5ce67ab5..ce1c668cf58a 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java @@ -74,7 +74,7 @@ public final class ResourceGroupsClientImpl implements ResourceGroupsClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementCl") + @ServiceInterface(name = "ResourceManagementClientResourceGroups") public interface ResourceGroupsService { @Headers({ "Content-Type: application/json" }) @Head("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") @@ -1257,7 +1257,8 @@ public PagedIterable list(String filter, Integer top, Contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the resource groups for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1283,7 +1284,8 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the resource groups for a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java index 72b000b66097..8d7e872f1ef5 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.fluent.ResourceGroupsClient; import com.azure.resourcemanager.resources.fluent.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.ResourcesClient; -import com.azure.resourcemanager.resources.fluent.TagOperationsClient; +import com.azure.resourcemanager.resources.fluent.TagsOperationsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -178,17 +178,17 @@ public ResourceGroupsClient getResourceGroups() { } /** - * The TagOperationsClient object to access its operations. + * The TagsOperationsClient object to access its operations. */ - private final TagOperationsClient tagOperations; + private final TagsOperationsClient tagsOperations; /** - * Gets the TagOperationsClient object to access its operations. + * Gets the TagsOperationsClient object to access its operations. * - * @return the TagOperationsClient object. + * @return the TagsOperationsClient object. */ - public TagOperationsClient getTagOperations() { - return this.tagOperations; + public TagsOperationsClient getTagsOperations() { + return this.tagsOperations; } /** @@ -215,6 +215,6 @@ public TagOperationsClient getTagOperations() { this.providerResourceTypes = new ProviderResourceTypesClientImpl(this); this.resources = new ResourcesClientImpl(this); this.resourceGroups = new ResourceGroupsClientImpl(this); - this.tagOperations = new TagOperationsClientImpl(this); + this.tagsOperations = new TagsOperationsClientImpl(this); } } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceNamesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceNamesClientImpl.java index da856672b7d1..0d5496997418 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceNamesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceNamesClientImpl.java @@ -56,7 +56,7 @@ public final class ResourceNamesClientImpl implements ResourceNamesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "SubscriptionClientRe") + @ServiceInterface(name = "SubscriptionClientResourceNames") public interface ResourceNamesService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.Resources/checkResourceName") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java index 29f7b71464d2..14939f7f42bd 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java @@ -74,7 +74,7 @@ public final class ResourcesClientImpl implements InnerSupportsListing> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -3515,7 +3516,8 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the resources for a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, @@ -3541,7 +3543,8 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the resources in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -3567,7 +3570,8 @@ private Mono> listNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the resources in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java index 5d4f54a2d28f..924cdec27a48 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java @@ -65,7 +65,7 @@ public final class SubscriptionFeatureRegistrationsClientImpl * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "FeatureClientSubscri") + @ServiceInterface(name = "FeatureClientSubscriptionFeatureRegistrations") public interface SubscriptionFeatureRegistrationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}") diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java index 0f6762708ced..4a037926c80f 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java @@ -66,7 +66,7 @@ public final class SubscriptionsClientImpl implements SubscriptionsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "SubscriptionClientSu") + @ServiceInterface(name = "SubscriptionClientSubscriptions") public interface SubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/locations") @@ -583,8 +583,7 @@ public CheckZonePeersResultInner checkZonePeers(String subscriptionId, CheckZone * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription list operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all subscriptions for a tenant along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -610,8 +609,7 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription list operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all subscriptions for a tenant along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java similarity index 99% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java index ac39c59de987..07e0fd0f8e9e 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java @@ -32,7 +32,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.resources.fluent.TagOperationsClient; +import com.azure.resourcemanager.resources.fluent.TagsOperationsClient; import com.azure.resourcemanager.resources.fluent.models.TagDetailsInner; import com.azure.resourcemanager.resources.fluent.models.TagValueInner; import com.azure.resourcemanager.resources.fluent.models.TagsResourceInner; @@ -43,13 +43,13 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TagOperationsClient. + * An instance of this class provides access to all the operations defined in TagsOperationsClient. */ -public final class TagOperationsClientImpl implements TagOperationsClient { +public final class TagsOperationsClientImpl implements TagsOperationsClient { /** * The proxy service used to perform REST calls. */ - private final TagOperationsService service; + private final TagsOperationsService service; /** * The service client containing this operation class. @@ -57,23 +57,23 @@ public final class TagOperationsClientImpl implements TagOperationsClient { private final ResourceManagementClientImpl client; /** - * Initializes an instance of TagOperationsClientImpl. + * Initializes an instance of TagsOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - TagOperationsClientImpl(ResourceManagementClientImpl client) { + TagsOperationsClientImpl(ResourceManagementClientImpl client) { this.service - = RestProxy.create(TagOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + = RestProxy.create(TagsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ResourceManagementClientTagOperations to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for ResourceManagementClientTagsOperations to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementCl") - public interface TagOperationsService { + @ServiceInterface(name = "ResourceManagementClientTagsOperations") + public interface TagsOperationsService { @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") @ExpectedResponses({ 200, 204 }) @@ -1536,6 +1536,8 @@ public void deleteAtScope(String scope, Context context) { } /** + * Gets a summary of tag usage under the subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1561,6 +1563,8 @@ private Mono> listNextSinglePageAsync(String next } /** + * Gets a summary of tag usage under the subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java index ec2bbc58a887..cfe03fe9cb2c 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java @@ -59,7 +59,7 @@ public final class TenantsClientImpl implements TenantsClient { * REST calls. */ @Host("{$host}") - @ServiceInterface(name = "SubscriptionClientTe") + @ServiceInterface(name = "SubscriptionClientTenants") public interface TenantsService { @Headers({ "Content-Type: application/json" }) @Get("/tenants") @@ -180,7 +180,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tenant Ids information along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the tenants for your account along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -206,7 +206,7 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tenant Ids information along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the tenants for your account along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentType.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentType.java new file mode 100644 index 000000000000..741cdb36803b --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of policy assignment. Possible values are NotSpecified, System, SystemHidden, and Custom. Immutable. + */ +public final class AssignmentType extends ExpandableStringEnum { + /** + * Static value NotSpecified for AssignmentType. + */ + public static final AssignmentType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value System for AssignmentType. + */ + public static final AssignmentType SYSTEM = fromString("System"); + + /** + * Static value SystemHidden for AssignmentType. + */ + public static final AssignmentType SYSTEM_HIDDEN = fromString("SystemHidden"); + + /** + * Static value Custom for AssignmentType. + */ + public static final AssignmentType CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of AssignmentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AssignmentType() { + } + + /** + * Creates or finds a AssignmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssignmentType. + */ + public static AssignmentType fromString(String name) { + return fromString(name, AssignmentType.class); + } + + /** + * Gets known AssignmentType values. + * + * @return known AssignmentType values. + */ + public static Collection values() { + return values(AssignmentType.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java index a5f55da18fbf..096167fdfd88 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. + * The policy assignment enforcement mode. Possible values are Default, DoNotEnforce, and Enroll. */ public final class EnforcementMode extends ExpandableStringEnum { /** @@ -21,6 +21,11 @@ public final class EnforcementMode extends ExpandableStringEnum */ public static final EnforcementMode DO_NOT_ENFORCE = fromString("DoNotEnforce"); + /** + * Static value Enroll for EnforcementMode. + */ + public static final EnforcementMode ENROLL = fromString("Enroll"); + /** * Creates a new instance of EnforcementMode value. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEndpointResult.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEndpointResult.java new file mode 100644 index 000000000000..0310f5a8a797 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEndpointResult.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The result of the external endpoint. Possible values are Succeeded and Failed. + */ +public final class ExternalEndpointResult extends ExpandableStringEnum { + /** + * Static value Succeeded for ExternalEndpointResult. + */ + public static final ExternalEndpointResult SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ExternalEndpointResult. + */ + public static final ExternalEndpointResult FAILED = fromString("Failed"); + + /** + * Creates a new instance of ExternalEndpointResult value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalEndpointResult() { + } + + /** + * Creates or finds a ExternalEndpointResult from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalEndpointResult. + */ + public static ExternalEndpointResult fromString(String name) { + return fromString(name, ExternalEndpointResult.class); + } + + /** + * Gets known ExternalEndpointResult values. + * + * @return known ExternalEndpointResult values. + */ + public static Collection values() { + return values(ExternalEndpointResult.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointInvocationResult.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointInvocationResult.java new file mode 100644 index 000000000000..2edf6232bc3e --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointInvocationResult.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The external evaluation endpoint invocation results. + */ +@Fluent +public final class ExternalEvaluationEndpointInvocationResult + implements JsonSerializable { + /* + * The details of the policy requiring the external endpoint invocation. + */ + private PolicyLogInfo policyInfo; + + /* + * The result of the external endpoint. Possible values are Succeeded and Failed. + */ + private ExternalEndpointResult result; + + /* + * The status message with additional details about the invocation result. + */ + private String message; + + /* + * The date and time after which a failed endpoint invocation can be retried. + */ + private OffsetDateTime retryAfter; + + /* + * The set of claims that will be attached to the policy token as an attestation for the result of the endpoint + * invocation. + */ + private Object claims; + + /* + * The expiration of the results. + */ + private OffsetDateTime expiration; + + /** + * Creates an instance of ExternalEvaluationEndpointInvocationResult class. + */ + public ExternalEvaluationEndpointInvocationResult() { + } + + /** + * Get the policyInfo property: The details of the policy requiring the external endpoint invocation. + * + * @return the policyInfo value. + */ + public PolicyLogInfo policyInfo() { + return this.policyInfo; + } + + /** + * Set the policyInfo property: The details of the policy requiring the external endpoint invocation. + * + * @param policyInfo the policyInfo value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withPolicyInfo(PolicyLogInfo policyInfo) { + this.policyInfo = policyInfo; + return this; + } + + /** + * Get the result property: The result of the external endpoint. Possible values are Succeeded and Failed. + * + * @return the result value. + */ + public ExternalEndpointResult result() { + return this.result; + } + + /** + * Set the result property: The result of the external endpoint. Possible values are Succeeded and Failed. + * + * @param result the result value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withResult(ExternalEndpointResult result) { + this.result = result; + return this; + } + + /** + * Get the message property: The status message with additional details about the invocation result. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The status message with additional details about the invocation result. + * + * @param message the message value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the retryAfter property: The date and time after which a failed endpoint invocation can be retried. + * + * @return the retryAfter value. + */ + public OffsetDateTime retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The date and time after which a failed endpoint invocation can be retried. + * + * @param retryAfter the retryAfter value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withRetryAfter(OffsetDateTime retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the claims property: The set of claims that will be attached to the policy token as an attestation for the + * result of the endpoint invocation. + * + * @return the claims value. + */ + public Object claims() { + return this.claims; + } + + /** + * Set the claims property: The set of claims that will be attached to the policy token as an attestation for the + * result of the endpoint invocation. + * + * @param claims the claims value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withClaims(Object claims) { + this.claims = claims; + return this; + } + + /** + * Get the expiration property: The expiration of the results. + * + * @return the expiration value. + */ + public OffsetDateTime expiration() { + return this.expiration; + } + + /** + * Set the expiration property: The expiration of the results. + * + * @param expiration the expiration value to set. + * @return the ExternalEvaluationEndpointInvocationResult object itself. + */ + public ExternalEvaluationEndpointInvocationResult withExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (policyInfo() != null) { + policyInfo().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("policyInfo", this.policyInfo); + jsonWriter.writeStringField("result", this.result == null ? null : this.result.toString()); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("retryAfter", + this.retryAfter == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.retryAfter)); + if (this.claims != null) { + jsonWriter.writeUntypedField("claims", this.claims); + } + jsonWriter.writeStringField("expiration", + this.expiration == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiration)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalEvaluationEndpointInvocationResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalEvaluationEndpointInvocationResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalEvaluationEndpointInvocationResult. + */ + public static ExternalEvaluationEndpointInvocationResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalEvaluationEndpointInvocationResult deserializedExternalEvaluationEndpointInvocationResult + = new ExternalEvaluationEndpointInvocationResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyInfo".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.policyInfo = PolicyLogInfo.fromJson(reader); + } else if ("result".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.result + = ExternalEndpointResult.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.message = reader.getString(); + } else if ("retryAfter".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.retryAfter = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("claims".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.claims = reader.readUntyped(); + } else if ("expiration".equals(fieldName)) { + deserializedExternalEvaluationEndpointInvocationResult.expiration = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalEvaluationEndpointInvocationResult; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointSettings.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointSettings.java new file mode 100644 index 000000000000..8533cf80182c --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEndpointSettings.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The settings of an external endpoint providing evaluation results. + */ +@Fluent +public final class ExternalEvaluationEndpointSettings implements JsonSerializable { + /* + * The kind of the endpoint. + */ + private String kind; + + /* + * The details of the endpoint. + */ + private Object details; + + /** + * Creates an instance of ExternalEvaluationEndpointSettings class. + */ + public ExternalEvaluationEndpointSettings() { + } + + /** + * Get the kind property: The kind of the endpoint. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of the endpoint. + * + * @param kind the kind value to set. + * @return the ExternalEvaluationEndpointSettings object itself. + */ + public ExternalEvaluationEndpointSettings withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the details property: The details of the endpoint. + * + * @return the details value. + */ + public Object details() { + return this.details; + } + + /** + * Set the details property: The details of the endpoint. + * + * @param details the details value to set. + * @return the ExternalEvaluationEndpointSettings object itself. + */ + public ExternalEvaluationEndpointSettings withDetails(Object details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + if (this.details != null) { + jsonWriter.writeUntypedField("details", this.details); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalEvaluationEndpointSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalEvaluationEndpointSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalEvaluationEndpointSettings. + */ + public static ExternalEvaluationEndpointSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalEvaluationEndpointSettings deserializedExternalEvaluationEndpointSettings + = new ExternalEvaluationEndpointSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedExternalEvaluationEndpointSettings.kind = reader.getString(); + } else if ("details".equals(fieldName)) { + deserializedExternalEvaluationEndpointSettings.details = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalEvaluationEndpointSettings; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEnforcementSettings.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEnforcementSettings.java new file mode 100644 index 000000000000..c994a5782e47 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExternalEvaluationEnforcementSettings.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The details of the source of external evaluation results required by the policy during enforcement evaluation. + */ +@Fluent +public final class ExternalEvaluationEnforcementSettings + implements JsonSerializable { + /* + * What to do when evaluating an enforcement policy that requires an external evaluation and the token is missing. + * Possible values are Audit and Deny and language expressions are supported. + */ + private String missingTokenAction; + + /* + * The lifespan of the endpoint invocation result after which it's no longer valid. Value is expected to follow the + * ISO 8601 duration format and language expressions are supported. + */ + private String resultLifespan; + + /* + * The settings of an external endpoint providing evaluation results. + */ + private ExternalEvaluationEndpointSettings endpointSettings; + + /* + * An array of the role definition Ids the assignment's MSI will need in order to invoke the endpoint. + */ + private List roleDefinitionIds; + + /** + * Creates an instance of ExternalEvaluationEnforcementSettings class. + */ + public ExternalEvaluationEnforcementSettings() { + } + + /** + * Get the missingTokenAction property: What to do when evaluating an enforcement policy that requires an external + * evaluation and the token is missing. Possible values are Audit and Deny and language expressions are supported. + * + * @return the missingTokenAction value. + */ + public String missingTokenAction() { + return this.missingTokenAction; + } + + /** + * Set the missingTokenAction property: What to do when evaluating an enforcement policy that requires an external + * evaluation and the token is missing. Possible values are Audit and Deny and language expressions are supported. + * + * @param missingTokenAction the missingTokenAction value to set. + * @return the ExternalEvaluationEnforcementSettings object itself. + */ + public ExternalEvaluationEnforcementSettings withMissingTokenAction(String missingTokenAction) { + this.missingTokenAction = missingTokenAction; + return this; + } + + /** + * Get the resultLifespan property: The lifespan of the endpoint invocation result after which it's no longer valid. + * Value is expected to follow the ISO 8601 duration format and language expressions are supported. + * + * @return the resultLifespan value. + */ + public String resultLifespan() { + return this.resultLifespan; + } + + /** + * Set the resultLifespan property: The lifespan of the endpoint invocation result after which it's no longer valid. + * Value is expected to follow the ISO 8601 duration format and language expressions are supported. + * + * @param resultLifespan the resultLifespan value to set. + * @return the ExternalEvaluationEnforcementSettings object itself. + */ + public ExternalEvaluationEnforcementSettings withResultLifespan(String resultLifespan) { + this.resultLifespan = resultLifespan; + return this; + } + + /** + * Get the endpointSettings property: The settings of an external endpoint providing evaluation results. + * + * @return the endpointSettings value. + */ + public ExternalEvaluationEndpointSettings endpointSettings() { + return this.endpointSettings; + } + + /** + * Set the endpointSettings property: The settings of an external endpoint providing evaluation results. + * + * @param endpointSettings the endpointSettings value to set. + * @return the ExternalEvaluationEnforcementSettings object itself. + */ + public ExternalEvaluationEnforcementSettings + withEndpointSettings(ExternalEvaluationEndpointSettings endpointSettings) { + this.endpointSettings = endpointSettings; + return this; + } + + /** + * Get the roleDefinitionIds property: An array of the role definition Ids the assignment's MSI will need in order + * to invoke the endpoint. + * + * @return the roleDefinitionIds value. + */ + public List roleDefinitionIds() { + return this.roleDefinitionIds; + } + + /** + * Set the roleDefinitionIds property: An array of the role definition Ids the assignment's MSI will need in order + * to invoke the endpoint. + * + * @param roleDefinitionIds the roleDefinitionIds value to set. + * @return the ExternalEvaluationEnforcementSettings object itself. + */ + public ExternalEvaluationEnforcementSettings withRoleDefinitionIds(List roleDefinitionIds) { + this.roleDefinitionIds = roleDefinitionIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointSettings() != null) { + endpointSettings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("missingTokenAction", this.missingTokenAction); + jsonWriter.writeStringField("resultLifespan", this.resultLifespan); + jsonWriter.writeJsonField("endpointSettings", this.endpointSettings); + jsonWriter.writeArrayField("roleDefinitionIds", this.roleDefinitionIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalEvaluationEnforcementSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalEvaluationEnforcementSettings if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalEvaluationEnforcementSettings. + */ + public static ExternalEvaluationEnforcementSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalEvaluationEnforcementSettings deserializedExternalEvaluationEnforcementSettings + = new ExternalEvaluationEnforcementSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("missingTokenAction".equals(fieldName)) { + deserializedExternalEvaluationEnforcementSettings.missingTokenAction = reader.getString(); + } else if ("resultLifespan".equals(fieldName)) { + deserializedExternalEvaluationEnforcementSettings.resultLifespan = reader.getString(); + } else if ("endpointSettings".equals(fieldName)) { + deserializedExternalEvaluationEnforcementSettings.endpointSettings + = ExternalEvaluationEndpointSettings.fromJson(reader); + } else if ("roleDefinitionIds".equals(fieldName)) { + List roleDefinitionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedExternalEvaluationEnforcementSettings.roleDefinitionIds = roleDefinitionIds; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalEvaluationEnforcementSettings; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java index f5f1d8233667..3b3191c65342 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java @@ -16,6 +16,11 @@ public final class OverrideKind extends ExpandableStringEnum { */ public static final OverrideKind POLICY_EFFECT = fromString("policyEffect"); + /** + * Static value definitionVersion for OverrideKind. + */ + public static final OverrideKind DEFINITION_VERSION = fromString("definitionVersion"); + /** * Creates a new instance of OverrideKind value. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyLogInfo.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyLogInfo.java new file mode 100644 index 000000000000..2be22da543d6 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyLogInfo.java @@ -0,0 +1,658 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The policy log info. + */ +@Fluent +public final class PolicyLogInfo implements JsonSerializable { + /* + * The policy definition Id. + */ + private String policyDefinitionId; + + /* + * The policy set definition Id. + */ + private String policySetDefinitionId; + + /* + * The policy definition instance Id inside a policy set. + */ + private String policyDefinitionReferenceId; + + /* + * The policy set definition name. + */ + private String policySetDefinitionName; + + /* + * The policy set definition display name. + */ + private String policySetDefinitionDisplayName; + + /* + * The policy set definition version. + */ + private String policySetDefinitionVersion; + + /* + * The policy set definition category. + */ + private String policySetDefinitionCategory; + + /* + * The policy definition name. + */ + private String policyDefinitionName; + + /* + * The policy definition display name. + */ + private String policyDefinitionDisplayName; + + /* + * The policy definition version. + */ + private String policyDefinitionVersion; + + /* + * The policy definition action. + */ + private String policyDefinitionEffect; + + /* + * An array of policy definition group names. + */ + private List policyDefinitionGroupNames; + + /* + * The policy assignment Id. + */ + private String policyAssignmentId; + + /* + * The policy assignment name. + */ + private String policyAssignmentName; + + /* + * The policy assignment display name. + */ + private String policyAssignmentDisplayName; + + /* + * The policy assignment version. + */ + private String policyAssignmentVersion; + + /* + * The policy assignment scope. + */ + private String policyAssignmentScope; + + /* + * The resource location. + */ + private String resourceLocation; + + /* + * The management group ancestors. + */ + private String ancestors; + + /* + * The policy compliance reason code. + */ + private String complianceReasonCode; + + /* + * An array of policy exemption Ids. + */ + private List policyExemptionIds; + + /** + * Creates an instance of PolicyLogInfo class. + */ + public PolicyLogInfo() { + } + + /** + * Get the policyDefinitionId property: The policy definition Id. + * + * @return the policyDefinitionId value. + */ + public String policyDefinitionId() { + return this.policyDefinitionId; + } + + /** + * Set the policyDefinitionId property: The policy definition Id. + * + * @param policyDefinitionId the policyDefinitionId value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionId(String policyDefinitionId) { + this.policyDefinitionId = policyDefinitionId; + return this; + } + + /** + * Get the policySetDefinitionId property: The policy set definition Id. + * + * @return the policySetDefinitionId value. + */ + public String policySetDefinitionId() { + return this.policySetDefinitionId; + } + + /** + * Set the policySetDefinitionId property: The policy set definition Id. + * + * @param policySetDefinitionId the policySetDefinitionId value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicySetDefinitionId(String policySetDefinitionId) { + this.policySetDefinitionId = policySetDefinitionId; + return this; + } + + /** + * Get the policyDefinitionReferenceId property: The policy definition instance Id inside a policy set. + * + * @return the policyDefinitionReferenceId value. + */ + public String policyDefinitionReferenceId() { + return this.policyDefinitionReferenceId; + } + + /** + * Set the policyDefinitionReferenceId property: The policy definition instance Id inside a policy set. + * + * @param policyDefinitionReferenceId the policyDefinitionReferenceId value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionReferenceId(String policyDefinitionReferenceId) { + this.policyDefinitionReferenceId = policyDefinitionReferenceId; + return this; + } + + /** + * Get the policySetDefinitionName property: The policy set definition name. + * + * @return the policySetDefinitionName value. + */ + public String policySetDefinitionName() { + return this.policySetDefinitionName; + } + + /** + * Set the policySetDefinitionName property: The policy set definition name. + * + * @param policySetDefinitionName the policySetDefinitionName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicySetDefinitionName(String policySetDefinitionName) { + this.policySetDefinitionName = policySetDefinitionName; + return this; + } + + /** + * Get the policySetDefinitionDisplayName property: The policy set definition display name. + * + * @return the policySetDefinitionDisplayName value. + */ + public String policySetDefinitionDisplayName() { + return this.policySetDefinitionDisplayName; + } + + /** + * Set the policySetDefinitionDisplayName property: The policy set definition display name. + * + * @param policySetDefinitionDisplayName the policySetDefinitionDisplayName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicySetDefinitionDisplayName(String policySetDefinitionDisplayName) { + this.policySetDefinitionDisplayName = policySetDefinitionDisplayName; + return this; + } + + /** + * Get the policySetDefinitionVersion property: The policy set definition version. + * + * @return the policySetDefinitionVersion value. + */ + public String policySetDefinitionVersion() { + return this.policySetDefinitionVersion; + } + + /** + * Set the policySetDefinitionVersion property: The policy set definition version. + * + * @param policySetDefinitionVersion the policySetDefinitionVersion value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicySetDefinitionVersion(String policySetDefinitionVersion) { + this.policySetDefinitionVersion = policySetDefinitionVersion; + return this; + } + + /** + * Get the policySetDefinitionCategory property: The policy set definition category. + * + * @return the policySetDefinitionCategory value. + */ + public String policySetDefinitionCategory() { + return this.policySetDefinitionCategory; + } + + /** + * Set the policySetDefinitionCategory property: The policy set definition category. + * + * @param policySetDefinitionCategory the policySetDefinitionCategory value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicySetDefinitionCategory(String policySetDefinitionCategory) { + this.policySetDefinitionCategory = policySetDefinitionCategory; + return this; + } + + /** + * Get the policyDefinitionName property: The policy definition name. + * + * @return the policyDefinitionName value. + */ + public String policyDefinitionName() { + return this.policyDefinitionName; + } + + /** + * Set the policyDefinitionName property: The policy definition name. + * + * @param policyDefinitionName the policyDefinitionName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionName(String policyDefinitionName) { + this.policyDefinitionName = policyDefinitionName; + return this; + } + + /** + * Get the policyDefinitionDisplayName property: The policy definition display name. + * + * @return the policyDefinitionDisplayName value. + */ + public String policyDefinitionDisplayName() { + return this.policyDefinitionDisplayName; + } + + /** + * Set the policyDefinitionDisplayName property: The policy definition display name. + * + * @param policyDefinitionDisplayName the policyDefinitionDisplayName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionDisplayName(String policyDefinitionDisplayName) { + this.policyDefinitionDisplayName = policyDefinitionDisplayName; + return this; + } + + /** + * Get the policyDefinitionVersion property: The policy definition version. + * + * @return the policyDefinitionVersion value. + */ + public String policyDefinitionVersion() { + return this.policyDefinitionVersion; + } + + /** + * Set the policyDefinitionVersion property: The policy definition version. + * + * @param policyDefinitionVersion the policyDefinitionVersion value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionVersion(String policyDefinitionVersion) { + this.policyDefinitionVersion = policyDefinitionVersion; + return this; + } + + /** + * Get the policyDefinitionEffect property: The policy definition action. + * + * @return the policyDefinitionEffect value. + */ + public String policyDefinitionEffect() { + return this.policyDefinitionEffect; + } + + /** + * Set the policyDefinitionEffect property: The policy definition action. + * + * @param policyDefinitionEffect the policyDefinitionEffect value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionEffect(String policyDefinitionEffect) { + this.policyDefinitionEffect = policyDefinitionEffect; + return this; + } + + /** + * Get the policyDefinitionGroupNames property: An array of policy definition group names. + * + * @return the policyDefinitionGroupNames value. + */ + public List policyDefinitionGroupNames() { + return this.policyDefinitionGroupNames; + } + + /** + * Set the policyDefinitionGroupNames property: An array of policy definition group names. + * + * @param policyDefinitionGroupNames the policyDefinitionGroupNames value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyDefinitionGroupNames(List policyDefinitionGroupNames) { + this.policyDefinitionGroupNames = policyDefinitionGroupNames; + return this; + } + + /** + * Get the policyAssignmentId property: The policy assignment Id. + * + * @return the policyAssignmentId value. + */ + public String policyAssignmentId() { + return this.policyAssignmentId; + } + + /** + * Set the policyAssignmentId property: The policy assignment Id. + * + * @param policyAssignmentId the policyAssignmentId value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyAssignmentId(String policyAssignmentId) { + this.policyAssignmentId = policyAssignmentId; + return this; + } + + /** + * Get the policyAssignmentName property: The policy assignment name. + * + * @return the policyAssignmentName value. + */ + public String policyAssignmentName() { + return this.policyAssignmentName; + } + + /** + * Set the policyAssignmentName property: The policy assignment name. + * + * @param policyAssignmentName the policyAssignmentName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyAssignmentName(String policyAssignmentName) { + this.policyAssignmentName = policyAssignmentName; + return this; + } + + /** + * Get the policyAssignmentDisplayName property: The policy assignment display name. + * + * @return the policyAssignmentDisplayName value. + */ + public String policyAssignmentDisplayName() { + return this.policyAssignmentDisplayName; + } + + /** + * Set the policyAssignmentDisplayName property: The policy assignment display name. + * + * @param policyAssignmentDisplayName the policyAssignmentDisplayName value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyAssignmentDisplayName(String policyAssignmentDisplayName) { + this.policyAssignmentDisplayName = policyAssignmentDisplayName; + return this; + } + + /** + * Get the policyAssignmentVersion property: The policy assignment version. + * + * @return the policyAssignmentVersion value. + */ + public String policyAssignmentVersion() { + return this.policyAssignmentVersion; + } + + /** + * Set the policyAssignmentVersion property: The policy assignment version. + * + * @param policyAssignmentVersion the policyAssignmentVersion value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyAssignmentVersion(String policyAssignmentVersion) { + this.policyAssignmentVersion = policyAssignmentVersion; + return this; + } + + /** + * Get the policyAssignmentScope property: The policy assignment scope. + * + * @return the policyAssignmentScope value. + */ + public String policyAssignmentScope() { + return this.policyAssignmentScope; + } + + /** + * Set the policyAssignmentScope property: The policy assignment scope. + * + * @param policyAssignmentScope the policyAssignmentScope value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyAssignmentScope(String policyAssignmentScope) { + this.policyAssignmentScope = policyAssignmentScope; + return this; + } + + /** + * Get the resourceLocation property: The resource location. + * + * @return the resourceLocation value. + */ + public String resourceLocation() { + return this.resourceLocation; + } + + /** + * Set the resourceLocation property: The resource location. + * + * @param resourceLocation the resourceLocation value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withResourceLocation(String resourceLocation) { + this.resourceLocation = resourceLocation; + return this; + } + + /** + * Get the ancestors property: The management group ancestors. + * + * @return the ancestors value. + */ + public String ancestors() { + return this.ancestors; + } + + /** + * Set the ancestors property: The management group ancestors. + * + * @param ancestors the ancestors value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withAncestors(String ancestors) { + this.ancestors = ancestors; + return this; + } + + /** + * Get the complianceReasonCode property: The policy compliance reason code. + * + * @return the complianceReasonCode value. + */ + public String complianceReasonCode() { + return this.complianceReasonCode; + } + + /** + * Set the complianceReasonCode property: The policy compliance reason code. + * + * @param complianceReasonCode the complianceReasonCode value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withComplianceReasonCode(String complianceReasonCode) { + this.complianceReasonCode = complianceReasonCode; + return this; + } + + /** + * Get the policyExemptionIds property: An array of policy exemption Ids. + * + * @return the policyExemptionIds value. + */ + public List policyExemptionIds() { + return this.policyExemptionIds; + } + + /** + * Set the policyExemptionIds property: An array of policy exemption Ids. + * + * @param policyExemptionIds the policyExemptionIds value to set. + * @return the PolicyLogInfo object itself. + */ + public PolicyLogInfo withPolicyExemptionIds(List policyExemptionIds) { + this.policyExemptionIds = policyExemptionIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policyDefinitionId", this.policyDefinitionId); + jsonWriter.writeStringField("policySetDefinitionId", this.policySetDefinitionId); + jsonWriter.writeStringField("policyDefinitionReferenceId", this.policyDefinitionReferenceId); + jsonWriter.writeStringField("policySetDefinitionName", this.policySetDefinitionName); + jsonWriter.writeStringField("policySetDefinitionDisplayName", this.policySetDefinitionDisplayName); + jsonWriter.writeStringField("policySetDefinitionVersion", this.policySetDefinitionVersion); + jsonWriter.writeStringField("policySetDefinitionCategory", this.policySetDefinitionCategory); + jsonWriter.writeStringField("policyDefinitionName", this.policyDefinitionName); + jsonWriter.writeStringField("policyDefinitionDisplayName", this.policyDefinitionDisplayName); + jsonWriter.writeStringField("policyDefinitionVersion", this.policyDefinitionVersion); + jsonWriter.writeStringField("policyDefinitionEffect", this.policyDefinitionEffect); + jsonWriter.writeArrayField("policyDefinitionGroupNames", this.policyDefinitionGroupNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("policyAssignmentId", this.policyAssignmentId); + jsonWriter.writeStringField("policyAssignmentName", this.policyAssignmentName); + jsonWriter.writeStringField("policyAssignmentDisplayName", this.policyAssignmentDisplayName); + jsonWriter.writeStringField("policyAssignmentVersion", this.policyAssignmentVersion); + jsonWriter.writeStringField("policyAssignmentScope", this.policyAssignmentScope); + jsonWriter.writeStringField("resourceLocation", this.resourceLocation); + jsonWriter.writeStringField("ancestors", this.ancestors); + jsonWriter.writeStringField("complianceReasonCode", this.complianceReasonCode); + jsonWriter.writeArrayField("policyExemptionIds", this.policyExemptionIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyLogInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyLogInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PolicyLogInfo. + */ + public static PolicyLogInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyLogInfo deserializedPolicyLogInfo = new PolicyLogInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyDefinitionId".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionId = reader.getString(); + } else if ("policySetDefinitionId".equals(fieldName)) { + deserializedPolicyLogInfo.policySetDefinitionId = reader.getString(); + } else if ("policyDefinitionReferenceId".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionReferenceId = reader.getString(); + } else if ("policySetDefinitionName".equals(fieldName)) { + deserializedPolicyLogInfo.policySetDefinitionName = reader.getString(); + } else if ("policySetDefinitionDisplayName".equals(fieldName)) { + deserializedPolicyLogInfo.policySetDefinitionDisplayName = reader.getString(); + } else if ("policySetDefinitionVersion".equals(fieldName)) { + deserializedPolicyLogInfo.policySetDefinitionVersion = reader.getString(); + } else if ("policySetDefinitionCategory".equals(fieldName)) { + deserializedPolicyLogInfo.policySetDefinitionCategory = reader.getString(); + } else if ("policyDefinitionName".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionName = reader.getString(); + } else if ("policyDefinitionDisplayName".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionDisplayName = reader.getString(); + } else if ("policyDefinitionVersion".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionVersion = reader.getString(); + } else if ("policyDefinitionEffect".equals(fieldName)) { + deserializedPolicyLogInfo.policyDefinitionEffect = reader.getString(); + } else if ("policyDefinitionGroupNames".equals(fieldName)) { + List policyDefinitionGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPolicyLogInfo.policyDefinitionGroupNames = policyDefinitionGroupNames; + } else if ("policyAssignmentId".equals(fieldName)) { + deserializedPolicyLogInfo.policyAssignmentId = reader.getString(); + } else if ("policyAssignmentName".equals(fieldName)) { + deserializedPolicyLogInfo.policyAssignmentName = reader.getString(); + } else if ("policyAssignmentDisplayName".equals(fieldName)) { + deserializedPolicyLogInfo.policyAssignmentDisplayName = reader.getString(); + } else if ("policyAssignmentVersion".equals(fieldName)) { + deserializedPolicyLogInfo.policyAssignmentVersion = reader.getString(); + } else if ("policyAssignmentScope".equals(fieldName)) { + deserializedPolicyLogInfo.policyAssignmentScope = reader.getString(); + } else if ("resourceLocation".equals(fieldName)) { + deserializedPolicyLogInfo.resourceLocation = reader.getString(); + } else if ("ancestors".equals(fieldName)) { + deserializedPolicyLogInfo.ancestors = reader.getString(); + } else if ("complianceReasonCode".equals(fieldName)) { + deserializedPolicyLogInfo.complianceReasonCode = reader.getString(); + } else if ("policyExemptionIds".equals(fieldName)) { + List policyExemptionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPolicyLogInfo.policyExemptionIds = policyExemptionIds; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyLogInfo; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenOperation.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenOperation.java new file mode 100644 index 000000000000..e839142345b2 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenOperation.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The resource operation to acquire a token for. + */ +@Fluent +public final class PolicyTokenOperation implements JsonSerializable { + /* + * The request URI of the resource operation. + */ + private String uri; + + /* + * The http method of the resource operation. + */ + private String httpMethod; + + /* + * The payload of the resource operation. + */ + private Object content; + + /** + * Creates an instance of PolicyTokenOperation class. + */ + public PolicyTokenOperation() { + } + + /** + * Get the uri property: The request URI of the resource operation. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The request URI of the resource operation. + * + * @param uri the uri value to set. + * @return the PolicyTokenOperation object itself. + */ + public PolicyTokenOperation withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the httpMethod property: The http method of the resource operation. + * + * @return the httpMethod value. + */ + public String httpMethod() { + return this.httpMethod; + } + + /** + * Set the httpMethod property: The http method of the resource operation. + * + * @param httpMethod the httpMethod value to set. + * @return the PolicyTokenOperation object itself. + */ + public PolicyTokenOperation withHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + + /** + * Get the content property: The payload of the resource operation. + * + * @return the content value. + */ + public Object content() { + return this.content; + } + + /** + * Set the content property: The payload of the resource operation. + * + * @param content the content value to set. + * @return the PolicyTokenOperation object itself. + */ + public PolicyTokenOperation withContent(Object content) { + this.content = content; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (uri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property uri in model PolicyTokenOperation")); + } + if (httpMethod() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property httpMethod in model PolicyTokenOperation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PolicyTokenOperation.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("httpMethod", this.httpMethod); + if (this.content != null) { + jsonWriter.writeUntypedField("content", this.content); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyTokenOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyTokenOperation if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PolicyTokenOperation. + */ + public static PolicyTokenOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyTokenOperation deserializedPolicyTokenOperation = new PolicyTokenOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedPolicyTokenOperation.uri = reader.getString(); + } else if ("httpMethod".equals(fieldName)) { + deserializedPolicyTokenOperation.httpMethod = reader.getString(); + } else if ("content".equals(fieldName)) { + deserializedPolicyTokenOperation.content = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyTokenOperation; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenRequest.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenRequest.java new file mode 100644 index 000000000000..2c9be82bbafd --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenRequest.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The policy token request properties. + */ +@Fluent +public final class PolicyTokenRequest implements JsonSerializable { + /* + * The resource operation to acquire a token for. + */ + private PolicyTokenOperation operation; + + /* + * The change reference. + */ + private String changeReference; + + /** + * Creates an instance of PolicyTokenRequest class. + */ + public PolicyTokenRequest() { + } + + /** + * Get the operation property: The resource operation to acquire a token for. + * + * @return the operation value. + */ + public PolicyTokenOperation operation() { + return this.operation; + } + + /** + * Set the operation property: The resource operation to acquire a token for. + * + * @param operation the operation value to set. + * @return the PolicyTokenRequest object itself. + */ + public PolicyTokenRequest withOperation(PolicyTokenOperation operation) { + this.operation = operation; + return this; + } + + /** + * Get the changeReference property: The change reference. + * + * @return the changeReference value. + */ + public String changeReference() { + return this.changeReference; + } + + /** + * Set the changeReference property: The change reference. + * + * @param changeReference the changeReference value to set. + * @return the PolicyTokenRequest object itself. + */ + public PolicyTokenRequest withChangeReference(String changeReference) { + this.changeReference = changeReference; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property operation in model PolicyTokenRequest")); + } else { + operation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PolicyTokenRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("operation", this.operation); + jsonWriter.writeStringField("changeReference", this.changeReference); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyTokenRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyTokenRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PolicyTokenRequest. + */ + public static PolicyTokenRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyTokenRequest deserializedPolicyTokenRequest = new PolicyTokenRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operation".equals(fieldName)) { + deserializedPolicyTokenRequest.operation = PolicyTokenOperation.fromJson(reader); + } else if ("changeReference".equals(fieldName)) { + deserializedPolicyTokenRequest.changeReference = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyTokenRequest; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenResult.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenResult.java new file mode 100644 index 000000000000..712a111ba9be --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyTokenResult.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The result of the completed token acquisition operation. Possible values are Succeeded and Failed. + */ +public final class PolicyTokenResult extends ExpandableStringEnum { + /** + * Static value Succeeded for PolicyTokenResult. + */ + public static final PolicyTokenResult SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PolicyTokenResult. + */ + public static final PolicyTokenResult FAILED = fromString("Failed"); + + /** + * Creates a new instance of PolicyTokenResult value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyTokenResult() { + } + + /** + * Creates or finds a PolicyTokenResult from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyTokenResult. + */ + public static PolicyTokenResult fromString(String name) { + return fromString(name, PolicyTokenResult.class); + } + + /** + * Gets known PolicyTokenResult values. + * + * @return known PolicyTokenResult values. + */ + public static Collection values() { + return values(PolicyTokenResult.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java index cd8618c87ac2..0e9c0e3c40a9 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java @@ -15,7 +15,7 @@ * The resource Id model. */ @Immutable -public class ResourceReference implements JsonSerializable { +public final class ResourceReference implements JsonSerializable { /* * The fully qualified Azure resource ID. */ diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java index b6028ce2622f..d8c7c84a028b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java similarity index 96% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java index aee8bf6a1239..1da93ff14a92 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java @@ -2,15 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources.fluent.models; +package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; -import com.azure.resourcemanager.resources.models.WhatIfChange; import java.io.IOException; import java.util.List; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/package-info.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/package-info.java index 793e8eedf738..e599cf81653b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the data models for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * ResourceManagement Client. */ package com.azure.resourcemanager.resources.models; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/package-info.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/package-info.java index 9861e006bf8b..c8539836458c 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the classes for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * ResourceManagement Client. */ package com.azure.resourcemanager.resources; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json index d5591bd81fcf..3302800cc2b5 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json +++ b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService"],["com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService"],["com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService"],["com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService"],["com.azure.resourcemanager.resources.implementation.TagOperationsClientImpl$TagOperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService"],["com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService"],["com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService"],["com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService"],["com.azure.resourcemanager.resources.implementation.TagsOperationsClientImpl$TagsOperationsService"]] \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json index 233b886f0659..356f6aced4e4 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json +++ b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.resources.implementation.DataPolicyManifestsClientImpl$DataPolicyManifestsService"],["com.azure.resourcemanager.resources.implementation.PolicyAssignmentsClientImpl$PolicyAssignmentsService"],["com.azure.resourcemanager.resources.implementation.PolicyDefinitionVersionsClientImpl$PolicyDefinitionVersionsService"],["com.azure.resourcemanager.resources.implementation.PolicyDefinitionsClientImpl$PolicyDefinitionsService"],["com.azure.resourcemanager.resources.implementation.PolicyExemptionsClientImpl$PolicyExemptionsService"],["com.azure.resourcemanager.resources.implementation.PolicySetDefinitionVersionsClientImpl$PolicySetDefinitionVersionsService"],["com.azure.resourcemanager.resources.implementation.PolicySetDefinitionsClientImpl$PolicySetDefinitionsService"]] \ No newline at end of file +[["com.azure.resourcemanager.resources.implementation.DataPolicyManifestsClientImpl$DataPolicyManifestsService"],["com.azure.resourcemanager.resources.implementation.PolicyAssignmentsClientImpl$PolicyAssignmentsService"],["com.azure.resourcemanager.resources.implementation.PolicyDefinitionVersionsClientImpl$PolicyDefinitionVersionsService"],["com.azure.resourcemanager.resources.implementation.PolicyDefinitionsClientImpl$PolicyDefinitionsService"],["com.azure.resourcemanager.resources.implementation.PolicyExemptionsClientImpl$PolicyExemptionsService"],["com.azure.resourcemanager.resources.implementation.PolicySetDefinitionVersionsClientImpl$PolicySetDefinitionVersionsService"],["com.azure.resourcemanager.resources.implementation.PolicySetDefinitionsClientImpl$PolicySetDefinitionsService"],["com.azure.resourcemanager.resources.implementation.PolicyTokensClientImpl$PolicyTokensService"]] \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties b/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties index 69bf03d5ec35..defbd48204e4 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties +++ b/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties @@ -1,26 +1 @@ version=${project.version} -# Premium libraries whose versions are eagerly loaded at AzureServiceClient class initialization. -# This list is maintained to ensure that premium management libraries are initialized early for diagnostics and telemetry. -premium-libraries=azure-resourcemanager-authorization,\ - azure-resourcemanager-cdn,\ - azure-resourcemanager-containerinstance,\ - azure-resourcemanager-appplatform,\ - azure-resourcemanager-appservice,\ - azure-resourcemanager-compute,\ - azure-resourcemanager-containerregistry,\ - azure-resourcemanager-containerservice,\ - azure-resourcemanager-cosmos,\ - azure-resourcemanager-dns,\ - azure-resourcemanager-eventhubs,\ - azure-resourcemanager-keyvault,\ - azure-resourcemanager-monitor,\ - azure-resourcemanager-msi,\ - azure-resourcemanager-network,\ - azure-resourcemanager-privatedns,\ - azure-resourcemanager-redis,\ - azure-resourcemanager-resources,\ - azure-resourcemanager-search,\ - azure-resourcemanager-servicebus,\ - azure-resourcemanager-sql,\ - azure-resourcemanager-storage,\ - azure-resourcemanager-trafficmanager \ No newline at end of file From c2734adf77c21d12d411b8f5ffc7ffa0d259f25e Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:31:01 +0800 Subject: [PATCH 07/16] changelog in azure-resourcemanager --- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 76a092b339e0..b0c7e98dd92a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -10,6 +10,10 @@ ### Other Changes +### azure-resourcemanager-resources + +- Updated `api-version` of policy to `2025-03-01`. + ## 2.59.0 (2026-01-30) ### azure-resourcemanager-redis From f7d16ab560bbc06ad8933f38c4057bfa858e3e07 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:40:50 +0800 Subject: [PATCH 08/16] regen on deployments --- .../models/WhatIfOperationProperties.java | 4 +- .../models/WhatIfOperationResultInner.java | 88 ++++++++++++++----- .../resources/models/ResourceReference.java | 16 ++-- .../models/UserAssignedIdentity.java | 15 ++-- 4 files changed, 87 insertions(+), 36 deletions(-) rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{ => fluent}/models/WhatIfOperationProperties.java (96%) diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java similarity index 96% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java index 1da93ff14a92..aee8bf6a1239 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java @@ -2,13 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources.models; +package com.azure.resourcemanager.resources.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; +import com.azure.resourcemanager.resources.models.WhatIfChange; import java.io.IOException; import java.util.List; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java index c1a5f348155a..583df84a433c 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java @@ -10,8 +10,10 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.WhatIfOperationProperties; +import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; +import com.azure.resourcemanager.resources.models.WhatIfChange; import java.io.IOException; +import java.util.List; /** * Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of @@ -27,7 +29,7 @@ public final class WhatIfOperationResultInner implements JsonSerializable changes() { + return this.innerProperties() == null ? null : this.innerProperties().changes(); + } + + /** + * Set the changes property: List of resource changes predicted by What-If operation. + * + * @param changes the changes value to set. + * @return the WhatIfOperationResultInner object itself. + */ + public WhatIfOperationResultInner withChanges(List changes) { + if (this.innerProperties() == null) { + this.innerProperties = new WhatIfOperationProperties(); + } + this.innerProperties().withChanges(changes); + return this; + } + + /** + * Get the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @return the potentialChanges value. + */ + public List potentialChanges() { + return this.innerProperties() == null ? null : this.innerProperties().potentialChanges(); + } + + /** + * Set the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @param potentialChanges the potentialChanges value to set. + * @return the WhatIfOperationResultInner object itself. + */ + public WhatIfOperationResultInner withPotentialChanges(List potentialChanges) { + if (this.innerProperties() == null) { + this.innerProperties = new WhatIfOperationProperties(); + } + this.innerProperties().withPotentialChanges(potentialChanges); + return this; + } + + /** + * Get the diagnostics property: List of resource diagnostics detected by What-If operation. + * + * @return the diagnostics value. + */ + public List diagnostics() { + return this.innerProperties() == null ? null : this.innerProperties().diagnostics(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (properties() != null) { - properties().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } @@ -118,7 +164,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -141,7 +187,7 @@ public static WhatIfOperationResultInner fromJson(JsonReader jsonReader) throws if ("status".equals(fieldName)) { deserializedWhatIfOperationResultInner.status = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedWhatIfOperationResultInner.properties = WhatIfOperationProperties.fromJson(reader); + deserializedWhatIfOperationResultInner.innerProperties = WhatIfOperationProperties.fromJson(reader); } else if ("error".equals(fieldName)) { deserializedWhatIfOperationResultInner.error = ManagementError.fromJson(reader); } else { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java index 0e9c0e3c40a9..f6c45cf75813 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java @@ -15,7 +15,7 @@ * The resource Id model. */ @Immutable -public final class ResourceReference implements JsonSerializable { +public class ResourceReference implements JsonSerializable { /* * The fully qualified Azure resource ID. */ @@ -49,7 +49,7 @@ public ResourceReference() { /** * Get the id property: The fully qualified Azure resource ID. - * + * * @return the id value. */ public String id() { @@ -58,7 +58,7 @@ public String id() { /** * Get the extension property: The extension the resource was deployed with. - * + * * @return the extension value. */ public DeploymentExtensionDefinition extension() { @@ -67,7 +67,7 @@ public DeploymentExtensionDefinition extension() { /** * Get the resourceType property: The resource type. - * + * * @return the resourceType value. */ public String resourceType() { @@ -76,7 +76,7 @@ public String resourceType() { /** * Get the identifiers property: The extensible resource identifiers. - * + * * @return the identifiers value. */ public Object identifiers() { @@ -85,7 +85,7 @@ public Object identifiers() { /** * Get the apiVersion property: The API version the resource was deployed with. - * + * * @return the apiVersion value. */ public String apiVersion() { @@ -94,7 +94,7 @@ public String apiVersion() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,7 +114,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ResourceReference from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ResourceReference if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java index d8c7c84a028b..b6028ce2622f 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.UUID; /** * User assigned identity properties. @@ -19,12 +20,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); + deserializedUserAssignedIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else { reader.skipChildren(); } From be2d49bda1babac1ce0869d1821230db9db94b63 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 11:58:12 +0800 Subject: [PATCH 09/16] regen --- sdk/resourcemanager/api-specs.json | 2 +- ...erationsCreateOrUpdateAtScopeSamples.java} | 8 +- ...=> TagOperationsDeleteAtScopeSamples.java} | 8 +- ...va => TagOperationsGetAtScopeSamples.java} | 8 +- ...=> TagOperationsUpdateAtScopeSamples.java} | 8 +- .../fluent/ResourceManagementClient.java | 6 +- ...nsClient.java => TagOperationsClient.java} | 4 +- .../models/WhatIfOperationResultInner.java | 88 +++++-------------- .../ResourceManagementClientImpl.java | 16 ++-- ...Impl.java => TagOperationsClientImpl.java} | 22 ++--- .../models/UserAssignedIdentity.java | 15 ++-- .../models/WhatIfOperationProperties.java | 4 +- .../proxy-config.json | 2 +- 13 files changed, 70 insertions(+), 121 deletions(-) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagsOperationCreateOrUpdateAtScopeSamples.java => TagOperationsCreateOrUpdateAtScopeSamples.java} (93%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagsOperationDeleteAtScopeSamples.java => TagOperationsDeleteAtScopeSamples.java} (90%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagsOperationGetAtScopeSamples.java => TagOperationsGetAtScopeSamples.java} (91%) rename sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/{TagsOperationUpdateAtScopeSamples.java => TagOperationsUpdateAtScopeSamples.java} (94%) rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/{TagsOperationsClient.java => TagOperationsClient.java} (99%) rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/{TagsOperationsClientImpl.java => TagOperationsClientImpl.java} (99%) rename sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/{fluent => }/models/WhatIfOperationProperties.java (96%) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index cd3c6837f88d..cd2080a80cf6 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -141,7 +141,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Resources/resources/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-resources-2025-04 --enable-sync-stack=false", + "args": "--tag=package-resources-2025-04 --enable-sync-stack=false --rename-operation-group=Tags:TagOperations", "note": "Remove `final` from `ResourceReference`, as it is used as superclass in deploymentstacks." }, "deployments": { diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java similarity index 93% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java index 307b43673fdb..0235b8869fd4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationCreateOrUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java @@ -10,9 +10,9 @@ import java.util.Map; /** - * Samples for TagsOperation CreateOrUpdateAtScope. + * Samples for TagOperations CreateOrUpdateAtScope. */ -public final class TagsOperationCreateOrUpdateAtScopeSamples { +public final class TagOperationsCreateOrUpdateAtScopeSamples { /* * x-ms-original-file: * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/PutTagsResource @@ -27,7 +27,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .createOrUpdateAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", new TagsResourceInner().withProperties( @@ -49,7 +49,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .createOrUpdateAtScope("subscriptions/00000000-0000-0000-0000-000000000000", new TagsResourceInner().withProperties( new Tags().withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))), diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java similarity index 90% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java index b3199eade13c..8c3067516ae3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationDeleteAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.resources.generated; /** - * Samples for TagsOperation DeleteAtScope. + * Samples for TagOperations DeleteAtScope. */ -public final class TagsOperationDeleteAtScopeSamples { +public final class TagOperationsDeleteAtScopeSamples { /* * x-ms-original-file: * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ @@ -22,7 +22,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .deleteAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", com.azure.core.util.Context.NONE); @@ -42,7 +42,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .deleteAtScope("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java similarity index 91% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java index 3bffc85fe34d..548b88354bf5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationGetAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.resources.generated; /** - * Samples for TagsOperation GetAtScope. + * Samples for TagOperations GetAtScope. */ -public final class TagsOperationGetAtScopeSamples { +public final class TagOperationsGetAtScopeSamples { /* * x-ms-original-file: * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/GetTagsResource @@ -22,7 +22,7 @@ public static void getTagsOnAResource(com.azure.resourcemanager.AzureResourceMan azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .getAtScopeWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", com.azure.core.util.Context.NONE); @@ -42,7 +42,7 @@ public static void getTagsOnASubscription(com.azure.resourcemanager.AzureResourc azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .getAtScopeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java similarity index 94% rename from sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java rename to sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java index 42b9ff7adf0e..15bffcd3153e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagsOperationUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java @@ -11,9 +11,9 @@ import java.util.Map; /** - * Samples for TagsOperation UpdateAtScope. + * Samples for TagOperations UpdateAtScope. */ -public final class TagsOperationUpdateAtScopeSamples { +public final class TagOperationsUpdateAtScopeSamples { /* * x-ms-original-file: * specification/resources/resource-manager/Microsoft.Resources/resources/stable/2025-04-01/examples/ @@ -28,7 +28,7 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .updateAtScope( "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm", new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE) @@ -51,7 +51,7 @@ public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureReso azure.genericResources() .manager() .serviceClient() - .getTagsOperations() + .getTagOperations() .updateAtScope("subscriptions/00000000-0000-0000-0000-000000000000", new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE) .withProperties(new Tags() diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java index 6791eac19572..9cee3c904b92 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourceManagementClient.java @@ -82,9 +82,9 @@ public interface ResourceManagementClient { ResourceGroupsClient getResourceGroups(); /** - * Gets the TagsOperationsClient object to access its operations. + * Gets the TagOperationsClient object to access its operations. * - * @return the TagsOperationsClient object. + * @return the TagOperationsClient object. */ - TagsOperationsClient getTagsOperations(); + TagOperationsClient getTagOperations(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java similarity index 99% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java index 5fd089e7ac9f..54be725b5782 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagsOperationsClient.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java @@ -22,9 +22,9 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TagsOperationsClient. + * An instance of this class provides access to all the operations defined in TagOperationsClient. */ -public interface TagsOperationsClient { +public interface TagOperationsClient { /** * Deletes a predefined tag value for a predefined tag name. * diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java index 583df84a433c..c1a5f348155a 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java @@ -10,10 +10,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; -import com.azure.resourcemanager.resources.models.WhatIfChange; +import com.azure.resourcemanager.resources.models.WhatIfOperationProperties; import java.io.IOException; -import java.util.List; /** * Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of @@ -29,7 +27,7 @@ public final class WhatIfOperationResultInner implements JsonSerializable changes() { - return this.innerProperties() == null ? null : this.innerProperties().changes(); - } - - /** - * Set the changes property: List of resource changes predicted by What-If operation. - * - * @param changes the changes value to set. - * @return the WhatIfOperationResultInner object itself. - */ - public WhatIfOperationResultInner withChanges(List changes) { - if (this.innerProperties() == null) { - this.innerProperties = new WhatIfOperationProperties(); - } - this.innerProperties().withChanges(changes); - return this; - } - - /** - * Get the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @return the potentialChanges value. - */ - public List potentialChanges() { - return this.innerProperties() == null ? null : this.innerProperties().potentialChanges(); - } - - /** - * Set the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @param potentialChanges the potentialChanges value to set. - * @return the WhatIfOperationResultInner object itself. - */ - public WhatIfOperationResultInner withPotentialChanges(List potentialChanges) { - if (this.innerProperties() == null) { - this.innerProperties = new WhatIfOperationProperties(); - } - this.innerProperties().withPotentialChanges(potentialChanges); - return this; - } - - /** - * Get the diagnostics property: List of resource diagnostics detected by What-If operation. - * - * @return the diagnostics value. - */ - public List diagnostics() { - return this.innerProperties() == null ? null : this.innerProperties().diagnostics(); - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } @@ -164,7 +118,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -187,7 +141,7 @@ public static WhatIfOperationResultInner fromJson(JsonReader jsonReader) throws if ("status".equals(fieldName)) { deserializedWhatIfOperationResultInner.status = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedWhatIfOperationResultInner.innerProperties = WhatIfOperationProperties.fromJson(reader); + deserializedWhatIfOperationResultInner.properties = WhatIfOperationProperties.fromJson(reader); } else if ("error".equals(fieldName)) { deserializedWhatIfOperationResultInner.error = ManagementError.fromJson(reader); } else { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java index 8d7e872f1ef5..72b000b66097 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java @@ -14,7 +14,7 @@ import com.azure.resourcemanager.resources.fluent.ResourceGroupsClient; import com.azure.resourcemanager.resources.fluent.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.ResourcesClient; -import com.azure.resourcemanager.resources.fluent.TagsOperationsClient; +import com.azure.resourcemanager.resources.fluent.TagOperationsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -178,17 +178,17 @@ public ResourceGroupsClient getResourceGroups() { } /** - * The TagsOperationsClient object to access its operations. + * The TagOperationsClient object to access its operations. */ - private final TagsOperationsClient tagsOperations; + private final TagOperationsClient tagOperations; /** - * Gets the TagsOperationsClient object to access its operations. + * Gets the TagOperationsClient object to access its operations. * - * @return the TagsOperationsClient object. + * @return the TagOperationsClient object. */ - public TagsOperationsClient getTagsOperations() { - return this.tagsOperations; + public TagOperationsClient getTagOperations() { + return this.tagOperations; } /** @@ -215,6 +215,6 @@ public TagsOperationsClient getTagsOperations() { this.providerResourceTypes = new ProviderResourceTypesClientImpl(this); this.resources = new ResourcesClientImpl(this); this.resourceGroups = new ResourceGroupsClientImpl(this); - this.tagsOperations = new TagsOperationsClientImpl(this); + this.tagOperations = new TagOperationsClientImpl(this); } } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java similarity index 99% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java index 07e0fd0f8e9e..efd8ffe269fd 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagsOperationsClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java @@ -32,7 +32,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.resources.fluent.TagsOperationsClient; +import com.azure.resourcemanager.resources.fluent.TagOperationsClient; import com.azure.resourcemanager.resources.fluent.models.TagDetailsInner; import com.azure.resourcemanager.resources.fluent.models.TagValueInner; import com.azure.resourcemanager.resources.fluent.models.TagsResourceInner; @@ -43,13 +43,13 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TagsOperationsClient. + * An instance of this class provides access to all the operations defined in TagOperationsClient. */ -public final class TagsOperationsClientImpl implements TagsOperationsClient { +public final class TagOperationsClientImpl implements TagOperationsClient { /** * The proxy service used to perform REST calls. */ - private final TagsOperationsService service; + private final TagOperationsService service; /** * The service client containing this operation class. @@ -57,23 +57,23 @@ public final class TagsOperationsClientImpl implements TagsOperationsClient { private final ResourceManagementClientImpl client; /** - * Initializes an instance of TagsOperationsClientImpl. + * Initializes an instance of TagOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - TagsOperationsClientImpl(ResourceManagementClientImpl client) { + TagOperationsClientImpl(ResourceManagementClientImpl client) { this.service - = RestProxy.create(TagsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + = RestProxy.create(TagOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ResourceManagementClientTagsOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ResourceManagementClientTagOperations to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ResourceManagementClientTagsOperations") - public interface TagsOperationsService { + @ServiceInterface(name = "ResourceManagementClientTagOperations") + public interface TagOperationsService { @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") @ExpectedResponses({ 200, 204 }) diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java index b6028ce2622f..d8c7c84a028b 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java similarity index 96% rename from sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java rename to sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java index aee8bf6a1239..1da93ff14a92 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java @@ -2,15 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.resources.fluent.models; +package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; -import com.azure.resourcemanager.resources.models.WhatIfChange; import java.io.IOException; import java.util.List; diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json index 3302800cc2b5..d5591bd81fcf 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json +++ b/sdk/resources/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService"],["com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService"],["com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService"],["com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService"],["com.azure.resourcemanager.resources.implementation.TagsOperationsClientImpl$TagsOperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService"],["com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService"],["com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService"],["com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService"],["com.azure.resourcemanager.resources.implementation.TagOperationsClientImpl$TagOperationsService"]] \ No newline at end of file From 6a52d2a9c38031e78f51d201abfb4cb91104a248 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 12:07:49 +0800 Subject: [PATCH 10/16] fix changelog --- sdk/resources/azure-resourcemanager-resources/CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 169443d146b3..7e2a6c934200 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -2,12 +2,6 @@ ## 2.54.0 (2026-02-06) -### Features Added - -### Breaking Changes - -### Bugs Fixed - ### Other Changes - Updated `api-version` of policy to `2025-03-01`. From 493ad65fcd670b58d33fb615fd85c43bc4b22928 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 12:18:51 +0800 Subject: [PATCH 11/16] missed file --- .../models/WhatIfOperationProperties.java | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java new file mode 100644 index 000000000000..aee8bf6a1239 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resources.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; +import com.azure.resourcemanager.resources.models.WhatIfChange; +import java.io.IOException; +import java.util.List; + +/** + * Deployment operation properties. + */ +@Fluent +public final class WhatIfOperationProperties implements JsonSerializable { + /* + * List of resource changes predicted by What-If operation. + */ + private List changes; + + /* + * List of resource changes predicted by What-If operation. + */ + private List potentialChanges; + + /* + * List of resource diagnostics detected by What-If operation. + */ + private List diagnostics; + + /** + * Creates an instance of WhatIfOperationProperties class. + */ + public WhatIfOperationProperties() { + } + + /** + * Get the changes property: List of resource changes predicted by What-If operation. + * + * @return the changes value. + */ + public List changes() { + return this.changes; + } + + /** + * Set the changes property: List of resource changes predicted by What-If operation. + * + * @param changes the changes value to set. + * @return the WhatIfOperationProperties object itself. + */ + public WhatIfOperationProperties withChanges(List changes) { + this.changes = changes; + return this; + } + + /** + * Get the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @return the potentialChanges value. + */ + public List potentialChanges() { + return this.potentialChanges; + } + + /** + * Set the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @param potentialChanges the potentialChanges value to set. + * @return the WhatIfOperationProperties object itself. + */ + public WhatIfOperationProperties withPotentialChanges(List potentialChanges) { + this.potentialChanges = potentialChanges; + return this; + } + + /** + * Get the diagnostics property: List of resource diagnostics detected by What-If operation. + * + * @return the diagnostics value. + */ + public List diagnostics() { + return this.diagnostics; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (changes() != null) { + changes().forEach(e -> e.validate()); + } + if (potentialChanges() != null) { + potentialChanges().forEach(e -> e.validate()); + } + if (diagnostics() != null) { + diagnostics().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("changes", this.changes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("potentialChanges", this.potentialChanges, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WhatIfOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WhatIfOperationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the WhatIfOperationProperties. + */ + public static WhatIfOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WhatIfOperationProperties deserializedWhatIfOperationProperties = new WhatIfOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("changes".equals(fieldName)) { + List changes = reader.readArray(reader1 -> WhatIfChange.fromJson(reader1)); + deserializedWhatIfOperationProperties.changes = changes; + } else if ("potentialChanges".equals(fieldName)) { + List potentialChanges = reader.readArray(reader1 -> WhatIfChange.fromJson(reader1)); + deserializedWhatIfOperationProperties.potentialChanges = potentialChanges; + } else if ("diagnostics".equals(fieldName)) { + List diagnostics + = reader.readArray(reader1 -> DeploymentDiagnosticsDefinition.fromJson(reader1)); + deserializedWhatIfOperationProperties.diagnostics = diagnostics; + } else { + reader.skipChildren(); + } + } + + return deserializedWhatIfOperationProperties; + }); + } +} From 3943293ef20ac9602eb54630ab9dec50b3113e8a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 12:23:04 +0800 Subject: [PATCH 12/16] fix flatten --- sdk/resourcemanager/api-specs.json | 2 +- .../models/WhatIfOperationResultInner.java | 88 +++++++--- .../models/UserAssignedIdentity.java | 15 +- .../models/WhatIfOperationProperties.java | 152 ------------------ 4 files changed, 77 insertions(+), 180 deletions(-) delete mode 100644 sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index cd2080a80cf6..d6a0a432830b 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -148,7 +148,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Resources/deployments/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-2025-04 --title=DeploymentsManagementClient --add-inner=Deployment,Provider --metadata-suffix=deployments --enable-sync-stack=false" + "args": "--tag=package-2025-04 --title=DeploymentsManagementClient --uuid-as-string=false --client-flattened-annotation-target=none --add-inner=Deployment,Provider --metadata-suffix=deployments --enable-sync-stack=false" }, "deploymentstacks": { "dir": "../resources/azure-resourcemanager-resources", diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java index c1a5f348155a..583df84a433c 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java @@ -10,8 +10,10 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.models.WhatIfOperationProperties; +import com.azure.resourcemanager.resources.models.DeploymentDiagnosticsDefinition; +import com.azure.resourcemanager.resources.models.WhatIfChange; import java.io.IOException; +import java.util.List; /** * Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of @@ -27,7 +29,7 @@ public final class WhatIfOperationResultInner implements JsonSerializable changes() { + return this.innerProperties() == null ? null : this.innerProperties().changes(); + } + + /** + * Set the changes property: List of resource changes predicted by What-If operation. + * + * @param changes the changes value to set. + * @return the WhatIfOperationResultInner object itself. + */ + public WhatIfOperationResultInner withChanges(List changes) { + if (this.innerProperties() == null) { + this.innerProperties = new WhatIfOperationProperties(); + } + this.innerProperties().withChanges(changes); + return this; + } + + /** + * Get the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @return the potentialChanges value. + */ + public List potentialChanges() { + return this.innerProperties() == null ? null : this.innerProperties().potentialChanges(); + } + + /** + * Set the potentialChanges property: List of resource changes predicted by What-If operation. + * + * @param potentialChanges the potentialChanges value to set. + * @return the WhatIfOperationResultInner object itself. + */ + public WhatIfOperationResultInner withPotentialChanges(List potentialChanges) { + if (this.innerProperties() == null) { + this.innerProperties = new WhatIfOperationProperties(); + } + this.innerProperties().withPotentialChanges(potentialChanges); + return this; + } + + /** + * Get the diagnostics property: List of resource diagnostics detected by What-If operation. + * + * @return the diagnostics value. + */ + public List diagnostics() { + return this.innerProperties() == null ? null : this.innerProperties().diagnostics(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (properties() != null) { - properties().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } @@ -118,7 +164,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -141,7 +187,7 @@ public static WhatIfOperationResultInner fromJson(JsonReader jsonReader) throws if ("status".equals(fieldName)) { deserializedWhatIfOperationResultInner.status = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedWhatIfOperationResultInner.properties = WhatIfOperationProperties.fromJson(reader); + deserializedWhatIfOperationResultInner.innerProperties = WhatIfOperationProperties.fromJson(reader); } else if ("error".equals(fieldName)) { deserializedWhatIfOperationResultInner.error = ManagementError.fromJson(reader); } else { diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java index d8c7c84a028b..b6028ce2622f 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java +++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UserAssignedIdentity.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.UUID; /** * User assigned identity properties. @@ -19,12 +20,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); + deserializedUserAssignedIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java deleted file mode 100644 index 1da93ff14a92..000000000000 --- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfOperationProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Deployment operation properties. - */ -@Fluent -public final class WhatIfOperationProperties implements JsonSerializable { - /* - * List of resource changes predicted by What-If operation. - */ - private List changes; - - /* - * List of resource changes predicted by What-If operation. - */ - private List potentialChanges; - - /* - * List of resource diagnostics detected by What-If operation. - */ - private List diagnostics; - - /** - * Creates an instance of WhatIfOperationProperties class. - */ - public WhatIfOperationProperties() { - } - - /** - * Get the changes property: List of resource changes predicted by What-If operation. - * - * @return the changes value. - */ - public List changes() { - return this.changes; - } - - /** - * Set the changes property: List of resource changes predicted by What-If operation. - * - * @param changes the changes value to set. - * @return the WhatIfOperationProperties object itself. - */ - public WhatIfOperationProperties withChanges(List changes) { - this.changes = changes; - return this; - } - - /** - * Get the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @return the potentialChanges value. - */ - public List potentialChanges() { - return this.potentialChanges; - } - - /** - * Set the potentialChanges property: List of resource changes predicted by What-If operation. - * - * @param potentialChanges the potentialChanges value to set. - * @return the WhatIfOperationProperties object itself. - */ - public WhatIfOperationProperties withPotentialChanges(List potentialChanges) { - this.potentialChanges = potentialChanges; - return this; - } - - /** - * Get the diagnostics property: List of resource diagnostics detected by What-If operation. - * - * @return the diagnostics value. - */ - public List diagnostics() { - return this.diagnostics; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (changes() != null) { - changes().forEach(e -> e.validate()); - } - if (potentialChanges() != null) { - potentialChanges().forEach(e -> e.validate()); - } - if (diagnostics() != null) { - diagnostics().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("changes", this.changes, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("potentialChanges", this.potentialChanges, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WhatIfOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WhatIfOperationProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WhatIfOperationProperties. - */ - public static WhatIfOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WhatIfOperationProperties deserializedWhatIfOperationProperties = new WhatIfOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("changes".equals(fieldName)) { - List changes = reader.readArray(reader1 -> WhatIfChange.fromJson(reader1)); - deserializedWhatIfOperationProperties.changes = changes; - } else if ("potentialChanges".equals(fieldName)) { - List potentialChanges = reader.readArray(reader1 -> WhatIfChange.fromJson(reader1)); - deserializedWhatIfOperationProperties.potentialChanges = potentialChanges; - } else if ("diagnostics".equals(fieldName)) { - List diagnostics - = reader.readArray(reader1 -> DeploymentDiagnosticsDefinition.fromJson(reader1)); - deserializedWhatIfOperationProperties.diagnostics = diagnostics; - } else { - reader.skipChildren(); - } - } - - return deserializedWhatIfOperationProperties; - }); - } -} From a3800083c1880fa9736b863fc4b54d7efae0ca71 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 12:32:08 +0800 Subject: [PATCH 13/16] nit --- sdk/resourcemanager/api-specs.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index d6a0a432830b..02efe7040d1d 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -27,7 +27,7 @@ "dir": "../compute/azure-resourcemanager-compute", "source": "specification/compute/resource-manager/readme.md", "package": "com.azure.resourcemanager.compute", - "args": "--tag=package-2025-03-03 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile --enable-sync-stack=false" + "args": "--tag=package-2025-03-03 --modelerfour.lenient-model-deduplication --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile --enable-sync-stack=false" }, "containerinstance": { "dir": "../containerinstance/azure-resourcemanager-containerinstance", @@ -39,13 +39,13 @@ "dir": "../containerregistry/azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2025-11 --modelerfour.lenient-model-deduplication=true --enable-sync-stack=false" + "args": "--tag=package-2025-11 --modelerfour.lenient-model-deduplication --enable-sync-stack=false" }, "containerregistrytasks": { "dir": "../containerregistry/azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2019-06-preview --title=ContainerRegistryTasksManagementClient --rename-operation-group:Registries:RegistryTasks --rename-model=DockerBuildStep:DockerTaskStep --modelerfour.lenient-model-deduplication=true --metadata-suffix=registrytasks --enable-sync-stack=false", + "args": "--tag=package-2019-06-preview --title=ContainerRegistryTasksManagementClient --rename-operation-group:Registries:RegistryTasks --rename-model=DockerBuildStep:DockerTaskStep --modelerfour.lenient-model-deduplication --metadata-suffix=registrytasks --enable-sync-stack=false", "note": "Use commit 09695f5a97dfcf201766ea2f2e7e3b53aec49144 for Swagger before TypeSpec migration" }, "containerservice": { @@ -102,7 +102,7 @@ "dir": "../monitor/azure-resourcemanager-monitor", "source": "specification/monitor/resource-manager/readme.md", "package": "com.azure.resourcemanager.monitor", - "args": "--tag=package-composite-v1-java --modelerfour.lenient-model-deduplication=true --add-inner=AutoscaleProfile,ScaleRule,LocalizableString,DiagnosticSettingsCategoryResourceCollection --rename-model=MetricUnit:Unit,IdentityAutoGenerated:Identity,UserIdentityPropertiesAutoGenerated:UserIdentityProperties --enable-sync-stack=false" + "args": "--tag=package-composite-v1-java --modelerfour.lenient-model-deduplication --add-inner=AutoscaleProfile,ScaleRule,LocalizableString,DiagnosticSettingsCategoryResourceCollection --rename-model=MetricUnit:Unit,IdentityAutoGenerated:Identity,UserIdentityPropertiesAutoGenerated:UserIdentityProperties --enable-sync-stack=false" }, "network": { "dir": "../network/azure-resourcemanager-network", @@ -115,7 +115,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Authorization/policy/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", + "args": "--tag=package-policy-2025-03-java --metadata-suffix=policy --modelerfour.lenient-model-deduplication --rename-model=UserAssignedIdentitiesValue:IdentityUserAssignedIdentitiesValue --enable-sync-stack=false", "note": "Remove policyVariables.json and policyVariableValues.json from tag, as they are still in preview." }, "privatedns": { @@ -173,7 +173,7 @@ "dir": "../sql/azure-resourcemanager-sql", "source": "specification/sql/resource-manager/readme.md", "package": "com.azure.resourcemanager.sql", - "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication=true --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState --enable-sync-stack=false", + "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState --enable-sync-stack=false", "note": "Add '\"x-ms-long-running-operation\": true' to TransparentDataEncryptions_CreateOrUpdate in specs file TransparentDataEncryptions.json" }, "storage": { From 641827ae03b34fcfd4221d5a2e79c59e9aac6ed0 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 13:11:09 +0800 Subject: [PATCH 14/16] delete deprecated deploymentstacks samples --- ...reateOrUpdateAtManagementGroupSamples.java | 62 ------------------ ...sCreateOrUpdateAtResourceGroupSamples.java | 62 ------------------ ...ksCreateOrUpdateAtSubscriptionSamples.java | 62 ------------------ ...tStacksDeleteAtManagementGroupSamples.java | 29 --------- ...mentStacksDeleteAtSubscriptionSamples.java | 28 -------- .../DeploymentStacksDeleteSamples.java | 29 --------- ...xportTemplateAtManagementGroupSamples.java | 30 --------- ...sExportTemplateAtResourceGroupSamples.java | 30 --------- ...ksExportTemplateAtSubscriptionSamples.java | 29 --------- ...mentStacksGetAtManagementGroupSamples.java | 28 -------- ...loymentStacksGetAtSubscriptionSamples.java | 28 -------- ...oymentStacksGetByResourceGroupSamples.java | 29 --------- ...entStacksListAtManagementGroupSamples.java | 28 -------- ...ymentStacksListByResourceGroupSamples.java | 28 -------- .../DeploymentStacksListSamples.java | 28 -------- ...ValidateStackAtManagementGroupSamples.java | 64 ------------------- ...ksValidateStackAtResourceGroupSamples.java | 63 ------------------ ...cksValidateStackAtSubscriptionSamples.java | 64 ------------------- 18 files changed, 721 deletions(-) delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java delete mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java deleted file mode 100644 index 259276f59380..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks CreateOrUpdateAtManagementGroup. - */ -public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupCreate.json - */ - /** - * Sample code: DeploymentStacksManagementGroupCreateOrUpdate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksManagementGroupCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java deleted file mode 100644 index ecc0eb47a6ff..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks CreateOrUpdateAtResourceGroup. - */ -public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupCreate.json - */ - /** - * Sample code: DeploymentStacksResourceGroupCreateOrUpdate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksResourceGroupCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .createOrUpdateAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java deleted file mode 100644 index 57e56a35aaab..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks CreateOrUpdateAtSubscription. - */ -public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionCreate.json - */ - /** - * Sample code: DeploymentStacksSubscriptionCreateOrUpdate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksSubscriptionCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .createOrUpdateAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java deleted file mode 100644 index 73f97659dddd..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks DeleteAtManagementGroup. - */ -public final class DeploymentStacksDeleteAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupDelete.json - */ - /** - * Sample code: DeploymentStacksManagementGroupDelete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksManagementGroupDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java deleted file mode 100644 index 04326f2e5831..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks DeleteAtSubscription. - */ -public final class DeploymentStacksDeleteAtSubscriptionSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionDelete.json - */ - /** - * Sample code: DeploymentStacksSubscriptionDelete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksSubscriptionDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java deleted file mode 100644 index 82dc3fdecd8c..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks Delete. - */ -public final class DeploymentStacksDeleteSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupDelete.json - */ - /** - * Sample code: DeploymentStacksResourceGroupDelete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksResourceGroupDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java deleted file mode 100644 index b8ec1882ec2c..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks ExportTemplateAtManagementGroup. - */ -public final class DeploymentStacksExportTemplateAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupExportTemplate.json - */ - /** - * Sample code: DeploymentStacksManagementGroupExportTemplate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksManagementGroupExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .exportTemplateAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java deleted file mode 100644 index bc4c45006e4b..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks ExportTemplateAtResourceGroup. - */ -public final class DeploymentStacksExportTemplateAtResourceGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackExportTemplate.json - */ - /** - * Sample code: DeploymentStacksResourceGroupExportTemplate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksResourceGroupExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .exportTemplateAtResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java deleted file mode 100644 index 3d6060725da7..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks ExportTemplateAtSubscription. - */ -public final class DeploymentStacksExportTemplateAtSubscriptionSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionExportTemplate.json - */ - /** - * Sample code: DeploymentStacksSubscriptionExportTemplate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - deploymentStacksSubscriptionExportTemplate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .exportTemplateAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java deleted file mode 100644 index 51fcda706270..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks GetAtManagementGroup. - */ -public final class DeploymentStacksGetAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupGet.json - */ - /** - * Sample code: DeploymentStacksManagementGroupGet. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksManagementGroupGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .getAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java deleted file mode 100644 index 393a46e1b2d5..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks GetAtSubscription. - */ -public final class DeploymentStacksGetAtSubscriptionSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionGet.json - */ - /** - * Sample code: DeploymentStacksSubscriptionGet. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksSubscriptionGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .getAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java deleted file mode 100644 index 02984b8180f0..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks GetByResourceGroup. - */ -public final class DeploymentStacksGetByResourceGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupGet.json - */ - /** - * Sample code: DeploymentStacksResourceGroupGet. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksResourceGroupGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .getByResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java deleted file mode 100644 index 26d5cce6cac5..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks ListAtManagementGroup. - */ -public final class DeploymentStacksListAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupList.json - */ - /** - * Sample code: DeploymentStacksManagementGroupList. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksManagementGroupList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .listAtManagementGroup("myMg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java deleted file mode 100644 index 5d447e141ff8..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks ListByResourceGroup. - */ -public final class DeploymentStacksListByResourceGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupList.json - */ - /** - * Sample code: DeploymentStacksResourceGroupList. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksResourceGroupList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .listByResourceGroup("deploymentStacksRG", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java deleted file mode 100644 index b2d009a410ca..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -/** - * Samples for DeploymentStacks List. - */ -public final class DeploymentStacksListSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionList.json - */ - /** - * Sample code: DeploymentStacksSubscriptionList. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksSubscriptionList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java deleted file mode 100644 index c03679ef3653..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks ValidateStackAtManagementGroup. - */ -public final class DeploymentStacksValidateStackAtManagementGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackManagementGroupValidate.json - */ - /** - * Sample code: DeploymentStacksManagementGroupValidate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksManagementGroupValidate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java deleted file mode 100644 index 9eb5a2ce2f31..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks ValidateStackAtResourceGroup. - */ -public final class DeploymentStacksValidateStackAtResourceGroupSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackResourceGroupValidate.json - */ - /** - * Sample code: DeploymentStacksResourceGroupValidate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksResourceGroupValidate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", - new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java deleted file mode 100644 index 41d75df15f50..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.generated; - -import com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.models.DenySettings; -import com.azure.resourcemanager.resources.models.DenySettingsMode; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum; -import com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DeploymentStacks ValidateStackAtSubscription. - */ -public final class DeploymentStacksValidateStackAtSubscriptionSamples { - /* - * x-ms-original-file: - * edacc3b43f9603efa119eabb6013d952d1dbe7d6/specification/resources/resource-manager/Microsoft.Resources/ - * deploymentStacks/stable/2024-03-01/examples/DeploymentStackSubscriptionValidate.json - */ - /** - * Sample code: DeploymentStacksSubscriptionValidate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void deploymentStacksSubscriptionValidate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.genericResources() - .manager() - .deploymentClient() - .getDeploymentStacks() - .validateStackAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} From 5293dc565a2cfd9d947383e32b36a23279144d91 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 13:12:54 +0800 Subject: [PATCH 15/16] turn off sample for deprecated client --- sdk/resourcemanager/api-specs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 02efe7040d1d..854ddb637060 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -45,7 +45,7 @@ "dir": "../containerregistry/azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2019-06-preview --title=ContainerRegistryTasksManagementClient --rename-operation-group:Registries:RegistryTasks --rename-model=DockerBuildStep:DockerTaskStep --modelerfour.lenient-model-deduplication --metadata-suffix=registrytasks --enable-sync-stack=false", + "args": "--tag=package-2019-06-preview --generate-samples=false --title=ContainerRegistryTasksManagementClient --rename-operation-group:Registries:RegistryTasks --rename-model=DockerBuildStep:DockerTaskStep --modelerfour.lenient-model-deduplication --metadata-suffix=registrytasks --enable-sync-stack=false", "note": "Use commit 09695f5a97dfcf201766ea2f2e7e3b53aec49144 for Swagger before TypeSpec migration" }, "containerservice": { @@ -154,7 +154,7 @@ "dir": "../resources/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-2024-03-java --metadata-suffix=deploymentstacks --enable-sync-stack=false" + "args": "--tag=package-2024-03-java --metadata-suffix=deploymentstacks --generate-samples=false --enable-sync-stack=false" }, "search": { "dir": "../search/azure-resourcemanager-search", From 946e0b9868d688345549051503b6d18593fc48ea Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Feb 2026 13:32:00 +0800 Subject: [PATCH 16/16] revert --- ...azure-resourcemanager-resources.properties | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties b/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties index defbd48204e4..69bf03d5ec35 100644 --- a/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties +++ b/sdk/resources/azure-resourcemanager-resources/src/main/resources/azure-resourcemanager-resources.properties @@ -1 +1,26 @@ version=${project.version} +# Premium libraries whose versions are eagerly loaded at AzureServiceClient class initialization. +# This list is maintained to ensure that premium management libraries are initialized early for diagnostics and telemetry. +premium-libraries=azure-resourcemanager-authorization,\ + azure-resourcemanager-cdn,\ + azure-resourcemanager-containerinstance,\ + azure-resourcemanager-appplatform,\ + azure-resourcemanager-appservice,\ + azure-resourcemanager-compute,\ + azure-resourcemanager-containerregistry,\ + azure-resourcemanager-containerservice,\ + azure-resourcemanager-cosmos,\ + azure-resourcemanager-dns,\ + azure-resourcemanager-eventhubs,\ + azure-resourcemanager-keyvault,\ + azure-resourcemanager-monitor,\ + azure-resourcemanager-msi,\ + azure-resourcemanager-network,\ + azure-resourcemanager-privatedns,\ + azure-resourcemanager-redis,\ + azure-resourcemanager-resources,\ + azure-resourcemanager-search,\ + azure-resourcemanager-servicebus,\ + azure-resourcemanager-sql,\ + azure-resourcemanager-storage,\ + azure-resourcemanager-trafficmanager \ No newline at end of file