DELETE https://management.azure.com/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/00000000-0000-0000-0000-000000000000?api-version=2025-03-01
/**
* Samples for GroupQuotaSubscriptions Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/
* DeleteGroupQuotaSubscriptions.json
*/
/**
* Sample code: GroupQuotaSubscriptions_Delete_Subscriptions.
*
* @param manager Entry point to QuotaManager.
*/
public static void
groupQuotaSubscriptionsDeleteSubscriptions(com.azure.resourcemanager.quota.QuotaManager manager) {
manager.groupQuotaSubscriptions().delete("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.quota import QuotaMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-quota
# USAGE
python delete_group_quota_subscriptions.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = QuotaMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.group_quota_subscriptions.begin_delete(
management_group_id="E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
group_quota_name="groupquota1",
).result()
# x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/DeleteGroupQuotaSubscriptions.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armquota_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/DeleteGroupQuotaSubscriptions.json
func ExampleGroupQuotaSubscriptionsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armquota.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").BeginDelete(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureQuotaExtensionAPI } = require("@azure/arm-quota");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Removes the subscription from GroupQuotas. The request's TenantId is validated against the subscription's TenantId.
*
* @summary Removes the subscription from GroupQuotas. The request's TenantId is validated against the subscription's TenantId.
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/DeleteGroupQuotaSubscriptions.json
*/
async function groupQuotaSubscriptionsDeleteSubscriptions() {
const subscriptionId =
process.env["QUOTA_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const managementGroupId = "E7EC67B3-7657-4966-BFFC-41EFD36BAA09";
const groupQuotaName = "groupquota1";
const credential = new DefaultAzureCredential();
const client = new AzureQuotaExtensionAPI(credential, subscriptionId);
const result = await client.groupQuotaSubscriptions.beginDeleteAndWait(
managementGroupId,
groupQuotaName,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Quota;
// Generated from example definition: specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/DeleteGroupQuotaSubscriptions.json
// this example is just showing the usage of "GroupQuotaSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this GroupQuotaSubscriptionResource created on azure
// for more information of creating GroupQuotaSubscriptionResource, please refer to the document of GroupQuotaSubscriptionResource
string managementGroupId = "E7EC67B3-7657-4966-BFFC-41EFD36BAA09";
string groupQuotaName = "groupquota1";
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier groupQuotaSubscriptionResourceId = GroupQuotaSubscriptionResource.CreateResourceIdentifier(managementGroupId, groupQuotaName, subscriptionId);
GroupQuotaSubscriptionResource groupQuotaSubscription = client.GetGroupQuotaSubscriptionResource(groupQuotaSubscriptionResourceId);
// invoke the operation
await groupQuotaSubscription.DeleteAsync(WaitUntil.Completed);
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue