ds_provider_azure_py_lib.linked_service ======================================= .. py:module:: ds_provider_azure_py_lib.linked_service .. autoapi-nested-parse:: **File:** ``__init__.py`` **Region:** ``ds_provider_azure_py_lib/linked_service`` Azure Linked Service This module implements a linked service for Azure storage. .. rubric:: Example >>> azure_linked_service = AzureLinkedService(settings=AzureLinkedServiceSettings( ... account_name="your_account_name", ... access_key="access key")) >>> azure_linked_service.connect() Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ds_provider_azure_py_lib/linked_service/storage_account/index Classes ------- .. autoapisummary:: ds_provider_azure_py_lib.linked_service.AzureLinkedService ds_provider_azure_py_lib.linked_service.AzureLinkedServiceSettings Package Contents ---------------- .. py:class:: AzureLinkedService Bases: :py:obj:`ds_resource_plugin_py_lib.common.resource.linked_service.LinkedService`\ [\ :py:obj:`AzureLinkedServiceSettingsType`\ ], :py:obj:`Generic`\ [\ :py:obj:`AzureLinkedServiceSettingsType`\ ] Linked service for connecting to AzureLinkedService. .. py:attribute:: settings :type: AzureLinkedServiceSettingsType .. py:attribute:: _blob_service_client :type: azure.storage.blob.BlobServiceClient | None :value: None .. py:attribute:: _table_service_client :type: azure.data.tables.TableServiceClient | None :value: None .. py:attribute:: _credential :type: azure.core.credentials.AzureNamedKeyCredential | None :value: None .. py:method:: check_settings_is_set() -> None Check if settings are set correctly. :returns: None :raises AttributeError: If settings are not set correctly. .. py:property:: type :type: ds_provider_azure_py_lib.enums.ResourceType Get the type of the linked service. :returns: ResourceType .. py:property:: connection :type: AzureLinkedServiceConnection Get the connection object for Azure StorageAccount. :returns: AzureLinkedServiceConnection .. py:property:: blob_service_client :type: azure.storage.blob.BlobServiceClient Get the BlobServiceClient instance. :returns: BlobServiceClient :raises ConnectionError: If blob service client is not connected. .. py:property:: table_service_client :type: azure.data.tables.TableServiceClient Get the TableServiceClient instance. :returns: TableServiceClient :raises ConnectionError: If table service client is not connected. .. py:method:: get_blob_service() -> azure.storage.blob.BlobServiceClient Connect to Azure Blob StorageAccount. :returns: BlobServiceClient .. py:method:: get_table_service() -> azure.data.tables.TableServiceClient Connect to Azure Table StorageAccount. :returns: TableServiceClient .. py:method:: connect() -> None Connect to Azure Storage (Blob and Table), ensuring both service clients are initialized. :returns: None .. py:method:: test_connection() -> tuple[bool, str] Test the connection to Azure Storage (Blob or Table). :returns: tuple[bool, str] .. py:method:: close() -> None No need to close the linked service. Just to comply with the interface. :returns: None .. py:method:: __enter__() -> AzureLinkedService[AzureLinkedServiceSettingsType] Enter context manager. :returns: Returns self for use in with statement. :rtype: AzureLinkedService .. py:method:: __exit__(exc_type: object, exc_val: object, exc_tb: object) -> None Exit context manager and close the connection. :param exc_type: Exception type if an exception occurred. :param exc_val: Exception value if an exception occurred. :param exc_tb: Exception traceback if an exception occurred. :returns: None .. py:class:: AzureLinkedServiceSettings Bases: :py:obj:`ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceSettings` The object containing the Azure linked service settings. .. py:attribute:: account_name :type: str .. py:attribute:: access_key :type: str