ds_provider_aws_py_lib.linked_service ===================================== .. py:module:: ds_provider_aws_py_lib.linked_service .. autoapi-nested-parse:: **File:** ``__init__.py`` **Region:** ``ds_provider_aws_py_lib/linked_service`` AWS Linked Service This module implements a linked service for AWS (for example, S3) and provides a boto3 session. .. rubric:: Example >>> linked_service = AWSLinkedService( ... id=UUID("00000000-0000-0000-0000-000000000000"), ... name="test-name", ... version="1.0.0", ... settings=AWSLinkedServiceSettings( ... account_id="your_account_id", ... access_key_id="your_access", ... access_key_secret="your_secret", ... region="us-west-2", ... ), ... ) >>> linked_service.test_connection() Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ds_provider_aws_py_lib/linked_service/aws/index Classes ------- .. autoapisummary:: ds_provider_aws_py_lib.linked_service.AWSLinkedService ds_provider_aws_py_lib.linked_service.AWSLinkedServiceSettings Package Contents ---------------- .. py:class:: AWSLinkedService Bases: :py:obj:`ds_resource_plugin_py_lib.common.resource.linked_service.LinkedService`\ [\ :py:obj:`AWSLinkedServiceSettingsType`\ ], :py:obj:`Generic`\ [\ :py:obj:`AWSLinkedServiceSettingsType`\ ] The class is used to connect with AWS services. .. py:attribute:: settings :type: AWSLinkedServiceSettingsType .. py:attribute:: _connection :type: boto3.Session | None :value: None .. py:property:: type :type: ds_provider_aws_py_lib.enums.ResourceType Get the type of the linked service. :returns: ResourceType .. py:property:: connection :type: boto3.Session Get the connection to AWS. :returns: The established boto3 session. :rtype: boto3.Session .. py:method:: connect() -> None Create a boto3 session using the provided AWS credentials and verify the account ID if specified. :raises AuthorizationError: If the AWS account ID does not match the expected value. .. py:method:: test_connection() -> tuple[bool, str] Test the connection to AWS by creating the session. :returns: A tuple containing a boolean indicating success and a message. :rtype: tuple[bool, str] .. py:method:: close() -> None boto3 sessions do not require explicit closing. .. py:class:: AWSLinkedServiceSettings Bases: :py:obj:`ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceSettings` The object containing the AWS linked service settings. .. py:attribute:: account_id :type: str The AWS account ID. .. py:attribute:: access_key_id :type: str The AWS access key ID. .. py:attribute:: access_key_secret :type: str The AWS access key secret. .. py:attribute:: region :type: str :value: 'eu-north-1' The AWS region.