listDiscoveredResources method
Lists discovered resources associated with the given
MigrationTask
.
May throw AccessDeniedException. May throw ThrottlingException. May throw InternalServerError. May throw ServiceUnavailableException. May throw InvalidInputException. May throw ResourceNotFoundException. May throw HomeRegionNotSetException.
Parameter migrationTaskName
:
The name of the MigrationTask. Do not store personal data in this
field.
Parameter progressUpdateStream
:
The name of the ProgressUpdateStream.
Parameter maxResults
:
The maximum number of results 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<ListDiscoveredResourcesResult> listDiscoveredResources({
required String migrationTaskName,
required String progressUpdateStream,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(migrationTaskName, 'migrationTaskName');
_s.validateStringLength(
'migrationTaskName',
migrationTaskName,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(progressUpdateStream, 'progressUpdateStream');
_s.validateStringLength(
'progressUpdateStream',
progressUpdateStream,
1,
50,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSMigrationHub.ListDiscoveredResources'
};
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 ListDiscoveredResourcesResult.fromJson(jsonResponse.body);
}