Skip to main content

migration_tasks

Creates, updates, deletes, gets or lists a migration_tasks resource.

Overview

Namemigration_tasks
TypeResource
Idaws.mgh.migration_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
migration_task_namestringUnique identifier that references the migration task. Do not store personal data in this field. (pattern: <code>[^:|]+</code>)
progress_update_streamstringA name that identifies the vendor of the migration tool being used. (pattern: <code>[^/:|\000-\037]+</code>)
resource_attribute_listarrayInformation about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.
taskobjectTask object encapsulating task information.
update_date_timestring (date-time)The timestamp when the task was gathered.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_migration_taskselectregionRetrieves a list of all attributes associated with a specific migration task.
list_migration_tasksselectregionLists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits: Can show a summary list of the most recent migration tasks. Can show a summary list of migration tasks associated with a given discovered resource. Lists migration tasks in a paginated interface.
put_resource_attributesreplaceregion, ProgressUpdateStream, MigrationTaskName, ResourceAttributeListProvides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service repository. This association occurs asynchronously after PutResourceAttributes returns. Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to add an IP address, it will then be required to call it with both the IP and MAC addresses to prevent overriding the MAC address. Note the instructions regarding the special use case of the ResourceAttributeList parameter when specifying any "VM" related value. Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call ListDiscoveredResources.
import_migration_taskexecregion, ProgressUpdateStream, MigrationTaskNameRegisters a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool. This API is a prerequisite to calling the NotifyMigrationTaskState API as the migration tool must first register the migration task with Migration Hub.
notify_migration_task_stateexecregion, ProgressUpdateStream, MigrationTaskName, Task, UpdateDateTime, NextUpdateSecondsNotifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits: Migration tools will call the NotifyMigrationTaskState API to share the latest progress and status. MigrationTaskName is used for addressing updates to the correct target. ProgressUpdateStream is used for access control and to provide a namespace for each migration tool.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves a list of all attributes associated with a specific migration task.

SELECT
migration_task_name,
progress_update_stream,
resource_attribute_list,
task,
update_date_time
FROM aws.mgh.migration_tasks
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service repository. This association occurs asynchronously after PutResourceAttributes returns. Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to add an IP address, it will then be required to call it with both the IP and MAC addresses to prevent overriding the MAC address. Note the instructions regarding the special use case of the ResourceAttributeList parameter when specifying any "VM" related value. Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call ListDiscoveredResources.

REPLACE aws.mgh.migration_tasks
SET
ProgressUpdateStream = '{{ ProgressUpdateStream }}',
MigrationTaskName = '{{ MigrationTaskName }}',
ResourceAttributeList = '{{ ResourceAttributeList }}',
DryRun = {{ DryRun }}
WHERE
region = '{{ region }}' --required
AND ProgressUpdateStream = '{{ ProgressUpdateStream }}' --required
AND MigrationTaskName = '{{ MigrationTaskName }}' --required
AND ResourceAttributeList = '{{ ResourceAttributeList }}' --required;

Lifecycle Methods

Registers a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool. This API is a prerequisite to calling the NotifyMigrationTaskState API as the migration tool must first register the migration task with Migration Hub.

EXEC aws.mgh.migration_tasks.import_migration_task
@region='{{ region }}' --required
@@json=
'{
"ProgressUpdateStream": "{{ ProgressUpdateStream }}",
"MigrationTaskName": "{{ MigrationTaskName }}",
"DryRun": {{ DryRun }}
}'
;