@aws-cdk_aws-iot-actions-alpha.S3PutObjectActionProps

interface S3PutObjectActionProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.IoT.Actions.Alpha.S3PutObjectActionProps
Gogithub.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2#S3PutObjectActionProps
Javasoftware.amazon.awscdk.services.iot.actions.alpha.S3PutObjectActionProps
Pythonaws_cdk.aws_iot_actions_alpha.S3PutObjectActionProps
TypeScript (source)@aws-cdk/aws-iot-actions-alpha ยป S3PutObjectActionProps

Configuration properties of an action for s3.

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)}',
    }),
  ],
});

Properties

NameTypeDescription
accessControl?๐Ÿ”นBucketAccessControlThe Amazon S3 canned ACL that controls access to the object identified by the object key.
key?๐Ÿ”นstringThe path to the file where the data is written.
role?๐Ÿ”นIRoleThe IAM role that allows access to AWS service.

accessControl?๐Ÿ”น

Type: BucketAccessControl (optional, default: None)

The Amazon S3 canned ACL that controls access to the object identified by the object key.

See also: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl


key?๐Ÿ”น

Type: string (optional, default: '${topic()}/${timestamp()}')

The path to the file where the data is written.

Supports substitution templates.

See also: https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html


role?๐Ÿ”น

Type: IRole (optional, default: a new role will be created)

The IAM role that allows access to AWS service.