associateDiscoveredResource method
Associates a discovered resource ID from Application Discovery Service with a migration task.
May throw AccessDeniedException.
May throw DryRunOperation.
May throw HomeRegionNotSetException.
May throw InternalServerError.
May throw InvalidInputException.
May throw PolicyErrorException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedOperation.
Parameter discoveredResource :
Object representing a Resource.
Parameter migrationTaskName :
The identifier given to the MigrationTask. Do not store personal data
in this field.
Parameter progressUpdateStream :
The name of the ProgressUpdateStream.
Parameter dryRun :
Optional boolean flag to indicate whether any effect should take place.
Used to test if the caller has permission to make the call.
Implementation
Future<void> associateDiscoveredResource({
required DiscoveredResource discoveredResource,
required String migrationTaskName,
required String progressUpdateStream,
bool? dryRun,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSMigrationHub.AssociateDiscoveredResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DiscoveredResource': discoveredResource,
'MigrationTaskName': migrationTaskName,
'ProgressUpdateStream': progressUpdateStream,
if (dryRun != null) 'DryRun': dryRun,
},
);
}