pub struct Client(/* private fields */);
Implementations§
Source§impl Client
impl Client
Sourcepub fn download(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn download( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Download operation reads or downloads a blob from the system, including its metadata and properties. You can also call Download to read a snapshot.
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn delete(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn delete( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
If the storage account’s soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account’s soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob’s data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob’s storage until it is permanently removed. Use the List Blobs API and specify the “include=deleted” query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound).
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn get_properties(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn get_properties( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn undelete(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn undelete( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
Undelete a blob that was previously soft deleted
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn set_expiry(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_expiry_option: impl Into<String>,
) -> RequestBuilder
pub fn set_expiry( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_expiry_option: impl Into<String>, ) -> RequestBuilder
Sets the time a blob will expire and be deleted.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_expiry_option
: Required. Indicates mode of the expiry time
Sourcepub fn set_http_headers(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn set_http_headers( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Set HTTP Headers operation sets system properties on the blob
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn set_immutability_policy(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn set_immutability_policy( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Set Immutability Policy operation sets the immutability policy on the blob
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn delete_immutability_policy(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn delete_immutability_policy( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Delete Immutability Policy operation deletes the immutability policy on the blob
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn set_legal_hold(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_legal_hold: bool,
) -> RequestBuilder
pub fn set_legal_hold( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_legal_hold: bool, ) -> RequestBuilder
The Set Legal Hold operation sets a legal hold on the blob.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_legal_hold
: Specified if a legal hold should be set on the blob.
Sourcepub fn set_metadata(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn set_metadata( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value pairs
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn acquire_lease(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_lease_action: impl Into<String>,
) -> RequestBuilder
pub fn acquire_lease( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_lease_action: impl Into<String>, ) -> RequestBuilder
[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_lease_action
: Describes what lease action to take.
Sourcepub fn release_lease(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_lease_action: impl Into<String>,
x_ms_lease_id: impl Into<String>,
) -> RequestBuilder
pub fn release_lease( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_lease_action: impl Into<String>, x_ms_lease_id: impl Into<String>, ) -> RequestBuilder
[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_lease_action
: Describes what lease action to take.x_ms_lease_id
: Specifies the current lease ID on the resource.
Sourcepub fn renew_lease(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_lease_action: impl Into<String>,
x_ms_lease_id: impl Into<String>,
) -> RequestBuilder
pub fn renew_lease( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_lease_action: impl Into<String>, x_ms_lease_id: impl Into<String>, ) -> RequestBuilder
[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_lease_action
: Describes what lease action to take.x_ms_lease_id
: Specifies the current lease ID on the resource.
Sourcepub fn change_lease(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_lease_action: impl Into<String>,
x_ms_lease_id: impl Into<String>,
x_ms_proposed_lease_id: impl Into<String>,
) -> RequestBuilder
pub fn change_lease( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_lease_action: impl Into<String>, x_ms_lease_id: impl Into<String>, x_ms_proposed_lease_id: impl Into<String>, ) -> RequestBuilder
[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_lease_action
: Describes what lease action to take.x_ms_lease_id
: Specifies the current lease ID on the resource.x_ms_proposed_lease_id
: Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.
Sourcepub fn break_lease(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_lease_action: impl Into<String>,
) -> RequestBuilder
pub fn break_lease( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_lease_action: impl Into<String>, ) -> RequestBuilder
[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_lease_action
: Describes what lease action to take.
Sourcepub fn create_snapshot(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn create_snapshot( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Create Snapshot operation creates a read-only snapshot of a blob
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn start_copy_from_url(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_copy_source: impl Into<String>,
) -> RequestBuilder
pub fn start_copy_from_url( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_copy_source: impl Into<String>, ) -> RequestBuilder
The Start Copy From URL operation copies a blob or an internet resource to a new blob.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_copy_source
: Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
Sourcepub fn copy_from_url(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_requires_sync: impl Into<String>,
x_ms_copy_source: impl Into<String>,
) -> RequestBuilder
pub fn copy_from_url( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_requires_sync: impl Into<String>, x_ms_copy_source: impl Into<String>, ) -> RequestBuilder
The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response until the copy is complete.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_requires_sync
: This header indicates that this is a synchronous Copy Blob From URL instead of a Asynchronous Copy Blob.x_ms_copy_source
: Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
Sourcepub fn abort_copy_from_url(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_copy_action: impl Into<String>,
) -> RequestBuilder
pub fn abort_copy_from_url( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_copy_action: impl Into<String>, ) -> RequestBuilder
The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_copy_action
: Copy action.
Sourcepub fn set_tier(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
x_ms_access_tier: impl Into<String>,
) -> RequestBuilder
pub fn set_tier( &self, container_name: impl Into<String>, blob: impl Into<String>, x_ms_access_tier: impl Into<String>, ) -> RequestBuilder
The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob’s tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob’s tier determines Hot/Cool/Archive storage type. This operation does not update the blob’s ETag.
Arguments:
container_name
: The container name.blob
: The blob name.x_ms_access_tier
: Indicates the tier to be set on the blob.
Sourcepub fn get_account_info(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn get_account_info( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
Returns the sku name and account kind
Arguments:
container_name
: The container name.blob
: The blob name.
Sourcepub fn query(
&self,
container_name: impl Into<String>,
blob: impl Into<String>,
) -> RequestBuilder
pub fn query( &self, container_name: impl Into<String>, blob: impl Into<String>, ) -> RequestBuilder
The Query operation enables users to select/project on blob data by providing simple query expressions.
Arguments:
container_name
: The container name.blob
: The blob name.
The Get Tags operation enables users to get the tags associated with a blob.
Arguments:
container_name
: The container name.blob
: The blob name.
The Set Tags operation enables users to set tags on a blob.
Arguments:
container_name
: The container name.blob
: The blob name.