POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys?api-version=2021-09-01
Параметры URI
Name
In
Required
Type
Description
accountName
path
True
string
Имя учетной записи хранения в указанной группе ресурсов. Имя учетной записи хранения должно содержать от 3 до 24 символов и состоять только из цифр и букв нижнего регистра.
resourceGroupName
path
True
string
Имя группы ресурсов в подписке пользователя. Регистр букв в имени не учитывается.
Regex pattern: ^[-\w\._\(\)]+$
subscriptionId
path
True
string
Идентификатор целевой подписки.
api-version
query
True
string
Версия API, используемая для этой операции.
Ответы
Name
Type
Description
200 OK
ОК — отзыв ключей делегирования пользователей выполнен успешно.
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4167/providers/Microsoft.Storage/storageAccounts/sto3539/revokeUserDelegationKeys?api-version=2021-09-01
import com.azure.core.util.Context;
/** Samples for StorageAccounts RevokeUserDelegationKeys. */
public final class Main {
/*
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountRevokeUserDelegationKeys.json
*/
/**
* Sample code: StorageAccountRevokeUserDelegationKeys.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void storageAccountRevokeUserDelegationKeys(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.storageAccounts()
.manager()
.serviceClient()
.getStorageAccounts()
.revokeUserDelegationKeysWithResponse("res4167", "sto3539", Context.NONE);
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountRevokeUserDelegationKeys.json
func ExampleAccountsClient_RevokeUserDelegationKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstorage.NewAccountsClient("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.RevokeUserDelegationKeys(ctx,
"res4167",
"sto3539",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Revoke user delegation keys.
*
* @summary Revoke user delegation keys.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountRevokeUserDelegationKeys.json
*/
async function storageAccountRevokeUserDelegationKeys() {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4167";
const accountName = "sto3539";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.revokeUserDelegationKeys(
resourceGroupName,
accountName
);
console.log(result);
}
storageAccountRevokeUserDelegationKeys().catch(console.error);
Read this SDK documentation on how to add the SDK to your project and authenticate.