Storage
Camel.storages.object storages.azure blob
AzureBlobStorage
A class to connect to Azure Blob Storage. It will connect to one container in the storage account.
Parameters:
- storage_account_name (str): The name of the storage account.
- container_name (str): The name of the container.
- access_key (Optional[str], optional): The access key of the storage account. Defaults to None.
- References:
- https: //azure.microsoft.com/en-us/products/storage/blobs
init
_prepare_and_check
Check privileges and existence of the container.
canonicalize_path
Canonicalize file path for Azure Blob Storage.
Parameters:
- file_path (PurePath): The path to be canonicalized.
Returns:
Tuple[str, str]: The canonicalized file key and file name.
_put_file
Put a file to the Azure Blob Storage container.
Parameters:
- file_key (str): The path to the object in the container.
- file (File): The file to be uploaded.
_get_file
Get a file from the Azure Blob Storage container.
Parameters:
- file_key (str): The path to the object in the container.
- filename (str): The name of the file.
Returns:
File: The object from the container.
_upload_file
Upload a local file to the Azure Blob Storage container.
Parameters:
- local_file_path (Path): The path to the local file to be uploaded.
- remote_file_key (str): The path to the object in the container.
_download_file
Download a file from the Azure Blob Storage container to the local system.
Parameters:
- local_file_path (Path): The path to the local file to be saved.
- remote_file_key (str): The key of the object in the container.
_object_exists
Check if the object exists in the Azure Blob Storage container.
Parameters:
- file_key: The key of the object in the container.
Returns:
bool: Whether the object exists in the container.