blob: 41a05b96db4c5985419152894ca35b6d9d9541f3 [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.operators.rds`
====================================================
.. py:module:: airflow.providers.amazon.aws.operators.rds
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.operators.rds.RdsCreateDbSnapshotOperator
airflow.providers.amazon.aws.operators.rds.RdsCopyDbSnapshotOperator
airflow.providers.amazon.aws.operators.rds.RdsDeleteDbSnapshotOperator
airflow.providers.amazon.aws.operators.rds.RdsStartExportTaskOperator
airflow.providers.amazon.aws.operators.rds.RdsCancelExportTaskOperator
airflow.providers.amazon.aws.operators.rds.RdsCreateEventSubscriptionOperator
airflow.providers.amazon.aws.operators.rds.RdsDeleteEventSubscriptionOperator
.. py:class:: RdsCreateDbSnapshotOperator(*, db_type, db_identifier, db_snapshot_identifier, tags = None, aws_conn_id = 'aws_conn_id', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Creates a snapshot of a DB instance or DB cluster.
The source DB instance or cluster must be in the available or storage-optimization state.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsCreateDbSnapshotOperator`
:param db_type: Type of the DB - either "instance" or "cluster"
:param db_identifier: The identifier of the instance or cluster that you want to create the snapshot of
:param db_snapshot_identifier: The identifier for the DB snapshot
:param tags: A list of tags in format `[{"Key": "something", "Value": "something"},]
`USER Tagging <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html>`__
.. py:attribute:: template_fields
:annotation: = ['db_snapshot_identifier', 'db_identifier', 'tags']
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsCopyDbSnapshotOperator(*, db_type, source_db_snapshot_identifier, target_db_snapshot_identifier, kms_key_id = '', tags = None, copy_tags = False, pre_signed_url = '', option_group_name = '', target_custom_availability_zone = '', source_region = '', aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Copies the specified DB instance or DB cluster snapshot
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsCopyDbSnapshotOperator`
:param db_type: Type of the DB - either "instance" or "cluster"
:param source_db_snapshot_identifier: The identifier of the source snapshot
:param target_db_snapshot_identifier: The identifier of the target snapshot
:param kms_key_id: The AWS KMS key identifier for an encrypted DB snapshot
:param tags: A list of tags in format `[{"Key": "something", "Value": "something"},]
`USER Tagging <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html>`__
:param copy_tags: Whether to copy all tags from the source snapshot to the target snapshot (default False)
:param pre_signed_url: The URL that contains a Signature Version 4 signed request
:param option_group_name: The name of an option group to associate with the copy of the snapshot
Only when db_type='instance'
:param target_custom_availability_zone: The external custom Availability Zone identifier for the target
Only when db_type='instance'
:param source_region: The ID of the region that contains the snapshot to be copied
.. py:attribute:: template_fields
:annotation: = ['source_db_snapshot_identifier', 'target_db_snapshot_identifier', 'tags', 'pre_signed_url',...
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsDeleteDbSnapshotOperator(*, db_type, db_snapshot_identifier, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Deletes a DB instance or cluster snapshot or terminating the copy operation
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsDeleteDbSnapshotOperator`
:param db_type: Type of the DB - either "instance" or "cluster"
:param db_snapshot_identifier: The identifier for the DB instance or DB cluster snapshot
.. py:attribute:: template_fields
:annotation: = ['db_snapshot_identifier']
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsStartExportTaskOperator(*, export_task_identifier, source_arn, s3_bucket_name, iam_role_arn, kms_key_id, s3_prefix = '', export_only = None, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Starts an export of a snapshot to Amazon S3. The provided IAM role must have access to the S3 bucket.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsStartExportTaskOperator`
:param export_task_identifier: A unique identifier for the snapshot export task.
:param source_arn: The Amazon Resource Name (ARN) of the snapshot to export to Amazon S3.
:param s3_bucket_name: The name of the Amazon S3 bucket to export the snapshot to.
:param iam_role_arn: The name of the IAM role to use for writing to the Amazon S3 bucket.
:param kms_key_id: The ID of the Amazon Web Services KMS key to use to encrypt the snapshot.
:param s3_prefix: The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.
:param export_only: The data to be exported from the snapshot.
.. py:attribute:: template_fields
:annotation: = ['export_task_identifier', 'source_arn', 's3_bucket_name', 'iam_role_arn', 'kms_key_id',...
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsCancelExportTaskOperator(*, export_task_identifier, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Cancels an export task in progress that is exporting a snapshot to Amazon S3
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsCancelExportTaskOperator`
:param export_task_identifier: The identifier of the snapshot export task to cancel
.. py:attribute:: template_fields
:annotation: = ['export_task_identifier']
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsCreateEventSubscriptionOperator(*, subscription_name, sns_topic_arn, source_type = '', event_categories = None, source_ids = None, enabled = True, tags = None, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Creates an RDS event notification subscription
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsCreateEventSubscriptionOperator`
:param subscription_name: The name of the subscription (must be less than 255 characters)
:param sns_topic_arn: The ARN of the SNS topic created for event notification
:param source_type: The type of source that is generating the events. Valid values: db-instance |
db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot | db-proxy
:param event_categories: A list of event categories for a source type that you want to subscribe to
`USER Events <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html>`__
:param source_ids: The list of identifiers of the event sources for which events are returned
:param enabled: A value that indicates whether to activate the subscription (default True)l
:param tags: A list of tags in format `[{"Key": "something", "Value": "something"},]
`USER Tagging <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html>`__
.. py:attribute:: template_fields
:annotation: = ['subscription_name', 'sns_topic_arn', 'source_type', 'event_categories', 'source_ids', 'tags']
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events
.. py:class:: RdsDeleteEventSubscriptionOperator(*, subscription_name, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`RdsBaseOperator`
Deletes an RDS event notification subscription
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:RdsDeleteEventSubscriptionOperator`
:param subscription_name: The name of the RDS event notification subscription you want to delete
.. py:attribute:: template_fields
:annotation: = ['subscription_name']
.. py:method:: execute(self, context)
Different implementations for snapshots, tasks and events