airflow.providers.amazon.aws.operators.rds

RdsCreateDbSnapshotOperator

建立資料庫例項或資料庫叢集的快照。

RdsCopyDbSnapshotOperator

複製指定的資料庫例項或資料庫叢集快照。

RdsDeleteDbSnapshotOperator

刪除資料庫例項或叢集快照,或終止複製操作。

RdsStartExportTaskOperator

開始將快照匯出到 Amazon S3。提供的 IAM 角色必須具有訪問 S3 儲存桶的許可權。

RdsCancelExportTaskOperator

取消正在進行中的、將快照匯出到 Amazon S3 的匯出任務。

RdsCreateEventSubscriptionOperator

建立 RDS 事件通知訂閱。

RdsDeleteEventSubscriptionOperator

刪除 RDS 事件通知訂閱。

RdsCreateDbInstanceOperator

建立 RDS 資料庫例項。

RdsDeleteDbInstanceOperator

刪除 RDS 資料庫例項。

RdsStartDbOperator

啟動 RDS 資料庫例項/叢集。

RdsStopDbOperator

停止 RDS 資料庫例項/叢集。

模組內容

class airflow.providers.amazon.aws.operators.rds.RdsCreateDbSnapshotOperator(*, db_type, db_identifier, db_snapshot_identifier, tags=None, wait_for_completion=True, **kwargs)[source]

基礎:RdsBaseOperator

建立資料庫例項或資料庫叢集的快照。

源資料庫例項或叢集必須處於可用或儲存最佳化狀態。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:建立資料庫快照

引數:
  • db_type (str) – 資料庫型別 - “instance”或“cluster”

  • db_identifier (str) – 要建立快照的例項或叢集的識別符號

  • db_snapshot_identifier (str) – 資料庫快照的識別符號

  • tags (collections.abc.Sequence[mypy_boto3_rds.type_defs.TagTypeDef] | dict | None) – 標籤字典或格式為 [{“Key”: “…”, “Value”: “…”},] 的標籤列表 USER Tagging

  • wait_for_completion (bool) – 如果為 True,則等待資料庫快照建立完成。(預設值:True)

  • aws_conn_id – 用於 AWS 憑證的 Airflow 連線。如果此引數為 None 或為空,則使用預設的 boto3 行為。如果在分散式環境中執行 Airflow 且 aws_conn_id 為 None 或為空,則將使用預設的 boto3 配置(且必須在每個工作節點上維護)。

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • verify – 是否驗證 SSL 證書。參見:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

template_fields[source]
db_type[source]
db_identifier[source]
db_snapshot_identifier[source]
tags = None[source]
wait_for_completion = True[source]
execute(context)[source]

快照、任務和事件的不同實現。

class airflow.providers.amazon.aws.operators.rds.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='', wait_for_completion=True, **kwargs)[source]

基礎:RdsBaseOperator

複製指定的資料庫例項或資料庫叢集快照。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:複製資料庫快照

引數:
  • db_type (str) – 資料庫型別 - “instance”或“cluster”

  • source_db_snapshot_identifier (str) – 源快照的識別符號

  • target_db_snapshot_identifier (str) – 目標快照的識別符號

  • kms_key_id (str) – 加密資料庫快照的 AWS KMS 金鑰識別符號

  • tags (collections.abc.Sequence[mypy_boto3_rds.type_defs.TagTypeDef] | dict | None) – 標籤字典或格式為 [{“Key”: “…”, “Value”: “…”},] 的標籤列表 USER Tagging

  • copy_tags (bool) – 是否將源快照的所有標籤複製到目標快照(預設值 False)

  • pre_signed_url (str) – 包含簽名版本 4 簽名請求的 URL

  • option_group_name (str) – 與快照副本關聯的選項組名稱 僅當 db_type=’instance’ 時有效

  • target_custom_availability_zone (str) – 目標外部自定義可用區識別符號 僅當 db_type=’instance’ 時有效

  • source_region (str) – 包含要複製的快照的區域 ID

  • wait_for_completion (bool) – 如果為 True,則等待快照複製完成。(預設值:True)

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • verify – 是否驗證 SSL 證書。參見:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

