Získejte vlastnosti zadaného odstraněného prostředku účtu.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}?api-version=2023-01-01
Parametry identifikátoru URI
Name |
V |
Vyžadováno |
Typ |
Description |
deletedAccountName
|
path |
True
|
string
|
Název odstraněného účtu úložiště.
|
location
|
path |
True
|
string
|
Umístění odstraněného účtu úložiště.
|
subscriptionId
|
path |
True
|
string
|
ID cílového předplatného.
|
api-version
|
query |
True
|
string
|
Verze rozhraní API, která se má použít pro tuto operaci.
|
Odpovědi
Name |
Typ |
Description |
200 OK
|
DeletedAccount
|
OK – vlastnosti se úspěšně načetly a vrátily pro odstraněný účet.
|
Other Status Codes
|
ErrorResponse
|
Chybová odpověď popisující, proč operace selhala.
|
Zabezpečení
azure_auth
Tok Azure Active Directory OAuth2
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
DeletedAccountGet
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125?api-version=2023-01-01
/** Samples for DeletedAccounts Get. */
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountGet.json
*/
/**
* Sample code: DeletedAccountGet.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deletedAccountGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getDeletedAccounts().getWithResponse("sto1125", "eastus",
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 deleted_account_get.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}",
)
response = client.deleted_accounts.get(
deleted_account_name="sto1125",
location="eastus",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountGet.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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountGet.json
func ExampleDeletedAccountsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDeletedAccountsClient().Get(ctx, "sto1125", "eastus", 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.DeletedAccount = armstorage.DeletedAccount{
// Name: to.Ptr("sto1125"),
// Type: to.Ptr("Microsoft.Storage/deletedAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125"),
// Properties: &armstorage.DeletedAccountProperties{
// CreationTime: to.Ptr("2020-08-17T03:35:37.4588848Z"),
// DeletionTime: to.Ptr("2020-08-17T04:41:37.3442475Z"),
// Location: to.Ptr("eastus"),
// RestoreReference: to.Ptr("sto1125|2020-08-17T03:35:37.4588848Z"),
// StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125"),
// },
// }
}
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 Get properties of specified deleted account resource.
*
* @summary Get properties of specified deleted account resource.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountGet.json
*/
async function deletedAccountGet() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const deletedAccountName = "sto1125";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.deletedAccounts.get(deletedAccountName, location);
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
Sample Response
{
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125",
"name": "sto1125",
"type": "Microsoft.Storage/deletedAccounts",
"properties": {
"storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125",
"location": "eastus",
"restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z",
"creationTime": "2020-08-17T03:35:37.4588848Z",
"deletionTime": "2020-08-17T04:41:37.3442475Z"
}
}
Definice
DeletedAccount
Odstraněný účet úložiště
Name |
Typ |
Description |
id
|
string
|
Plně kvalifikované ID prostředku. Příklad – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Název prostředku
|
properties.creationTime
|
string
|
Čas vytvoření odstraněného účtu.
|
properties.deletionTime
|
string
|
Čas odstranění odstraněného účtu.
|
properties.location
|
string
|
Umístění odstraněného účtu.
|
properties.restoreReference
|
string
|
Můžete ho použít k pokusu o obnovení tohoto odstraněného účtu prostřednictvím rozhraní API PutStorageAccount.
|
properties.storageAccountResourceId
|
string
|
Úplné ID prostředku původního účtu úložiště
|
type
|
string
|
Typ prostředku. Například Microsoft.Compute/virtualMachines nebo Microsoft.Storage/storageAccounts
|
ErrorResponse
Chybová odpověď od poskytovatele prostředků úložiště.
Name |
Typ |
Description |
error
|
ErrorResponseBody
|
Text odpovědi na chybu poskytovatele prostředků služby Azure Storage
|
ErrorResponseBody
Kontrakt textu odpovědi na chybu
Name |
Typ |
Description |
code
|
string
|
Identifikátor chyby. Kódy jsou invariantní a mají být využívány programově.
|
message
|
string
|
Zpráva popisující chybu, která má být vhodná pro zobrazení v uživatelském rozhraní.
|