listMigrationTaskUpdates method
This is a paginated API that returns all the migration-task states for the
specified MigrationTaskName and
ProgressUpdateStream.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidInputException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter migrationTaskName :
A unique identifier that references the migration task. Do not include
sensitive data in this field.
Parameter progressUpdateStream :
The name of the progress-update stream, which is used for access control
as well as a namespace for migration-task names that is implicitly linked
to your AWS account. The progress-update stream 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.
Parameter maxResults :
The maximum number of results to include in the response. If more results
exist than the value that you specify here for MaxResults,
the response will include a token that you can use to retrieve the next
set of results.
Parameter nextToken :
If NextToken was returned by a previous call, there are more
results available. The value of NextToken is a unique
pagination token for each page. To retrieve the next page of results,
specify the NextToken value that the previous call returned.
Keep all other arguments unchanged. Each pagination token expires after 24
hours. Using an expired pagination token will return an HTTP 400
InvalidToken error.
Implementation
Future<ListMigrationTaskUpdatesResult> listMigrationTaskUpdates({
required String migrationTaskName,
required String progressUpdateStream,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSMigrationHub.ListMigrationTaskUpdates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MigrationTaskName': migrationTaskName,
'ProgressUpdateStream': progressUpdateStream,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListMigrationTaskUpdatesResult.fromJson(jsonResponse.body);
}