Listák törölt fiókokat az előfizetés alatt.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/deletedAccounts?api-version=2023-01-01
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
subscriptionId
|
path |
True
|
string
|
A cél-előfizetés azonosítója.
|
api-version
|
query |
True
|
string
|
A művelethez használandó API-verzió.
|
Válaszok
Name |
Típus |
Description |
200 OK
|
DeletedAccountListResult
|
OK – A törölt fiókok listáját lekérte és sikeresen visszaadta.
|
Other Status Codes
|
ErrorResponse
|
Hibaválasz, amely leírja, hogy a művelet miért hiúsult meg.
|
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
felhasználói fiók megszemélyesítése
|
Példák
DeletedAccountList
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Storage/deletedAccounts?api-version=2023-01-01
/** Samples for DeletedAccounts List. */
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountList.json
*/
/**
* Sample code: DeletedAccountList.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deletedAccountList(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getDeletedAccounts().list(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_list.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.list()
for item in response:
print(item)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountList.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/DeletedAccountList.json
func ExampleDeletedAccountsClient_NewListPager() {
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)
}
pager := clientFactory.NewDeletedAccountsClient().NewListPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.DeletedAccountListResult = armstorage.DeletedAccountListResult{
// Value: []*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"),
// },
// },
// {
// Name: to.Ptr("sto1126"),
// Type: to.Ptr("Microsoft.Storage/deletedAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126"),
// Properties: &armstorage.DeletedAccountProperties{
// CreationTime: to.Ptr("2020-08-19T15:10:21.5902165Z"),
// DeletionTime: to.Ptr("2020-08-20T06:11:55.1957302Z"),
// Location: to.Ptr("eastus"),
// RestoreReference: to.Ptr("sto1126|2020-08-17T03:35:37.4588848Z"),
// StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126"),
// },
// }},
// }
}
}
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 Lists deleted accounts under the subscription.
*
* @summary Lists deleted accounts under the subscription.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedAccountList.json
*/
async function deletedAccountList() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.deletedAccounts.list()) {
resArray.push(item);
}
console.log(resArray);
}
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
{
"value": [
{
"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"
}
},
{
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126",
"name": "sto1126",
"type": "Microsoft.Storage/deletedAccounts",
"properties": {
"storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126",
"location": "eastus",
"restoreReference": "sto1126|2020-08-17T03:35:37.4588848Z",
"creationTime": "2020-08-19T15:10:21.5902165Z",
"deletionTime": "2020-08-20T06:11:55.1957302Z"
}
}
]
}
Definíciók
DeletedAccount
Törölt tárfiók
Name |
Típus |
Description |
id
|
string
|
Az erőforrás teljes erőforrás-azonosítója. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Az erőforrás neve
|
properties.creationTime
|
string
|
A törölt fiók létrehozási ideje.
|
properties.deletionTime
|
string
|
A törölt fiók törlési ideje.
|
properties.location
|
string
|
A törölt fiók helye.
|
properties.restoreReference
|
string
|
A törölt fiók helyreállításának megkísérlésére használható a PutStorageAccount API-val.
|
properties.storageAccountResourceId
|
string
|
Az eredeti tárfiók teljes erőforrás-azonosítója.
|
type
|
string
|
Az erőforrás típusa. Például "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts"
|
DeletedAccountListResult
A Törölt fiókok listázása művelet válasza.
Name |
Típus |
Description |
nextLink
|
string
|
A törölt fiókok következő oldalának lekérdezéséhez használható kérelem URL-címe. Akkor adja vissza, ha a kért törölt fiókok teljes száma meghaladja a maximális oldalméretet.
|
value
|
DeletedAccount[]
|
Lekéri a törölt fiókok listáját és tulajdonságait.
|
ErrorResponse
Hibaválasz a tárerőforrás-szolgáltatótól.
Name |
Típus |
Description |
error
|
ErrorResponseBody
|
Azure Storage-erőforrás-szolgáltató hibaválasz törzse.
|
ErrorResponseBody
Hibaválasz törzsszerződése.
Name |
Típus |
Description |
code
|
string
|
A hiba azonosítója. A kódok invariánsak, és programozott módon használhatók.
|
message
|
string
|
A hibát leíró üzenet, amely alkalmas a felhasználói felületen való megjelenítésre.
|