class S3PutObjectAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.Actions.S3PutObjectAction |
Java | software.amazon.awscdk.services.iot.actions.S3PutObjectAction |
Python | aws_cdk.aws_iot_actions.S3PutObjectAction |
TypeScript (source) | @aws-cdk/aws-iot-actions » S3PutObjectAction |
Implements
IAction
The action to write the data from an MQTT message to an Amazon S3 bucket.
Example
const bucket = new s3.Bucket(this, 'MyBucket');
new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20160323(
"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'",
),
actions: [
new actions.S3PutObjectAction(bucket, {
key: '${year}/${month}/${day}/${topic(2)}',
}),
],
});
Initializer
new S3PutObjectAction(bucket: IBucket, props?: S3PutObjectActionProps)
Parameters
- bucket
IBucket
— The Amazon S3 bucket to which to write data. - props
S3
— Optional properties to not use default.Put Object Action Props
Methods
Name | Description |
---|---|
bind(rule) | Returns the topic rule action specification. |
bind(rule)
public bind(rule: ITopicRule): ActionConfig
Parameters
- rule
ITopic
Rule
Returns
Returns the topic rule action specification.