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.
Parameters:
-
progress_update_stream_name
(ProgressUpdateStream)
–
The name of the ProgressUpdateStream. Do not store personal data in this field.
-
dry_run
(Optional[DryRun], default:
None
)
–
Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
DryRunOperation
–
Exception raised to indicate a successfully authorized action when the DryRun flag is set to "true".
-
HomeRegionNotSetException
–
The home region is not set. Set the home region to continue.
-
InternalServerError
–
Exception raised when an internal, configuration, or dependency error is encountered.
-
InvalidInputException
–
Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.
-
ServiceUnavailableException
–
Exception raised when there is an internal, configuration, or dependency error encountered.
-
ThrottlingException
–
The request was denied due to request throttling.
-
UnauthorizedOperation
–
Exception raised to indicate a request was not authorized when the DryRun flag is set to "true".
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_migration_hub/_services/migration_hub.py
| def create_progress_update_stream(
self,
progress_update_stream_name: "capo_migration_hub.types.progress_update_stream.ProgressUpdateStream",
*,
config_overrides: Optional[MigrationHubClientConfig] = None,
dry_run: Optional["capo_migration_hub.types.dry_run.DryRun"] = None,
) -> "capo_migration_hub.types.create_progress_update_stream_result.CreateProgressUpdateStreamResult":
"""<p>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.</p>
Args:
progress_update_stream_name: <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
dry_run: <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
Raises:
capo_migration_hub.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_migration_hub.errors.dry_run_operation.DryRunOperation: <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
capo_migration_hub.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home region is not set. Set the home region to continue.</p>
capo_migration_hub.errors.internal_server_error.InternalServerError: <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
capo_migration_hub.errors.invalid_input_exception.InvalidInputException: <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
capo_migration_hub.errors.service_unavailable_exception.ServiceUnavailableException: <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
capo_migration_hub.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_migration_hub.errors.unauthorized_operation.UnauthorizedOperation: <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
capo_migration_hub.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_migration_hub.types.create_progress_update_stream_request.CreateProgressUpdateStreamRequest]",
) -> OperationResponse[
"capo_migration_hub.types.create_progress_update_stream_result.CreateProgressUpdateStreamResult"
]:
import capo_migration_hub._operations.aws_migration_hub.create_progress_update_stream
output, http_response = (
capo_migration_hub._operations.aws_migration_hub.create_progress_update_stream.create_progress_update_stream(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateProgressUpdateStream")
)
input_: capo_migration_hub.types.create_progress_update_stream_request.CreateProgressUpdateStreamRequest = {
"progress_update_stream_name": progress_update_stream_name
}
if dry_run is not None:
input_["dry_run"] = dry_run
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|