Skip to content

list_generated_templates async

list_generated_templates(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListGeneratedTemplatesOutput

Lists your generated templates in this Region.

Parameters:

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

  • max_results (Optional[MaxResults], default: None ) –

    If the number of available results exceeds this maximum, the response includes a NextToken value that you can use for the NextToken parameter to get the next set of results. By default the ListGeneratedTemplates API action will return at most 50 results in each response. The maximum value is 100.

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def list_generated_templates(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_cloudformation.types.max_results.MaxResults"
    ] = None,
) -> "capo_cloudformation.types.list_generated_templates_output.ListGeneratedTemplatesOutput":
    """<p>Lists your generated templates in this Region.</p>

    Args:
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        max_results: <p>If the number of available results exceeds this maximum, the response includes a <code>NextToken</code> value that you can use for the <code>NextToken</code> parameter to get the next set of results. By default the <code>ListGeneratedTemplates</code> API action will return at most 50 results in each response. The maximum value is 100.</p>

    Raises:
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.list_generated_templates_input.ListGeneratedTemplatesInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.list_generated_templates_output.ListGeneratedTemplatesOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.list_generated_templates

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.list_generated_templates.async_list_generated_templates(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListGeneratedTemplates")
    )
    input_: capo_cloudformation.types.list_generated_templates_input.ListGeneratedTemplatesInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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