DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto2434?api-version=2026-09-01
/**
* Samples for StorageAccounts Delete.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountDelete.json
*/
/**
* Sample code: StorageAccountDelete.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountDelete(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().deleteWithResponse("res4228", "sto2434",
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.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_delete.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 = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
client.storage_accounts.delete(
resource_group_name="res4228",
account_name="sto2434",
)
# x-ms-original-file: 2026-09-01/StorageAccountDelete.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 armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountDelete.json
func ExampleAccountsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Delete(ctx, "res4228", "sto2434", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientDeleteResponse{
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to deletes a storage account in Microsoft Azure.
*
* @summary deletes a storage account in Microsoft Azure.
* x-ms-original-file: 2026-09-01/StorageAccountDelete.json
*/
async function storageAccountDelete() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
await client.storageAccounts.delete("res4228", "sto2434");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue