createProgressUpdateStream method

Future<void> createProgressUpdateStream({
  1. required String progressUpdateStreamName,
  2. bool? dryRun,
})

Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It 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.

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

Parameter progressUpdateStreamName : The name of the ProgressUpdateStream. Do not store personal data in this field.

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> createProgressUpdateStream({
  required String progressUpdateStreamName,
  bool? dryRun,
}) async {
  ArgumentError.checkNotNull(
      progressUpdateStreamName, 'progressUpdateStreamName');
  _s.validateStringLength(
    'progressUpdateStreamName',
    progressUpdateStreamName,
    1,
    50,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSMigrationHub.CreateProgressUpdateStream'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProgressUpdateStreamName': progressUpdateStreamName,
      if (dryRun != null) 'DryRun': dryRun,
    },
  );
}