airflow.providers.amazon.aws.hooks.dms

Module Contents

Classes

DmsTaskWaiterStatus

Available AWS DMS Task Waiter statuses.

DmsHook

Interact with AWS Database Migration Service.

class airflow.providers.amazon.aws.hooks.dms.DmsTaskWaiterStatus[source]

Bases: str, enum.Enum

Available AWS DMS Task Waiter statuses.

DELETED = deleted[source]
READY = ready[source]
RUNNING = running[source]
STOPPED = stopped[source]
class airflow.providers.amazon.aws.hooks.dms.DmsHook(*args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

Interact with AWS Database Migration Service.

describe_replication_tasks(self, **kwargs)[source]

Describe replication tasks

Returns

Marker and list of replication tasks

Return type

(Optional[str], list)

find_replication_tasks_by_arn(self, replication_task_arn: str, without_settings: Optional[bool] = False)[source]

Find and describe replication tasks by task ARN :param replication_task_arn: Replication task arn :type replication_task_arn: str :param without_settings: Indicates whether to return task information with settings. :type without_settings: Optional[bool]

Returns

list of replication tasks that match the ARN

get_task_status(self, replication_task_arn: str) Optional[str][source]

Retrieve task status.

Parameters

replication_task_arn (str) -- Replication task ARN

Returns

Current task status

create_replication_task(self, replication_task_id: str, source_endpoint_arn: str, target_endpoint_arn: str, replication_instance_arn: str, migration_type: str, table_mappings: dict, **kwargs) str[source]

Create DMS replication task

Parameters
  • replication_task_id (str) -- Replication task id

  • source_endpoint_arn (str) -- Source endpoint ARN

  • target_endpoint_arn (str) -- Target endpoint ARN

  • replication_instance_arn (str) -- Replication instance ARN

  • table_mappings (dict) -- Table mappings

  • migration_type (str) -- Migration type ('full-load'|'cdc'|'full-load-and-cdc'), full-load by default.

Returns

Replication task ARN

start_replication_task(self, replication_task_arn: str, start_replication_task_type: str, **kwargs)[source]

Starts replication task.

Parameters
  • replication_task_arn (str) -- Replication task ARN

  • start_replication_task_type (str) -- Replication task start type ('start-replication'|'resume-processing'|'reload-target')

stop_replication_task(self, replication_task_arn)[source]

Stops replication task.

Parameters

replication_task_arn (str) -- Replication task ARN

delete_replication_task(self, replication_task_arn)[source]

Starts replication task deletion and waits for it to be deleted

Parameters

replication_task_arn (str) -- Replication task ARN

wait_for_task_status(self, replication_task_arn: str, status: DmsTaskWaiterStatus)[source]

Waits for replication task to reach status. Supported statuses: deleted, ready, running, stopped.

Parameters

Was this entry helpful?