template_fields[source]
db_type[source]
source_db_snapshot_identifier[source]
target_db_snapshot_identifier[source]
kms_key_id = ''[source]
tags = None[source]
copy_tags = False[source]
pre_signed_url = ''[source]
option_group_name = ''[source]
target_custom_availability_zone = ''[source]
source_region = ''[source]
wait_for_completion = True[source]
execute(context)[source]

快照、任務和事件的不同實現。

class airflow.providers.amazon.aws.operators.rds.RdsDeleteDbSnapshotOperator(*, db_type, db_snapshot_identifier, wait_for_completion=True, **kwargs)[source]

基礎:RdsBaseOperator

刪除資料庫例項或叢集快照,或終止複製操作。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:刪除資料庫快照

引數:
template_fields[source]
db_type[source]
db_snapshot_identifier[source]
wait_for_completion = True[source]
execute(context)[source]

快照、任務和事件的不同實現。

class airflow.providers.amazon.aws.operators.rds.RdsStartExportTaskOperator(*, export_task_identifier, source_arn, s3_bucket_name, iam_role_arn, kms_key_id, s3_prefix='', export_only=None, wait_for_completion=True, waiter_interval=30, waiter_max_attempts=40, **kwargs)[source]

基礎:RdsBaseOperator

開始將快照匯出到 Amazon S3。提供的 IAM 角色必須具有訪問 S3 儲存桶的許可權。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:將 Amazon RDS 快照匯出到 Amazon S3

引數:
  • export_task_identifier (str) – 快照匯出任務的唯一識別符號。

  • source_arn (str) – 要匯出到 Amazon S3 的快照的 Amazon Resource Name (ARN)。

  • s3_bucket_name (str) – 要將快照匯出到的 Amazon S3 儲存桶的名稱。

  • iam_role_arn (str) – 用於寫入 Amazon S3 儲存桶的 IAM 角色名稱。

  • kms_key_id (str) – 用於加密快照的 Amazon Web Services KMS 金鑰 ID。

  • s3_prefix (str) – 用作匯出快照的檔名和路徑的 Amazon S3 儲存桶字首。

  • export_only (list[str] | None) – 要從快照匯出的資料。

  • wait_for_completion (bool) – 如果為 True,則等待資料庫快照匯出完成。(預設值:True)

  • waiter_interval (int) – 檢查匯出狀態之前等待的秒數。(預設值:30)

  • waiter_max_attempts (int) – 失敗前嘗試的最大次數。(預設值:40)

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • verify – 是否驗證 SSL 證書。參見:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

template_fields[source]
export_task_identifier[source]
source_arn[source]
s3_bucket_name[source]
iam_role_arn[source]
kms_key_id[source]
s3_prefix = ''[source]
export_only = [][source]
wait_for_completion = True[source]
waiter_interval = 30[source]
waiter_max_attempts = 40[source]
execute(context)[source]

快照、任務和事件的不同實現。

class airflow.providers.amazon.aws.operators.rds.RdsCancelExportTaskOperator(*, export_task_identifier, wait_for_completion=True, check_interval=30, max_attempts=40, **kwargs)[source]

基礎:RdsBaseOperator

取消正在進行中的、將快照匯出到 Amazon S3 的匯出任務。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:取消 Amazon RDS 匯出任務

