ds_provider_aws_py_lib.linked_service.aws

File: aws.py Region: ds_provider_aws_py_lib/linked_service/aws

AWS Linked Service

This module implements a linked service for AWS.

Attributes

logger

AWSLinkedServiceSettingsType

Classes

AWSLinkedServiceSettings

The object containing the AWS linked service settings.

AWSLinkedService

The class is used to connect with AWS services.

Module Contents

ds_provider_aws_py_lib.linked_service.aws.logger
class ds_provider_aws_py_lib.linked_service.aws.AWSLinkedServiceSettings[source]

Bases: ds_resource_plugin_py_lib.common.resource.linked_service.LinkedServiceSettings

The object containing the AWS linked service settings.

account_id: str

The AWS account ID.

access_key_id: str

The AWS access key ID.

access_key_secret: str

The AWS access key secret.

region: str = 'eu-north-1'

The AWS region.

ds_provider_aws_py_lib.linked_service.aws.AWSLinkedServiceSettingsType
class ds_provider_aws_py_lib.linked_service.aws.AWSLinkedService[source]

Bases: ds_resource_plugin_py_lib.common.resource.linked_service.LinkedService[AWSLinkedServiceSettingsType], Generic[AWSLinkedServiceSettingsType]

The class is used to connect with AWS services.

settings: AWSLinkedServiceSettingsType
_connection: boto3.Session | None = None
property type: ds_provider_aws_py_lib.enums.ResourceType

Get the type of the linked service.

Returns:

ResourceType

property connection: boto3.Session

Get the connection to AWS.

Returns:

The established boto3 session.

Return type:

boto3.Session

connect() None[source]

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.

test_connection() tuple[bool, str][source]

Test the connection to AWS by creating the session.

Returns:

A tuple containing a boolean indicating success and a message.

Return type:

tuple[bool, str]

close() None[source]

boto3 sessions do not require explicit closing.