listCreatedArtifacts method
Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits:
- Gets the list of the created artifacts while migration is taking place.
-
Shows the artifacts created by the migration tool that was associated by
the
AssociateCreatedArtifactAPI. - Lists created artifacts in a paginated interface.
May throw AccessDeniedException.
May throw HomeRegionNotSetException.
May throw InternalServerError.
May throw InvalidInputException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter migrationTaskName :
Unique identifier that references the migration task. Do not store
personal data in this field.
Parameter progressUpdateStream :
The name of the ProgressUpdateStream.
Parameter maxResults :
Maximum number of results to be returned per page.
Parameter nextToken :
If a NextToken was returned by a previous call, there are
more results available. To retrieve the next page of results, make the
call again using the returned token in NextToken.
Implementation
Future<ListCreatedArtifactsResult> listCreatedArtifacts({
required String migrationTaskName,
required String progressUpdateStream,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSMigrationHub.ListCreatedArtifacts'
};
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 ListCreatedArtifactsResult.fromJson(jsonResponse.body);
}