Ruft Eigenschaften der angegebenen gelöschten Kontoressource ab.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}?api-version=2023-01-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
deletedAccountName
|
path |
True
|
string
|
Name des gelöschten Speicherkontos.
|
location
|
path |
True
|
string
|
Der Speicherort des gelöschten Speicherkontos.
|
subscriptionId
|
path |
True
|
string
|
Hierbei handelt es sich um die ID des Zielabonnements.
|
api-version
|
query |
True
|
string
|
Hierbei handelt es sich um die für diesen Vorgang zu verwendende API-Version.
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
DeletedAccount
|
OK : Eigenschaften, die für das gelöschte Konto abgerufen und erfolgreich zurückgegeben wurden.
|
Other Status Codes
|
ErrorResponse
|
Fehlerantwort mit Beschreibung des Grunds für den Fehler.
|
Sicherheit
azure_auth
Azure Active Directory-OAuth2-Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
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"
}
}
Definitionen
DeletedAccount
Gelöschtes Speicherkonto
Name |
Typ |
Beschreibung |
id
|
string
|
Vollqualifizierte Ressourcen-ID für die Ressource. Beispiel: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Der Name der Ressource
|
properties.creationTime
|
string
|
Erstellungszeit des gelöschten Kontos.
|
properties.deletionTime
|
string
|
Löschzeit des gelöschten Kontos.
|
properties.location
|
string
|
Speicherort des gelöschten Kontos.
|
properties.restoreReference
|
string
|
Kann verwendet werden, um zu versuchen, dieses gelöschte Konto über die PutStorageAccount-API wiederherzustellen.
|
properties.storageAccountResourceId
|
string
|
Vollständige Ressourcen-ID des ursprünglichen Speicherkontos.
|
type
|
string
|
Der Typ der Ressource. Z. B. "Microsoft.Compute/virtualMachines" oder "Microsoft.Storage/storageAccounts"
|
ErrorResponse
Eine Fehlerantwort des Speicherressourcenanbieters.
Name |
Typ |
Beschreibung |
error
|
ErrorResponseBody
|
Fehlerantworttext des Azure Storage-Ressourcenanbieters.
|
ErrorResponseBody
Fehlerantworttextvertrag.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollten programmgesteuert verwendet werden.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, der für die Anzeige in einer Benutzeroberfläche geeignet sein soll.
|