引數:
template_fields[source]
export_task_identifier[原始碼]
wait_for_completion = True[原始碼]
check_interval = 30[原始碼]
max_attempts = 40[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

airflow.providers.amazon.aws.operators.rds.RdsCreateEventSubscriptionOperator(*, subscription_name, sns_topic_arn, source_type='', event_categories=None, source_ids=None, enabled=True, tags=None, wait_for_completion=True, **kwargs)[原始碼]

基礎:RdsBaseOperator

建立 RDS 事件通知訂閱。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:訂閱 Amazon RDS 事件通知

引數:
template_fields[原始碼]
subscription_name[原始碼]
sns_topic_arn[原始碼]
source_type = ''[原始碼]
event_categories = [][原始碼]
source_ids = [][原始碼]
enabled = True[原始碼]
tags = None[原始碼]
wait_for_completion = True[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

airflow.providers.amazon.aws.operators.rds.RdsDeleteEventSubscriptionOperator(*, subscription_name, **kwargs)[原始碼]

基礎:RdsBaseOperator

刪除 RDS 事件通知訂閱。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:取消訂閱 Amazon RDS 事件通知

引數:
template_fields[原始碼]
subscription_name[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

airflow.providers.amazon.aws.operators.rds.RdsCreateDbInstanceOperator(*, db_instance_identifier, db_instance_class, engine, rds_kwargs=None, wait_for_completion=True, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), waiter_delay=30, waiter_max_attempts=60, **kwargs)[原始碼]

基礎:RdsBaseOperator

建立 RDS 資料庫例項。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:建立資料庫例項

引數:
template_fields[原始碼]
db_instance_identifier[原始碼]
db_instance_class[原始碼]
engine[原始碼]
rds_kwargs[原始碼]
wait_for_completion = False[原始碼]
deferrable = True[原始碼]
waiter_delay = 30[原始碼]
waiter_max_attempts = 60[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

execute_complete(context, event=None)[原始碼]
airflow.providers.amazon.aws.operators.rds.RdsDeleteDbInstanceOperator(*, db_instance_identifier, rds_kwargs=None, wait_for_completion=True, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), waiter_delay=30, waiter_max_attempts=60, **kwargs)[原始碼]

基礎:RdsBaseOperator

刪除 RDS 資料庫例項。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:刪除資料庫例項

引數:
template_fields[原始碼]
db_instance_identifier[原始碼]
rds_kwargs[原始碼]
wait_for_completion = False[原始碼]
deferrable = True[原始碼]
waiter_delay = 30[原始碼]
waiter_max_attempts = 60[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

execute_complete(context, event=None)[原始碼]
airflow.providers.amazon.aws.operators.rds.RdsStartDbOperator(*, db_identifier, db_type=RdsDbType.INSTANCE, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=40, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[原始碼]

基礎:RdsBaseOperator

啟動 RDS 資料庫例項/叢集。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:啟動資料庫例項或叢集

引數:
template_fields[原始碼]
db_identifier[原始碼]
db_type[原始碼]
wait_for_completion = True[原始碼]
waiter_delay = 30[原始碼]
waiter_max_attempts = 40[原始碼]
deferrable = True[原始碼]
execute(context)[原始碼]

快照、任務和事件的不同實現。

execute_complete(context, event=None)[原始碼]
airflow.providers.amazon.aws.operators.rds.RdsStopDbOperator(*, db_identifier, db_type=RdsDbType.INSTANCE, db_snapshot_identifier=None, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=40, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[原始碼]

基礎:RdsBaseOperator

停止 RDS 資料庫例項/叢集。

另請參閱

有關如何使用此操作器的更多資訊,請參閱指南:停止資料庫例項或叢集

引數:
  • db_identifier (str) – 要停止的資料庫的 AWS 識別符號

  • db_type (airflow.providers.amazon.aws.utils.rds.RdsDbType | str) – 資料庫型別 - "instance"(例項)或 "cluster"(叢集)(預設為 "instance")

  • db_snapshot_identifier (str | None) – 在停止資料庫例項之前要建立的資料庫快照的例項識別符號。預設值 (None) 跳過快照建立。當 db_type 為 "cluster" 時,此引數將被忽略。

  • wait_for_completion (bool) – 如果為 True,則等待資料庫停止。(預設為 True)

  • waiter_delay (int) – 檢查資料庫例項狀態的兩次連續呼叫之間的等待時間(以秒為單位)

  • waiter_max_attempts (int) – 檢查資料庫例項狀態的最大嘗試次數

  • deferrable (bool) – 如果為 True,操作器將非同步等待資料庫例項建立。這意味著將等待完成。此模式需要安裝 aiobotocore 模組。

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • verify – 是否驗證 SSL 證書。參見:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

template_fields[來源]
db_identifier[來源]
db_type[來源]
db_snapshot_identifier = None[來源]
wait_for_completion = True[來源]
waiter_delay = 30[來源]
waiter_max_attempts = 40[來源]
deferrable = True[來源]
execute(context)[來源]

快照、任務和事件的不同實現。

execute_complete(context, event=None)[來源]

此條目有幫助嗎?