ds_resource_plugin_py_lib.common.resource.linked_service¶
File: __init__.py
Region: ds_resource_plugin_py_lib/common/resource/linked_service
Description¶
Linked service models and typed properties.
Submodules¶
Classes¶
The object containing the connection information to connect with related data store. |
|
NamedTuple that represents the linked service information. |
|
The object containing the settings of the linked service. |
|
Allowed linked service operation names. |
Package Contents¶
- class ds_resource_plugin_py_lib.common.resource.linked_service.LinkedService[source]¶
Bases:
abc.ABC,ds_common_serde_py_lib.Serializable,Generic[LinkedServiceSettingsType]The object containing the connection information to connect with related data store.
You probably want to use the subclasses and not this class directly. Known subclasses are: - SftpLinkedService - S3LinkedService - GraphQlLinkedService
All required parameters must be populated in the constructor in order to send to ds-workflow-service.
- id: uuid.UUID¶
- name: str¶
- description: str | None = None¶
- version: str¶
- settings: LinkedServiceSettingsType¶
- __exit__(exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: types.TracebackType | None) None[source]¶
Context manager exit.
- Parameters:
exc_type – The type of the exception.
exc_value – The value of the exception.
traceback – The traceback of the exception.
- property type: enum.StrEnum¶
- Abstractmethod:
Get the type of the linked service.
- Returns:
The type of the linked service.
- property connection: Any¶
- Abstractmethod:
Return the backend client or connection object. Must raise
ConnectionErrorifconnect()has not been called.- Returns:
The backend client, session, or connection object.
- Raises:
ConnectionError – If the connection has not been established.
See also
Full contract:
docs/LINKED_SERVICE_CONTRACT.md–connection
- abstractmethod connect() None[source]¶
Establish a connection to the backend data store. The result is stored internally and accessible via the
connectionproperty.- Raises:
ConnectionError – If the connection cannot be established.
AuthenticationError – If credentials are invalid.
NotSupportedError – If the provider does not support connect.
See also
Full contract:
docs/LINKED_SERVICE_CONTRACT.md–connect()
- abstractmethod test_connection() tuple[bool, str][source]¶
Verify that the connection to the backend is healthy. Does not raise on connection failure – returns
(False, "reason")instead.- Returns:
(True, ""). On failure:(False, "error description").- Return type:
A tuple
(success, message). On success- Raises:
NotSupportedError – If the provider does not support test_connection.
See also
Full contract:
docs/LINKED_SERVICE_CONTRACT.md–test_connection()
- class ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceInfo[source]¶
Bases:
NamedTupleNamedTuple that represents the linked service information.
- type: str¶
- name: str¶
- class_name: str¶
- version: str¶
- description: str | None = None¶
- __str__() str[source]¶
Return a string representation of the linked service info.
- Returns:
A string representation of the linked service info.
- property key: tuple[str, str]¶
Return the composite key (type, version) for dictionary lookups.
- Returns:
A tuple containing the type and version.
- class ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceSettings[source]¶
Bases:
ds_common_serde_py_lib.SerializableThe object containing the settings of the linked service.
- class ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceMethod[source]¶
Bases:
enum.StrEnumAllowed linked service operation names.
- CONNECT = 'connect'¶
Establish a connection to the backend data store.
- TEST_CONNECTION = 'test_connection'¶
Verify that the connection to the backend is healthy.