File tree 2 files changed +12
-0
lines changed
include/aws/lambda-runtime
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ struct invocation_request {
61
61
*/
62
62
std::chrono::time_point<std::chrono::system_clock> deadline;
63
63
64
+ /* *
65
+ * Tenant ID of the current invocation.
66
+ */
67
+ std::string tenant_id;
68
+
64
69
/* *
65
70
* The number of milliseconds left before lambda terminates the current execution.
66
71
*/
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ static constexpr auto CLIENT_CONTEXT_HEADER = "lambda-runtime-client-context";
41
41
static constexpr auto COGNITO_IDENTITY_HEADER = " lambda-runtime-cognito-identity" ;
42
42
static constexpr auto DEADLINE_MS_HEADER = " lambda-runtime-deadline-ms" ;
43
43
static constexpr auto FUNCTION_ARN_HEADER = " lambda-runtime-invoked-function-arn" ;
44
+ static constexpr auto TENANT_ID_HEADER = " lambda-runtime-aws-tenant-id" ;
44
45
45
46
enum Endpoints {
46
47
INIT,
@@ -315,6 +316,12 @@ runtime::next_outcome runtime::get_next()
315
316
req.payload .c_str (),
316
317
static_cast <int64_t >(req.get_time_remaining ().count ()));
317
318
}
319
+
320
+ out = resp.get_header (TENANT_ID_HEADER);
321
+ if (out.is_success ()) {
322
+ req.tenant_id = std::move (out).get_result ();
323
+ }
324
+
318
325
return {req};
319
326
}
320
327
You can’t perform that action at this time.
0 commit comments