diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 3a08e92d0c4f..ca87d62de70c 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -551,6 +551,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-beta.1
# 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/api-specs.json b/sdk/resourcemanager/api-specs.json
index 2a38bcdf5e12..886c33533d23 100644
--- a/sdk/resourcemanager/api-specs.json
+++ b/sdk/resourcemanager/api-specs.json
@@ -187,7 +187,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-stable --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."
},
"policy-hybrid": {
diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml
index 59f5223a5da3..9f57f735bc62 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.4
+ 2.54.0-beta.1
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
deleted file mode 100644
index 579798e41842..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java
+++ /dev/null
@@ -1,27 +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 AuthorizationOperations List.
- */
-public final class AuthorizationOperationsListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ListProviderOperations.json
- */
- /**
- * Sample code: List provider operations.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listProviderOperations(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getAuthorizationOperations()
- .list(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3c3541670073..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.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 Changes Get.
- */
-public final class ChangesGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/GetChange.json
- */
- /**
- * Sample code: GetChange.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getChange(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .resourceChangeClient()
- .getChanges()
- .getWithResponse("resourceGroup1", "resourceProvider1", "resourceType1", "resourceName1",
- "1d58d72f-0719-4a48-9228-b7ea682885bf", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index a6e857e51612..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.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 Changes List.
- */
-public final class ChangesListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/ListChanges.json
- */
- /**
- * Sample code: ListChanges.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listChanges(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .resourceChangeClient()
- .getChanges()
- .list("resourceGroup1", "resourceProvider1", "resourceType1", "resourceName1", null, null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8bac11580317..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetScopeSamples.java
+++ /dev/null
@@ -1,31 +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.models.DefaultName;
-
-/**
- * Samples for DataBoundaries GetScope.
- */
-public final class DataBoundariesGetScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetScopedDataBoundary.
- * json
- */
- /**
- * Sample code: Get data boundary at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getDataBoundaryAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .dataBoundaryClient()
- .getDataBoundaries()
- .getScopeWithResponse("subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/my-resource-group",
- DefaultName.DEFAULT, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 4c35310e6806..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesGetTenantSamples.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;
-
-import com.azure.resourcemanager.resources.models.DefaultName;
-
-/**
- * Samples for DataBoundaries GetTenant.
- */
-public final class DataBoundariesGetTenantSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetTenantDataBoundary.
- * json
- */
- /**
- * Sample code: Get data boundary for tenant.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getDataBoundaryForTenant(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .dataBoundaryClient()
- .getDataBoundaries()
- .getTenantWithResponse(DefaultName.DEFAULT, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 69a7e55a14b8..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataBoundariesPutSamples.java
+++ /dev/null
@@ -1,33 +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.DataBoundaryDefinitionInner;
-import com.azure.resourcemanager.resources.models.DataBoundary;
-import com.azure.resourcemanager.resources.models.DataBoundaryProperties;
-import com.azure.resourcemanager.resources.models.DefaultName;
-
-/**
- * Samples for DataBoundaries Put.
- */
-public final class DataBoundariesPutSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/PutDataBoundary.json
- */
- /**
- * Sample code: Opt-in to data boundary.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void optInToDataBoundary(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .dataBoundaryClient()
- .getDataBoundaries()
- .putWithResponse(DefaultName.DEFAULT, new DataBoundaryDefinitionInner().withProperties(
- new DataBoundaryProperties().withDataBoundary(DataBoundary.EU)), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 1c60139c82f2..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.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 DataPolicyManifests GetByPolicyMode.
- */
-public final class DataPolicyManifestsGetByPolicyModeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/getDataPolicyManifest
- * .json
- */
- /**
- * Sample code: Retrieve a data policy manifest by policy mode.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveADataPolicyManifestByPolicyMode(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getDataPolicyManifests()
- .getByPolicyModeWithResponse("Microsoft.KeyVault.Data", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 01b3e5eb74a5..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java
+++ /dev/null
@@ -1,45 +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 DataPolicyManifests List.
- */
-public final class DataPolicyManifestsListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/
- * listDataPolicyManifests.json
- */
- /**
- * Sample code: List data policy manifests.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listDataPolicyManifests(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getDataPolicyManifests()
- .list(null, com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/
- * listDataPolicyManifestsNamespaceFilter.json
- */
- /**
- * Sample code: List data policy manifests with namespace filter.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listDataPolicyManifestsWithNamespaceFilter(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getDataPolicyManifests()
- .list("namespace eq 'Microsoft.KeyVault'", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java
deleted file mode 100644
index e730badd4b07..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java
+++ /dev/null
@@ -1,36 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import java.io.IOException;
-
-/**
- * Samples for Deployments CalculateTemplateHash.
- */
-public final class DeploymentsCalculateTemplateHashSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * CalculateTemplateHash.json
- */
- /**
- * Sample code: Calculate template hash.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void calculateTemplateHash(com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .calculateTemplateHashWithResponse(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"$schema\":\"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\"contentVersion\":\"1.0.0.0\",\"outputs\":{\"string\":{\"type\":\"string\",\"value\":\"myvalue\"}},\"parameters\":{\"string\":{\"type\":\"string\"}},\"resources\":[],\"variables\":{\"array\":[1,2,3,4],\"bool\":true,\"int\":42,\"object\":{\"object\":{\"location\":\"West US\",\"vmSize\":\"Large\"}},\"string\":\"string\"}}",
- Object.class, SerializerEncoding.JSON),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java
deleted file mode 100644
index 806ac4c6092c..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java
+++ /dev/null
@@ -1,53 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeployment;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments CreateOrUpdateAtManagementGroupScope.
- */
-public final class DeploymentsCreateOrUpdateAtManagementGroupScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentAtManagementGroup.json
- */
- /**
- * Sample code: Create deployment at management group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createDeploymentAtManagementGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdateAtManagementGroupScope("my-management-group-id", "my-deployment",
- new ScopedDeployment().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsCreateOrUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java
deleted file mode 100644
index ff2f240f0475..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java
+++ /dev/null
@@ -1,55 +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.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments CreateOrUpdateAtScope.
- */
-public final class DeploymentsCreateOrUpdateAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentAtScope.json
- */
- /**
- * Sample code: Create deployment at a given scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createDeploymentAtAGivenScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdateAtScope("providers/Microsoft.Management/managementGroups/my-management-group-id",
- "my-deployment",
- new DeploymentInner().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL))
- .withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder")),
- 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/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java
deleted file mode 100644
index 8cbe5df35203..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java
+++ /dev/null
@@ -1,53 +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.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments CreateOrUpdateAtSubscriptionScope.
- */
-public final class DeploymentsCreateOrUpdateAtSubscriptionScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentSubscriptionTemplateSpecsWithId.json
- */
- /**
- * Sample code: Create a deployment that will deploy a templateSpec with the given resourceId.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdateAtSubscriptionScope("my-deployment", new DeploymentInner().withLocation("eastus")
- .withProperties(new DeploymentProperties().withTemplateLink(new TemplateLink().withId(
- "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsCreateOrUpdateAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java
deleted file mode 100644
index 2c2b58546454..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java
+++ /dev/null
@@ -1,54 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeployment;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments CreateOrUpdateAtTenantScope.
- */
-public final class DeploymentsCreateOrUpdateAtTenantScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentAtTenant.json
- */
- /**
- * Sample code: Create deployment at tenant scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createDeploymentAtTenantScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdateAtTenantScope("tenant-dep01",
- new ScopedDeployment().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL))
- .withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder")),
- 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/DeploymentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java
deleted file mode 100644
index 7a73e33e3ebb..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,169 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentExternalInput;
-import com.azure.resourcemanager.resources.models.DeploymentExternalInputDefinition;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentParameter;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.OnErrorDeployment;
-import com.azure.resourcemanager.resources.models.OnErrorDeploymentType;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments CreateOrUpdate.
- */
-public final class DeploymentsCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentWithExternalInputs.json
- */
- /**
- * Sample code: Create deployment using external inputs.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createDeploymentUsingExternalInputs(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdate("my-resource-group", "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties().withTemplate(SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"$schema\":\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"outputs\":{\"inputObj\":{\"type\":\"object\",\"value\":\"[parameters('inputObj')]\"}},\"parameters\":{\"inputObj\":{\"type\":\"object\"}},\"resources\":[]}",
- Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("inputObj",
- new DeploymentParameter().withExpression("[createObject('foo', externalInputs('fooValue'))]")))
- .withExternalInputs(mapOf("fooValue", new DeploymentExternalInput().withValue("baz")))
- .withExternalInputDefinitions(mapOf("fooValue",
- new DeploymentExternalInputDefinition().withKind("sys.envVar").withConfig("FOO_VALUE")))
- .withMode(DeploymentMode.INCREMENTAL)),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentResourceGroup.json
- */
- /**
- * Sample code: Create a deployment that will deploy a template with a uri and queryString.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createADeploymentThatWillDeployATemplateWithAUriAndQueryString(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdate("my-resource-group", "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties().withTemplateLink(new TemplateLink()
- .withUri("https://example.com/exampleTemplate.json")
- .withQueryString(
- "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentResourceGroupTemplateSpecsWithId.json
- */
- /**
- * Sample code: Create a deployment that will deploy a templateSpec with the given resourceId.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdate("my-resource-group", "my-deployment", new DeploymentInner()
- .withProperties(new DeploymentProperties().withTemplateLink(new TemplateLink().withId(
- "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentWithOnErrorDeploymentSpecificDeployment.json
- */
- /**
- * Sample code: Create a deployment that will redeploy another deployment on failure.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createADeploymentThatWillRedeployAnotherDeploymentOnFailure(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdate("my-resource-group", "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.COMPLETE)
- .withOnErrorDeployment(new OnErrorDeployment().withType(OnErrorDeploymentType.SPECIFIC_DEPLOYMENT)
- .withDeploymentName("name-of-deployment-to-use"))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PutDeploymentWithOnErrorDeploymentLastSuccessful.json
- */
- /**
- * Sample code: Create a deployment that will redeploy the last successful deployment on failure.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createADeploymentThatWillRedeployTheLastSuccessfulDeploymentOnFailure(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .createOrUpdate("my-resource-group", "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.COMPLETE)
- .withOnErrorDeployment(new OnErrorDeployment().withType(OnErrorDeploymentType.LAST_SUCCESSFUL))),
- 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/DeploymentsValidateAtManagementGroupScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtManagementGroupScopeSamples.java
deleted file mode 100644
index 28a2cc870ab7..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtManagementGroupScopeSamples.java
+++ /dev/null
@@ -1,53 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeployment;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments ValidateAtManagementGroupScope.
- */
-public final class DeploymentsValidateAtManagementGroupScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentValidateOnManagementGroup.json
- */
- /**
- * Sample code: Validates a template at management group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void validatesATemplateAtManagementGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .validateAtManagementGroupScope("my-management-group-id", "my-deployment",
- new ScopedDeployment().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsValidateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtScopeSamples.java
deleted file mode 100644
index 6fb596502092..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtScopeSamples.java
+++ /dev/null
@@ -1,55 +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.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments ValidateAtScope.
- */
-public final class DeploymentsValidateAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentValidateOnScope.json
- */
- /**
- * Sample code: Validates a template at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void validatesATemplateAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .validateAtScope("subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group",
- "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties().withTemplateLink(new TemplateLink()
- .withUri("https://example.com/exampleTemplate.json")
- .withQueryString(
- "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsValidateAtSubscriptionScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtSubscriptionScopeSamples.java
deleted file mode 100644
index ef1d99a68801..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtSubscriptionScopeSamples.java
+++ /dev/null
@@ -1,53 +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.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments ValidateAtSubscriptionScope.
- */
-public final class DeploymentsValidateAtSubscriptionScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentValidateOnSubscription.json
- */
- /**
- * Sample code: Validates a template at subscription scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void validatesATemplateAtSubscriptionScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .validateAtSubscriptionScope("my-deployment",
- new DeploymentInner().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsValidateAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtTenantScopeSamples.java
deleted file mode 100644
index 3d700f1d4e0d..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateAtTenantScopeSamples.java
+++ /dev/null
@@ -1,53 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeployment;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments ValidateAtTenantScope.
- */
-public final class DeploymentsValidateAtTenantScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentValidateOnTenant.json
- */
- /**
- * Sample code: Validates a template at tenant scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void validatesATemplateAtTenantScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .validateAtTenantScope("my-deployment",
- new ScopedDeployment().withLocation("eastus")
- .withProperties(new DeploymentProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsValidateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateSamples.java
deleted file mode 100644
index 1b7dd4dd4c61..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsValidateSamples.java
+++ /dev/null
@@ -1,54 +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.DeploymentInner;
-import com.azure.resourcemanager.resources.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments Validate.
- */
-public final class DeploymentsValidateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentValidateOnResourceGroup.json
- */
- /**
- * Sample code: Validates a template at resource group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void validatesATemplateAtResourceGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .validate("my-resource-group", "my-deployment",
- new DeploymentInner().withProperties(new DeploymentProperties().withTemplateLink(new TemplateLink()
- .withUri("https://example.com/exampleTemplate.json")
- .withQueryString(
- "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsWhatIfAtManagementGroupScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java
deleted file mode 100644
index 86bc047a8d57..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java
+++ /dev/null
@@ -1,54 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIfProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeploymentWhatIf;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments WhatIfAtManagementGroupScope.
- */
-public final class DeploymentsWhatIfAtManagementGroupScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentWhatIfOnManagementGroup.json
- */
- /**
- * Sample code: Predict template changes at management group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- predictTemplateChangesAtManagementGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .whatIfAtManagementGroupScope("myManagementGruop", "exampleDeploymentName",
- new ScopedDeploymentWhatIf().withLocation("eastus")
- .withProperties(new DeploymentWhatIfProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsWhatIfAtSubscriptionScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java
deleted file mode 100644
index 9da49c072df2..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java
+++ /dev/null
@@ -1,53 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIf;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIfProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments WhatIfAtSubscriptionScope.
- */
-public final class DeploymentsWhatIfAtSubscriptionScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentWhatIfOnSubscription.json
- */
- /**
- * Sample code: Predict template changes at subscription scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void predictTemplateChangesAtSubscriptionScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .whatIfAtSubscriptionScope("my-deployment",
- new DeploymentWhatIf().withLocation("westus")
- .withProperties(new DeploymentWhatIfProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsWhatIfAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java
deleted file mode 100644
index b669480f97c1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java
+++ /dev/null
@@ -1,54 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIfProperties;
-import com.azure.resourcemanager.resources.models.ScopedDeploymentWhatIf;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments WhatIfAtTenantScope.
- */
-public final class DeploymentsWhatIfAtTenantScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentWhatIfOnTenant.json
- */
- /**
- * Sample code: Predict template changes at management group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- predictTemplateChangesAtManagementGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .whatIfAtTenantScope("exampleDeploymentName",
- new ScopedDeploymentWhatIf().withLocation("eastus")
- .withProperties(new DeploymentWhatIfProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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/DeploymentsWhatIfSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java
deleted file mode 100644
index 2f9a1de6b1d9..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java
+++ /dev/null
@@ -1,53 +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.models.DeploymentMode;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIf;
-import com.azure.resourcemanager.resources.models.DeploymentWhatIfProperties;
-import com.azure.resourcemanager.resources.models.TemplateLink;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for Deployments WhatIf.
- */
-public final class DeploymentsWhatIfSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/deployments/stable/2025-04-01/examples/
- * PostDeploymentWhatIfOnResourceGroup.json
- */
- /**
- * Sample code: Predict template changes at resource group scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- predictTemplateChangesAtResourceGroupScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .deploymentClient()
- .getDeployments()
- .whatIf("my-resource-group", "my-deployment",
- new DeploymentWhatIf().withProperties(new DeploymentWhatIfProperties()
- .withTemplateLink(new TemplateLink().withUri("https://example.com/exampleTemplate.json"))
- .withParameters(mapOf())
- .withMode(DeploymentMode.INCREMENTAL)),
- 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
deleted file mode 100644
index 200d4ddb711a..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java
+++ /dev/null
@@ -1,27 +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 Features Get.
- */
-public final class FeaturesGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/getFeature.json
- */
- /**
- * Sample code: Get feature.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getFeature(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getFeatures()
- .getWithResponse("Resource Provider Namespace", "feature", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index c500fe3df762..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java
+++ /dev/null
@@ -1,24 +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 Features ListAll.
- */
-public final class FeaturesListAllSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listSubscriptionFeatures.
- * json
- */
- /**
- * Sample code: List subscription Features.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listSubscriptionFeatures(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources().manager().featureClient().getFeatures().listAll(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 4f1a77fd8387..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java
+++ /dev/null
@@ -1,27 +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 Features List.
- */
-public final class FeaturesListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listProviderFeatures.json
- */
- /**
- * Sample code: List provider Features.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listProviderFeatures(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getFeatures()
- .list("Resource Provider Namespace", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index a1480c6340bb..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java
+++ /dev/null
@@ -1,27 +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 Features Register.
- */
-public final class FeaturesRegisterSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/registerFeature.json
- */
- /**
- * Sample code: Register feature.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void registerFeature(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getFeatures()
- .registerWithResponse("Resource Provider Namespace", "feature", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 2b122e119923..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java
+++ /dev/null
@@ -1,27 +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 Features Unregister.
- */
-public final class FeaturesUnregisterSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/unregisterFeature.json
- */
- /**
- * Sample code: Register feature.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void registerFeature(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getFeatures()
- .unregisterWithResponse("Resource Provider Namespace", "feature", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index b3d425a79712..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java
+++ /dev/null
@@ -1,31 +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.ManagementLockObjectInner;
-import com.azure.resourcemanager.resources.models.LockLevel;
-
-/**
- * Samples for ManagementLocks CreateOrUpdateAtResourceGroupLevel.
- */
-public final class ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_CreateOrUpdateAtResourceGroupLevel.json
- */
- /**
- * Sample code: Create management lock at resource group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createManagementLockAtResourceGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .createOrUpdateAtResourceGroupLevelWithResponse("resourcegroupname", "testlock",
- new ManagementLockObjectInner().withLevel(LockLevel.READ_ONLY), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 4422d51156fc..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java
+++ /dev/null
@@ -1,32 +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.ManagementLockObjectInner;
-import com.azure.resourcemanager.resources.models.LockLevel;
-
-/**
- * Samples for ManagementLocks CreateOrUpdateAtResourceLevel.
- */
-public final class ManagementLocksCreateOrUpdateAtResourceLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_CreateOrUpdateAtResourceLevel.json
- */
- /**
- * Sample code: Create management lock at resource level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createManagementLockAtResourceLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .createOrUpdateAtResourceLevelWithResponse("resourcegroupname", "Microsoft.Storage", "parentResourcePath",
- "storageAccounts", "teststorageaccount", "testlock",
- new ManagementLockObjectInner().withLevel(LockLevel.READ_ONLY), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 1f6b592808c2..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java
+++ /dev/null
@@ -1,31 +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.ManagementLockObjectInner;
-import com.azure.resourcemanager.resources.models.LockLevel;
-
-/**
- * Samples for ManagementLocks CreateOrUpdateAtSubscriptionLevel.
- */
-public final class ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_CreateOrUpdateAtSubscriptionLevel.json
- */
- /**
- * Sample code: Create management lock at subscription level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createManagementLockAtSubscriptionLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .createOrUpdateAtSubscriptionLevelWithResponse("testlock",
- new ManagementLockObjectInner().withLevel(LockLevel.READ_ONLY), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 55927636099c..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java
+++ /dev/null
@@ -1,31 +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.ManagementLockObjectInner;
-import com.azure.resourcemanager.resources.models.LockLevel;
-
-/**
- * Samples for ManagementLocks CreateOrUpdateByScope.
- */
-public final class ManagementLocksCreateOrUpdateByScopeSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_CreateOrUpdateAtScope.json
- */
- /**
- * Sample code: Create management lock at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createManagementLockAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .createOrUpdateByScopeWithResponse("subscriptions/subscriptionId", "testlock",
- new ManagementLockObjectInner().withLevel(LockLevel.READ_ONLY), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index abbc09448cd6..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.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 ManagementLocks DeleteAtResourceLevel.
- */
-public final class ManagementLocksDeleteAtResourceLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_DeleteAtResourceLevel.json
- */
- /**
- * Sample code: Delete management lock at resource level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteManagementLockAtResourceLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .deleteAtResourceLevelWithResponse("resourcegroupname", "Microsoft.Storage", "parentResourcePath",
- "storageAccounts", "teststorageaccount", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index eee3953db7f8..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks DeleteAtSubscriptionLevel.
- */
-public final class ManagementLocksDeleteAtSubscriptionLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_DeleteAtSubscriptionLevel.json
- */
- /**
- * Sample code: Delete management lock at subscription level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteManagementLockAtSubscriptionLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .deleteAtSubscriptionLevelWithResponse("testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index f04a90755277..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks DeleteByScope.
- */
-public final class ManagementLocksDeleteByScopeSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_DeleteAtScope.json
- */
- /**
- * Sample code: Delete management lock at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteManagementLockAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .deleteByScopeWithResponse("subscriptions/subscriptionId", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 9dfff17327dd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks Delete.
- */
-public final class ManagementLocksDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_DeleteAtResourceGroupLevel.json
- */
- /**
- * Sample code: Delete management lock at resource group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteManagementLockAtResourceGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .deleteWithResponse("resourcegroupname", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 251b73ea92d1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.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 ManagementLocks GetAtResourceLevel.
- */
-public final class ManagementLocksGetAtResourceLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_GetAtResourceLevel.json
- */
- /**
- * Sample code: Get management lock at resource level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getManagementLockAtResourceLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .getAtResourceLevelWithResponse("resourcegroupname", "Microsoft.Storage", "parentResourcePath",
- "storageAccounts", "teststorageaccount", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 6570d9448972..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks GetAtSubscriptionLevel.
- */
-public final class ManagementLocksGetAtSubscriptionLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_GetAtSubscriptionLevel.json
- */
- /**
- * Sample code: Get management lock at subscription level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getManagementLockAtSubscriptionLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .getAtSubscriptionLevelWithResponse("testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 82758782129e..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks GetByResourceGroup.
- */
-public final class ManagementLocksGetByResourceGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_GetAtResourceGroupLevel.json
- */
- /**
- * Sample code: Get management lock at resource group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getManagementLockAtResourceGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .getByResourceGroupWithResponse("resourcegroupname", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index b78a074446d7..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks GetByScope.
- */
-public final class ManagementLocksGetByScopeSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_GetAtScope.json
- */
- /**
- * Sample code: Get management lock at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getManagementLockAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .getByScopeWithResponse("subscriptions/subscriptionId", "testlock", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index dd15ade02072..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.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 ManagementLocks ListAtResourceLevel.
- */
-public final class ManagementLocksListAtResourceLevelSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_ListAtResourceLevel.json
- */
- /**
- * Sample code: List management locks at resource level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listManagementLocksAtResourceLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .listAtResourceLevel("resourcegroupname", "Microsoft.Storage", "parentResourcePath", "storageAccounts",
- "teststorageaccount", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 9943904ed3f3..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks ListByResourceGroup.
- */
-public final class ManagementLocksListByResourceGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_ListAtResourceGroupLevel.json
- */
- /**
- * Sample code: List management groups at resource group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listManagementGroupsAtResourceGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .listByResourceGroup("resourcegroupname", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ae2e8a281455..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks ListByScope.
- */
-public final class ManagementLocksListByScopeSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_ListAtScope.json
- */
- /**
- * Sample code: List management locks at scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listManagementLocksAtScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .listByScope("subscriptions/subscriptionId", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 793794ec1fdd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java
+++ /dev/null
@@ -1,27 +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 ManagementLocks List.
- */
-public final class ManagementLocksListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/
- * ManagementLocks_ListAtSubscriptionLevel.json
- */
- /**
- * Sample code: List management locks at subscription level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listManagementLocksAtSubscriptionLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .managementLockClient()
- .getManagementLocks()
- .list(null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index d6c87905f168..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java
+++ /dev/null
@@ -1,97 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner;
-import com.azure.resourcemanager.resources.models.EnforcementMode;
-import com.azure.resourcemanager.resources.models.Identity;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.ResourceIdentityType;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyAssignments CreateById.
- */
-public final class PolicyAssignmentsCreateByIdSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentById.json
- */
- /**
- * Sample code: Create or update policy assignment by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdatePolicyAssignmentByID(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- new PolicyAssignmentInner().withDisplayName("Enforce storage account SKU")
- .withPolicyDefinitionId(
- "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withDefinitionVersion("1.*.*")
- .withParameters(mapOf("listOfAllowedSKUs", new ParameterValuesValue().withValue(SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class, SerializerEncoding.JSON))))
- .withDescription("Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"assignedBy\":\"Cheapskate Boss\"}", Object.class, SerializerEncoding.JSON))
- .withEnforcementMode(EnforcementMode.DEFAULT),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithIdentityById.json
- */
- /**
- * Sample code: Create or update policy assignment with a managed identity by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdatePolicyAssignmentWithAManagedIdentityByID(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- new PolicyAssignmentInner().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withDisplayName("Enforce storage account SKU")
- .withPolicyDefinitionId(
- "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withDefinitionVersion("1.*.*")
- .withParameters(mapOf("listOfAllowedSKUs", new ParameterValuesValue().withValue(SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class, SerializerEncoding.JSON))))
- .withDescription("Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"assignedBy\":\"Cheapskate Boss\"}", Object.class, SerializerEncoding.JSON))
- .withEnforcementMode(EnforcementMode.DEFAULT),
- 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/PolicyAssignmentsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java
deleted file mode 100644
index b383dae5d2fc..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java
+++ /dev/null
@@ -1,249 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner;
-import com.azure.resourcemanager.resources.models.EnforcementMode;
-import com.azure.resourcemanager.resources.models.Identity;
-import com.azure.resourcemanager.resources.models.IdentityUserAssignedIdentitiesValue;
-import com.azure.resourcemanager.resources.models.NonComplianceMessage;
-import com.azure.resourcemanager.resources.models.OverrideKind;
-import com.azure.resourcemanager.resources.models.OverrideModel;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.ResourceIdentityType;
-import com.azure.resourcemanager.resources.models.ResourceSelector;
-import com.azure.resourcemanager.resources.models.Selector;
-import com.azure.resourcemanager.resources.models.SelectorKind;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyAssignments Create.
- */
-public final class PolicyAssignmentsCreateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithResourceSelectors.json
- */
- /**
- * Sample code: Create or update a policy assignment with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithResourceSelectors(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement",
- new PolicyAssignmentInner().withDisplayName("Limit the resource location and resource SKU")
- .withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement")
- .withDescription("Limit the resource location and resource SKU")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"assignedBy\":\"Special Someone\"}", Object.class, SerializerEncoding.JSON))
- .withResourceSelectors(Arrays.asList(new ResourceSelector().withName("SDPRegions")
- .withSelectors(Arrays.asList(new Selector().withKind(SelectorKind.RESOURCE_LOCATION)
- .withIn(Arrays.asList("eastus2euap", "centraluseuap")))))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignment.json
- */
- /**
- * Sample code: Create or update a policy assignment.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignment(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- 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))
- .withNonComplianceMessages(Arrays.asList(new NonComplianceMessage()
- .withMessage("Resource names must start with 'DeptA' and end with '-LC'."))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithIdentity.json
- */
- /**
- * Sample code: Create or update a policy assignment with a system assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithASystemAssignedIdentity(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- new PolicyAssignmentInner().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .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\":\"Foo Bar\"}", Object.class, SerializerEncoding.JSON))
- .withEnforcementMode(EnforcementMode.DEFAULT),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentNonComplianceMessages.json
- */
- /**
- * Sample code: Create or update a policy assignment with multiple non-compliance messages.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithMultipleNonComplianceMessages(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "securityInitAssignment",
- new PolicyAssignmentInner().withDisplayName("Enforce security policies")
- .withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/securityInitiative")
- .withNonComplianceMessages(Arrays.asList(new NonComplianceMessage().withMessage(
- "Resources must comply with all internal security policies. See for more info."),
- new NonComplianceMessage()
- .withMessage("Resource names must start with 'DeptA' and end with '-LC'.")
- .withPolicyDefinitionReferenceId("10420126870854049575"),
- new NonComplianceMessage().withMessage("Storage accounts must have firewall rules configured.")
- .withPolicyDefinitionReferenceId("8572513655450389710"))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithUserAssignedIdentity.json
- */
- /**
- * Sample code: Create or update a policy assignment with a user assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithAUserAssignedIdentity(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- new PolicyAssignmentInner().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
- new IdentityUserAssignedIdentitiesValue())))
- .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\":\"Foo Bar\"}", Object.class, SerializerEncoding.JSON))
- .withEnforcementMode(EnforcementMode.DEFAULT),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithOverrides.json
- */
- /**
- * Sample code: Create or update a policy assignment with overrides.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithOverrides(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement",
- new PolicyAssignmentInner().withDisplayName("Limit the resource location and resource SKU")
- .withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement")
- .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")))))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createPolicyAssignmentWithoutEnforcement.json
- */
- /**
- * Sample code: Create or update a policy assignment without enforcing policy effect during resource creation or
- * update.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyAssignmentWithoutEnforcingPolicyEffectDuringResourceCreationOrUpdate(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .createWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- 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.DO_NOT_ENFORCE),
- 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/PolicyAssignmentsDeleteByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java
deleted file mode 100644
index ba10accdc456..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.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 PolicyAssignments DeleteById.
- */
-public final class PolicyAssignmentsDeleteByIdSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyAssignmentById.json
- */
- /**
- * Sample code: Delete a policy assignment by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicyAssignmentByID(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .deleteByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 30421e6fb5e6..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.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 PolicyAssignments Delete.
- */
-public final class PolicyAssignmentsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyAssignment.json
- */
- /**
- * Sample code: Delete a policy assignment.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicyAssignment(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .deleteWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 1dfa34dbca76..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java
+++ /dev/null
@@ -1,49 +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 PolicyAssignments GetById.
- */
-public final class PolicyAssignmentsGetByIdSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentById.json
- */
- /**
- * Sample code: Retrieve a policy assignment by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyAssignmentByID(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- null, com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentWithIdentityById.json
- */
- /**
- * Sample code: Retrieve a policy assignment with a managed identity by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyAssignmentWithAManagedIdentityByID(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- null, 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
deleted file mode 100644
index f845b0eb423f..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java
+++ /dev/null
@@ -1,104 +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 PolicyAssignments Get.
- */
-public final class PolicyAssignmentsGetSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentWithOverrides.json
- */
- /**
- * Sample code: Retrieve a policy assignment with overrides.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentWithUserAssignedIdentity.json
- */
- /**
- * Sample code: Retrieve a policy assignment with a user assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyAssignmentWithAUserAssignedIdentity(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentWithResourceSelectors.json
- */
- /**
- * Sample code: Retrieve a policy assignment with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyAssignmentWithResourceSelectors(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/getPolicyAssignment.
- * json
- */
- /**
- * Sample code: Retrieve a policy assignment.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyAssignment(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyAssignmentWithIdentity.json
- */
- /**
- * Sample code: Retrieve a policy assignment with a system assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyAssignmentWithASystemAssignedIdentity(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming", null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8be4b18e4397..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.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 PolicyAssignments ListByResourceGroup.
- */
-public final class PolicyAssignmentsListByResourceGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyAssignmentsForResourceGroup.json
- */
- /**
- * Sample code: List policy assignments that apply to a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyAssignmentsThatApplyToAResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .listByResourceGroup("TestResourceGroup", "atScope()",
- "LatestDefinitionVersion, EffectiveDefinitionVersion", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 51f49ffa02be..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.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 PolicyAssignments ListForManagementGroup.
- */
-public final class PolicyAssignmentsListForManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyAssignmentsForManagementGroup.json
- */
- /**
- * Sample code: List policy assignments that apply to a management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyAssignmentsThatApplyToAManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .listForManagementGroup("TestManagementGroup", "atScope()",
- "LatestDefinitionVersion, EffectiveDefinitionVersion", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index eec05747756b..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.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 PolicyAssignments ListForResource.
- */
-public final class PolicyAssignmentsListForResourceSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyAssignmentsForResource.json
- */
- /**
- * Sample code: List all policy assignments that apply to a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyAssignmentsThatApplyToAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .listForResource("TestResourceGroup", "Microsoft.Compute", "virtualMachines/MyTestVm", "domainNames",
- "MyTestComputer.cloudapp.net", null, null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8d87f7ae9960..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.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 PolicyAssignments List.
- */
-public final class PolicyAssignmentsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/listPolicyAssignments
- * .json
- */
- /**
- * Sample code: List policy assignments that apply to a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyAssignmentsThatApplyToASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .list("atScope()", "LatestDefinitionVersion, EffectiveDefinitionVersion", null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ee338b27c142..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java
+++ /dev/null
@@ -1,36 +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.models.Identity;
-import com.azure.resourcemanager.resources.models.PolicyAssignmentUpdate;
-import com.azure.resourcemanager.resources.models.ResourceIdentityType;
-
-/**
- * Samples for PolicyAssignments UpdateById.
- */
-public final class PolicyAssignmentsUpdateByIdSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * updatePolicyAssignmentWithIdentityById.json
- */
- /**
- * Sample code: Update policy assignment with a managed identity by ID.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- updatePolicyAssignmentWithAManagedIdentityByID(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .updateByIdWithResponse(
- "providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage",
- new PolicyAssignmentUpdate().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ce6eeba1d879..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java
+++ /dev/null
@@ -1,126 +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.models.Identity;
-import com.azure.resourcemanager.resources.models.IdentityUserAssignedIdentitiesValue;
-import com.azure.resourcemanager.resources.models.OverrideKind;
-import com.azure.resourcemanager.resources.models.OverrideModel;
-import com.azure.resourcemanager.resources.models.PolicyAssignmentUpdate;
-import com.azure.resourcemanager.resources.models.ResourceIdentityType;
-import com.azure.resourcemanager.resources.models.ResourceSelector;
-import com.azure.resourcemanager.resources.models.Selector;
-import com.azure.resourcemanager.resources.models.SelectorKind;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyAssignments Update.
- */
-public final class PolicyAssignmentsUpdateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * updatePolicyAssignmentWithResourceSelectors.json
- */
- /**
- * Sample code: Update a policy assignment with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- updateAPolicyAssignmentWithResourceSelectors(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .updateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement",
- new PolicyAssignmentUpdate()
- .withResourceSelectors(Arrays.asList(new ResourceSelector().withName("SDPRegions")
- .withSelectors(Arrays.asList(new Selector().withKind(SelectorKind.RESOURCE_LOCATION)
- .withIn(Arrays.asList("eastus2euap", "centraluseuap")))))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * updatePolicyAssignmentWithUserAssignedIdentity.json
- */
- /**
- * Sample code: Update a policy assignment with a user assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- updateAPolicyAssignmentWithAUserAssignedIdentity(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .updateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- new PolicyAssignmentUpdate().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
- new IdentityUserAssignedIdentitiesValue()))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * updatePolicyAssignmentWithOverrides.json
- */
- /**
- * Sample code: Update a policy assignment with overrides.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateAPolicyAssignmentWithOverrides(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .updateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "CostManagement",
- new PolicyAssignmentUpdate().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")))))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * updatePolicyAssignmentWithIdentity.json
- */
- /**
- * Sample code: Update a policy assignment with a system assigned identity.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- updateAPolicyAssignmentWithASystemAssignedIdentity(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyAssignments()
- .updateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", "EnforceNaming",
- new PolicyAssignmentUpdate().withLocation("eastus")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)),
- 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/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java
deleted file mode 100644
index 3dba6f20d6b9..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java
+++ /dev/null
@@ -1,71 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionVersionInner;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyDefinitionVersions CreateOrUpdateAtManagementGroup.
- */
-public final class PolicyDefinitionVersionsCreateOrUpdateAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicyDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Create or update a policy definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyDefinitionVersionAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .createOrUpdateAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming", "1.2.1",
- new PolicyDefinitionVersionInner().withMode("All")
- .withDisplayName("Enforce resource naming convention")
- .withDescription("Force resource names to begin with given 'prefix' and/or end with given 'suffix'")
- .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"if\":{\"not\":{\"field\":\"name\",\"like\":\"[concat(parameters('prefix'), '*', parameters('suffix'))]\"}},\"then\":{\"effect\":\"deny\"}}",
- Object.class, SerializerEncoding.JSON))
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Naming\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("prefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Prefix")
- .withDescription("Resource name prefix")
- .withAdditionalProperties(mapOf())),
- "suffix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Suffix")
- .withDescription("Resource name suffix")
- .withAdditionalProperties(mapOf()))))
- .withVersion("1.2.1"),
- 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/PolicyDefinitionVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java
deleted file mode 100644
index dd57fd21fea3..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,69 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionVersionInner;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyDefinitionVersions CreateOrUpdate.
- */
-public final class PolicyDefinitionVersionsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicyDefinitionVersion.json
- */
- /**
- * Sample code: Create or update a policy definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .createOrUpdateWithResponse("ResourceNaming", "1.2.1", new PolicyDefinitionVersionInner().withMode("All")
- .withDisplayName("Enforce resource naming convention")
- .withDescription("Force resource names to begin with given 'prefix' and/or end with given 'suffix'")
- .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"if\":{\"not\":{\"field\":\"name\",\"like\":\"[concat(parameters('prefix'), '*', parameters('suffix'))]\"}},\"then\":{\"effect\":\"deny\"}}",
- Object.class, SerializerEncoding.JSON))
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Naming\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("prefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Prefix")
- .withDescription("Resource name prefix")
- .withAdditionalProperties(mapOf())),
- "suffix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Suffix")
- .withDescription("Resource name suffix")
- .withAdditionalProperties(mapOf()))))
- .withVersion("1.2.1"), 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/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.java
deleted file mode 100644
index 51440d0c00a5..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteAtManagementGroupSamples.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 PolicyDefinitionVersions DeleteAtManagementGroup.
- */
-public final class PolicyDefinitionVersionsDeleteAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Delete a policy definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- deleteAPolicyDefinitionVersionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .deleteAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming", "1.2.1",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 370191abf6f8..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsDeleteSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitionVersions Delete.
- */
-public final class PolicyDefinitionVersionsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyDefinitionVersion.json
- */
- /**
- * Sample code: Delete a policy definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicyDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .deleteWithResponse("ResourceNaming", "1.2.1", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 586b6f45f552..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetAtManagementGroupSamples.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 PolicyDefinitionVersions GetAtManagementGroup.
- */
-public final class PolicyDefinitionVersionsGetAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Retrieve a policy definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyDefinitionVersionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .getAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming", "1.2.1",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 473dd611bf53..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitionVersions GetBuiltIn.
- */
-public final class PolicyDefinitionVersionsGetBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getBuiltinPolicyDefinitionVersion.json
- */
- /**
- * Sample code: Retrieve a built-in policy definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveABuiltInPolicyDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .getBuiltInWithResponse("7433c107-6db4-4ad1-b57a-a76dce0154a1", "1.2.1", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index e1769c6da400..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsGetSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitionVersions Get.
- */
-public final class PolicyDefinitionVersionsGetSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyDefinitionVersion.json
- */
- /**
- * Sample code: Retrieve a policy definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .getWithResponse("ResourceNaming", "1.2.1", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 56128a1f607e..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllAtManagementGroupSamples.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 PolicyDefinitionVersions ListAllAtManagementGroup.
- */
-public final class PolicyDefinitionVersionsListAllAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllPolicyDefinitionVersionsByManagementGroup.json
- */
- /**
- * Sample code: List all policy definition versions at management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyDefinitionVersionsAtManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .listAllAtManagementGroupWithResponse("MyManagementGroup", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 9640334bc6cd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllBuiltinsSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitionVersions ListAllBuiltins.
- */
-public final class PolicyDefinitionVersionsListAllBuiltinsSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllBuiltInPolicyDefinitionVersions.json
- */
- /**
- * Sample code: List all built-in policy definition versions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listAllBuiltInPolicyDefinitionVersions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .listAllBuiltinsWithResponse(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 0a2624968701..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListAllSamples.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 PolicyDefinitionVersions ListAll.
- */
-public final class PolicyDefinitionVersionsListAllSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllPolicyDefinitionVersions.json
- */
- /**
- * Sample code: List all policy definition versions at subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyDefinitionVersionsAtSubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .listAllWithResponse(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3f1630aa6785..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitionVersions ListBuiltIn.
- */
-public final class PolicyDefinitionVersionsListBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listBuiltInPolicyDefinitionVersions.json
- */
- /**
- * Sample code: List built-in policy definition versions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listBuiltInPolicyDefinitionVersions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .listBuiltIn("06a78e20-9358-41c9-923c-fb736d382a12", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 2c26dcbeb15f..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListByManagementGroupSamples.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 PolicyDefinitionVersions ListByManagementGroup.
- */
-public final class PolicyDefinitionVersionsListByManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyDefinitionVersionsByManagementGroup.json
- */
- /**
- * Sample code: List policy definition versions by management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyDefinitionVersionsByManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .listByManagementGroup("MyManagementGroup", "ResourceNaming", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index be72badeeca0..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionVersionsListSamples.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 PolicyDefinitionVersions List.
- */
-public final class PolicyDefinitionVersionsListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyDefinitionVersions.json
- */
- /**
- * Sample code: List policy definition versions by subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyDefinitionVersionsBySubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitionVersions()
- .list("ResourceNaming", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 69c1966a3475..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java
+++ /dev/null
@@ -1,70 +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.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.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyDefinitions CreateOrUpdateAtManagementGroup.
- */
-public final class PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicyDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Create or update a policy definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyDefinitionAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .createOrUpdateAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming",
- new PolicyDefinitionInner().withMode("All")
- .withDisplayName("Enforce resource naming convention")
- .withDescription("Force resource names to begin with given 'prefix' and/or end with given 'suffix'")
- .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"if\":{\"not\":{\"field\":\"name\",\"like\":\"[concat(parameters('prefix'), '*', parameters('suffix'))]\"}},\"then\":{\"effect\":\"deny\"}}",
- Object.class, SerializerEncoding.JSON))
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Naming\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("prefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Prefix")
- .withDescription("Resource name prefix")
- .withAdditionalProperties(mapOf())),
- "suffix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Suffix")
- .withDescription("Resource name suffix")
- .withAdditionalProperties(mapOf())))),
- 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/PolicyDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java
deleted file mode 100644
index 4acc4c4f5e7c..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,105 +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.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.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicyDefinitions CreateOrUpdate.
- */
-public final class PolicyDefinitionsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicyDefinitionAdvancedParams.json
- */
- /**
- * Sample code: Create or update a policy definition with advanced parameters.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyDefinitionWithAdvancedParameters(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .createOrUpdateWithResponse("EventHubDiagnosticLogs", new PolicyDefinitionInner().withMode("Indexed")
- .withDisplayName("Event Hubs should have diagnostic logging enabled")
- .withDescription(
- "Audit enabling of logs and retain them up to a year. This enables recreation of activity trails for investigation purposes when a security incident occurs or your network is compromised")
- .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"if\":{\"equals\":\"Microsoft.EventHub/namespaces\",\"field\":\"type\"},\"then\":{\"effect\":\"AuditIfNotExists\",\"details\":{\"type\":\"Microsoft.Insights/diagnosticSettings\",\"existenceCondition\":{\"allOf\":[{\"equals\":\"true\",\"field\":\"Microsoft.Insights/diagnosticSettings/logs[*].retentionPolicy.enabled\"},{\"equals\":\"[parameters('requiredRetentionDays')]\",\"field\":\"Microsoft.Insights/diagnosticSettings/logs[*].retentionPolicy.days\"}]}}}}",
- Object.class, SerializerEncoding.JSON))
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Event Hub\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("requiredRetentionDays", new ParameterDefinitionsValue()
- .withType(ParameterType.INTEGER)
- .withAllowedValues(Arrays.asList(0, 30, 90, 180, 365))
- .withDefaultValue(365)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Required retention (days)")
- .withDescription("The required diagnostic logs retention in days")
- .withAdditionalProperties(mapOf())))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicyDefinition.json
- */
- /**
- * Sample code: Create or update a policy definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyDefinition(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .createOrUpdateWithResponse("ResourceNaming", new PolicyDefinitionInner().withMode("All")
- .withDisplayName("Enforce resource naming convention")
- .withDescription("Force resource names to begin with given 'prefix' and/or end with given 'suffix'")
- .withPolicyRule(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"if\":{\"not\":{\"field\":\"name\",\"like\":\"[concat(parameters('prefix'), '*', parameters('suffix'))]\"}},\"then\":{\"effect\":\"deny\"}}",
- Object.class, SerializerEncoding.JSON))
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Naming\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("prefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Prefix")
- .withDescription("Resource name prefix")
- .withAdditionalProperties(mapOf())),
- "suffix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withMetadata(new ParameterDefinitionsValueMetadata().withDisplayName("Suffix")
- .withDescription("Resource name suffix")
- .withAdditionalProperties(mapOf())))),
- 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/PolicyDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java
deleted file mode 100644
index 3d44f77601c9..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.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 PolicyDefinitions DeleteAtManagementGroup.
- */
-public final class PolicyDefinitionsDeleteAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Delete a policy definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- deleteAPolicyDefinitionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .deleteAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index e1510c1be657..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitions Delete.
- */
-public final class PolicyDefinitionsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicyDefinition.json
- */
- /**
- * Sample code: Delete a policy definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicyDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .deleteWithResponse("ResourceNaming", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8a35808c451c..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.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 PolicyDefinitions GetAtManagementGroup.
- */
-public final class PolicyDefinitionsGetAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicyDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Retrieve a policy definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyDefinitionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .getAtManagementGroupWithResponse("MyManagementGroup", "ResourceNaming", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3793506ff734..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitions GetBuiltIn.
- */
-public final class PolicyDefinitionsGetBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getBuiltinPolicyDefinition.json
- */
- /**
- * Sample code: Retrieve a built-in policy definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveABuiltInPolicyDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .getBuiltInWithResponse("7433c107-6db4-4ad1-b57a-a76dce0154a1", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3a314cc5eb41..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.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 PolicyDefinitions Get.
- */
-public final class PolicyDefinitionsGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/getPolicyDefinition.
- * json
- */
- /**
- * Sample code: Retrieve a policy definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .getWithResponse("ResourceNaming", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index d0adfd3350cd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitions ListBuiltIn.
- */
-public final class PolicyDefinitionsListBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listBuiltInPolicyDefinitions.json
- */
- /**
- * Sample code: List built-in policy definitions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listBuiltInPolicyDefinitions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .listBuiltIn(null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 5ab1244ee8ab..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java
+++ /dev/null
@@ -1,27 +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 PolicyDefinitions ListByManagementGroup.
- */
-public final class PolicyDefinitionsListByManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicyDefinitionsByManagementGroup.json
- */
- /**
- * Sample code: List policy definitions by management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listPolicyDefinitionsByManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .listByManagementGroup("MyManagementGroup", null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3557f5a237e0..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.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 PolicyDefinitions List.
- */
-public final class PolicyDefinitionsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/listPolicyDefinitions
- * .json
- */
- /**
- * Sample code: List policy definitions by subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listPolicyDefinitionsBySubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyDefinitions()
- .list(null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ed5964d39caa..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,85 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicyExemptionInner;
-import com.azure.resourcemanager.resources.models.AssignmentScopeValidation;
-import com.azure.resourcemanager.resources.models.ExemptionCategory;
-import com.azure.resourcemanager.resources.models.ResourceSelector;
-import com.azure.resourcemanager.resources.models.Selector;
-import com.azure.resourcemanager.resources.models.SelectorKind;
-import java.io.IOException;
-import java.util.Arrays;
-
-/**
- * Samples for PolicyExemptions CreateOrUpdate.
- */
-public final class PolicyExemptionsCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * createOrUpdatePolicyExemption.json
- */
- /**
- * Sample code: Create or update a policy exemption.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyExemption(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .createOrUpdateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM",
- new PolicyExemptionInner().withPolicyAssignmentId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement")
- .withPolicyDefinitionReferenceIds(Arrays.asList("Limit_Skus"))
- .withExemptionCategory(ExemptionCategory.WAIVER)
- .withDisplayName("Exempt demo cluster")
- .withDescription("Exempt demo cluster from limit sku")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"reason\":\"Temporary exemption for a expensive VM demo\"}", Object.class,
- SerializerEncoding.JSON)),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * createOrUpdatePolicyExemptionWithResourceSelectors.json
- */
- /**
- * Sample code: Create or update a policy exemption with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicyExemptionWithResourceSelectors(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .createOrUpdateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM",
- new PolicyExemptionInner().withPolicyAssignmentId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement")
- .withPolicyDefinitionReferenceIds(Arrays.asList("Limit_Skus"))
- .withExemptionCategory(ExemptionCategory.WAIVER)
- .withDisplayName("Exempt demo cluster")
- .withDescription("Exempt demo cluster from limit sku")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"reason\":\"Temporary exemption for a expensive VM demo\"}", Object.class,
- SerializerEncoding.JSON))
- .withResourceSelectors(Arrays.asList(new ResourceSelector().withName("SDPRegions")
- .withSelectors(Arrays.asList(new Selector().withKind(SelectorKind.RESOURCE_LOCATION)
- .withIn(Arrays.asList("eastus2euap", "centraluseuap"))))))
- .withAssignmentScopeValidation(AssignmentScopeValidation.DEFAULT),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 54b10313d942..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.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 PolicyExemptions Delete.
- */
-public final class PolicyExemptionsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * deletePolicyExemption.json
- */
- /**
- * Sample code: Delete a policy exemption.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicyExemption(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .deleteWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 9982f49a9b66..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java
+++ /dev/null
@@ -1,49 +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 PolicyExemptions Get.
- */
-public final class PolicyExemptionsGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * getPolicyExemptionWithResourceSelectors.json
- */
- /**
- * Sample code: Retrieve a policy exemption with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicyExemptionWithResourceSelectors(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM", com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * getPolicyExemption.json
- */
- /**
- * Sample code: Retrieve a policy exemption.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicyExemption(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .getWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 11280371ebfb..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.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 PolicyExemptions ListByResourceGroup.
- */
-public final class PolicyExemptionsListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * listPolicyExemptionsForResourceGroup.json
- */
- /**
- * Sample code: List policy exemptions that apply to a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyExemptionsThatApplyToAResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .listByResourceGroup("TestResourceGroup", "atScope()", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index fcc7123fab5f..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.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 PolicyExemptions ListForManagementGroup.
- */
-public final class PolicyExemptionsListForManagementGroupSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * listPolicyExemptionsForManagementGroup.json
- */
- /**
- * Sample code: List policy exemptions that apply to a management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyExemptionsThatApplyToAManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .listForManagementGroup("DevOrg", "atScope()", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 773f344b809a..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.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 PolicyExemptions ListForResource.
- */
-public final class PolicyExemptionsListForResourceSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * listPolicyExemptionsForResource.json
- */
- /**
- * Sample code: List all policy exemptions that apply to a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyExemptionsThatApplyToAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .listForResource("TestResourceGroup", "Microsoft.Compute", "virtualMachines/MyTestVm", "domainNames",
- "MyTestComputer.cloudapp.net", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ea90b7f25579..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.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 PolicyExemptions List.
- */
-public final class PolicyExemptionsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * listPolicyExemptionsForSubscription.json
- */
- /**
- * Sample code: List policy exemptions that apply to a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicyExemptionsThatApplyToASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .list("atScope()", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 3611cb93928a..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java
+++ /dev/null
@@ -1,43 +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.models.AssignmentScopeValidation;
-import com.azure.resourcemanager.resources.models.PolicyExemptionUpdate;
-import com.azure.resourcemanager.resources.models.ResourceSelector;
-import com.azure.resourcemanager.resources.models.Selector;
-import com.azure.resourcemanager.resources.models.SelectorKind;
-import java.util.Arrays;
-
-/**
- * Samples for PolicyExemptions Update.
- */
-public final class PolicyExemptionsUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/
- * updatePolicyExemptionWithResourceSelectors.json
- */
- /**
- * Sample code: Update a policy exemption with resource selectors.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- updateAPolicyExemptionWithResourceSelectors(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicyExemptions()
- .updateWithResponse("subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
- "DemoExpensiveVM",
- new PolicyExemptionUpdate()
- .withResourceSelectors(Arrays.asList(new ResourceSelector().withName("SDPRegions")
- .withSelectors(Arrays.asList(new Selector().withKind(SelectorKind.RESOURCE_LOCATION)
- .withIn(Arrays.asList("eastus2euap", "centraluseuap"))))))
- .withAssignmentScopeValidation(AssignmentScopeValidation.DEFAULT),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index d3ead9dfa8c0..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples.java
+++ /dev/null
@@ -1,69 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionVersionInner;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionReference;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicySetDefinitionVersions CreateOrUpdateAtManagementGroup.
- */
-public final class PolicySetDefinitionVersionsCreateOrUpdateAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Create or update a policy set definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinitionVersionAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .createOrUpdateAtManagementGroupWithResponse("MyManagementGroup", "CostManagement", "1.2.1",
- new PolicySetDefinitionVersionInner().withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withParameters(mapOf("listOfAllowedSKUs",
- new ParameterValuesValue()
- .withValue(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class,
- SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus"),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withParameters(mapOf("prefix", new ParameterValuesValue().withValue("DeptA"), "suffix",
- new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming")))
- .withVersion("1.2.1"),
- 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/PolicySetDefinitionVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java
deleted file mode 100644
index b63c127d03a6..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,79 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionVersionInner;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionReference;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicySetDefinitionVersions CreateOrUpdate.
- */
-public final class PolicySetDefinitionVersionsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinitionVersion.json
- */
- /**
- * Sample code: Create or update a policy set definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .createOrUpdateWithResponse("CostManagement", "1.2.1",
- new PolicySetDefinitionVersionInner().withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("namePrefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withDefaultValue("myPrefix")
- .withMetadata(new ParameterDefinitionsValueMetadata()
- .withDisplayName("Prefix to enforce on resource names")
- .withAdditionalProperties(mapOf()))))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withParameters(mapOf("listOfAllowedSKUs",
- new ParameterValuesValue()
- .withValue(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class,
- SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus"),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withParameters(
- mapOf("prefix", new ParameterValuesValue().withValue("[parameters('namePrefix')]"),
- "suffix", new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming")))
- .withVersion("1.2.1"),
- 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/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.java
deleted file mode 100644
index aa939e50ae54..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteAtManagementGroupSamples.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 PolicySetDefinitionVersions DeleteAtManagementGroup.
- */
-public final class PolicySetDefinitionVersionsDeleteAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicySetDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Delete a policy set definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- deleteAPolicySetDefinitionVersionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .deleteAtManagementGroupWithResponse("MyManagementGroup", "CostManagement", "1.2.1",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index dfcd8d6dd6a4..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsDeleteSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitionVersions Delete.
- */
-public final class PolicySetDefinitionVersionsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicySetDefinitionVersion.json
- */
- /**
- * Sample code: Delete a policy set definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicySetDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .deleteWithResponse("CostManagement", "1.2.1", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index f72a182c06c1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetAtManagementGroupSamples.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 PolicySetDefinitionVersions GetAtManagementGroup.
- */
-public final class PolicySetDefinitionVersionsGetAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicySetDefinitionVersionAtManagementGroup.json
- */
- /**
- * Sample code: Retrieve a policy set definition version at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicySetDefinitionVersionAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .getAtManagementGroupWithResponse("MyManagementGroup", "CostManagement", "1.2.1", null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index f392df3a14c4..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetBuiltInSamples.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 PolicySetDefinitionVersions GetBuiltIn.
- */
-public final class PolicySetDefinitionVersionsGetBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getBuiltInPolicySetDefinitionVersion.json
- */
- /**
- * Sample code: Retrieve a built-in policy set definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveABuiltInPolicySetDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .getBuiltInWithResponse("1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "1.2.1", null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index a6844d06597e..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsGetSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitionVersions Get.
- */
-public final class PolicySetDefinitionVersionsGetSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicySetDefinitionVersion.json
- */
- /**
- * Sample code: Retrieve a policy set definition version.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicySetDefinitionVersion(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .getWithResponse("CostManagement", "1.2.1", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index d38c04b69e4f..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllAtManagementGroupSamples.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 PolicySetDefinitionVersions ListAllAtManagementGroup.
- */
-public final class PolicySetDefinitionVersionsListAllAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllPolicySetDefinitionVersionsByManagementGroup.json
- */
- /**
- * Sample code: List all policy definition versions at management group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyDefinitionVersionsAtManagementGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .listAllAtManagementGroupWithResponse("MyManagementGroup", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 2d44dc25c0a8..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllBuiltinsSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitionVersions ListAllBuiltins.
- */
-public final class PolicySetDefinitionVersionsListAllBuiltinsSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllBuiltInPolicySetDefinitionVersions.json
- */
- /**
- * Sample code: List all built-in policy definition versions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listAllBuiltInPolicyDefinitionVersions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .listAllBuiltinsWithResponse(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 4075029ddb7e..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListAllSamples.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 PolicySetDefinitionVersions ListAll.
- */
-public final class PolicySetDefinitionVersionsListAllSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listAllPolicySetDefinitionVersions.json
- */
- /**
- * Sample code: List all policy definition versions at subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listAllPolicyDefinitionVersionsAtSubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .listAllWithResponse(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index cfc4bc8eabda..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitionVersions ListBuiltIn.
- */
-public final class PolicySetDefinitionVersionsListBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listBuiltInPolicySetDefinitionVersions.json
- */
- /**
- * Sample code: List built-in policy set definitions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listBuiltInPolicySetDefinitions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .listBuiltIn("1f3afdf9-d0c9-4c3d-847f-89da613e70a8", null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8e2de045c209..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListByManagementGroupSamples.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 PolicySetDefinitionVersions ListByManagementGroup.
- */
-public final class PolicySetDefinitionVersionsListByManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicySetDefinitionVersionsByManagementGroup.json
- */
- /**
- * Sample code: List policy set definitions at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicySetDefinitionsAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .listByManagementGroup("MyManagementGroup", "CostManagement", null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 7fbfcd96d274..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionVersionsListSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitionVersions List.
- */
-public final class PolicySetDefinitionVersionsListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicySetDefinitionVersions.json
- */
- /**
- * Sample code: List policy set definitions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listPolicySetDefinitions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitionVersions()
- .list("CostManagement", null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8a837573b922..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java
+++ /dev/null
@@ -1,115 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionInner;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionGroup;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionReference;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicySetDefinitions CreateOrUpdateAtManagementGroup.
- */
-public final class PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinitionWithGroupsAtManagementGroup.json
- */
- /**
- * Sample code: Create or update a policy set definition with groups at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinitionWithGroupsAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .createOrUpdateAtManagementGroupWithResponse("MyManagementGroup", "CostManagement",
- new PolicySetDefinitionInner().withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withParameters(mapOf("listOfAllowedSKUs",
- new ParameterValuesValue()
- .withValue(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class,
- SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus")
- .withGroupNames(Arrays.asList("CostSaving")),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withParameters(mapOf("prefix", new ParameterValuesValue().withValue("DeptA"), "suffix",
- new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming")
- .withGroupNames(Arrays.asList("Organizational"))))
- .withPolicyDefinitionGroups(Arrays.asList(
- new PolicyDefinitionGroup().withName("CostSaving")
- .withDisplayName("Cost Management Policies")
- .withDescription("Policies designed to control spend within a subscription."),
- new PolicyDefinitionGroup().withName("Organizational")
- .withDisplayName("Organizational Policies")
- .withDescription(
- "Policies that help enforce resource organization standards within a subscription."))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Create or update a policy set definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinitionAtManagementGroupLevel(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .createOrUpdateAtManagementGroupWithResponse("MyManagementGroup", "CostManagement",
- new PolicySetDefinitionInner().withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withParameters(mapOf("listOfAllowedSKUs",
- new ParameterValuesValue()
- .withValue(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class,
- SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus"),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withParameters(mapOf("prefix", new ParameterValuesValue().withValue("DeptA"), "suffix",
- new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming"))),
- 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/PolicySetDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java
deleted file mode 100644
index c392c970ff88..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,125 +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.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionInner;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue;
-import com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata;
-import com.azure.resourcemanager.resources.models.ParameterType;
-import com.azure.resourcemanager.resources.models.ParameterValuesValue;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionGroup;
-import com.azure.resourcemanager.resources.models.PolicyDefinitionReference;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for PolicySetDefinitions CreateOrUpdate.
- */
-public final class PolicySetDefinitionsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinitionWithGroups.json
- */
- /**
- * Sample code: Create or update a policy set definition with groups.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinitionWithGroups(
- com.azure.resourcemanager.AzureResourceManager azure) throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .createOrUpdateWithResponse("CostManagement", new PolicySetDefinitionInner()
- .withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withDefinitionVersion("1.*.*")
- .withParameters(mapOf("listOfAllowedSKUs", new ParameterValuesValue().withValue(SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class, SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus")
- .withGroupNames(Arrays.asList("CostSaving")),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withDefinitionVersion("1.*.*")
- .withParameters(mapOf("prefix", new ParameterValuesValue().withValue("DeptA"), "suffix",
- new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming")
- .withGroupNames(Arrays.asList("Organizational"))))
- .withPolicyDefinitionGroups(Arrays.asList(
- new PolicyDefinitionGroup().withName("CostSaving")
- .withDisplayName("Cost Management Policies")
- .withDescription("Policies designed to control spend within a subscription."),
- new PolicyDefinitionGroup().withName("Organizational")
- .withDisplayName("Organizational Policies")
- .withDescription(
- "Policies that help enforce resource organization standards within a subscription."))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * createOrUpdatePolicySetDefinition.json
- */
- /**
- * Sample code: Create or update a policy set definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAPolicySetDefinition(com.azure.resourcemanager.AzureResourceManager azure)
- throws IOException {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .createOrUpdateWithResponse("CostManagement",
- new PolicySetDefinitionInner().withDisplayName("Cost Management")
- .withDescription("Policies to enforce low cost storage SKUs")
- .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{\"category\":\"Cost Management\"}", Object.class, SerializerEncoding.JSON))
- .withParameters(mapOf("namePrefix",
- new ParameterDefinitionsValue().withType(ParameterType.STRING)
- .withDefaultValue("myPrefix")
- .withMetadata(new ParameterDefinitionsValueMetadata()
- .withDisplayName("Prefix to enforce on resource names")
- .withAdditionalProperties(mapOf()))))
- .withPolicyDefinitions(Arrays.asList(new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1")
- .withParameters(mapOf("listOfAllowedSKUs",
- new ParameterValuesValue()
- .withValue(SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("[\"Standard_GRS\",\"Standard_LRS\"]", Object.class,
- SerializerEncoding.JSON))))
- .withPolicyDefinitionReferenceId("Limit_Skus"),
- new PolicyDefinitionReference().withPolicyDefinitionId(
- "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming")
- .withParameters(
- mapOf("prefix", new ParameterValuesValue().withValue("[parameters('namePrefix')]"),
- "suffix", new ParameterValuesValue().withValue("-LC")))
- .withPolicyDefinitionReferenceId("Resource_Naming"))),
- 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/PolicySetDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java
deleted file mode 100644
index cf5afe1d88a1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.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 PolicySetDefinitions DeleteAtManagementGroup.
- */
-public final class PolicySetDefinitionsDeleteAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicySetDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Delete a policy set definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- deleteAPolicySetDefinitionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .deleteAtManagementGroupWithResponse("MyManagementGroup", "CostManagement",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 2b0780f69ffd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitions Delete.
- */
-public final class PolicySetDefinitionsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * deletePolicySetDefinition.json
- */
- /**
- * Sample code: Delete a policy set definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deleteAPolicySetDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .deleteWithResponse("CostManagement", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 099a53bda690..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.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 PolicySetDefinitions GetAtManagementGroup.
- */
-public final class PolicySetDefinitionsGetAtManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicySetDefinitionAtManagementGroup.json
- */
- /**
- * Sample code: Retrieve a policy set definition at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- retrieveAPolicySetDefinitionAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .getAtManagementGroupWithResponse("MyManagementGroup", "CostManagement", null,
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8aac011535a8..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitions GetBuiltIn.
- */
-public final class PolicySetDefinitionsGetBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getBuiltInPolicySetDefinition.json
- */
- /**
- * Sample code: Retrieve a built-in policy set definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveABuiltInPolicySetDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .getBuiltInWithResponse("1f3afdf9-d0c9-4c3d-847f-89da613e70a8", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 4b56c6eec4df..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitions Get.
- */
-public final class PolicySetDefinitionsGetSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * getPolicySetDefinition.json
- */
- /**
- * Sample code: Retrieve a policy set definition.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void retrieveAPolicySetDefinition(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .getWithResponse("CostManagement", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 0b10fa5125d1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitions ListBuiltIn.
- */
-public final class PolicySetDefinitionsListBuiltInSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listBuiltInPolicySetDefinitions.json
- */
- /**
- * Sample code: List built-in policy set definitions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listBuiltInPolicySetDefinitions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .listBuiltIn(null, null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 1326a99f7ad7..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.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 PolicySetDefinitions ListByManagementGroup.
- */
-public final class PolicySetDefinitionsListByManagementGroupSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicySetDefinitionsByManagementGroup.json
- */
- /**
- * Sample code: List policy set definitions at management group level.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- listPolicySetDefinitionsAtManagementGroupLevel(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .listByManagementGroup("MyManagementGroup", null, null, null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index c54724dd780a..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java
+++ /dev/null
@@ -1,27 +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 PolicySetDefinitions List.
- */
-public final class PolicySetDefinitionsListSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2023-04-01/examples/
- * listPolicySetDefinitions.json
- */
- /**
- * Sample code: List policy set definitions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void listPolicySetDefinitions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .policyClient()
- .getPolicySetDefinitions()
- .list(null, null, null, 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
deleted file mode 100644
index 54ac9b478581..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.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 ProviderResourceTypes List.
- */
-public final class ProviderResourceTypesListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviderResourceTypes.
- * json
- */
- /**
- * Sample code: Get provider resource types.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getProviderResourceTypes(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getProviderResourceTypes()
- .listWithResponse("Microsoft.TestRP", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index bcf5069a599a..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.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 Providers GetAtTenantScope.
- */
-public final class ProvidersGetAtTenantScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetNamedProviderAtTenant.
- * json
- */
- /**
- * Sample code: Get a resource provider at tenant scope.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getAResourceProviderAtTenantScope(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getProviders()
- .getAtTenantScopeWithResponse("Microsoft.Storage", "resourceTypes/aliases",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index b4c33e88cedb..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java
+++ /dev/null
@@ -1,27 +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 Providers Get.
- */
-public final class ProvidersGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProvider.json
- */
- /**
- * Sample code: Get provider.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getProvider(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getProviders()
- .getWithResponse("Microsoft.TestRP1", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 826ded4286c2..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java
+++ /dev/null
@@ -1,23 +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 Providers List.
- */
-public final class ProvidersListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviders.json
- */
- /**
- * Sample code: Get providers.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getProviders(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources().manager().serviceClient().getProviders().list(null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 9d719d3f173b..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.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 Providers ProviderPermissions.
- */
-public final class ProvidersProviderPermissionsSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetProviderPermissions.
- * json
- */
- /**
- * Sample code: Get provider resource types.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getProviderResourceTypes(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getProviders()
- .providerPermissionsWithResponse("Microsoft.TestRP", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 8932bc869064..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.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;
-
-import com.azure.resourcemanager.resources.fluent.models.ResourceGroupInner;
-
-/**
- * Samples for ResourceGroups CreateOrUpdate.
- */
-public final class ResourceGroupsCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/CreateResourceGroup.json
- */
- /**
- * Sample code: Create or update a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createOrUpdateAResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .createOrUpdateWithResponse("my-resource-group", new ResourceGroupInner().withLocation("eastus"),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 98fe980a93a5..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java
+++ /dev/null
@@ -1,47 +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 ResourceGroups Delete.
- */
-public final class ResourceGroupsDeleteSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/
- * ForceDeleteVMsInResourceGroup.json
- */
- /**
- * Sample code: Force delete all the Virtual Machines in a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void
- forceDeleteAllTheVirtualMachinesInAResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .delete("my-resource-group", "Microsoft.Compute/virtualMachines", com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/
- * ForceDeleteVMsAndVMSSInResourceGroup.json
- */
- /**
- * Sample code: Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void forceDeleteAllTheVirtualMachinesAndVirtualMachineScaleSetsInAResourceGroup(
- com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .delete("my-resource-group", "Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index a19a0455c69b..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java
+++ /dev/null
@@ -1,72 +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.models.ExportTemplateOutputFormat;
-import com.azure.resourcemanager.resources.models.ExportTemplateRequest;
-import java.util.Arrays;
-
-/**
- * Samples for ResourceGroups ExportTemplate.
- */
-public final class ResourceGroupsExportTemplateSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/
- * ExportResourceGroupAsBicep.json
- */
- /**
- * Sample code: Export a resource group as Bicep.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void exportAResourceGroupAsBicep(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .exportTemplate("my-resource-group",
- new ExportTemplateRequest().withResources(Arrays.asList("*"))
- .withOptions("IncludeParameterDefaultValue,IncludeComments")
- .withOutputFormat(ExportTemplateOutputFormat.BICEP),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/ExportResourceGroup.json
- */
- /**
- * Sample code: Export a resource group.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void exportAResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .exportTemplate("my-resource-group", new ExportTemplateRequest().withResources(Arrays.asList("*"))
- .withOptions("IncludeParameterDefaultValue,IncludeComments"), com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/
- * ExportResourceGroupWithFiltering.json
- */
- /**
- * Sample code: Export a resource group with filtering.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void exportAResourceGroupWithFiltering(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getResourceGroups()
- .exportTemplate("my-resource-group", new ExportTemplateRequest().withResources(Arrays.asList(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/My.RP/myResourceType/myFirstResource"))
- .withOptions("SkipResourceNameParameterization"), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 58290cee0e9c..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.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;
-
-import com.azure.resourcemanager.resources.models.ResourceName;
-
-/**
- * Samples for ResourceName CheckResourceName.
- */
-public final class ResourceNameCheckResourceNameSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/CheckResourceName.json
- */
- /**
- * Sample code: CheckValidityForAResourceName.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void checkValidityForAResourceName(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getResourceNames()
- .checkResourceNameWithResponse(new ResourceName(), com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index ceacd4b66959..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,34 +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.SubscriptionFeatureRegistrationInner;
-import com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationProperties;
-
-/**
- * Samples for SubscriptionFeatureRegistrations CreateOrUpdate.
- */
-public final class SubscriptionFeatureRegistrationsCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/
- * SubscriptionFeatureRegistrationPUT.json
- */
- /**
- * Sample code: Creates a feature registration.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void createsAFeatureRegistration(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getSubscriptionFeatureRegistrations()
- .createOrUpdateWithResponse("subscriptionFeatureRegistrationGroupTestRG", "testFeature",
- new SubscriptionFeatureRegistrationInner()
- .withProperties(new SubscriptionFeatureRegistrationProperties()),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 35b1094795a1..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.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 SubscriptionFeatureRegistrations Delete.
- */
-public final class SubscriptionFeatureRegistrationsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/
- * SubscriptionFeatureRegistrationDELETE.json
- */
- /**
- * Sample code: Deletes a feature registration.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void deletesAFeatureRegistration(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getSubscriptionFeatureRegistrations()
- .deleteWithResponse("subscriptionFeatureRegistrationGroupTestRG", "testFeature",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index d21cbc8d70bd..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.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 SubscriptionFeatureRegistrations Get.
- */
-public final class SubscriptionFeatureRegistrationsGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/
- * SubscriptionFeatureRegistrationGET.json
- */
- /**
- * Sample code: Gets a feature registration.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getsAFeatureRegistration(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getSubscriptionFeatureRegistrations()
- .getWithResponse("subscriptionFeatureRegistrationGroupTestRG", "testFeature",
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 50d9043ba036..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.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 SubscriptionFeatureRegistrations ListBySubscription.
- */
-public final class SubscriptionFeatureRegistrationsListBySubscriptionSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/
- * SubscriptionFeatureRegistrationLIST.json
- */
- /**
- * Sample code: Gets a list of feature registrations.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getsAListOfFeatureRegistrations(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getSubscriptionFeatureRegistrations()
- .listBySubscription("subscriptionFeatureRegistrationGroupTestRG", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index e2bd6675a864..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.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 SubscriptionFeatureRegistrations List.
- */
-public final class SubscriptionFeatureRegistrationsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/
- * SubscriptionFeatureRegistrationLISTALL.json
- */
- /**
- * Sample code: Gets a list of feature registrations.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getsAListOfFeatureRegistrations(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .featureClient()
- .getSubscriptionFeatureRegistrations()
- .list(com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index 5325c8fcd199..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java
+++ /dev/null
@@ -1,33 +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.models.CheckZonePeersRequest;
-import java.util.Arrays;
-
-/**
- * Samples for Subscriptions CheckZonePeers.
- */
-public final class SubscriptionsCheckZonePeersSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/PostCheckZonePeers.json
- */
- /**
- * Sample code: GetLogicalZoneMapping.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getLogicalZoneMapping(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getSubscriptions()
- .checkZonePeersWithResponse("8d65815f-a5b6-402f-9298-045155da7d74",
- new CheckZonePeersRequest().withLocation("eastus")
- .withSubscriptionIds(Arrays.asList("subscriptions/11111111-1111-1111-1111-111111111111")),
- com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index b4103fd39c51..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java
+++ /dev/null
@@ -1,27 +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 Subscriptions Get.
- */
-public final class SubscriptionsGetSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscription.json
- */
- /**
- * Sample code: GetASingleSubscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getASingleSubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getSubscriptions()
- .getWithResponse("291bba3f-e0a5-47bc-a099-3bdcb2a50a05", com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index b27e73159edf..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java
+++ /dev/null
@@ -1,44 +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 Subscriptions ListLocations.
- */
-public final class SubscriptionsListLocationsSamples {
- /*
- * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/
- * GetLocationsWithExtendedLocations.json
- */
- /**
- * Sample code: GetLocationsWithExtendedLocations.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getLocationsWithExtendedLocations(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getSubscriptions()
- .listLocations("a1ffc958-d2c7-493e-9f1e-125a0477f536", true, com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetLocations.json
- */
- /**
- * Sample code: GetLocationsWithASubscriptionId.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getLocationsWithASubscriptionId(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getSubscriptions()
- .listLocations("a1ffc958-d2c7-493e-9f1e-125a0477f536", null, com.azure.core.util.Context.NONE);
- }
-}
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
deleted file mode 100644
index bd4ddcc1c5a3..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java
+++ /dev/null
@@ -1,27 +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 Subscriptions List.
- */
-public final class SubscriptionsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscriptions.json
- */
- /**
- * Sample code: GetAllSubscriptions.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getAllSubscriptions(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .subscriptionClient()
- .getSubscriptions()
- .list(com.azure.core.util.Context.NONE);
- }
-}
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/TagOperationsCreateOrUpdateAtScopeSamples.java
deleted file mode 100644
index e96fd7ca5145..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java
+++ /dev/null
@@ -1,68 +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.TagsResourceInner;
-import com.azure.resourcemanager.resources.models.Tags;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for TagOperations CreateOrUpdateAtScope.
- */
-public final class TagOperationsCreateOrUpdateAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PutTagsResource.json
- */
- /**
- * Sample code: Update tags on a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .createOrUpdateAtScope(
- "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm",
- new TagsResourceInner().withProperties(
- new Tags().withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PutTagsSubscription.json
- */
- /**
- * Sample code: Update tags on a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .createOrUpdateAtScope("subscriptions/00000000-0000-0000-0000-000000000000",
- new TagsResourceInner().withProperties(
- new Tags().withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))),
- 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/TagOperationsDeleteAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java
deleted file mode 100644
index b61aa8d8d94b..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java
+++ /dev/null
@@ -1,47 +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 TagOperations DeleteAtScope.
- */
-public final class TagOperationsDeleteAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/DeleteTagsResource.json
- */
- /**
- * Sample code: Update tags on a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .deleteAtScope(
- "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm",
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/DeleteTagsSubscription.
- * json
- */
- /**
- * Sample code: Update tags on a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .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/TagOperationsGetAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java
deleted file mode 100644
index b5d8e49c3d35..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java
+++ /dev/null
@@ -1,47 +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 TagOperations GetAtScope.
- */
-public final class TagOperationsGetAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetTagsResource.json
- */
- /**
- * Sample code: Get tags on a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getTagsOnAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .getAtScopeWithResponse(
- "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm",
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/GetTagsSubscription.json
- */
- /**
- * Sample code: Get tags on a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getTagsOnASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .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/TagOperationsUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java
deleted file mode 100644
index bf7cd4c431a6..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java
+++ /dev/null
@@ -1,72 +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.models.Tags;
-import com.azure.resourcemanager.resources.models.TagsPatchOperation;
-import com.azure.resourcemanager.resources.models.TagsPatchResource;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for TagOperations UpdateAtScope.
- */
-public final class TagOperationsUpdateAtScopeSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PatchTagsResource.json
- */
- /**
- * Sample code: Update tags on a resource.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .updateAtScope(
- "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm",
- new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE)
- .withProperties(new Tags()
- .withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2025-04-01/examples/PatchTagsSubscription.
- * json
- */
- /**
- * Sample code: Update tags on a subscription.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void updateTagsOnASubscription(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources()
- .manager()
- .serviceClient()
- .getTagOperations()
- .updateAtScope("subscriptions/00000000-0000-0000-0000-000000000000",
- new TagsPatchResource().withOperation(TagsPatchOperation.REPLACE)
- .withProperties(new Tags()
- .withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder"))),
- 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/TenantsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java
deleted file mode 100644
index 525cd08b2cc0..000000000000
--- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java
+++ /dev/null
@@ -1,23 +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 Tenants List.
- */
-public final class TenantsListSamples {
- /*
- * x-ms-original-file:
- * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetTenants.json
- */
- /**
- * Sample code: GetAllTenants.
- *
- * @param azure The entry point for accessing resource management APIs in Azure.
- */
- public static void getAllTenants(com.azure.resourcemanager.AzureResourceManager azure) {
- azure.genericResources().manager().subscriptionClient().getTenants().list(com.azure.core.util.Context.NONE);
- }
-}
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..e094e24b2a80 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
@@ -22,60 +22,57 @@
public interface PolicyAssignmentsClient
extends InnerSupportsListing, InnerSupportsDelete {
/**
- * Deletes a policy assignment.
- *
- * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
- * assignment is the part of its ID preceding
- * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * Retrieves the policy assignment with the given ID.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to delete.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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> deleteWithResponseAsync(String scope, String policyAssignmentName);
+ Mono> getByIdWithResponseAsync(String policyAssignmentId);
/**
- * Deletes a policy assignment.
- *
- * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
- * assignment is the part of its ID preceding
- * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * Retrieves the policy assignment with the given ID.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to delete.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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 on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono deleteAsync(String scope, String policyAssignmentName);
+ Mono getByIdAsync(String policyAssignmentId);
/**
- * Deletes a policy assignment.
- *
- * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
- * assignment is the part of its ID preceding
- * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * Retrieves the policy assignment with the given ID.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to delete.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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.
@@ -83,89 +80,90 @@ public interface PolicyAssignmentsClient
* @return the policy assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String scope, String policyAssignmentName, Context context);
+ Response getByIdWithResponse(String policyAssignmentId, Context context);
/**
- * Deletes a policy assignment.
- *
- * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
- * assignment is the part of its ID preceding
- * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * Retrieves the policy assignment with the given ID.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to delete.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner delete(String scope, String policyAssignmentName);
+ PolicyAssignmentInner getById(String policyAssignmentId);
/**
* Creates or updates a policy assignment.
*
- * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
- * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
- *
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
+ * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+ * policy applies to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for the policy assignment.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment.
* @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> createWithResponseAsync(String scope, String policyAssignmentName,
+ Mono> createByIdWithResponseAsync(String policyAssignmentId,
PolicyAssignmentInner parameters);
/**
* Creates or updates a policy assignment.
*
- * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
- * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
- *
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
+ * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+ * policy applies to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for the policy assignment.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment.
* @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 on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono createAsync(String scope, String policyAssignmentName,
- PolicyAssignmentInner parameters);
+ Mono createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters);
/**
* Creates or updates a policy assignment.
*
- * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
- * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
- *
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
+ * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+ * policy applies to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for the policy assignment.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment.
* @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.
@@ -173,85 +171,94 @@ Mono createAsync(String scope, String policyAssignmentNam
* @return the policy assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(String scope, String policyAssignmentName,
- PolicyAssignmentInner parameters, Context context);
+ Response createByIdWithResponse(String policyAssignmentId, PolicyAssignmentInner parameters,
+ Context context);
/**
* Creates or updates a policy assignment.
*
- * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
- * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
- *
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
+ * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+ * policy applies to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for the policy assignment.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner create(String scope, String policyAssignmentName, PolicyAssignmentInner parameters);
+ PolicyAssignmentInner createById(String policyAssignmentId, PolicyAssignmentInner parameters);
/**
- * Retrieves a policy assignment.
- *
- * This operation retrieves a single policy assignment, given its name and the scope it was created at.
+ * Updates a policy assignment.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
+ * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
+ * to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to get.
- * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
- * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment patch request.
* @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> getWithResponseAsync(String scope, String policyAssignmentName,
- String expand);
+ Mono> updateByIdWithResponseAsync(String policyAssignmentId,
+ PolicyAssignmentUpdate parameters);
/**
- * Retrieves a policy assignment.
- *
- * This operation retrieves a single policy assignment, given its name and the scope it was created at.
+ * Updates a policy assignment.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
+ * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
+ * to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to get.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment patch request.
* @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 on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono getAsync(String scope, String policyAssignmentName);
+ Mono updateByIdAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters);
/**
- * Retrieves a policy assignment.
- *
- * This operation retrieves a single policy assignment, given its name and the scope it was created at.
+ * Updates a policy assignment.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
+ * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
+ * to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to get.
- * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
- * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment patch request.
* @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.
@@ -259,88 +266,87 @@ Mono> getWithResponseAsync(String scope, String
* @return the policy assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String scope, String policyAssignmentName, String expand,
+ Response updateByIdWithResponse(String policyAssignmentId, PolicyAssignmentUpdate parameters,
Context context);
/**
- * Retrieves a policy assignment.
- *
- * This operation retrieves a single policy assignment, given its name and the scope it was created at.
+ * Updates a policy assignment.
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
+ * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
+ * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
+ * to all resources in the group. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
+ * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
+ * (format: '/subscriptions/{subscriptionId}'), resource group (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment to get.
+ *
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param parameters Parameters for policy assignment patch request.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner get(String scope, String policyAssignmentName);
+ PolicyAssignmentInner updateById(String policyAssignmentId, PolicyAssignmentUpdate parameters);
/**
- * Updates a policy assignment.
+ * Deletes a policy assignment.
*
- * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
- * resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
+ * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
+ * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+ * '/subscriptions/{subscriptionId}' (subscription),
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * (resource).
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for policy assignment patch request.
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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> updateWithResponseAsync(String scope, String policyAssignmentName,
- PolicyAssignmentUpdate parameters);
+ Mono> deleteByIdWithResponseAsync(String policyAssignmentId);
/**
- * Updates a policy assignment.
+ * Deletes a policy assignment.
*
- * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
- * resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
+ * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
+ * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+ * '/subscriptions/{subscriptionId}' (subscription),
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * (resource).
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for policy assignment patch request.
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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 on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono updateAsync(String scope, String policyAssignmentName,
- PolicyAssignmentUpdate parameters);
+ Mono deleteByIdAsync(String policyAssignmentId);
/**
- * Updates a policy assignment.
+ * Deletes a policy assignment.
*
- * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
- * resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
+ * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
+ * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+ * '/subscriptions/{subscriptionId}' (subscription),
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * (resource).
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for policy assignment patch request.
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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.
@@ -348,323 +354,284 @@ Mono updateAsync(String scope, String policyAssignmentNam
* @return the policy assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String scope, String policyAssignmentName,
- PolicyAssignmentUpdate parameters, Context context);
+ Response deleteByIdWithResponse(String policyAssignmentId, Context context);
/**
- * Updates a policy assignment.
+ * Deletes a policy assignment.
*
- * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
- * resources contained within their scope. For example, when you assign a policy at resource group scope, that
- * policy applies to all resources in the group.
+ * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
+ * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+ * '/subscriptions/{subscriptionId}' (subscription),
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+ * (resource).
*
- * @param scope The scope of the policy assignment. Valid scopes are: management group (format:
- * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
- * '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- * @param policyAssignmentName The name of the policy assignment.
- * @param parameters Parameters for policy assignment patch request.
+ * @param policyAssignmentId The ID of the policy assignment to get. Use the format
+ * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner update(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters);
+ PolicyAssignmentInner deleteById(String policyAssignmentId);
/**
- * Retrieves all policy assignments that apply to a resource group.
- *
- * This operation retrieves the list of all policy assignments associated with the given resource group in the given
- * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
- * assignments associated with the resource group, including those that apply directly or apply from containing
- * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
- * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
- * in the unfiltered list except those applied to resources contained within the resource group. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
- * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value} that apply to the resource group.
+ * This operation retrieves a single policy assignment, given its name and the scope it was created at.
*
- * @param resourceGroupName The name of the resource group that contains policy assignments.
- * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
- * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
- * in the unfiltered list except those applied to sub scopes contained within the given scope. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
- * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value}.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
* @param expand Comma-separated list of additional properties to be included in the response. Supported values are
* 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the policy assignment along with {@link Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, String expand,
- Integer top);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(String scope, String policyAssignmentName,
+ String expand);
/**
- * Retrieves all policy assignments that apply to a resource group.
- *
- * This operation retrieves the list of all policy assignments associated with the given resource group in the given
- * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
- * assignments associated with the resource group, including those that apply directly or apply from containing
- * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
- * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
- * in the unfiltered list except those applied to resources contained within the resource group. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
- * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value} that apply to the resource group.
+ * This operation retrieves a single policy assignment, given its name and the scope it was created at.
*
- * @param resourceGroupName The name of the resource group that contains policy assignments.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the policy assignment on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listByResourceGroupAsync(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String scope, String policyAssignmentName);
/**
- * Retrieves all policy assignments that apply to a resource group.
- *
- * This operation retrieves the list of all policy assignments associated with the given resource group in the given
- * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
- * assignments associated with the resource group, including those that apply directly or apply from containing
- * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
- * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
- * in the unfiltered list except those applied to resources contained within the resource group. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
- * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value} that apply to the resource group.
+ * This operation retrieves a single policy assignment, given its name and the scope it was created at.
*
- * @param resourceGroupName The name of the resource group that contains policy assignments.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the policy assignment along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String scope, String policyAssignmentName, String expand,
+ Context context);
/**
- * Retrieves all policy assignments that apply to a resource group.
- *
- * This operation retrieves the list of all policy assignments associated with the given resource group in the given
- * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
- * assignments associated with the resource group, including those that apply directly or apply from containing
- * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
- * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
- * in the unfiltered list except those applied to resources contained within the resource group. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
- * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value} that apply to the resource group.
+ * This operation retrieves a single policy assignment, given its name and the scope it was created at.
*
- * @param resourceGroupName The name of the resource group that contains policy assignments.
- * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
- * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
- * in the unfiltered list except those applied to sub scopes contained within the given scope. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
- * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value}.
- * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
- * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
- * @param context The context to associate with this operation.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the policy assignment.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
- Integer top, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyAssignmentInner get(String scope, String policyAssignmentName);
/**
- * Retrieves all policy assignments that apply to a resource.
- *
- * This operation retrieves the list of all policy assignments associated with the specified resource in the given
- * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
- * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
- * all policy assignments associated with the resource, including those that apply directly or from all containing
- * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
- * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
- * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
- * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
- * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
- * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
- * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
- * should not be provided (or provided as ''). For example a web app could be specified as
- * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
- * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
- * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
- * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
- * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
- * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
- * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
+ * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
+ * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
*
- * @param resourceGroupName The name of the resource group containing the resource.
- * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
- * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
- * @param parentResourcePath The parent resource path. Use empty string if there is none.
- * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
- * Microsoft.Web/sites).
- * @param resourceName The name of the resource.
- * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
- * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
- * in the unfiltered list except those applied to sub scopes contained within the given scope. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
- * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value}.
- * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
- * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for the policy assignment.
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the policy assignment along with {@link Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listForResourceAsync(String resourceGroupName, String resourceProviderNamespace,
- String parentResourcePath, String resourceType, String resourceName, String filter, String expand, Integer top);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> createWithResponseAsync(String scope, String policyAssignmentName,
+ PolicyAssignmentInner parameters);
/**
- * Retrieves all policy assignments that apply to a resource.
- *
- * This operation retrieves the list of all policy assignments associated with the specified resource in the given
- * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
- * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
- * all policy assignments associated with the resource, including those that apply directly or from all containing
- * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
- * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
- * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
- * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
- * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
- * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
- * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
- * should not be provided (or provided as ''). For example a web app could be specified as
- * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
- * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
- * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
- * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
- * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
- * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
- * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
+ * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
+ * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
*
- * @param resourceGroupName The name of the resource group containing the resource.
- * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
- * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
- * @param parentResourcePath The parent resource path. Use empty string if there is none.
- * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
- * Microsoft.Web/sites).
- * @param resourceName The name of the resource.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for the policy assignment.
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the policy assignment on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listForResourceAsync(String resourceGroupName, String resourceProviderNamespace,
- String parentResourcePath, String resourceType, String resourceName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createAsync(String scope, String policyAssignmentName,
+ PolicyAssignmentInner parameters);
/**
- * Retrieves all policy assignments that apply to a resource.
- *
- * This operation retrieves the list of all policy assignments associated with the specified resource in the given
- * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
- * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
- * all policy assignments associated with the resource, including those that apply directly or from all containing
- * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
- * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
- * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
- * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
- * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
- * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
- * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
- * should not be provided (or provided as ''). For example a web app could be specified as
- * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
- * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
- * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
- * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
- * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
- * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
- * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
+ * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
+ * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
*
- * @param resourceGroupName The name of the resource group containing the resource.
- * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
- * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
- * @param parentResourcePath The parent resource path. Use empty string if there is none.
- * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
- * Microsoft.Web/sites).
- * @param resourceName The name of the resource.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for the policy assignment.
+ * @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the policy assignment along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listForResource(String resourceGroupName, String resourceProviderNamespace,
- String parentResourcePath, String resourceType, String resourceName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(String scope, String policyAssignmentName,
+ PolicyAssignmentInner parameters, Context context);
/**
- * Retrieves all policy assignments that apply to a resource.
+ * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to
+ * all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
*
- * This operation retrieves the list of all policy assignments associated with the specified resource in the given
- * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
- * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
- * all policy assignments associated with the resource, including those that apply directly or from all containing
- * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
- * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
- * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
- * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
- * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
- * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
- * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
- * should not be provided (or provided as ''). For example a web app could be specified as
- * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
- * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
- * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
- * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
- * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
- * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
- * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for the policy assignment.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyAssignmentInner create(String scope, String policyAssignmentName, PolicyAssignmentInner parameters);
+
+ /**
+ * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
+ * resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
*
- * @param resourceGroupName The name of the resource group containing the resource.
- * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
- * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
- * @param parentResourcePath The parent resource path. Use empty string if there is none.
- * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
- * Microsoft.Web/sites).
- * @param resourceName The name of the resource.
- * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
- * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
- * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
- * in the unfiltered list except those applied to sub scopes contained within the given scope. If
- * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
- * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
- * of the policy definition whose id is {value}.
- * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
- * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for policy assignment patch request.
+ * @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> updateWithResponseAsync(String scope, String policyAssignmentName,
+ PolicyAssignmentUpdate parameters);
+
+ /**
+ * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
+ * resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for policy assignment patch request.
+ * @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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono updateAsync(String scope, String policyAssignmentName,
+ PolicyAssignmentUpdate parameters);
+
+ /**
+ * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
+ * resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for policy assignment patch request.
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the policy assignment along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listForResource(String resourceGroupName, String resourceProviderNamespace,
- String parentResourcePath, String resourceType, String resourceName, String filter, String expand, Integer top,
- Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String scope, String policyAssignmentName,
+ PolicyAssignmentUpdate parameters, Context context);
+
+ /**
+ * This operation updates a policy assignment with the given scope and name. Policy assignments apply to all
+ * resources contained within their scope. For example, when you assign a policy at resource group scope, that
+ * policy applies to all resources in the group.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @param parameters Parameters for policy assignment patch request.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyAssignmentInner update(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters);
+
+ /**
+ * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
+ * assignment is the part of its ID preceding
+ * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @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> deleteWithResponseAsync(String scope, String policyAssignmentName);
+
+ /**
+ * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
+ * assignment is the part of its ID preceding
+ * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String scope, String policyAssignmentName);
+
+ /**
+ * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
+ * assignment is the part of its ID preceding
+ * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @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 assignment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String scope, String policyAssignmentName, Context context);
+
+ /**
+ * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy
+ * assignment is the part of its ID preceding
+ * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param policyAssignmentName The name of the policy assignment to get.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyAssignmentInner delete(String scope, String policyAssignmentName);
/**
* Retrieves all policy assignments that apply to a management group.
@@ -677,7 +644,7 @@ PagedIterable listForResource(String resourceGroupName, S
* provided, the returned list includes all policy assignments of the policy definition whose id is {value} that
* apply to the management group.
*
- * @param managementGroupId The ID of the management group.
+ * @param managementGroupId The management group ID.
* @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
* or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
* is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
@@ -691,7 +658,7 @@ PagedIterable listForResource(String resourceGroupName, S
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listForManagementGroupAsync(String managementGroupId, String filter, String expand,
@@ -708,11 +675,11 @@ PagedFlux listForManagementGroupAsync(String managementGr
* provided, the returned list includes all policy assignments of the policy definition whose id is {value} that
* apply to the management group.
*
- * @param managementGroupId The ID of the management group.
+ * @param managementGroupId The management group ID.
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listForManagementGroupAsync(String managementGroupId);
@@ -728,11 +695,11 @@ PagedFlux listForManagementGroupAsync(String managementGr
* provided, the returned list includes all policy assignments of the policy definition whose id is {value} that
* apply to the management group.
*
- * @param managementGroupId The ID of the management group.
+ * @param managementGroupId The management group ID.
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForManagementGroup(String managementGroupId);
@@ -748,7 +715,7 @@ PagedFlux listForManagementGroupAsync(String managementGr
* provided, the returned list includes all policy assignments of the policy definition whose id is {value} that
* apply to the management group.
*
- * @param managementGroupId The ID of the management group.
+ * @param managementGroupId The management group ID.
* @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
* or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
* is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
@@ -763,7 +730,7 @@ PagedFlux listForManagementGroupAsync(String managementGr
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForManagementGroup(String managementGroupId, String filter, String expand,
@@ -796,7 +763,7 @@ PagedIterable listForManagementGroup(String managementGro
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listAsync(String filter, String expand, Integer top);
@@ -817,7 +784,7 @@ PagedIterable listForManagementGroup(String managementGro
*
* @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 list of policy assignments as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listAsync();
@@ -838,7 +805,7 @@ PagedIterable listForManagementGroup(String managementGro
*
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -871,368 +838,293 @@ PagedIterable listForManagementGroup(String managementGro
* @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 list of policy assignments as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String filter, String expand, Integer top, Context context);
/**
- * Deletes a policy assignment.
+ * Retrieves all policy assignments that apply to a resource.
*
- * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
- * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
- * '/subscriptions/{subscriptionId}' (subscription),
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
- * (resource).
+ * This operation retrieves the list of all policy assignments associated with the specified resource in the given
+ * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
+ * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
+ * all policy assignments associated with the resource, including those that apply directly or from all containing
+ * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
+ * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
+ * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
+ * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
+ * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
+ * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
+ * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
+ * should not be provided (or provided as ''). For example a web app could be specified as
+ * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
+ * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
+ * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
+ * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
+ * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
+ * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
+ * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
*
- * @param policyAssignmentId The ID of the policy assignment to delete. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
+ * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
+ * @param parentResourcePath The parent resource path. Use empty string if there is none.
+ * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
+ * Microsoft.Web/sites).
+ * @param resourceName The name of the resource.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
+ * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
+ * in the unfiltered list except those applied to sub scopes contained within the given scope. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
+ * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value}.
+ * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
+ * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> deleteByIdWithResponseAsync(String policyAssignmentId);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listForResourceAsync(String resourceGroupName, String resourceProviderNamespace,
+ String parentResourcePath, String resourceType, String resourceName, String filter, String expand, Integer top);
/**
- * Deletes a policy assignment.
+ * Retrieves all policy assignments that apply to a resource.
*
- * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
- * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
- * '/subscriptions/{subscriptionId}' (subscription),
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
- * (resource).
+ * This operation retrieves the list of all policy assignments associated with the specified resource in the given
+ * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
+ * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
+ * all policy assignments associated with the resource, including those that apply directly or from all containing
+ * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
+ * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
+ * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
+ * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
+ * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
+ * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
+ * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
+ * should not be provided (or provided as ''). For example a web app could be specified as
+ * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
+ * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
+ * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
+ * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
+ * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
+ * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
+ * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
*
- * @param policyAssignmentId The ID of the policy assignment to delete. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
+ * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
+ * @param parentResourcePath The parent resource path. Use empty string if there is none.
+ * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
+ * Microsoft.Web/sites).
+ * @param resourceName The name of the resource.
* @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 on successful completion of {@link Mono}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono deleteByIdAsync(String policyAssignmentId);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listForResourceAsync(String resourceGroupName, String resourceProviderNamespace,
+ String parentResourcePath, String resourceType, String resourceName);
/**
- * Deletes a policy assignment.
+ * Retrieves all policy assignments that apply to a resource.
*
- * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
- * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
- * '/subscriptions/{subscriptionId}' (subscription),
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
- * (resource).
- *
- * @param policyAssignmentId The ID of the policy assignment to delete. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @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 assignment along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteByIdWithResponse(String policyAssignmentId, Context context);
-
- /**
- * Deletes a policy assignment.
- *
- * This operation deletes the policy with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope}
- * are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
- * '/subscriptions/{subscriptionId}' (subscription),
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
- * (resource).
- *
- * @param policyAssignmentId The ID of the policy assignment to delete. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner deleteById(String policyAssignmentId);
-
- /**
- * Creates or updates a policy assignment.
- *
- * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
- * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
- * policy applies to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to create. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment.
- * @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> createByIdWithResponseAsync(String policyAssignmentId,
- PolicyAssignmentInner parameters);
-
- /**
- * Creates or updates a policy assignment.
- *
- * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
- * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
- * policy applies to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to create. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment.
- * @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 on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters);
-
- /**
- * Creates or updates a policy assignment.
- *
- * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
- * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
- * policy applies to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to create. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment.
- * @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 assignment along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createByIdWithResponse(String policyAssignmentId, PolicyAssignmentInner parameters,
- Context context);
-
- /**
- * Creates or updates a policy assignment.
- *
- * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope
- * apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
- * policy applies to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the specified resource in the given
+ * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
+ * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
+ * all policy assignments associated with the resource, including those that apply directly or from all containing
+ * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
+ * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
+ * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
+ * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
+ * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
+ * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
+ * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
+ * should not be provided (or provided as ''). For example a web app could be specified as
+ * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
+ * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
+ * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
+ * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
+ * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
+ * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
+ * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
*
- * @param policyAssignmentId The ID of the policy assignment to create. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
+ * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
+ * @param parentResourcePath The parent resource path. Use empty string if there is none.
+ * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
+ * Microsoft.Web/sites).
+ * @param resourceName The name of the resource.
* @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.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner createById(String policyAssignmentId, PolicyAssignmentInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listForResource(String resourceGroupName, String resourceProviderNamespace,
+ String parentResourcePath, String resourceType, String resourceName);
/**
- * Retrieves the policy assignment with the given ID.
+ * Retrieves all policy assignments that apply to a resource.
*
- * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the specified resource in the given
+ * resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()',
+ * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes
+ * all policy assignments associated with the resource, including those that apply directly or from all containing
+ * scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the
+ * returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered
+ * list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the
+ * returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq
+ * '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is
+ * {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific
+ * resource. If the resource is not part of a parent resource (the more common case), the parent resource path
+ * should not be provided (or provided as ''). For example a web app could be specified as
+ * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites',
+ * {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be
+ * provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} ==
+ * 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames',
+ * {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately
+ * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '',
+ * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').
*
- * @param policyAssignmentId The ID of the policy assignment to get. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual
+ * machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).
+ * @param parentResourcePath The parent resource path. Use empty string if there is none.
+ * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from
+ * Microsoft.Web/sites).
+ * @param resourceName The name of the resource.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
+ * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
+ * in the unfiltered list except those applied to sub scopes contained within the given scope. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
+ * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value}.
* @param expand Comma-separated list of additional properties to be included in the response. Supported values are
* 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @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 assignment along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> getByIdWithResponseAsync(String policyAssignmentId, String expand);
-
- /**
- * Retrieves the policy assignment with the given ID.
- *
- * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to get. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @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 on successful completion of {@link Mono}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono getByIdAsync(String policyAssignmentId);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listForResource(String resourceGroupName, String resourceProviderNamespace,
+ String parentResourcePath, String resourceType, String resourceName, String filter, String expand, Integer top,
+ Context context);
/**
- * Retrieves the policy assignment with the given ID.
- *
- * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the given resource group in the given
+ * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
+ * assignments associated with the resource group, including those that apply directly or apply from containing
+ * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
+ * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
+ * in the unfiltered list except those applied to resources contained within the resource group. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
+ * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value} that apply to the resource group.
*
- * @param policyAssignmentId The ID of the policy assignment to get. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
+ * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
+ * in the unfiltered list except those applied to sub scopes contained within the given scope. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
+ * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value}.
* @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the policy assignment along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByIdWithResponse(String policyAssignmentId, String expand, Context context);
-
- /**
- * Retrieves the policy assignment with the given ID.
- *
- * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to get. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner getById(String policyAssignmentId);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, String expand,
+ Integer top);
/**
- * Updates a policy assignment.
- *
- * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
- * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
- * to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the given resource group in the given
+ * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
+ * assignments associated with the resource group, including those that apply directly or apply from containing
+ * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
+ * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
+ * in the unfiltered list except those applied to resources contained within the resource group. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
+ * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value} that apply to the resource group.
*
- * @param policyAssignmentId The ID of the policy assignment to update. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment patch request.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> updateByIdWithResponseAsync(String policyAssignmentId,
- PolicyAssignmentUpdate parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByResourceGroupAsync(String resourceGroupName);
/**
- * Updates a policy assignment.
- *
- * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
- * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
- * to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the given resource group in the given
+ * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
+ * assignments associated with the resource group, including those that apply directly or apply from containing
+ * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
+ * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
+ * in the unfiltered list except those applied to resources contained within the resource group. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
+ * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value} that apply to the resource group.
*
- * @param policyAssignmentId The ID of the policy assignment to update. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment patch request.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 on successful completion of {@link Mono}.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono updateByIdAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Updates a policy assignment.
- *
- * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
- * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
- * to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+ * This operation retrieves the list of all policy assignments associated with the given resource group in the given
+ * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy
+ * assignments associated with the resource group, including those that apply directly or apply from containing
+ * scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is
+ * provided, the returned list includes all policy assignments that apply to the resource group, which is everything
+ * in the unfiltered list except those applied to resources contained within the resource group. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource
+ * group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value} that apply to the resource group.
*
- * @param policyAssignmentId The ID of the policy assignment to update. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment patch request.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()'
+ * or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope()
+ * is provided, the returned list only includes all policy assignments that apply to the scope, which is everything
+ * in the unfiltered list except those applied to sub scopes contained within the given scope. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given
+ * scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments
+ * of the policy definition whose id is {value}.
+ * @param expand Comma-separated list of additional properties to be included in the response. Supported values are
+ * 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 assignment along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateByIdWithResponse(String policyAssignmentId, PolicyAssignmentUpdate parameters,
- Context context);
-
- /**
- * Updates a policy assignment.
- *
- * This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all
- * resources contained in that scope. For example, when you assign a policy to a resource group that policy applies
- * to all resources in the group. Policy assignment IDs have this format:
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are:
- * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription
- * (format: '/subscriptions/{subscriptionId}'), resource group (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
- *
- * @param policyAssignmentId The ID of the policy assignment to update. Use the format
- * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- * @param parameters Parameters for policy assignment patch request.
- * @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.
+ * @return the response of a PolicyAssignment list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyAssignmentInner updateById(String policyAssignmentId, PolicyAssignmentUpdate parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
+ Integer top, Context context);
}
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..511df5027107 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
@@ -25,6 +25,13 @@ public interface PolicyClient {
*/
String getEndpoint();
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -40,18 +47,11 @@ public interface PolicyClient {
Duration getDefaultPollInterval();
/**
- * Gets the DataPolicyManifestsClient object to access its operations.
- *
- * @return the DataPolicyManifestsClient object.
- */
- DataPolicyManifestsClient getDataPolicyManifests();
-
- /**
- * Gets the PolicyDefinitionsClient object to access its operations.
+ * Gets the PolicyAssignmentsClient object to access its operations.
*
- * @return the PolicyDefinitionsClient object.
+ * @return the PolicyAssignmentsClient object.
*/
- PolicyDefinitionsClient getPolicyDefinitions();
+ PolicyAssignmentsClient getPolicyAssignments();
/**
* Gets the PolicyDefinitionVersionsClient object to access its operations.
@@ -61,30 +61,30 @@ public interface PolicyClient {
PolicyDefinitionVersionsClient getPolicyDefinitionVersions();
/**
- * Gets the PolicySetDefinitionsClient object to access its operations.
+ * Gets the PolicySetDefinitionVersionsClient object to access its operations.
*
- * @return the PolicySetDefinitionsClient object.
+ * @return the PolicySetDefinitionVersionsClient object.
*/
- PolicySetDefinitionsClient getPolicySetDefinitions();
+ PolicySetDefinitionVersionsClient getPolicySetDefinitionVersions();
/**
- * Gets the PolicySetDefinitionVersionsClient object to access its operations.
+ * Gets the PolicyDefinitionsClient object to access its operations.
*
- * @return the PolicySetDefinitionVersionsClient object.
+ * @return the PolicyDefinitionsClient object.
*/
- PolicySetDefinitionVersionsClient getPolicySetDefinitionVersions();
+ PolicyDefinitionsClient getPolicyDefinitions();
/**
- * Gets the PolicyAssignmentsClient object to access its operations.
+ * Gets the PolicySetDefinitionsClient object to access its operations.
*
- * @return the PolicyAssignmentsClient object.
+ * @return the PolicySetDefinitionsClient object.
*/
- PolicyAssignmentsClient getPolicyAssignments();
+ PolicySetDefinitionsClient getPolicySetDefinitions();
/**
- * Gets the PolicyExemptionsClient object to access its operations.
+ * Gets the PolicyTokensClient object to access its operations.
*
- * @return the PolicyExemptionsClient object.
+ * @return the PolicyTokensClient object.
*/
- PolicyExemptionsClient getPolicyExemptions();
+ PolicyTokensClient getPolicyTokens();
}
diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionVersionsClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionVersionsClient.java
index 45b00ad3a86b..9e995244cc58 100644
--- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionVersionsClient.java
+++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionVersionsClient.java
@@ -26,7 +26,8 @@ public interface PolicyDefinitionVersionsClient extends InnerSupportsDelete> listAllBuiltinsWithResponseAsync();
@@ -38,7 +39,7 @@ public interface PolicyDefinitionVersionsClient extends InnerSupportsDelete listAllBuiltinsAsync();
@@ -52,7 +53,7 @@ public interface PolicyDefinitionVersionsClient extends InnerSupportsDelete listAllBuiltinsWithResponse(Context context);
@@ -64,129 +65,70 @@ public interface PolicyDefinitionVersionsClient extends InnerSupportsDelete>
- listAllAtManagementGroupWithResponseAsync(String managementGroupName);
-
- /**
- * Lists all policy definition versions at management group scope.
- *
- * This operation lists all the policy definition versions for all policy definitions at the management group scope.
+ * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
+ * @param policyDefinitionName The name of the policy definition.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 list of policy definition versions on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono listAllAtManagementGroupAsync(String managementGroupName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listBuiltInAsync(String policyDefinitionName, Integer top);
/**
- * Lists all policy definition versions at management group scope.
- *
- * This operation lists all the policy definition versions for all policy definitions at the management group scope.
+ * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
- * @param context The context to associate with this operation.
+ * @param policyDefinitionName The name of the policy definition.
* @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 list of policy definition versions along with {@link Response}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listAllAtManagementGroupWithResponse(String managementGroupName,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listBuiltInAsync(String policyDefinitionName);
/**
- * Lists all policy definition versions at management group scope.
- *
- * This operation lists all the policy definition versions for all policy definitions at the management group scope.
+ * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
+ * @param policyDefinitionName The name of the policy definition.
* @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 list of policy definition versions.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionListResultInner listAllAtManagementGroup(String managementGroupName);
-
- /**
- * Lists all policy definition versions within a subscription.
- *
- * This operation lists all the policy definition versions for all policy definitions within a subscription.
- *
- * @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 list of policy definition versions along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> listAllWithResponseAsync();
-
- /**
- * Lists all policy definition versions within a subscription.
- *
- * This operation lists all the policy definition versions for all policy definitions within a subscription.
- *
- * @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 list of policy definition versions on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono listAllAsync();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBuiltIn(String policyDefinitionName);
/**
- * Lists all policy definition versions within a subscription.
- *
- * This operation lists all the policy definition versions for all policy definitions within a subscription.
+ * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
*
+ * @param policyDefinitionName The name of the policy definition.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 list of policy definition versions along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listAllWithResponse(Context context);
-
- /**
- * Lists all policy definition versions within a subscription.
- *
- * This operation lists all the policy definition versions for all policy definitions within a subscription.
- *
- * @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 list of policy definition versions.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionListResultInner listAll();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBuiltIn(String policyDefinitionName, Integer top, Context context);
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves the built-in policy definition version with the given name.
*
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
- * @param parameters The policy definition 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.
@@ -194,36 +136,29 @@ Response listAllAtManagementGroupWithRes
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono> createOrUpdateWithResponseAsync(String policyDefinitionName,
- String policyDefinitionVersion, PolicyDefinitionVersionInner parameters);
+ Mono> getBuiltInWithResponseAsync(String policyDefinitionName,
+ String policyDefinitionVersion);
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves the built-in policy definition version with the given name.
*
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
- * @param parameters The policy definition 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 ID of the policy definition version on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono createOrUpdateAsync(String policyDefinitionName, String policyDefinitionVersion,
- PolicyDefinitionVersionInner parameters);
+ Mono getBuiltInAsync(String policyDefinitionName, String policyDefinitionVersion);
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves the built-in policy definition version with the given name.
*
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
- * @param parameters The policy definition 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.
@@ -231,164 +166,152 @@ Mono createOrUpdateAsync(String policyDefinitionNa
* @return the ID of the policy definition version along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String policyDefinitionName,
- String policyDefinitionVersion, PolicyDefinitionVersionInner parameters, Context context);
+ Response getBuiltInWithResponse(String policyDefinitionName,
+ String policyDefinitionVersion, Context context);
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves the built-in policy definition version with the given name.
*
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
- * @param parameters The policy definition 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 ID of the policy definition version.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionInner createOrUpdate(String policyDefinitionName, String policyDefinitionVersion,
- PolicyDefinitionVersionInner parameters);
+ PolicyDefinitionVersionInner getBuiltIn(String policyDefinitionName, String policyDefinitionVersion);
/**
- * Deletes a policy definition version in a subscription.
+ * Lists all policy definition versions at management group scope.
*
- * This operation deletes the policy definition version in the given subscription with the given name.
+ * This operation lists all the policy definition versions for all policy definitions at the management group scope.
*
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @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 {@link Response} on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono> deleteWithResponseAsync(String policyDefinitionName, String policyDefinitionVersion);
+ Mono>
+ listAllAtManagementGroupWithResponseAsync(String managementGroupName);
/**
- * Deletes a policy definition version in a subscription.
+ * Lists all policy definition versions at management group scope.
*
- * This operation deletes the policy definition version in the given subscription with the given name.
+ * This operation lists all the policy definition versions for all policy definitions at the management group scope.
*
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @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 A {@link Mono} that completes when a successful response is received.
+ * @return the response of a PolicyDefinitionVersion list operation on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono deleteAsync(String policyDefinitionName, String policyDefinitionVersion);
+ Mono listAllAtManagementGroupAsync(String managementGroupName);
/**
- * Deletes a policy definition version in a subscription.
+ * Lists all policy definition versions at management group scope.
*
- * This operation deletes the policy definition version in the given subscription with the given name.
+ * This operation lists all the policy definition versions for all policy definitions at the management group scope.
*
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @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 {@link Response}.
+ * @return the response of a PolicyDefinitionVersion list operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String policyDefinitionName, String policyDefinitionVersion, Context context);
+ Response listAllAtManagementGroupWithResponse(String managementGroupName,
+ Context context);
/**
- * Deletes a policy definition version in a subscription.
+ * Lists all policy definition versions at management group scope.
*
- * This operation deletes the policy definition version in the given subscription with the given name.
+ * This operation lists all the policy definition versions for all policy definitions at the management group scope.
*
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @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 response of a PolicyDefinitionVersion list operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String policyDefinitionName, String policyDefinitionVersion);
+ PolicyDefinitionVersionListResultInner listAllAtManagementGroup(String managementGroupName);
/**
- * Retrieves a policy definition version in a subscription.
- *
- * This operation retrieves the policy definition version in the given subscription with the given name.
+ * This operation retrieves a list of all the policy definition versions for the given policy definition in the
+ * given management group.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 ID of the policy definition version along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> getWithResponseAsync(String policyDefinitionName,
- String policyDefinitionVersion);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByManagementGroupAsync(String managementGroupName,
+ String policyDefinitionName, Integer top);
/**
- * Retrieves a policy definition version in a subscription.
- *
- * This operation retrieves the policy definition version in the given subscription with the given name.
+ * This operation retrieves a list of all the policy definition versions for the given policy definition in the
+ * given management group.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
* @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 ID of the policy definition version on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono getAsync(String policyDefinitionName, String policyDefinitionVersion);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByManagementGroupAsync(String managementGroupName,
+ String policyDefinitionName);
/**
- * Retrieves a policy definition version in a subscription.
- *
- * This operation retrieves the policy definition version in the given subscription with the given name.
+ * This operation retrieves a list of all the policy definition versions for the given policy definition in the
+ * given management group.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
- * @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 ID of the policy definition version along with {@link Response}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String policyDefinitionName, String policyDefinitionVersion,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByManagementGroup(String managementGroupName,
+ String policyDefinitionName);
/**
- * Retrieves a policy definition version in a subscription.
- *
- * This operation retrieves the policy definition version in the given subscription with the given name.
+ * This operation retrieves a list of all the policy definition versions for the given policy definition in the
+ * given management group.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @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 ID of the policy definition version.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionInner get(String policyDefinitionName, String policyDefinitionVersion);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByManagementGroup(String managementGroupName,
+ String policyDefinitionName, Integer top, Context context);
/**
- * Retrieves a built-in policy definition version.
- *
- * This operation retrieves the built-in policy definition version with the given name.
+ * This operation retrieves the policy definition version in the given management group with the given name.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
@@ -399,14 +322,13 @@ Response getWithResponse(String policyDefinitionNa
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono> getBuiltInWithResponseAsync(String policyDefinitionName,
- String policyDefinitionVersion);
+ Mono> getAtManagementGroupWithResponseAsync(String managementGroupName,
+ String policyDefinitionName, String policyDefinitionVersion);
/**
- * Retrieves a built-in policy definition version.
- *
- * This operation retrieves the built-in policy definition version with the given name.
+ * This operation retrieves the policy definition version in the given management group with the given name.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
@@ -416,13 +338,13 @@ Mono> getBuiltInWithResponseAsync(String
* @return the ID of the policy definition version on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono getBuiltInAsync(String policyDefinitionName, String policyDefinitionVersion);
+ Mono getAtManagementGroupAsync(String managementGroupName,
+ String policyDefinitionName, String policyDefinitionVersion);
/**
- * Retrieves a built-in policy definition version.
- *
- * This operation retrieves the built-in policy definition version with the given name.
+ * This operation retrieves the policy definition version in the given management group with the given name.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
@@ -433,14 +355,13 @@ Mono> getBuiltInWithResponseAsync(String
* @return the ID of the policy definition version along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getBuiltInWithResponse(String policyDefinitionName,
- String policyDefinitionVersion, Context context);
+ Response getAtManagementGroupWithResponse(String managementGroupName,
+ String policyDefinitionName, String policyDefinitionVersion, Context context);
/**
- * Retrieves a built-in policy definition version.
- *
- * This operation retrieves the built-in policy definition version with the given name.
+ * This operation retrieves the policy definition version in the given management group with the given name.
*
+ * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
* @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
* number, y is the minor version number, and z is the patch number.
@@ -450,11 +371,10 @@ Response getBuiltInWithResponse(String policyDefin
* @return the ID of the policy definition version.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionInner getBuiltIn(String policyDefinitionName, String policyDefinitionVersion);
+ PolicyDefinitionVersionInner getAtManagementGroup(String managementGroupName, String policyDefinitionName,
+ String policyDefinitionVersion);
/**
- * Creates or updates a policy definition version in a management group.
- *
* This operation creates or updates a policy definition version in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -474,8 +394,6 @@ Mono> createOrUpdateAtManagementGroupWith
PolicyDefinitionVersionInner parameters);
/**
- * Creates or updates a policy definition version in a management group.
- *
* This operation creates or updates a policy definition version in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -493,8 +411,6 @@ Mono createOrUpdateAtManagementGroupAsync(String m
String policyDefinitionName, String policyDefinitionVersion, PolicyDefinitionVersionInner parameters);
/**
- * Creates or updates a policy definition version in a management group.
- *
* This operation creates or updates a policy definition version in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -514,8 +430,6 @@ Response createOrUpdateAtManagementGroupWithRespon
Context context);
/**
- * Creates or updates a policy definition version in a management group.
- *
* This operation creates or updates a policy definition version in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -533,8 +447,6 @@ PolicyDefinitionVersionInner createOrUpdateAtManagementGroup(String managementGr
String policyDefinitionName, String policyDefinitionVersion, PolicyDefinitionVersionInner parameters);
/**
- * Deletes a policy definition in a management group.
- *
* This operation deletes the policy definition in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -551,8 +463,6 @@ Mono> deleteAtManagementGroupWithResponseAsync(String managementG
String policyDefinitionName, String policyDefinitionVersion);
/**
- * Deletes a policy definition in a management group.
- *
* This operation deletes the policy definition in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -569,8 +479,6 @@ Mono deleteAtManagementGroupAsync(String managementGroupName, String polic
String policyDefinitionVersion);
/**
- * Deletes a policy definition in a management group.
- *
* This operation deletes the policy definition in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -588,8 +496,6 @@ Response deleteAtManagementGroupWithResponse(String managementGroupName, S
String policyDefinitionVersion, Context context);
/**
- * Deletes a policy definition in a management group.
- *
* This operation deletes the policy definition in the given management group with the given name.
*
* @param managementGroupName The name of the management group. The name is case insensitive.
@@ -605,82 +511,57 @@ void deleteAtManagementGroup(String managementGroupName, String policyDefinition
String policyDefinitionVersion);
/**
- * Retrieve a policy definition version in a management group.
+ * Lists all policy definition versions within a subscription.
*
- * This operation retrieves the policy definition version in the given management group with the given name.
+ * This operation lists all the policy definition versions for all policy definitions within a subscription.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
- * @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 ID of the policy definition version along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono> getAtManagementGroupWithResponseAsync(String managementGroupName,
- String policyDefinitionName, String policyDefinitionVersion);
+ Mono> listAllWithResponseAsync();
/**
- * Retrieve a policy definition version in a management group.
+ * Lists all policy definition versions within a subscription.
*
- * This operation retrieves the policy definition version in the given management group with the given name.
+ * This operation lists all the policy definition versions for all policy definitions within a subscription.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
- * @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 ID of the policy definition version on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinitionVersion list operation on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono getAtManagementGroupAsync(String managementGroupName,
- String policyDefinitionName, String policyDefinitionVersion);
+ Mono listAllAsync();
/**
- * Retrieve a policy definition version in a management group.
+ * Lists all policy definition versions within a subscription.
*
- * This operation retrieves the policy definition version in the given management group with the given name.
+ * This operation lists all the policy definition versions for all policy definitions within a subscription.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
* @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 ID of the policy definition version along with {@link Response}.
+ * @return the response of a PolicyDefinitionVersion list operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getAtManagementGroupWithResponse(String managementGroupName,
- String policyDefinitionName, String policyDefinitionVersion, Context context);
+ Response listAllWithResponse(Context context);
/**
- * Retrieve a policy definition version in a management group.
+ * Lists all policy definition versions within a subscription.
*
- * This operation retrieves the policy definition version in the given management group with the given name.
+ * This operation lists all the policy definition versions for all policy definitions within a subscription.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
- * @param policyDefinitionName The name of the policy definition.
- * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
- * number, y is the minor version number, and z is the patch number.
- * @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 ID of the policy definition version.
+ * @return the response of a PolicyDefinitionVersion list operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionVersionInner getAtManagementGroup(String managementGroupName, String policyDefinitionName,
- String policyDefinitionVersion);
+ PolicyDefinitionVersionListResultInner listAll();
/**
- * Retrieves policy definition versions for a given policy definition in a subscription
- *
* This operation retrieves a list of all the policy definition versions for the given policy definition.
*
* @param policyDefinitionName The name of the policy definition.
@@ -688,42 +569,37 @@ PolicyDefinitionVersionInner getAtManagementGroup(String managementGroupName, St
* @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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listAsync(String policyDefinitionName, Integer top);
/**
- * Retrieves policy definition versions for a given policy definition in a subscription
- *
* This operation retrieves a list of all the policy definition versions for the given policy definition.
*
* @param policyDefinitionName The name of the policy definition.
* @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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux listAsync(String policyDefinitionName);
/**
- * Retrieves policy definition versions for a given policy definition in a subscription
- *
* This operation retrieves a list of all the policy definition versions for the given policy definition.
*
* @param policyDefinitionName The name of the policy definition.
* @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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String policyDefinitionName);
/**
- * Retrieves policy definition versions for a given policy definition in a subscription
- *
* This operation retrieves a list of all the policy definition versions for the given policy definition.
*
* @param policyDefinitionName The name of the policy definition.
@@ -732,138 +608,191 @@ PolicyDefinitionVersionInner getAtManagementGroup(String managementGroupName, St
* @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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return the response of a PolicyDefinitionVersion list operation as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String policyDefinitionName, Integer top, Context context);
/**
- * Retrieve built-in policy definition versions
- *
- * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
+ * This operation retrieves the policy definition version in the given subscription with the given name.
*
* @param policyDefinitionName The name of the policy definition.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
* @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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the ID of the policy definition version along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listBuiltInAsync(String policyDefinitionName, Integer top);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(String policyDefinitionName,
+ String policyDefinitionVersion);
/**
- * Retrieve built-in policy definition versions
+ * This operation retrieves the policy definition version in the given subscription with the given name.
*
- * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
+ * @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @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 ID of the policy definition version on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String policyDefinitionName, String policyDefinitionVersion);
+
+ /**
+ * This operation retrieves the policy definition version in the given subscription with the given name.
*
* @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the ID of the policy definition version along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listBuiltInAsync(String policyDefinitionName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String policyDefinitionName, String policyDefinitionVersion,
+ Context context);
/**
- * Retrieve built-in policy definition versions
+ * This operation retrieves the policy definition version in the given subscription with the given name.
*
- * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
+ * @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @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 ID of the policy definition version.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyDefinitionVersionInner get(String policyDefinitionName, String policyDefinitionVersion);
+
+ /**
+ * This operation creates or updates a policy definition in the given subscription with the given name.
*
* @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @param parameters The policy definition 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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return the ID of the policy definition version along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBuiltIn(String policyDefinitionName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> createOrUpdateWithResponseAsync(String policyDefinitionName,
+ String policyDefinitionVersion, PolicyDefinitionVersionInner parameters);
/**
- * Retrieve built-in policy definition versions
+ * This operation creates or updates a policy definition in the given subscription with the given name.
*
- * This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
+ * @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @param parameters The policy definition 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 ID of the policy definition version on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createOrUpdateAsync(String policyDefinitionName, String policyDefinitionVersion,
+ PolicyDefinitionVersionInner parameters);
+
+ /**
+ * This operation creates or updates a policy definition in the given subscription with the given name.
*
* @param policyDefinitionName The name of the policy definition.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @param parameters The policy definition 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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return the ID of the policy definition version along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBuiltIn(String policyDefinitionName, Integer top, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String policyDefinitionName,
+ String policyDefinitionVersion, PolicyDefinitionVersionInner parameters, Context context);
/**
- * Retrieve policy definition versions in a management group policy definition.
- *
- * This operation retrieves a list of all the policy definition versions for the given policy definition in the
- * given management group.
+ * This operation creates or updates a policy definition in the given subscription with the given name.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @param parameters The policy definition 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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the ID of the policy definition version.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listByManagementGroupAsync(String managementGroupName,
- String policyDefinitionName, Integer top);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyDefinitionVersionInner createOrUpdate(String policyDefinitionName, String policyDefinitionVersion,
+ PolicyDefinitionVersionInner parameters);
/**
- * Retrieve policy definition versions in a management group policy definition.
- *
- * This operation retrieves a list of all the policy definition versions for the given policy definition in the
- * given management group.
+ * This operation deletes the policy definition version in the given subscription with the given name.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
* @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 list of policy definition versions as paginated response with {@link PagedFlux}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listByManagementGroupAsync(String managementGroupName,
- String policyDefinitionName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> deleteWithResponseAsync(String policyDefinitionName, String policyDefinitionVersion);
/**
- * Retrieve policy definition versions in a management group policy definition.
- *
- * This operation retrieves a list of all the policy definition versions for the given policy definition in the
- * given management group.
+ * This operation deletes the policy definition version in the given subscription with the given name.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
* @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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByManagementGroup(String managementGroupName,
- String policyDefinitionName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String policyDefinitionName, String policyDefinitionVersion);
/**
- * Retrieve policy definition versions in a management group policy definition.
- *
- * This operation retrieves a list of all the policy definition versions for the given policy definition in the
- * given management group.
+ * This operation deletes the policy definition version in the given subscription with the given name.
*
- * @param managementGroupName The name of the management group. The name is case insensitive.
* @param policyDefinitionName The name of the policy definition.
- * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
* @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 list of policy definition versions as paginated response with {@link PagedIterable}.
+ * @return the {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByManagementGroup(String managementGroupName,
- String policyDefinitionName, Integer top, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String policyDefinitionName, String policyDefinitionVersion, Context context);
+
+ /**
+ * This operation deletes the policy definition version in the given subscription with the given name.
+ *
+ * @param policyDefinitionName The name of the policy definition.
+ * @param policyDefinitionVersion The policy definition version. The format is x.y.z where x is the major version
+ * number, y is the minor version number, and z is the patch number.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String policyDefinitionName, String policyDefinitionVersion);
}
diff --git a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java
index f68631cc6382..f8c3da4523a4 100644
--- a/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java
+++ b/sdk/resources/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java
@@ -18,215 +18,259 @@
*/
public interface PolicyDefinitionsClient {
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If
+ * $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose
+ * category match the {value}.
*
- * @param policyDefinitionName The name of the policy definition to create.
- * @param parameters The policy definition properties.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType
+ * -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering is performed. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given
+ * scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category
+ * match the {value}.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
* @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 definition along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinition list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> createOrUpdateWithResponseAsync(String policyDefinitionName,
- PolicyDefinitionInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listBuiltInAsync(String filter, Integer top);
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If
+ * $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose
+ * category match the {value}.
*
- * @param policyDefinitionName The name of the policy definition to create.
- * @param parameters The policy definition 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 definition on successful completion of {@link Mono}.
+ * @return the response of a PolicyDefinition list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono createOrUpdateAsync(String policyDefinitionName, PolicyDefinitionInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listBuiltInAsync();
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If
+ * $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose
+ * category match the {value}.
*
- * @param policyDefinitionName The name of the policy definition to create.
- * @param parameters The policy definition 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 definition along with {@link Response}.
+ * @return the response of a PolicyDefinition list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String policyDefinitionName,
- PolicyDefinitionInner parameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBuiltIn();
/**
- * Creates or updates a policy definition in a subscription.
- *
- * This operation creates or updates a policy definition in the given subscription with the given name.
+ * This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If
+ * $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose
+ * category match the {value}.
*
- * @param policyDefinitionName The name of the policy definition to create.
- * @param parameters The policy definition properties.
+ * @param filter The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType
+ * -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering is performed. If
+ * $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given
+ * scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions
+ * whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If
+ * $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category
+ * match the {value}.
+ * @param top Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
+ * @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 definition.
+ * @return the response of a PolicyDefinition list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- PolicyDefinitionInner createOrUpdate(String policyDefinitionName, PolicyDefinitionInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBuiltIn(String filter, Integer top, Context context);
/**
- * Deletes a policy definition in a subscription.
- *
- * This operation deletes the policy definition in the given subscription with the given name.
+ * This operation retrieves the built-in policy definition with the given name.
*
- * @param policyDefinitionName The name of the policy definition to delete.
+ * @param policyDefinitionName The name of the built-in policy definition to get.
* @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 {@link Response} on successful completion of {@link Mono}.
+ * @return the policy definition along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono