airflow.providers.amazon.aws.hooks.ecs
¶
Module Contents¶
Classes¶
Contains the possible State values of an ECS Cluster. |
|
Contains the possible State values of an ECS Task Definition. |
|
Contains the possible State values of an ECS Task. |
|
Interact with Amazon Elastic Container Service (ECS). |
|
Fetches Cloudwatch log events with specific interval as a thread |
|
A structured Protocol for |
Functions¶
|
Check if exception is related to ECS resource quota (CPU, MEM). |
|
Check if exception is related to ENI (Elastic Network Interfaces). |
- airflow.providers.amazon.aws.hooks.ecs.should_retry(exception)[source]¶
Check if exception is related to ECS resource quota (CPU, MEM).
- airflow.providers.amazon.aws.hooks.ecs.should_retry_eni(exception)[source]¶
Check if exception is related to ENI (Elastic Network Interfaces).
- class airflow.providers.amazon.aws.hooks.ecs.EcsClusterStates[source]¶
Bases:
airflow.providers.amazon.aws.utils._StringCompareEnum
Contains the possible State values of an ECS Cluster.
- class airflow.providers.amazon.aws.hooks.ecs.EcsTaskDefinitionStates[source]¶
Bases:
airflow.providers.amazon.aws.utils._StringCompareEnum
Contains the possible State values of an ECS Task Definition.
- class airflow.providers.amazon.aws.hooks.ecs.EcsTaskStates[source]¶
Bases:
airflow.providers.amazon.aws.utils._StringCompareEnum
Contains the possible State values of an ECS Task.
- class airflow.providers.amazon.aws.hooks.ecs.EcsHook(*args, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.hooks.base_aws.AwsGenericHook
Interact with Amazon Elastic Container Service (ECS). Provide thin wrapper around
boto3.client("ecs")
.Additional arguments (such as
aws_conn_id
) may be specified and are passed down to the underlying AwsBaseHook.- get_cluster_state(cluster_name)[source]¶
Get ECS Cluster state.
See also
- Parameters
cluster_name (str) – ECS Cluster name or full cluster Amazon Resource Name (ARN) entry.
- get_task_definition_state(task_definition)[source]¶
Get ECS Task Definition state.
- Parameters
task_definition (str) – The family for the latest ACTIVE revision, family and revision ( family:revision ) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.
- class airflow.providers.amazon.aws.hooks.ecs.EcsTaskLogFetcher(*, log_group, log_stream_name, fetch_interval, logger, aws_conn_id='aws_default', region_name=None)[source]¶
Bases:
threading.Thread
Fetches Cloudwatch log events with specific interval as a thread and sends the log events to the info channel of the provided logger.
- run()[source]¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- class airflow.providers.amazon.aws.hooks.ecs.EcsProtocol[source]¶
Bases:
airflow.typing_compat.Protocol
A structured Protocol for
boto3.client('ecs')
. This is used for type hints onEcsOperator.client()
.See also