airflow.providers.amazon.aws.hooks.ec2
¶
Module Contents¶
Functions¶
|
- class airflow.providers.amazon.aws.hooks.ec2.EC2Hook(api_type='resource_type', *args, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook
Interact with Amazon Elastic Compute Cloud (EC2). Provide thick wrapper around
boto3.client("ec2")
orboto3.resource("ec2")
.- Parameters
api_type – If set to
client_type
then hook useboto3.client("ec2")
capabilities, If set toresource_type
then hook useboto3.resource("ec2")
capabilities.
Additional arguments (such as
aws_conn_id
) may be specified and are passed down to the underlying AwsBaseHook.- describe_instances(filters=None, instance_ids=None)[source]¶
Describe EC2 instances, optionally applying filters and selective instance ids
- get_instances(filters=None, instance_ids=None)[source]¶
Get list of instance details, optionally applying filters and selective instance ids
- get_instance_ids(filters=None)[source]¶
Get list of instance ids, optionally applying filters to fetch selective instances