blob: 0df5c1cb4bd33f4d0452d6900de3c49b8a757dac [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.operators.ec2`
====================================================
.. py:module:: airflow.providers.amazon.aws.operators.ec2
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.operators.ec2.EC2StartInstanceOperator
airflow.providers.amazon.aws.operators.ec2.EC2StopInstanceOperator
.. py:class:: EC2StartInstanceOperator(*, instance_id, aws_conn_id = 'aws_default', region_name = None, check_interval = 15, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Start AWS EC2 instance using boto3.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:EC2StartInstanceOperator`
:param instance_id: id of the AWS EC2 instance
:param aws_conn_id: aws connection to use
:param region_name: (optional) aws region name associated with the client
:param check_interval: time in seconds that the job should wait in
between each instance state checks until operation is completed
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['instance_id', 'region_name']
.. py:attribute:: ui_color
:annotation: = #eeaa11
.. py:attribute:: ui_fgcolor
:annotation: = #ffffff
.. py:method:: execute(self, context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.
.. py:class:: EC2StopInstanceOperator(*, instance_id, aws_conn_id = 'aws_default', region_name = None, check_interval = 15, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Stop AWS EC2 instance using boto3.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:EC2StopInstanceOperator`
:param instance_id: id of the AWS EC2 instance
:param aws_conn_id: aws connection to use
:param region_name: (optional) aws region name associated with the client
:param check_interval: time in seconds that the job should wait in
between each instance state checks until operation is completed
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['instance_id', 'region_name']
.. py:attribute:: ui_color
:annotation: = #eeaa11
.. py:attribute:: ui_fgcolor
:annotation: = #ffffff
.. py:method:: execute(self, context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.