Skip to content

get_export

get_export(
    name: Name,
    version: NumericalVersion,
    resource_type: ResourceType,
    export_type: ExportType,
    *,
    config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> GetExportResponse

Exports the contents of a Amazon Lex resource in a specified format.

Parameters:

  • name (Name) –

    The name of the bot to export.

  • version (NumericalVersion) –

    The version of the bot to export.

  • resource_type (ResourceType) –

    The type of resource to export.

  • export_type (ExportType) –

    The format of the exported data.

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/lex_model_building_service.py
def get_export(
    self,
    name: "capo_lex_model_building_service.types.name.Name",
    version: "capo_lex_model_building_service.types.numerical_version.NumericalVersion",
    resource_type: "capo_lex_model_building_service.types.resource_type.ResourceType",
    export_type: "capo_lex_model_building_service.types.export_type.ExportType",
    *,
    config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_export_response.GetExportResponse":
    """<p>Exports the contents of a Amazon Lex resource in a specified format. </p>

    Args:
        name: <p>The name of the bot to export.</p>
        version: <p>The version of the bot to export.</p>
        resource_type: <p>The type of resource to export. </p>
        export_type: <p>The format of the exported data.</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.
    """

    def _handler(
        req: "OperationRequest[capo_lex_model_building_service.types.get_export_request.GetExportRequest]",
    ) -> OperationResponse[
        "capo_lex_model_building_service.types.get_export_response.GetExportResponse"
    ]:
        import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_export

        output, http_response = (
            capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_export.get_export(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetExport")
    )
    input_: capo_lex_model_building_service.types.get_export_request.GetExportRequest = {
        "name": name,
        "version": version,
        "resource_type": resource_type,
        "export_type": export_type,
    }

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