Retrieves the current status and progress of a migration job, including the number of exported and imported objects and error details if the migration failed.
Parameters:
-
migration_id
(String)
–
The unique identifier of the migration job to retrieve.
Raises:
Source code in docs_src/capo_opensearch/_services/async_open_search.py
| async def get_migration(
self,
migration_id: "capo_opensearch.types.string.String",
*,
config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
) -> "capo_opensearch.types.get_migration_response.GetMigrationResponse":
"""<p>Retrieves the current status and progress of a migration job, including the number of exported and imported objects and error details if the migration failed.</p>
Args:
migration_id: <p>The unique identifier of the migration job to retrieve.</p>
Raises:
capo_opensearch.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because you don't have permissions to access the resource.</p>
capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_opensearch.types.get_migration_request.GetMigrationRequest]",
) -> AsyncOperationResponse[
"capo_opensearch.types.get_migration_response.GetMigrationResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.get_migration
(
output,
http_response,
) = await capo_opensearch._operations.amazon_open_search_service.get_migration.async_get_migration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetMigration")
)
input_: capo_opensearch.types.get_migration_request.GetMigrationRequest = {
"migration_id": migration_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|