Context class

Context contains the Lambda execution context information. They are either provided via Platform.environment or NextInvocation which is the result from the Lambda API.

Note: this should not be used directly.

Constructors

Context({String? handler, String? functionName, String? functionMemorySize, String? logGroupName, String? logStreamName, required String requestId, String? invokedFunction, String? region, String? executionEnv, String? accessKey, String? secretAccessKey, String? sessionToken})

Properties

accessKey String?
Access key that is acquired via STS.
getter/setter pair
executionEnv String?
The execution environment of the function.
getter/setter pair
functionMemorySize String?
Memory sized that is allocated to execution of the function.
getter/setter pair
functionName String?
Name of the function that is invoked.
getter/setter pair
functionVersion String?
Version of the function that is invoked.
getter/setter pair
handler String?
Handler that is used for the invocation of the function
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
invokedFunctionArn String?
The ARN to identify the function.
getter/setter pair
logGroupName String?
Cloudwatch LogGroup that is associated with the Lambda.
getter/setter pair
logStreamName String?
Cloudwach LogStream that is associated with the Lambda.
getter/setter pair
region String?
Region that this function exists in.
getter/setter pair
requestId String?
Id of the request. You can use this to track the request for the invocation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretAccessKey String?
Secret access key that is acquired via STS.
getter/setter pair
sessionToken String?
The session token from STS.
getter/setter pair

Methods

copyWith({String? handler, String? functionName, String? functionMemorySize, String? logGroupName, String? logStreamName, String? requestId, String? invokedFunction, String? region, String? executionEnv, String? accessKey, String? secretAccessKey, String? sessionToken}) Context
Allows to copy a created Context over with some new settings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromNextInvocation(NextInvocation nextInvocation) Context
Creates a new Context from NextInvocation which is the data from the Lambda Runtime Interface for the next Handler<T> invocation.