Skip to content

get_function_definition_version

get_function_definition_version(
    function_definition_id: __string,
    function_definition_version_id: __string,
    *,
    config_overrides: Optional[GreengrassClientConfig] = None,
    next_token: Optional[__string] = None,
) -> GetFunctionDefinitionVersionResponse

Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.

Parameters:

  • function_definition_id (__string) –

    The ID of the Lambda function definition.

  • function_definition_version_id (__string) –

    The ID of the function definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListFunctionDefinitionVersions'' requests. If the version is the last one that was associated with a function definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.

  • 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/greengrass.py
def get_function_definition_version(
    self,
    function_definition_id: "capo_greengrass.types.__string.__string",
    function_definition_version_id: "capo_greengrass.types.__string.__string",
    *,
    config_overrides: Optional[GreengrassClientConfig] = None,
    next_token: Optional["capo_greengrass.types.__string.__string"] = None,
) -> "capo_greengrass.types.get_function_definition_version_response.GetFunctionDefinitionVersionResponse":
    """Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.

    Args:
        function_definition_id: The ID of the Lambda function definition.
        function_definition_version_id: The ID of the function definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListFunctionDefinitionVersions'' requests. If the version is the last one that was associated with a function definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
        next_token: The token for the next set of results, or ''null'' if there are no additional results.

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

    def _handler(
        req: "OperationRequest[capo_greengrass.types.get_function_definition_version_request.GetFunctionDefinitionVersionRequest]",
    ) -> OperationResponse[
        "capo_greengrass.types.get_function_definition_version_response.GetFunctionDefinitionVersionResponse"
    ]:
        import capo_greengrass._operations.greengrass.get_function_definition_version

        output, http_response = (
            capo_greengrass._operations.greengrass.get_function_definition_version.get_function_definition_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetFunctionDefinitionVersion")
    )
    input_: capo_greengrass.types.get_function_definition_version_request.GetFunctionDefinitionVersionRequest = {
        "function_definition_id": function_definition_id,
        "function_definition_version_id": function_definition_version_id,
    }
    if next_token is not None:
        input_["next_token"] = next_token

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