disassociateSourceResource method

Future<void> disassociateSourceResource({
  1. required String migrationTaskName,
  2. required String progressUpdateStream,
  3. required String sourceResourceName,
  4. bool? dryRun,
})

Removes the association between a source resource and a migration task.

May throw AccessDeniedException. May throw DryRunOperation. May throw InternalServerError. May throw InvalidInputException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedOperation.

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 sourceResourceName : The name that was specified for the source resource.

Parameter dryRun : This is an optional parameter that you can use to test whether the call will succeed. Set this parameter to true to verify that you have the permissions that are required to make the call, and that you have specified the other parameters in the call correctly.

Implementation

Future<void> disassociateSourceResource({
  required String migrationTaskName,
  required String progressUpdateStream,
  required String sourceResourceName,
  bool? dryRun,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSMigrationHub.DisassociateSourceResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MigrationTaskName': migrationTaskName,
      'ProgressUpdateStream': progressUpdateStream,
      'SourceResourceName': sourceResourceName,
      if (dryRun != null) 'DryRun': dryRun,
    },
  );
}