| :mod:`airflow.providers.amazon.aws.hooks.dms` |
| ============================================= |
| |
| .. py:module:: airflow.providers.amazon.aws.hooks.dms |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: DmsTaskWaiterStatus |
| |
| Bases: :class:`str`, :class:`enum.Enum` |
| |
| Available AWS DMS Task Waiter statuses. |
| |
| .. attribute:: DELETED |
| :annotation: = deleted |
| |
| |
| |
| .. attribute:: READY |
| :annotation: = ready |
| |
| |
| |
| .. attribute:: RUNNING |
| :annotation: = running |
| |
| |
| |
| .. attribute:: STOPPED |
| :annotation: = stopped |
| |
| |
| |
| |
| .. py:class:: DmsHook(*args, **kwargs) |
| |
| Bases: :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook` |
| |
| Interact with AWS Database Migration Service. |
| |
| |
| .. method:: describe_replication_tasks(self, **kwargs) |
| |
| Describe replication tasks |
| |
| :return: Marker and list of replication tasks |
| :rtype: (str, list) |
| |
| |
| |
| |
| .. method:: find_replication_tasks_by_arn(self, replication_task_arn: str, without_settings: Optional[bool] = False) |
| |
| 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] |
| |
| :return: list of replication tasks that match the ARN |
| |
| |
| |
| |
| .. method:: get_task_status(self, replication_task_arn: str) |
| |
| Retrieve task status. |
| |
| :param replication_task_arn: Replication task ARN |
| :type replication_task_arn: str |
| :return: Current task status |
| |
| |
| |
| |
| .. method:: 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) |
| |
| Create DMS replication task |
| |
| :param replication_task_id: Replication task id |
| :type replication_task_id: str |
| :param source_endpoint_arn: Source endpoint ARN |
| :type source_endpoint_arn: str |
| :param target_endpoint_arn: Target endpoint ARN |
| :type target_endpoint_arn: str |
| :param replication_instance_arn: Replication instance ARN |
| :type replication_instance_arn: str |
| :param table_mappings: Table mappings |
| :type table_mappings: dict |
| :param migration_type: Migration type ('full-load'|'cdc'|'full-load-and-cdc'), full-load by default. |
| :type migration_type: str |
| :return: Replication task ARN |
| |
| |
| |
| |
| .. method:: start_replication_task(self, replication_task_arn: str, start_replication_task_type: str, **kwargs) |
| |
| Starts replication task. |
| |
| :param replication_task_arn: Replication task ARN |
| :type replication_task_arn: str |
| :param start_replication_task_type: Replication task start type |
| ('start-replication'|'resume-processing'|'reload-target') |
| :type start_replication_task_type: str |
| |
| |
| |
| |
| .. method:: stop_replication_task(self, replication_task_arn) |
| |
| Stops replication task. |
| |
| :param replication_task_arn: Replication task ARN |
| :type replication_task_arn: str |
| |
| |
| |
| |
| .. method:: delete_replication_task(self, replication_task_arn) |
| |
| Starts replication task deletion and waits for it to be deleted |
| |
| :param replication_task_arn: Replication task ARN |
| :type replication_task_arn: str |
| |
| |
| |
| |
| .. method:: wait_for_task_status(self, replication_task_arn: str, status: DmsTaskWaiterStatus) |
| |
| Waits for replication task to reach status. |
| Supported statuses: deleted, ready, running, stopped. |
| |
| :param status: Status to wait for |
| :type status: DmsTaskWaiterStatus |
| :param replication_task_arn: Replication task ARN |
| :type replication_task_arn: str |
| |
| |
| |
| |