airflow.providers.amazon.aws.hooks.ecr

Module Contents

Classes

EcrCredentials

Helper (frozen dataclass) for storing temporary ECR credentials.

EcrHook

Interact with Amazon Elastic Container Registry (ECR).

Attributes

logger

airflow.providers.amazon.aws.hooks.ecr.logger[source]
class airflow.providers.amazon.aws.hooks.ecr.EcrCredentials[source]

Helper (frozen dataclass) for storing temporary ECR credentials.

property registry: str[source]

Return registry in appropriate docker login format.

username: str[source]
password: str[source]
proxy_endpoint: str[source]
expires_at: datetime.datetime[source]
__post_init__()[source]
class airflow.providers.amazon.aws.hooks.ecr.EcrHook(**kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

Interact with Amazon Elastic Container Registry (ECR). Provide thin wrapper around boto3.client("ecr").

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

get_temporary_credentials(registry_ids=None)[source]

Get temporary credentials for Amazon ECR.

Parameters

registry_ids (list[str] | str | None) – Either AWS Account ID or list of AWS Account IDs that are associated with the registries from which credentials are obtained. If you do not specify a registry, the default registry is assumed.

Returns

list of airflow.providers.amazon.aws.hooks.ecr.EcrCredentials, obtained credentials valid for 12 hours.

Return type

list[EcrCredentials]

Was this entry helpful?