ds_provider_aws_py_lib.linked_service.aws ========================================= .. py:module:: ds_provider_aws_py_lib.linked_service.aws .. autoapi-nested-parse:: **File:** ``aws.py`` **Region:** ``ds_provider_aws_py_lib/linked_service/aws`` AWS Linked Service This module implements a linked service for AWS. Attributes ---------- .. autoapisummary:: ds_provider_aws_py_lib.linked_service.aws.logger ds_provider_aws_py_lib.linked_service.aws.AWSLinkedServiceSettingsType Classes ------- .. autoapisummary:: ds_provider_aws_py_lib.linked_service.aws.AWSLinkedServiceSettings ds_provider_aws_py_lib.linked_service.aws.AWSLinkedService Module Contents --------------- .. py:data:: logger .. 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. .. py:data:: AWSLinkedServiceSettingsType .. 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.