airflow.providers.amazon.aws.utils.connection_wrapper

Module Contents

Classes

ArgNotSet

Sentinel type for annotations, useful when None is not viable.

AwsConnectionWrapper

AWS Connection Wrapper class helper.

class airflow.providers.amazon.aws.utils.connection_wrapper.ArgNotSet[source]

Sentinel type for annotations, useful when None is not viable.

class airflow.providers.amazon.aws.utils.connection_wrapper.AwsConnectionWrapper(context=None)[source]

Bases: airflow.utils.log.logging_mixin.LoggingMixin

AWS Connection Wrapper class helper. Use for validate and resolve AWS Connection parameters.

conn reference to Airflow Connection object or AwsConnectionWrapper

if it set to None than default values would use.

The precedence rules for region_name
  1. Explicit set (in Hook) region_name.

  2. Airflow Connection Extra 'region_name'.

The precedence rules for botocore_config
  1. Explicit set (in Hook) botocore_config.

  2. Construct from Airflow Connection Extra 'botocore_kwargs'.

  3. The wrapper's default value

conn :dataclasses.InitVar[Optional[Union[airflow.models.connection.Connection, AwsConnectionWrapper]]][source]
region_name :Optional[str][source]
botocore_config :Optional[botocore.config.Config][source]
verify :Optional[Union[bool, str]][source]
conn_id :Optional[Union[str, airflow.utils.types.ArgNotSet]][source]
conn_type :Optional[str][source]
login :Optional[str][source]
password :Optional[str][source]
extra_config :Dict[str, Any][source]
aws_access_key_id :Optional[str][source]
aws_secret_access_key :Optional[str][source]
aws_session_token :Optional[str][source]
profile_name :Optional[str][source]
endpoint_url :Optional[str][source]
role_arn :Optional[str][source]
assume_role_method :Optional[str][source]
assume_role_kwargs :Dict[str, Any][source]
conn_repr()[source]
__post_init__(conn)[source]
classmethod from_connection_metadata(conn_id=None, login=None, password=None, extra=None)[source]

Create config from connection metadata.

Parameters
  • conn_id (Optional[str]) -- Custom connection ID.

  • login (Optional[str]) -- AWS Access Key ID.

  • password (Optional[str]) -- AWS Secret Access Key.

  • extra (Optional[Dict[str, Any]]) -- Connection Extra metadata.

property extra_dejson[source]

Compatibility with airflow.models.Connection.extra_dejson property.

property session_kwargs[source]

Additional kwargs passed to boto3.session.Session.

__bool__()[source]

Was this entry helpful?