Sdílet prostřednictvím


StorageExtensions.GetStorageAccounts Method

Definition

Overloads

GetStorageAccounts(SubscriptionResource, CancellationToken)

Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts
  • Operation Id: StorageAccounts_List
  • Default Api Version: 2023-05-01
  • Resource: StorageAccountResource
GetStorageAccounts(ResourceGroupResource)

Gets a collection of StorageAccountResources in the ResourceGroupResource. MockingTo mock this method, please mock GetStorageAccounts() instead.

GetStorageAccounts(SubscriptionResource, CancellationToken)

Source:
StorageExtensions.cs
Source:
StorageExtensions.cs

Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts
  • Operation Id: StorageAccounts_List
  • Default Api Version: 2023-05-01
  • Resource: StorageAccountResource
public static Azure.Pageable<Azure.ResourceManager.Storage.StorageAccountResource> GetStorageAccounts (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetStorageAccounts : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Storage.StorageAccountResource>
<Extension()>
Public Function GetStorageAccounts (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of StorageAccountResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of StorageAccountResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to

GetStorageAccounts(ResourceGroupResource)

Source:
StorageExtensions.cs
Source:
StorageExtensions.cs

Gets a collection of StorageAccountResources in the ResourceGroupResource. MockingTo mock this method, please mock GetStorageAccounts() instead.

public static Azure.ResourceManager.Storage.StorageAccountCollection GetStorageAccounts (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetStorageAccounts : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Storage.StorageAccountCollection
<Extension()>
Public Function GetStorageAccounts (resourceGroupResource As ResourceGroupResource) As StorageAccountCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of StorageAccountResources and their operations over a StorageAccountResource.

Exceptions

resourceGroupResource is null.

Applies to