Skip to content

list_function_definitions async

list_function_definitions(
    *,
    config_overrides: Optional[AsyncGreengrassClientConfig] = None,
    max_results: Optional[__string] = None,
    next_token: Optional[__string] = None,
) -> ListFunctionDefinitionsResponse

Retrieves a list of Lambda function definitions.

Parameters:

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

    The maximum number of results to be returned per request.

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

    The token for the next set of results, or ''null'' if there are no additional results.

Raises:

Source code in docs_src/capo_greengrass/_services/async_greengrass.py
async def list_function_definitions(
    self,
    *,
    config_overrides: Optional[AsyncGreengrassClientConfig] = None,
    max_results: Optional["capo_greengrass.types.__string.__string"] = None,
    next_token: Optional["capo_greengrass.types.__string.__string"] = None,
) -> "capo_greengrass.types.list_function_definitions_response.ListFunctionDefinitionsResponse":
    """Retrieves a list of Lambda function definitions.

    Args:
        max_results: The maximum number of results to be returned per request.
        next_token: The token for the next set of results, or ''null'' if there are no additional results.

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

    async def _handler(
        req: "AsyncOperationRequest[capo_greengrass.types.list_function_definitions_request.ListFunctionDefinitionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_greengrass.types.list_function_definitions_response.ListFunctionDefinitionsResponse"
    ]:
        import capo_greengrass._operations.greengrass.list_function_definitions

        (
            output,
            http_response,
        ) = await capo_greengrass._operations.greengrass.list_function_definitions.async_list_function_definitions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListFunctionDefinitions")
    )
    input_: capo_greengrass.types.list_function_definitions_request.ListFunctionDefinitionsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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