Kotlin function invocation context
Written by
Updated at January 22, 2025
Invocation context is an object that is optionally accepted by the request handler if using the YcFunction interface as the programming model. Invocation context is a yandex.cloud.sdk.functions.Context
type object providing the following methods for getting information about function version properties:
getFunctionId()
: Returns the string ID of the function.getFunctionVersionId()
: Returns the string ID of the function version.getMemoryLimitInMB()
: Returns the amount of memory specified when creating the version, MB.getRequestId()
: Returns the request ID.getTokenJson()
: Returns the parameters for authentication in the Yandex Cloud API.
To get information from the invocation context, use one of the above functions in the handler method.