Struct aws_sdk_iotevents::types::builders::AlarmActionBuilder
source · #[non_exhaustive]pub struct AlarmActionBuilder { /* private fields */ }
Expand description
A builder for AlarmAction
.
Implementations§
source§impl AlarmActionBuilder
impl AlarmActionBuilder
sourcepub fn sns(self, input: SnsTopicPublishAction) -> Self
pub fn sns(self, input: SnsTopicPublishAction) -> Self
Information required to publish the Amazon SNS message.
sourcepub fn set_sns(self, input: Option<SnsTopicPublishAction>) -> Self
pub fn set_sns(self, input: Option<SnsTopicPublishAction>) -> Self
Information required to publish the Amazon SNS message.
sourcepub fn get_sns(&self) -> &Option<SnsTopicPublishAction>
pub fn get_sns(&self) -> &Option<SnsTopicPublishAction>
Information required to publish the Amazon SNS message.
sourcepub fn iot_topic_publish(self, input: IotTopicPublishAction) -> Self
pub fn iot_topic_publish(self, input: IotTopicPublishAction) -> Self
Information required to publish the MQTT message through the AWS IoT message broker.
sourcepub fn set_iot_topic_publish(self, input: Option<IotTopicPublishAction>) -> Self
pub fn set_iot_topic_publish(self, input: Option<IotTopicPublishAction>) -> Self
Information required to publish the MQTT message through the AWS IoT message broker.
sourcepub fn get_iot_topic_publish(&self) -> &Option<IotTopicPublishAction>
pub fn get_iot_topic_publish(&self) -> &Option<IotTopicPublishAction>
Information required to publish the MQTT message through the AWS IoT message broker.
sourcepub fn lambda(self, input: LambdaAction) -> Self
pub fn lambda(self, input: LambdaAction) -> Self
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn set_lambda(self, input: Option<LambdaAction>) -> Self
pub fn set_lambda(self, input: Option<LambdaAction>) -> Self
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn get_lambda(&self) -> &Option<LambdaAction>
pub fn get_lambda(&self) -> &Option<LambdaAction>
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn iot_events(self, input: IotEventsAction) -> Self
pub fn iot_events(self, input: IotEventsAction) -> Self
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn set_iot_events(self, input: Option<IotEventsAction>) -> Self
pub fn set_iot_events(self, input: Option<IotEventsAction>) -> Self
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn get_iot_events(&self) -> &Option<IotEventsAction>
pub fn get_iot_events(&self) -> &Option<IotEventsAction>
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
sourcepub fn sqs(self, input: SqsAction) -> Self
pub fn sqs(self, input: SqsAction) -> Self
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
sourcepub fn set_sqs(self, input: Option<SqsAction>) -> Self
pub fn set_sqs(self, input: Option<SqsAction>) -> Self
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
sourcepub fn get_sqs(&self) -> &Option<SqsAction>
pub fn get_sqs(&self) -> &Option<SqsAction>
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
sourcepub fn firehose(self, input: FirehoseAction) -> Self
pub fn firehose(self, input: FirehoseAction) -> Self
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
sourcepub fn set_firehose(self, input: Option<FirehoseAction>) -> Self
pub fn set_firehose(self, input: Option<FirehoseAction>) -> Self
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
sourcepub fn get_firehose(&self) -> &Option<FirehoseAction>
pub fn get_firehose(&self) -> &Option<FirehoseAction>
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
sourcepub fn dynamo_db(self, input: DynamoDbAction) -> Self
pub fn dynamo_db(self, input: DynamoDbAction) -> Self
Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
You must use expressions for all parameters in DynamoDBAction
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
hashKeyType
parameter can be'STRING'
. -
For references, you must specify either variables or input values. For example, the value for the
hashKeyField
parameter can be$input.GreenhouseInput.name
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
hashKeyValue
parameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
If the defined payload type is a string, DynamoDBAction
writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField
parameter is
.
sourcepub fn set_dynamo_db(self, input: Option<DynamoDbAction>) -> Self
pub fn set_dynamo_db(self, input: Option<DynamoDbAction>) -> Self
Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
You must use expressions for all parameters in DynamoDBAction
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
hashKeyType
parameter can be'STRING'
. -
For references, you must specify either variables or input values. For example, the value for the
hashKeyField
parameter can be$input.GreenhouseInput.name
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
hashKeyValue
parameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
If the defined payload type is a string, DynamoDBAction
writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField
parameter is
.
sourcepub fn get_dynamo_db(&self) -> &Option<DynamoDbAction>
pub fn get_dynamo_db(&self) -> &Option<DynamoDbAction>
Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
You must use expressions for all parameters in DynamoDBAction
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
hashKeyType
parameter can be'STRING'
. -
For references, you must specify either variables or input values. For example, the value for the
hashKeyField
parameter can be$input.GreenhouseInput.name
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
hashKeyValue
parameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
If the defined payload type is a string, DynamoDBAction
writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField
parameter is
.
sourcepub fn dynamo_dbv2(self, input: DynamoDBv2Action) -> Self
pub fn dynamo_dbv2(self, input: DynamoDBv2Action) -> Self
Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
You must use expressions for all parameters in DynamoDBv2Action
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
tableName
parameter can be'GreenhouseTemperatureTable'
. -
For references, you must specify either variables or input values. For example, the value for the
tableName
parameter can be$variable.ddbtableName
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
contentExpression
parameter inPayload
uses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
The value for the type
parameter in Payload
must be JSON
.
sourcepub fn set_dynamo_dbv2(self, input: Option<DynamoDBv2Action>) -> Self
pub fn set_dynamo_dbv2(self, input: Option<DynamoDBv2Action>) -> Self
Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
You must use expressions for all parameters in DynamoDBv2Action
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
tableName
parameter can be'GreenhouseTemperatureTable'
. -
For references, you must specify either variables or input values. For example, the value for the
tableName
parameter can be$variable.ddbtableName
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
contentExpression
parameter inPayload
uses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
The value for the type
parameter in Payload
must be JSON
.
sourcepub fn get_dynamo_dbv2(&self) -> &Option<DynamoDBv2Action>
pub fn get_dynamo_dbv2(&self) -> &Option<DynamoDBv2Action>
Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
You must use expressions for all parameters in DynamoDBv2Action
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
tableName
parameter can be'GreenhouseTemperatureTable'
. -
For references, you must specify either variables or input values. For example, the value for the
tableName
parameter can be$variable.ddbtableName
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
contentExpression
parameter inPayload
uses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
-
For a string concatenation, you must use
+
. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
tableName
parameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide.
The value for the type
parameter in Payload
must be JSON
.
sourcepub fn iot_site_wise(self, input: IotSiteWiseAction) -> Self
pub fn iot_site_wise(self, input: IotSiteWiseAction) -> Self
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.
You must use expressions for all parameters in IotSiteWiseAction
. The expressions accept literals, operators, functions, references, and substitutions templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
propertyAlias
parameter can be'/company/windfarm/3/turbine/7/temperature'
. -
For references, you must specify either variables or input values. For example, the value for the
assetId
parameter can be$input.TurbineInput.assetId1
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
propertyAlias
parameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'
You must specify either propertyAlias
or both assetId
and propertyId
to identify the target asset property in AWS IoT SiteWise.
For more information, see Expressions in the AWS IoT Events Developer Guide.
sourcepub fn set_iot_site_wise(self, input: Option<IotSiteWiseAction>) -> Self
pub fn set_iot_site_wise(self, input: Option<IotSiteWiseAction>) -> Self
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.
You must use expressions for all parameters in IotSiteWiseAction
. The expressions accept literals, operators, functions, references, and substitutions templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
propertyAlias
parameter can be'/company/windfarm/3/turbine/7/temperature'
. -
For references, you must specify either variables or input values. For example, the value for the
assetId
parameter can be$input.TurbineInput.assetId1
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
propertyAlias
parameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'
You must specify either propertyAlias
or both assetId
and propertyId
to identify the target asset property in AWS IoT SiteWise.
For more information, see Expressions in the AWS IoT Events Developer Guide.
sourcepub fn get_iot_site_wise(&self) -> &Option<IotSiteWiseAction>
pub fn get_iot_site_wise(&self) -> &Option<IotSiteWiseAction>
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.
You must use expressions for all parameters in IotSiteWiseAction
. The expressions accept literals, operators, functions, references, and substitutions templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
propertyAlias
parameter can be'/company/windfarm/3/turbine/7/temperature'
. -
For references, you must specify either variables or input values. For example, the value for the
assetId
parameter can be$input.TurbineInput.assetId1
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
propertyAlias
parameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'
You must specify either propertyAlias
or both assetId
and propertyId
to identify the target asset property in AWS IoT SiteWise.
For more information, see Expressions in the AWS IoT Events Developer Guide.
sourcepub fn build(self) -> AlarmAction
pub fn build(self) -> AlarmAction
Consumes the builder and constructs a AlarmAction
.
Trait Implementations§
source§impl Clone for AlarmActionBuilder
impl Clone for AlarmActionBuilder
source§fn clone(&self) -> AlarmActionBuilder
fn clone(&self) -> AlarmActionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AlarmActionBuilder
impl Debug for AlarmActionBuilder
source§impl Default for AlarmActionBuilder
impl Default for AlarmActionBuilder
source§fn default() -> AlarmActionBuilder
fn default() -> AlarmActionBuilder
source§impl PartialEq for AlarmActionBuilder
impl PartialEq for AlarmActionBuilder
source§fn eq(&self, other: &AlarmActionBuilder) -> bool
fn eq(&self, other: &AlarmActionBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AlarmActionBuilder
Auto Trait Implementations§
impl Freeze for AlarmActionBuilder
impl RefUnwindSafe for AlarmActionBuilder
impl Send for AlarmActionBuilder
impl Sync for AlarmActionBuilder
impl Unpin for AlarmActionBuilder
impl UnwindSafe for AlarmActionBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more