airflow.providers.amazon.aws.hooks.dms¶
類¶
可用的 AWS DMS 任務等待器狀態。 |
|
與 AWS Database Migration Service (DMS) 互動。 |
模組內容¶
- class airflow.providers.amazon.aws.hooks.dms.DmsHook(*args, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook與 AWS Database Migration Service (DMS) 互動。
提供圍繞
boto3.client("dms")的精簡封裝。可以指定附加引數(例如
aws_conn_id),這些引數將傳遞給底層的 AwsBaseHook。- find_replication_tasks_by_arn(replication_task_arn, without_settings=False)[source]¶
按任務 ARN 查詢並描述複製任務。
- create_replication_task(replication_task_id, source_endpoint_arn, target_endpoint_arn, replication_instance_arn, migration_type, table_mappings, **kwargs)[source]¶
建立 DMS 複製任務。
- start_replication_task(replication_task_arn, start_replication_task_type, **kwargs)[source]¶
啟動複製任務。
- delete_replication_task(replication_task_arn)[source]¶
啟動複製任務刪除並等待其被刪除。
- 引數:
replication_task_arn – 複製任務 ARN
- wait_for_task_status(replication_task_arn, status)[source]¶
等待複製任務達到指定狀態;支援的狀態包括:deleted、ready、running、stopped。
- 引數:
status (DmsTaskWaiterStatus) – 要等待的狀態
replication_task_arn (str) – 複製任務 ARN
- create_replication_config(replication_config_id, source_endpoint_arn, target_endpoint_arn, compute_config, replication_type, table_mappings, additional_config_kwargs=None, **kwargs)[source]¶
建立一個 AWS DMS 無伺服器配置,可用於啟動 DMS 無伺服器複製。
- 引數:
replicationConfigId – 用於建立 ReplicationConfigArn 的唯一識別符號。
sourceEndpointArn – 源端點 ARN
targetEndpointArn – 目標端點 ARN
computeConfig – 用於預置 DMS 無伺服器複製的引數。
replicationType – DMS 無伺服器複製的型別
tableMappings – JSON 表對映
tags – 鍵值標籤對
resourceId – 您為給定資源設定的唯一值或名稱,可用於構造該資源的 Amazon Resource Name (ARN)。
supplementalSettings – 用於指定補充資料的 JSON 設定
replicationSettings – DMS 無伺服器複製的 JSON 設定
- 返回:
ReplicationConfigArn
- delete_replication_config(replication_config_arn, delay=60, max_attempts=120)[source]¶
刪除 AWS DMS 無伺服器配置。
- 引數:
replication_config_arn (str) – ReplicationConfigArn