Provides details about an ongoing or complete migration from an Amazon Lex V1 bot to an Amazon Lex V2 bot. Use this operation to view the migration alerts and warnings related to the migration.
Parameters:
-
migration_id
(MigrationId)
–
The unique identifier of the migration to view. The migrationID is returned by the operation.
Raises:
-
BadRequestException
–
The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.
-
InternalFailureException
–
An internal Amazon Lex error occurred. Try your request again.
-
LimitExceededException
–
The request exceeded a limit. Try your request again.
-
NotFoundException
–
The resource specified in the request was not found. Check the resource and try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_lex_model_building_service/_services/async_lex_model_building_service.py
| async def get_migration(
self,
migration_id: "capo_lex_model_building_service.types.migration_id.MigrationId",
*,
config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_migration_response.GetMigrationResponse":
"""<p>Provides details about an ongoing or complete migration from an Amazon Lex V1 bot to an Amazon Lex V2 bot. Use this operation to view the migration alerts and warnings related to the migration.</p>
Args:
migration_id: <p>The unique identifier of the migration to view. The <code>migrationID</code> is returned by the operation.</p>
Raises:
capo_lex_model_building_service.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
capo_lex_model_building_service.errors.internal_failure_exception.InternalFailureException: <p>An internal Amazon Lex error occurred. Try your request again.</p>
capo_lex_model_building_service.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded a limit. Try your request again.</p>
capo_lex_model_building_service.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource and try again.</p>
capo_lex_model_building_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lex_model_building_service.types.get_migration_request.GetMigrationRequest]",
) -> AsyncOperationResponse[
"capo_lex_model_building_service.types.get_migration_response.GetMigrationResponse"
]:
import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_migration
(
output,
http_response,
) = await capo_lex_model_building_service._operations.aws_deep_sense_model_building_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_lex_model_building_service.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
|