diff --git a/en/functions/lang/python/context.md b/en/functions/lang/python/context.md index 5961bb2158..720d6a6e72 100644 --- a/en/functions/lang/python/context.md +++ b/en/functions/lang/python/context.md @@ -3,8 +3,10 @@ _Invocation context_ is an object that contains certain [execution context](../../concepts/runtime/execution-context.md) parameters as well as invocation parameters for the Python function itself. It is accepted by the [call handler](handler.md) as its second argument. The invocation context contains: +* `function_folder_id` - Function Folder. * `function_name`: Function ID. * `function_version`: Function version ID. +* `deadline_ms` - Unix-time (Epoch time) of a call timeout in milliseconds, i.e. a moment which `get_remaining_time_in_millis()` counts down. * `memory_limit_in_mb`: Amount of memory specified at version creation, MB. * `request_id`: ID of the request being handled. * `token`: {{ yandex-cloud }} API authentication parameters. @@ -22,7 +24,7 @@ Invocation context is required for a function to have access to environment info If a function has a service account specified, the `token` parameter contains information for authentication on behalf of this service account: * `access_token`: [IAM token](../../../iam/concepts/authorization/iam-token.md). -* `expires_in`: Token lifetime in seconds. +* `expires_in`: Token lifetime in seconds from the invocation. * `token_type`: Token type (`Bearer`). -You can also get this information using the metadata service. For more information, see [{#T}](../../../compute/operations/vm-connect/auth-inside-vm.md#auth-inside-vm). \ No newline at end of file +You can also get this information using the metadata service. For more information, see [{#T}](../../../compute/operations/vm-connect/auth-inside-vm.md#auth-inside-vm). diff --git a/ru/functions/lang/python/context.md b/ru/functions/lang/python/context.md index 5f8d8192a5..ba3a6046fb 100644 --- a/ru/functions/lang/python/context.md +++ b/ru/functions/lang/python/context.md @@ -3,8 +3,10 @@ _Контекст вызова_ — это объект, который содержит некоторые параметры [контекста выполнения](../../concepts/runtime/execution-context.md) и параметры вызова самой функции на Python. Принимается [обработчиком запросов](handler.md) в качестве второго аргумента. Контекст вызова содержит: +* `function_folder_id` - каталог функции; * `function_name` — идентификатор функции; * `function_version` — идентификатор версии функции; +* `deadline_ms` - Unix-время (Epoch time) таймаута вызова в миллисекундах, т.е. момент времени до которого ведёт обратный отсчёт функция `get_remaining_time_in_millis()` * `memory_limit_in_mb` — объем памяти, указанный при создании версии, МБ; * `request_id` — идентификатор обрабатываемого запроса; * `token` — параметры для аутентификации в API сервисов {{ yandex-cloud }}. @@ -22,7 +24,7 @@ _Контекст вызова_ — это объект, который соде Если в функции указан сервисный аккаунт, то параметр `token` содержит информацию для аутентификации от имени этого сервисного аккаунта: * `access_token` — [IAM-токен](../../../iam/concepts/authorization/iam-token.md); -* `expires_in` — время жизни токена в секундах; +* `expires_in` — оставшееся время жизни токена в секундах вычисленное в момент вызова функции; * `token_type` — тип токена (`Bearer`). -Также данную информацию можно получить с помощью сервиса метаданных. Подробнее об этом способе читайте в разделе [{#T}](../../../compute/operations/vm-connect/auth-inside-vm.md#auth-inside-vm). \ No newline at end of file +Также данную информацию можно получить с помощью сервиса метаданных. Подробнее об этом способе читайте в разделе [{#T}](../../../compute/operations/vm-connect/auth-inside-vm.md#auth-inside-vm).