Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Developing in Java
  2. Invocation context

Java function invocation context

Written by
Yandex Cloud
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.

Was the article helpful?

Previous
Request handler
Next
Logging
Yandex project
© 2025 Yandex.Cloud LLC