AbstractAzureStorageDatastore Class
Represents the base class for datastores that save connection information to Azure Blob and Azure File storage.
You should not work with this class directly. To create a datastore, use one of the register*
methods
of the Datastore class, for example, register_azure_blob_container.
Note: When using a datastore to access data, you must have permission to access the data, which depends on the credentials registered with the datastore.
Class AbstractAzureStorageDatastore constructor.
- Inheritance
-
AbstractAzureStorageDatastore
Constructor
AbstractAzureStorageDatastore(workspace, name, datastore_type, container_name, account_name, sas_token=None, account_key=None, protocol=None, endpoint=None)
Parameters
- sas_token
- str, <xref:optional>
The SAS token for accessing this container, defaults to None.
- protocol
- str, <xref:optional>
The protocol to use to connect to the storage account. If None, defaults to https.
- endpoint
- str, <xref:optional>
The endpoint of the blob container. If None, defaults to core.windows.net.
- sas_token
- str, <xref:optional>
The SAS token for accessing this container, defaults to None.
- protocol
- str, <xref:optional>
The protocol to use to connect to the storage account. If None, defaults to https.
- endpoint
- str, <xref:optional>
The endpoint of the blob container. If None, defaults to core.windows.net.
Methods
as_download |
Return data reference object with download mode. Note: This method is deprecated and will no longer be supported. Recommend to use
|
as_mount |
Return data reference object with mount mode. Note: This method is deprecated and will no longer be supported. Recommend to use
|
as_upload |
Return data reference object with upload mode. Note: This method is deprecated and will no longer be supported. Recommend to use dataset to upload instead. |
download |
Download paths with prefix to target_path. |
path |
Return corresponding data reference object. |
upload |
Upload src_dir to target_path. |
upload_files |
Upload files to target_path. |
as_download
Return data reference object with download mode.
Note: This method is deprecated and will no longer be supported. Recommend to use
file_dataset.as_download
instead.
as_download(path_on_compute=None)
Parameters
Returns
The data reference object.
Return type
as_mount
Return data reference object with mount mode.
Note: This method is deprecated and will no longer be supported. Recommend to use
file_dataset.as_mount
instead.
as_mount()
Parameters
Returns
The data reference object.
Return type
as_upload
Return data reference object with upload mode.
Note: This method is deprecated and will no longer be supported. Recommend to use dataset to upload instead.
as_upload(path_on_compute=None)
Parameters
Returns
The data reference object.
Return type
download
Download paths with prefix to target_path.
abstract download(target_path, prefix=None, overwrite=False, show_progress=True)
Parameters
- target_path
- prefix
- overwrite
- show_progress
path
Return corresponding data reference object.
path(path=None, data_reference_name=None)
Parameters
Returns
The data reference object.
Return type
upload
Upload src_dir to target_path.
abstract upload(src_dir, target_path=None, overwrite=False, show_progress=True)
Parameters
- src_dir
- target_path
- overwrite
- show_progress
upload_files
Upload files to target_path.
abstract upload_files(files, relative_root=None, target_path=None, overwrite=False, show_progress=True)
Parameters
- files
- relative_root
relative path in target
- target_path
- overwrite
- show_progress
Attributes
is_sas
use credential_type
property.
This property is deprecated, please use the property credential_type
to determine the credential type.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for