Table of Contents
A low-level client representing AWS Migration Hub:
import boto3
client = boto3.client('mgh')
These are the available methods:
Associates a created artifact of an AWS cloud resource, the target receiving the migration, with the migration task performed by a migration tool. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.associate_created_artifact(
ProgressUpdateStream='string',
MigrationTaskName='string',
CreatedArtifact={
'Name': 'string',
'Description': 'string'
},
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
[REQUIRED]
An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
An ARN that uniquely identifies the result of a migration task.
A description that can be free-form text to record additional detail about the artifact for clarity or for later reference.
dict
Response Syntax
{}
Response Structure
Associates a discovered resource ID from Application Discovery Service with a migration task.
See also: AWS API Documentation
Request Syntax
response = client.associate_discovered_resource(
ProgressUpdateStream='string',
MigrationTaskName='string',
DiscoveredResource={
'ConfigurationId': 'string',
'Description': 'string'
},
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
The identifier given to the MigrationTask. Do not store personal data in this field.
[REQUIRED]
Object representing a Resource.
The configurationId in Application Discovery Service that uniquely identifies the on-premise resource.
A description that can be free-form text to record additional detail about the discovered resource for clarity or later reference.
dict
Response Syntax
{}
Response Structure
Check if an operation can be paginated.
Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It must uniquely identify the migration tool as it is used for all updates made by the tool; however, it does not need to be unique for each AWS account because it is scoped to the AWS account.
See also: AWS API Documentation
Request Syntax
response = client.create_progress_update_stream(
ProgressUpdateStreamName='string',
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream. Do not store personal data in this field.
dict
Response Syntax
{}
Response Structure
Deletes a progress update stream, including all of its tasks, which was previously created as an AWS resource used for access control. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.delete_progress_update_stream(
ProgressUpdateStreamName='string',
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream. Do not store personal data in this field.
dict
Response Syntax
{}
Response Structure
Gets the migration status of an application.
See also: AWS API Documentation
Request Syntax
response = client.describe_application_state(
ApplicationId='string'
)
[REQUIRED]
The configurationId in Application Discovery Service that uniquely identifies the grouped application.
{
'ApplicationStatus': 'NOT_STARTED'|'IN_PROGRESS'|'COMPLETED',
'LastUpdatedTime': datetime(2015, 1, 1)
}
Response Structure
Status of the application - Not Started, In-Progress, Complete.
The timestamp when the application status was last updated.
Retrieves a list of all attributes associated with a specific migration task.
See also: AWS API Documentation
Request Syntax
response = client.describe_migration_task(
ProgressUpdateStream='string',
MigrationTaskName='string'
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
The identifier given to the MigrationTask. Do not store personal data in this field.
dict
Response Syntax
{
'MigrationTask': {
'ProgressUpdateStream': 'string',
'MigrationTaskName': 'string',
'Task': {
'Status': 'NOT_STARTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED',
'StatusDetail': 'string',
'ProgressPercent': 123
},
'UpdateDateTime': datetime(2015, 1, 1),
'ResourceAttributeList': [
{
'Type': 'IPV4_ADDRESS'|'IPV6_ADDRESS'|'MAC_ADDRESS'|'FQDN'|'VM_MANAGER_ID'|'VM_MANAGED_OBJECT_REFERENCE'|'VM_NAME'|'VM_PATH'|'BIOS_ID'|'MOTHERBOARD_SERIAL_NUMBER',
'Value': 'string'
},
]
}
}
Response Structure
(dict) --
MigrationTask (dict) --
Object encapsulating information about the migration task.
ProgressUpdateStream (string) --
A name that identifies the vendor of the migration tool being used.
MigrationTaskName (string) --
Unique identifier that references the migration task. Do not store personal data in this field.
Task (dict) --
Task object encapsulating task information.
Status (string) --
Status of the task - Not Started, In-Progress, Complete.
StatusDetail (string) --
Details of task status as notified by a migration tool. A tool might use this field to provide clarifying information about the status that is unique to that tool or that explains an error state.
ProgressPercent (integer) --
Indication of the percentage completion of the task.
UpdateDateTime (datetime) --
The timestamp when the task was gathered.
ResourceAttributeList (list) --
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.
(dict) --
Attribute associated with a resource.
Note the corresponding format required per type listed below:
IPV4
x.x.x.x
where x is an integer in the range [0,255]
IPV6
y : y : y : y : y : y : y : y
where y is a hexadecimal between 0 and FFFF. [0, FFFF]
MAC_ADDRESS
^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
FQDN
^[^<>{}\\\\/?,=\\p{Cntrl}]{1,256}$
Type (string) --
Type of resource.
Value (string) --
Value of the resource type.
Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.disassociate_created_artifact(
ProgressUpdateStream='string',
MigrationTaskName='string',
CreatedArtifactName='string',
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task to be disassociated with the artifact. Do not store personal data in this field.
[REQUIRED]
An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
dict
Response Syntax
{}
Response Structure
Disassociate an Application Discovery Service discovered resource from a migration task.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_discovered_resource(
ProgressUpdateStream='string',
MigrationTaskName='string',
ConfigurationId='string',
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
The identifier given to the MigrationTask. Do not store personal data in this field.
[REQUIRED]
ConfigurationId of the Application Discovery Service resource to be disassociated.
dict
Response Syntax
{}
Response Structure
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
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.
See also: AWS API Documentation
Request Syntax
response = client.import_migration_task(
ProgressUpdateStream='string',
MigrationTaskName='string',
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream. >
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
dict
Response Syntax
{}
Response Structure
Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.list_created_artifacts(
ProgressUpdateStream='string',
MigrationTaskName='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
dict
Response Syntax
{
'NextToken': 'string',
'CreatedArtifactList': [
{
'Name': 'string',
'Description': 'string'
},
]
}
Response Structure
(dict) --
NextToken (string) --
If there are more created artifacts than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
CreatedArtifactList (list) --
List of created artifacts up to the maximum number of results specified in the request.
(dict) --
An ARN of the AWS cloud resource target receiving the migration (e.g., AMI, EC2 instance, RDS instance, etc.).
Name (string) --
An ARN that uniquely identifies the result of a migration task.
Description (string) --
A description that can be free-form text to record additional detail about the artifact for clarity or for later reference.
Lists discovered resources associated with the given MigrationTask .
See also: AWS API Documentation
Request Syntax
response = client.list_discovered_resources(
ProgressUpdateStream='string',
MigrationTaskName='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
The name of the MigrationTask. Do not store personal data in this field.
dict
Response Syntax
{
'NextToken': 'string',
'DiscoveredResourceList': [
{
'ConfigurationId': 'string',
'Description': 'string'
},
]
}
Response Structure
(dict) --
NextToken (string) --
If there are more discovered resources than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
DiscoveredResourceList (list) --
Returned list of discovered resources associated with the given MigrationTask.
(dict) --
Object representing the on-premises resource being migrated.
ConfigurationId (string) --
The configurationId in Application Discovery Service that uniquely identifies the on-premise resource.
Description (string) --
A description that can be free-form text to record additional detail about the discovered resource for clarity or later reference.
Lists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.list_migration_tasks(
NextToken='string',
MaxResults=123,
ResourceName='string'
)
dict
Response Syntax
{
'NextToken': 'string',
'MigrationTaskSummaryList': [
{
'ProgressUpdateStream': 'string',
'MigrationTaskName': 'string',
'Status': 'NOT_STARTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED',
'ProgressPercent': 123,
'StatusDetail': 'string',
'UpdateDateTime': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
NextToken (string) --
If there are more migration tasks than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
MigrationTaskSummaryList (list) --
Lists the migration task's summary which includes: MigrationTaskName , ProgressPercent , ProgressUpdateStream , Status , and the UpdateDateTime for each task.
(dict) --
MigrationTaskSummary includes MigrationTaskName , ProgressPercent , ProgressUpdateStream , Status , and UpdateDateTime for each task.
ProgressUpdateStream (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.
MigrationTaskName (string) --
Unique identifier that references the migration task. Do not store personal data in this field.
Status (string) --
Status of the task.
ProgressPercent (integer) --
Indication of the percentage completion of the task.
StatusDetail (string) --
Detail information of what is being done within the overall status state.
UpdateDateTime (datetime) --
The timestamp when the task was gathered.
Lists progress update streams associated with the user account making this call.
See also: AWS API Documentation
Request Syntax
response = client.list_progress_update_streams(
NextToken='string',
MaxResults=123
)
dict
Response Syntax
{
'ProgressUpdateStreamSummaryList': [
{
'ProgressUpdateStreamName': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ProgressUpdateStreamSummaryList (list) --
List of progress update streams up to the max number of results passed in the input.
(dict) --
Summary of the AWS resource used for access control that is implicitly linked to your AWS account.
ProgressUpdateStreamName (string) --
The name of the ProgressUpdateStream. Do not store personal data in this field.
NextToken (string) --
If there are more streams created than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
Sets the migration state of an application. For a given application identified by the value passed to ApplicationId , its status is set or updated by passing one of three values to Status : NOT_STARTED | IN_PROGRESS | COMPLETED .
See also: AWS API Documentation
Request Syntax
response = client.notify_application_state(
ApplicationId='string',
Status='NOT_STARTED'|'IN_PROGRESS'|'COMPLETED',
UpdateDateTime=datetime(2015, 1, 1),
DryRun=True|False
)
[REQUIRED]
The configurationId in Application Discovery Service that uniquely identifies the grouped application.
[REQUIRED]
Status of the application - Not Started, In-Progress, Complete.
dict
Response Syntax
{}
Response Structure
Notifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits:
See also: AWS API Documentation
Request Syntax
response = client.notify_migration_task_state(
ProgressUpdateStream='string',
MigrationTaskName='string',
Task={
'Status': 'NOT_STARTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED',
'StatusDetail': 'string',
'ProgressPercent': 123
},
UpdateDateTime=datetime(2015, 1, 1),
NextUpdateSeconds=123,
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
[REQUIRED]
Information about the task's progress and status.
Status of the task - Not Started, In-Progress, Complete.
Details of task status as notified by a migration tool. A tool might use this field to provide clarifying information about the status that is unique to that tool or that explains an error state.
Indication of the percentage completion of the task.
[REQUIRED]
The timestamp when the task was gathered.
[REQUIRED]
Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.
dict
Response Syntax
{}
Response Structure
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.
Warning
Note
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 .
See also: AWS API Documentation
Request Syntax
response = client.put_resource_attributes(
ProgressUpdateStream='string',
MigrationTaskName='string',
ResourceAttributeList=[
{
'Type': 'IPV4_ADDRESS'|'IPV6_ADDRESS'|'MAC_ADDRESS'|'FQDN'|'VM_MANAGER_ID'|'VM_MANAGED_OBJECT_REFERENCE'|'VM_NAME'|'VM_PATH'|'BIOS_ID'|'MOTHERBOARD_SERIAL_NUMBER',
'Value': 'string'
},
],
DryRun=True|False
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
[REQUIRED]
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.
Note
Takes the object array of ResourceAttribute where the Type field is reserved for the following values: IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER where the identifying value can be a string up to 256 characters.
Warning
Attribute associated with a resource.
Note the corresponding format required per type listed below:
IPV4x.x.x.x
where x is an integer in the range [0,255]
IPV6y : y : y : y : y : y : y : y
where y is a hexadecimal between 0 and FFFF. [0, FFFF]
MAC_ADDRESS^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
FQDN^[^<>{}\\\\/?,=\\p{Cntrl}]{1,256}$
Type of resource.
Value of the resource type.
dict
Response Syntax
{}
Response Structure
The available paginators are:
paginator = client.get_paginator('list_created_artifacts')
Creates an iterator that will paginate through responses from MigrationHub.Client.list_created_artifacts().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ProgressUpdateStream='string',
MigrationTaskName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
Unique identifier that references the migration task. Do not store personal data in this field.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'CreatedArtifactList': [
{
'Name': 'string',
'Description': 'string'
},
]
}
Response Structure
(dict) --
CreatedArtifactList (list) --
List of created artifacts up to the maximum number of results specified in the request.
(dict) --
An ARN of the AWS cloud resource target receiving the migration (e.g., AMI, EC2 instance, RDS instance, etc.).
Name (string) --
An ARN that uniquely identifies the result of a migration task.
Description (string) --
A description that can be free-form text to record additional detail about the artifact for clarity or for later reference.
paginator = client.get_paginator('list_discovered_resources')
Creates an iterator that will paginate through responses from MigrationHub.Client.list_discovered_resources().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ProgressUpdateStream='string',
MigrationTaskName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the ProgressUpdateStream.
[REQUIRED]
The name of the MigrationTask. Do not store personal data in this field.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'DiscoveredResourceList': [
{
'ConfigurationId': 'string',
'Description': 'string'
},
]
}
Response Structure
(dict) --
DiscoveredResourceList (list) --
Returned list of discovered resources associated with the given MigrationTask.
(dict) --
Object representing the on-premises resource being migrated.
ConfigurationId (string) --
The configurationId in Application Discovery Service that uniquely identifies the on-premise resource.
Description (string) --
A description that can be free-form text to record additional detail about the discovered resource for clarity or later reference.
paginator = client.get_paginator('list_migration_tasks')
Creates an iterator that will paginate through responses from MigrationHub.Client.list_migration_tasks().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ResourceName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'MigrationTaskSummaryList': [
{
'ProgressUpdateStream': 'string',
'MigrationTaskName': 'string',
'Status': 'NOT_STARTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED',
'ProgressPercent': 123,
'StatusDetail': 'string',
'UpdateDateTime': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
MigrationTaskSummaryList (list) --
Lists the migration task's summary which includes: MigrationTaskName , ProgressPercent , ProgressUpdateStream , Status , and the UpdateDateTime for each task.
(dict) --
MigrationTaskSummary includes MigrationTaskName , ProgressPercent , ProgressUpdateStream , Status , and UpdateDateTime for each task.
ProgressUpdateStream (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.
MigrationTaskName (string) --
Unique identifier that references the migration task. Do not store personal data in this field.
Status (string) --
Status of the task.
ProgressPercent (integer) --
Indication of the percentage completion of the task.
StatusDetail (string) --
Detail information of what is being done within the overall status state.
UpdateDateTime (datetime) --
The timestamp when the task was gathered.
paginator = client.get_paginator('list_progress_update_streams')
Creates an iterator that will paginate through responses from MigrationHub.Client.list_progress_update_streams().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'ProgressUpdateStreamSummaryList': [
{
'ProgressUpdateStreamName': 'string'
},
],
}
Response Structure
List of progress update streams up to the max number of results passed in the input.
Summary of the AWS resource used for access control that is implicitly linked to your AWS account.
The name of the ProgressUpdateStream. Do not store personal data in this field.