Cancels a single premigration assessment run.
This operation prevents any individual assessments from running if they haven't started running. It also attempts to cancel any individual assessments that are currently running.
Parameters:
-
replication_task_assessment_run_arn
(String)
–
Amazon Resource Name (ARN) of the premigration assessment run to be canceled.
Raises:
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
| async def cancel_replication_task_assessment_run(
self,
replication_task_assessment_run_arn: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.cancel_replication_task_assessment_run_response.CancelReplicationTaskAssessmentRunResponse":
"""<p>Cancels a single premigration assessment run.</p> <p>This operation prevents any individual assessments from running if they haven't started running. It also attempts to cancel any individual assessments that are currently running.</p>
Args:
replication_task_assessment_run_arn: <p>Amazon Resource Name (ARN) of the premigration assessment run to be canceled.</p>
Raises:
capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_database_migration_service.types.cancel_replication_task_assessment_run_message.CancelReplicationTaskAssessmentRunMessage]",
) -> AsyncOperationResponse[
"capo_database_migration_service.types.cancel_replication_task_assessment_run_response.CancelReplicationTaskAssessmentRunResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.cancel_replication_task_assessment_run
(
output,
http_response,
) = await capo_database_migration_service._operations.amazon_dm_sv20160101.cancel_replication_task_assessment_run.async_cancel_replication_task_assessment_run(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelReplicationTaskAssessmentRun")
)
input_: capo_database_migration_service.types.cancel_replication_task_assessment_run_message.CancelReplicationTaskAssessmentRunMessage = {
"replication_task_assessment_run_arn": replication_task_assessment_run_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|