A client to interact with the Blob Service at the account level.
This client provides operations to retrieve and configure the account properties as well as list, create and delete containers within the account. For operations relating to a specific container or blob, clients for those entities can also be retrieved using the get_client functions.
For more optional configuration, please click here.
ConstructorBlobServiceClient(account_url: str, credential: str | Dict[str, str] | AzureNamedKeyCredential | AzureSasCredential | TokenCredential | None = None, **kwargs: Any)
Parameters Keyword-Only Parameters Methods close
This method is to close the sockets opened by the client. It need not be used when using with a context manager.
create_containerCreates a new container under the specified account.
If the container with the same name already exists, a ResourceExistsError will be raised. This method returns a client with which to interact with the newly created container.
delete_containerMarks the specified container for deletion.
The container and any blobs contained within it are later deleted during garbage collection. If the container is not found, a ResourceNotFoundError will be raised.
find_blobs_by_tagsThe Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container.
from_connection_stringCreate BlobServiceClient from a Connection String.
get_account_informationGets information related to the storage account.
The information can also be retrieved if the user has a SAS to a container or blob. The keys in the returned dictionary include 'sku_name' and 'account_kind'.
get_blob_clientGet a client to interact with the specified blob.
The blob need not already exist.
get_container_clientGet a client to interact with the specified container.
The container need not already exist.
get_service_propertiesGets the properties of a storage account's Blob service, including Azure Storage Analytics.
get_service_statsRetrieves statistics related to replication for the Blob service.
It is only available when read-access geo-redundant replication is enabled for the storage account.
With geo-redundant replication, Azure Storage maintains your data durable in two locations. In both locations, Azure Storage constantly maintains multiple healthy replicas of your data. The location where you read, create, update, or delete data is the primary storage account location. The primary location exists in the region you choose at the time you create an account via the Azure Management Azure classic portal, for example, North Central US. The location to which your data is replicated is the secondary location. The secondary location is automatically determined based on the location of the primary; it is in a second data center that resides in the same region as the primary location. Read-only access is available from the secondary location, if read-access geo-redundant replication is enabled for your storage account.
get_user_delegation_keyObtain a user delegation key for the purpose of signing SAS tokens. A token credential must be present on the service object for this request to succeed.
list_containersReturns a generator to list the containers under the specified account.
The generator will lazily follow the continuation tokens returned by the service and stop when all containers have been returned.
set_service_propertiesSets the properties of a storage account's Blob service, including Azure Storage Analytics.
If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved.
undelete_containerRestores soft-deleted container.
Operation will only be successful if used within the specified number of days set in the delete retention policy.
New in version 12.4.0: This operation was introduced in API version '2019-12-12'.
closeThis method is to close the sockets opened by the client. It need not be used when using with a context manager.
close()
create_container
Creates a new container under the specified account.
If the container with the same name already exists, a ResourceExistsError will be raised. This method returns a client with which to interact with the newly created container.
create_container(name: str, metadata: Dict[str, str] | None = None, public_access: PublicAccess | str | None = None, **kwargs: Any) -> ContainerClient
Parameters Keyword-Only Parameters Returns delete_container
Marks the specified container for deletion.
The container and any blobs contained within it are later deleted during garbage collection. If the container is not found, a ResourceNotFoundError will be raised.
delete_container(container: ContainerProperties | str, lease: BlobLeaseClient | str | None = None, **kwargs: Any) -> None
Parameters Keyword-Only Parameters find_blobs_by_tags
The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container.
find_blobs_by_tags(filter_expression: str, **kwargs: Any) -> ItemPaged[FilteredBlob]
Parameters Keyword-Only Parameters Returns from_connection_string
Create BlobServiceClient from a Connection String.
from_connection_string(conn_str: str, credential: str | Dict[str, str] | AzureNamedKeyCredential | AzureSasCredential | TokenCredential | None = None, **kwargs: Any) -> Self
Parameters Keyword-Only Parameters Returns get_account_information
Gets information related to the storage account.
The information can also be retrieved if the user has a SAS to a container or blob. The keys in the returned dictionary include 'sku_name' and 'account_kind'.
get_account_information(**kwargs: Any) -> Dict[str, str]
Returns get_blob_client
Get a client to interact with the specified blob.
The blob need not already exist.
get_blob_client(container: ContainerProperties | str, blob: str, snapshot: str | Dict[str, Any] | None = None, *, version_id: str | None = None) -> BlobClient
Parameters Keyword-Only Parameters Returns get_container_client
Get a client to interact with the specified container.
The container need not already exist.
get_container_client(container: ContainerProperties | str) -> ContainerClient
Parameters Returns get_service_properties
Gets the properties of a storage account's Blob service, including Azure Storage Analytics.
get_service_properties(**kwargs: Any) -> Dict[str, Any]
Keyword-Only Parameters Returns get_service_stats
Retrieves statistics related to replication for the Blob service.
It is only available when read-access geo-redundant replication is enabled for the storage account.
With geo-redundant replication, Azure Storage maintains your data durable in two locations. In both locations, Azure Storage constantly maintains multiple healthy replicas of your data. The location where you read, create, update, or delete data is the primary storage account location. The primary location exists in the region you choose at the time you create an account via the Azure Management Azure classic portal, for example, North Central US. The location to which your data is replicated is the secondary location. The secondary location is automatically determined based on the location of the primary; it is in a second data center that resides in the same region as the primary location. Read-only access is available from the secondary location, if read-access geo-redundant replication is enabled for your storage account.
get_service_stats(**kwargs: Any) -> Dict[str, Any]
Keyword-Only Parameters Returns get_user_delegation_key
Obtain a user delegation key for the purpose of signing SAS tokens. A token credential must be present on the service object for this request to succeed.
get_user_delegation_key(key_start_time: datetime, key_expiry_time: datetime, **kwargs: Any) -> UserDelegationKey
Parameters Keyword-Only Parameters Returns list_containers
Returns a generator to list the containers under the specified account.
The generator will lazily follow the continuation tokens returned by the service and stop when all containers have been returned.
list_containers(name_starts_with: str | None = None, include_metadata: bool = False, **kwargs: Any) -> ItemPaged[ContainerProperties]
Parameters Keyword-Only Parameters Returns set_service_properties
Sets the properties of a storage account's Blob service, including Azure Storage Analytics.
If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved.
set_service_properties(analytics_logging: BlobAnalyticsLogging | None = None, hour_metrics: Metrics | None = None, minute_metrics: Metrics | None = None, cors: List[CorsRule] | None = None, target_version: str | None = None, delete_retention_policy: RetentionPolicy | None = None, static_website: StaticWebsite | None = None, **kwargs: Any) -> None
Parameters Keyword-Only Parameters Returns undelete_container
Restores soft-deleted container.
Operation will only be successful if used within the specified number of days set in the delete retention policy.
New in version 12.4.0: This operation was introduced in API version '2019-12-12'.
undelete_container(deleted_container_name: str, deleted_container_version: str, **kwargs: Any) -> ContainerClient
Parameters Keyword-Only Parameters Returns Attributes api_version
The version of the Storage API used for requests.
Returns location_modeThe location mode that the client is currently using.
By default this will be "primary". Options include "primary" and "secondary".
Returns primary_endpointThe full primary endpoint URL.
Returns primary_hostnameThe hostname of the primary endpoint.
Returns secondary_endpointThe full secondary endpoint URL if configured.
If not available a ValueError will be raised. To explicitly specify a secondary hostname, use the optional secondary_hostname keyword argument on instantiation.
Returns Exceptions secondary_hostnameThe hostname of the secondary endpoint.
If not available this will be None. To explicitly specify a secondary hostname, use the optional secondary_hostname keyword argument on instantiation.
Returns urlThe full endpoint URL to this entity, including SAS token if used.
This could be either the primary endpoint, or the secondary endpoint depending on the current location_mode. :returns: The full endpoint URL to this entity, including SAS token if used. :rtype: str
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4