migration_tasks
Creates, updates, deletes, gets or lists a migration_tasks resource.
Overview
| Name | migration_tasks |
| Type | Resource |
| Id | aws.mgh.migration_tasks |
Fields
The following fields are returned by SELECT queries:
- describe_migration_task
- list_migration_tasks
| Name | Datatype | Description |
|---|---|---|
migration_task_name | string | Unique identifier that references the migration task. Do not store personal data in this field. (pattern: <code>[^:|]+</code>) |
progress_update_stream | string | A name that identifies the vendor of the migration tool being used. (pattern: <code>[^/:|\000-\037]+</code>) |
resource_attribute_list | array | Information 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. |
task | object | Task object encapsulating task information. |
update_date_time | string (date-time) | The timestamp when the task was gathered. |
| Name | Datatype | Description |
|---|---|---|
migration_task_name | string | Unique identifier that references the migration task. Do not store personal data in this field. (pattern: <code>[^:|]+</code>) |
progress_percent | integer | Indication of the percentage completion of the task. |
progress_update_stream | string | An AWS resource used for access control. It should uniquely identify the migration tool as it is used for all updates made by the tool. (pattern: <code>[^/:|\000-\037]+</code>) |
status | string | Status of the task. (NOT_STARTED, IN_PROGRESS, FAILED, COMPLETED) |
status_detail | string | Detail information of what is being done within the overall status state. (pattern: <code>^.{0,2500}$</code>) |
update_date_time | string (date-time) | The timestamp when the task was gathered. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_migration_task | select | region | Retrieves a list of all attributes associated with a specific migration task. | |
list_migration_tasks | select | region | Lists 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_attributes | replace | region, ProgressUpdateStream, MigrationTaskName, ResourceAttributeList | 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. | |
import_migration_task | exec | region, ProgressUpdateStream, MigrationTaskName | 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. | |
notify_migration_task_state | exec | region, ProgressUpdateStream, MigrationTaskName, Task, UpdateDateTime, NextUpdateSeconds | Notifies 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_migration_task
- list_migration_tasks
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
;
Lists 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.
SELECT
migration_task_name,
progress_percent,
progress_update_stream,
status,
status_detail,
update_date_time
FROM aws.mgh.migration_tasks
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_resource_attributes
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
- import_migration_task
- notify_migration_task_state
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 }}
}'
;
Notifies 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.
EXEC aws.mgh.migration_tasks.notify_migration_task_state
@region='{{ region }}' --required
@@json=
'{
"ProgressUpdateStream": "{{ ProgressUpdateStream }}",
"MigrationTaskName": "{{ MigrationTaskName }}",
"Task": "{{ Task }}",
"UpdateDateTime": "{{ UpdateDateTime }}",
"NextUpdateSeconds": {{ NextUpdateSeconds }},
"DryRun": {{ DryRun }}
}'
;