Skip to content

get_cloud_formation_template async

get_cloud_formation_template(
    application_id: __string,
    template_id: __string,
    *,
    config_overrides: Optional[AsyncServerlessApplicationRepositoryClientConfig] = None,
) -> GetCloudFormationTemplateResponse

Gets the specified AWS CloudFormation template.

Parameters:

  • application_id (__string) –

    The Amazon Resource Name (ARN) of the application.

  • template_id (__string) –

    The UUID returned by CreateCloudFormationTemplate.

    Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}

Raises:

Source code in docs_src/capo_serverlessapplicationrepository/_services/async_serverless_application_repository.py
async def get_cloud_formation_template(
    self,
    application_id: "capo_serverlessapplicationrepository.types.__string.__string",
    template_id: "capo_serverlessapplicationrepository.types.__string.__string",
    *,
    config_overrides: Optional[
        AsyncServerlessApplicationRepositoryClientConfig
    ] = None,
) -> "capo_serverlessapplicationrepository.types.get_cloud_formation_template_response.GetCloudFormationTemplateResponse":
    r"""<p>Gets the specified AWS CloudFormation template.</p>

    Args:
        application_id: <p>The Amazon Resource Name (ARN) of the application.</p>
        template_id: <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>

    Raises:
        capo_serverlessapplicationrepository.errors.bad_request_exception.BadRequestException: <p>One of the parameters in the request is invalid.</p>
        capo_serverlessapplicationrepository.errors.forbidden_exception.ForbiddenException: <p>The client is not authenticated.</p>
        capo_serverlessapplicationrepository.errors.internal_server_error_exception.InternalServerErrorException: <p>The AWS Serverless Application Repository service encountered an internal error.</p>
        capo_serverlessapplicationrepository.errors.not_found_exception.NotFoundException: <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
        capo_serverlessapplicationrepository.errors.too_many_requests_exception.TooManyRequestsException: <p>The client is sending more than the allowed number of requests per unit of time.</p>
        capo_serverlessapplicationrepository.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_serverlessapplicationrepository.types.get_cloud_formation_template_request.GetCloudFormationTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_serverlessapplicationrepository.types.get_cloud_formation_template_response.GetCloudFormationTemplateResponse"
    ]:
        import capo_serverlessapplicationrepository._operations.serverless_application_repository.get_cloud_formation_template

        (
            output,
            http_response,
        ) = await capo_serverlessapplicationrepository._operations.serverless_application_repository.get_cloud_formation_template.async_get_cloud_formation_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCloudFormationTemplate")
    )
    input_: capo_serverlessapplicationrepository.types.get_cloud_formation_template_request.GetCloudFormationTemplateRequest = {
        "application_id": application_id,
        "template_id": template_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output