#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for LambdaExecutionParameters
Implementations
sourceimpl Builder
impl Builder
sourcepub fn event_sources(self, input: LambdaEventSource) -> Self
pub fn event_sources(self, input: LambdaEventSource) -> Self
Appends an item to event_sources
.
To override the contents of this collection use set_event_sources
.
The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and Amazon Web Services IoT Core MQTT messages.
sourcepub fn set_event_sources(self, input: Option<Vec<LambdaEventSource>>) -> Self
pub fn set_event_sources(self, input: Option<Vec<LambdaEventSource>>) -> Self
The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and Amazon Web Services IoT Core MQTT messages.
sourcepub fn max_queue_size(self, input: i32) -> Self
pub fn max_queue_size(self, input: i32) -> Self
The maximum size of the message queue for the Lambda function component. The IoT Greengrass core stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
sourcepub fn set_max_queue_size(self, input: Option<i32>) -> Self
pub fn set_max_queue_size(self, input: Option<i32>) -> Self
The maximum size of the message queue for the Lambda function component. The IoT Greengrass core stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
sourcepub fn max_instances_count(self, input: i32) -> Self
pub fn max_instances_count(self, input: i32) -> Self
The maximum number of instances that a non-pinned Lambda function can run at the same time.
sourcepub fn set_max_instances_count(self, input: Option<i32>) -> Self
pub fn set_max_instances_count(self, input: Option<i32>) -> Self
The maximum number of instances that a non-pinned Lambda function can run at the same time.
sourcepub fn max_idle_time_in_seconds(self, input: i32) -> Self
pub fn max_idle_time_in_seconds(self, input: i32) -> Self
The maximum amount of time in seconds that a non-pinned Lambda function can idle before the IoT Greengrass Core software stops its process.
sourcepub fn set_max_idle_time_in_seconds(self, input: Option<i32>) -> Self
pub fn set_max_idle_time_in_seconds(self, input: Option<i32>) -> Self
The maximum amount of time in seconds that a non-pinned Lambda function can idle before the IoT Greengrass Core software stops its process.
sourcepub fn timeout_in_seconds(self, input: i32) -> Self
pub fn timeout_in_seconds(self, input: i32) -> Self
The maximum amount of time in seconds that the Lambda function can process a work item.
sourcepub fn set_timeout_in_seconds(self, input: Option<i32>) -> Self
pub fn set_timeout_in_seconds(self, input: Option<i32>) -> Self
The maximum amount of time in seconds that the Lambda function can process a work item.
sourcepub fn status_timeout_in_seconds(self, input: i32) -> Self
pub fn status_timeout_in_seconds(self, input: i32) -> Self
The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
sourcepub fn set_status_timeout_in_seconds(self, input: Option<i32>) -> Self
pub fn set_status_timeout_in_seconds(self, input: Option<i32>) -> Self
The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
sourcepub fn pinned(self, input: bool) -> Self
pub fn pinned(self, input: bool) -> Self
Whether or not the Lambda function is pinned, or long-lived.
-
A pinned Lambda function starts when IoT Greengrass starts and keeps running in its own container.
-
A non-pinned Lambda function starts only when it receives a work item and exists after it idles for
maxIdleTimeInSeconds
. If the function has multiple work items, the IoT Greengrass Core software creates multiple instances of the function.
Default: true
sourcepub fn set_pinned(self, input: Option<bool>) -> Self
pub fn set_pinned(self, input: Option<bool>) -> Self
Whether or not the Lambda function is pinned, or long-lived.
-
A pinned Lambda function starts when IoT Greengrass starts and keeps running in its own container.
-
A non-pinned Lambda function starts only when it receives a work item and exists after it idles for
maxIdleTimeInSeconds
. If the function has multiple work items, the IoT Greengrass Core software creates multiple instances of the function.
Default: true
sourcepub fn input_payload_encoding_type(
self,
input: LambdaInputPayloadEncodingType
) -> Self
pub fn input_payload_encoding_type(
self,
input: LambdaInputPayloadEncodingType
) -> Self
The encoding type that the Lambda function supports.
Default: json
sourcepub fn set_input_payload_encoding_type(
self,
input: Option<LambdaInputPayloadEncodingType>
) -> Self
pub fn set_input_payload_encoding_type(
self,
input: Option<LambdaInputPayloadEncodingType>
) -> Self
The encoding type that the Lambda function supports.
Default: json
sourcepub fn exec_args(self, input: impl Into<String>) -> Self
pub fn exec_args(self, input: impl Into<String>) -> Self
Appends an item to exec_args
.
To override the contents of this collection use set_exec_args
.
The list of arguments to pass to the Lambda function when it runs.
sourcepub fn set_exec_args(self, input: Option<Vec<String>>) -> Self
pub fn set_exec_args(self, input: Option<Vec<String>>) -> Self
The list of arguments to pass to the Lambda function when it runs.
sourcepub fn environment_variables(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
pub fn environment_variables(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
Adds a key-value pair to environment_variables
.
To override the contents of this collection use set_environment_variables
.
The map of environment variables that are available to the Lambda function when it runs.
sourcepub fn set_environment_variables(
self,
input: Option<HashMap<String, String>>
) -> Self
pub fn set_environment_variables(
self,
input: Option<HashMap<String, String>>
) -> Self
The map of environment variables that are available to the Lambda function when it runs.
sourcepub fn linux_process_params(self, input: LambdaLinuxProcessParams) -> Self
pub fn linux_process_params(self, input: LambdaLinuxProcessParams) -> Self
The parameters for the Linux process that contains the Lambda function.
sourcepub fn set_linux_process_params(
self,
input: Option<LambdaLinuxProcessParams>
) -> Self
pub fn set_linux_process_params(
self,
input: Option<LambdaLinuxProcessParams>
) -> Self
The parameters for the Linux process that contains the Lambda function.
sourcepub fn build(self) -> LambdaExecutionParameters
pub fn build(self) -> LambdaExecutionParameters
Consumes the builder and constructs a LambdaExecutionParameters
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more