pub struct StorageClient<'a> { /* private fields */ }Expand description
Client for the Azure Storage API
Implementations§
Source§impl<'a> StorageClient<'a>
impl<'a> StorageClient<'a>
Sourcepub async fn list_storage_accounts(
&self,
subscription_id: &str,
) -> Result<StorageAccountListResult>
pub async fn list_storage_accounts( &self, subscription_id: &str, ) -> Result<StorageAccountListResult>
Lists all storage accounts in a subscription
Sourcepub async fn list_storage_accounts_by_resource_group(
&self,
subscription_id: &str,
resource_group_name: &str,
) -> Result<StorageAccountListResult>
pub async fn list_storage_accounts_by_resource_group( &self, subscription_id: &str, resource_group_name: &str, ) -> Result<StorageAccountListResult>
Lists all storage accounts in a resource group
Sourcepub async fn get_storage_account(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
) -> Result<StorageAccount>
pub async fn get_storage_account( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, ) -> Result<StorageAccount>
Returns the properties of a storage account
Sourcepub async fn create_storage_account(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
body: &StorageAccountCreateRequest,
) -> Result<StorageAccount>
pub async fn create_storage_account( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, body: &StorageAccountCreateRequest, ) -> Result<StorageAccount>
Creates a new storage account.
Azure Storage creates accounts asynchronously — this method polls until provisioningState is “Succeeded” (or up to ~60s) when the initial PUT returns 202 with an empty body.
Sourcepub async fn delete_storage_account(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
) -> Result<StorageAccount>
pub async fn delete_storage_account( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, ) -> Result<StorageAccount>
Deletes a storage account
Sourcepub async fn list_keys(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
) -> Result<StorageAccountListKeysResult>
pub async fn list_keys( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, ) -> Result<StorageAccountListKeysResult>
Lists the access keys for a storage account
Sourcepub async fn regenerate_key(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
body: &StorageAccountRegenerateKeyRequest,
) -> Result<StorageAccountListKeysResult>
pub async fn regenerate_key( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, body: &StorageAccountRegenerateKeyRequest, ) -> Result<StorageAccountListKeysResult>
Regenerates one of the access keys for a storage account
Sourcepub async fn update_storage_account(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
body: &StorageAccountUpdateRequest,
) -> Result<StorageAccount>
pub async fn update_storage_account( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, body: &StorageAccountUpdateRequest, ) -> Result<StorageAccount>
Updates properties of an existing storage account (partial PATCH).
ARM PATCH semantics — only fields set in body are changed; all other
properties remain unchanged. Useful for toggling security settings such
as allow_blob_public_access, supports_https_traffic_only, and
minimum_tls_version without touching the rest of the account.
Sourcepub async fn get_management_policy(
&self,
subscription_id: &str,
resource_group_name: &str,
account_name: &str,
) -> Result<Option<ManagementPolicy>>
pub async fn get_management_policy( &self, subscription_id: &str, resource_group_name: &str, account_name: &str, ) -> Result<Option<ManagementPolicy>>
Fetch the blob lifecycle management policy for a storage account.
Returns Ok(None) if no policy is configured (HTTP 404 — valid state).
Returns Ok(Some(policy)) on HTTP 200 with the policy data.
Returns Err(...) on other errors (401, 403, 5xx, etc.).