airflow.providers.amazon.aws.operators.dms

Module Contents

Classes

DmsCreateTaskOperator

Creates AWS DMS replication task.

DmsDeleteTaskOperator

Deletes AWS DMS replication task.

DmsDescribeTasksOperator

Describes AWS DMS replication tasks.

DmsStartTaskOperator

Starts AWS DMS replication task.

DmsStopTaskOperator

Stops AWS DMS replication task.

class airflow.providers.amazon.aws.operators.dms.DmsCreateTaskOperator(*, replication_task_id, source_endpoint_arn, target_endpoint_arn, replication_instance_arn, table_mappings, migration_type='full-load', create_task_kwargs=None, aws_conn_id='aws_default', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.dms.DmsHook]

Creates AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Create a 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.

  • create_task_kwargs (dict | None) – Extra arguments for DMS replication task creation.

  • aws_conn_id (str) – The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – Configuration dictionary (key-values) for botocore client. See: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

aws_hook_class[source]
template_fields: Sequence[str][source]
template_fields_renderers[source]
execute(context)[source]

Create AWS DMS replication task from Airflow.

Returns

replication task arn

class airflow.providers.amazon.aws.operators.dms.DmsDeleteTaskOperator(*, replication_task_arn=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.dms.DmsHook]

Deletes AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Delete a replication task

Parameters
aws_hook_class[source]
template_fields: Sequence[str][source]
execute(context)[source]

Delete AWS DMS replication task from Airflow.

Returns

replication task arn

class airflow.providers.amazon.aws.operators.dms.DmsDescribeTasksOperator(*, describe_tasks_kwargs=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.dms.DmsHook]

Describes AWS DMS replication tasks.

See also

For more information on how to use this operator, take a look at the guide: Get details of replication tasks

Parameters
aws_hook_class[source]
template_fields: Sequence[str][source]
template_fields_renderers: dict[str, str][source]
execute(context)[source]

Describe AWS DMS replication tasks from Airflow.

Returns

Marker and list of replication tasks

Return type

tuple[str | None, list]

class airflow.providers.amazon.aws.operators.dms.DmsStartTaskOperator(*, replication_task_arn, start_replication_task_type='start-replication', start_task_kwargs=None, aws_conn_id='aws_default', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.dms.DmsHook]

Starts AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Start a replication task

Parameters
  • replication_task_arn (str) – Replication task ARN

  • start_replication_task_type (str) – Replication task start type (default=’start-replication’) (‘start-replication’|’resume-processing’|’reload-target’)

  • start_task_kwargs (dict | None) – Extra start replication task arguments

  • aws_conn_id (str) – The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – Configuration dictionary (key-values) for botocore client. See: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

aws_hook_class[source]
template_fields: Sequence[str][source]
template_fields_renderers[source]
execute(context)[source]

Start AWS DMS replication task from Airflow.

class airflow.providers.amazon.aws.operators.dms.DmsStopTaskOperator(*, replication_task_arn=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.dms.DmsHook]

Stops AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Stop a replication task

Parameters
aws_hook_class[source]
template_fields: Sequence[str][source]
execute(context)[source]

Stop AWS DMS replication task from Airflow.

Was this entry helpful?