Skip to content

describe_bot_resource_generation

describe_bot_resource_generation(
    bot_id: Id,
    bot_version: BotVersion,
    locale_id: LocaleId,
    generation_id: Id,
    *,
    config_overrides: Optional[LexModelsV2ClientConfig] = None,
) -> DescribeBotResourceGenerationResponse

Returns information about a request to generate a bot through natural language description, made through the StartBotResource API. Use the generatedBotLocaleUrl to retrieve the Amazon S3 object containing the bot locale configuration. You can then modify and import this configuration.

Parameters:

  • bot_id (Id) –

    The unique identifier of the bot for which to return the generation details.

  • bot_version (BotVersion) –

    The version of the bot for which to return the generation details.

  • locale_id (LocaleId) –

    The locale of the bot for which to return the generation details.

  • generation_id (Id) –

    The unique identifier of the generation request for which to return the generation details.

Raises:

  • InternalServerException –

    The service encountered an unexpected condition. Try your request again.

  • ResourceNotFoundException –

    You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again.

  • ThrottlingException –

    Your request rate is too high. Reduce the frequency of requests.

  • ValidationException –

    One of the input parameters in your request isn't valid. Check the parameters and try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lex_models_v2/_services/lex_models_v2.py
def describe_bot_resource_generation(
    self,
    bot_id: "capo_lex_models_v2.types.id.Id",
    bot_version: "capo_lex_models_v2.types.bot_version.BotVersion",
    locale_id: "capo_lex_models_v2.types.locale_id.LocaleId",
    generation_id: "capo_lex_models_v2.types.id.Id",
    *,
    config_overrides: Optional[LexModelsV2ClientConfig] = None,
) -> "capo_lex_models_v2.types.describe_bot_resource_generation_response.DescribeBotResourceGenerationResponse":
    """<p>Returns information about a request to generate a bot through natural language description, made through the <code>StartBotResource</code> API. Use the <code>generatedBotLocaleUrl</code> to retrieve the Amazon S3 object containing the bot locale configuration. You can then modify and import this configuration.</p>

    Args:
        bot_id: <p>The unique identifier of the bot for which to return the generation details.</p>
        bot_version: <p>The version of the bot for which to return the generation details.</p>
        locale_id: <p>The locale of the bot for which to return the generation details.</p>
        generation_id: <p>The unique identifier of the generation request for which to return the generation details.</p>

    Raises:
        capo_lex_models_v2.errors.internal_server_exception.InternalServerException: <p>The service encountered an unexpected condition. Try your request again.</p>
        capo_lex_models_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again.</p>
        capo_lex_models_v2.errors.throttling_exception.ThrottlingException: <p>Your request rate is too high. Reduce the frequency of requests.</p>
        capo_lex_models_v2.errors.validation_exception.ValidationException: <p>One of the input parameters in your request isn't valid. Check the parameters and try your request again.</p>
        capo_lex_models_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lex_models_v2.types.describe_bot_resource_generation_request.DescribeBotResourceGenerationRequest]",
    ) -> OperationResponse[
        "capo_lex_models_v2.types.describe_bot_resource_generation_response.DescribeBotResourceGenerationResponse"
    ]:
        import capo_lex_models_v2._operations.lex_model_building_service_v2.describe_bot_resource_generation

        output, http_response = (
            capo_lex_models_v2._operations.lex_model_building_service_v2.describe_bot_resource_generation.describe_bot_resource_generation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeBotResourceGeneration")
    )
    input_: capo_lex_models_v2.types.describe_bot_resource_generation_request.DescribeBotResourceGenerationRequest = {
        "bot_id": bot_id,
        "bot_version": bot_version,
        "locale_id": locale_id,
        "generation_id": generation_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output