PayloadProperty Struct
Information needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotevents as iotevents } from 'aws-cdk-lib';
const payloadProperty: iotevents.CfnDetectorModel.PayloadProperty = {
contentExpression: 'contentExpression',
type: 'type',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iotevents as iotevents
payload_property = iotevents.CfnDetectorModel.PayloadProperty(
content_expression="contentExpression",
type="type"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iotevents.*;
PayloadProperty payloadProperty = PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTEvents;
var payloadProperty = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
payloadProperty := &PayloadProperty{
ContentExpression: jsii.String("contentExpression"),
Type: jsii.String("type"),
}
Properties
contentExpressionstringcontent_expressionstrcontentExpressionStringContentExpressionstringContentExpression*stringrequired#The content of the payload.
notes
You can use a string expression that includes quoted strings ( '<string>' ), variables ( $variable.<variable-name> ), input values ( $input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.
The value of the payload type can be either `STRING` or `JSON` .