Skip to content
v2.276.0

CfnStreamProps Struct ​

Properties for defining a CfnStream.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnStreamProps: iot.CfnStreamProps = {
  files: [{
    fileId: 123,
    s3Location: {
      bucket: 'bucket',
      key: 'key',
      version: 'version',
    },
  }],
  roleArn: 'roleArn',
  streamId: 'streamId',

  // the properties below are optional
  description: 'description',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

cfn_stream_props = iot.CfnStreamProps(
    files=[iot.CfnStream.StreamFileProperty(
        file_id=123,
        s3_location=iot.CfnStream.S3LocationProperty(
            bucket="bucket",
            key="key",
            version="version"
        )
    )],
    role_arn="roleArn",
    stream_id="streamId",

    # the properties below are optional
    description="description",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.iot.*;

CfnStreamProps cfnStreamProps = CfnStreamProps.builder()
        .files(List.of(StreamFileProperty.builder()
                .fileId(123)
                .s3Location(S3LocationProperty.builder()
                        .bucket("bucket")
                        .key("key")
                        .version("version")
                        .build())
                .build()))
        .roleArn("roleArn")
        .streamId("streamId")

        // the properties below are optional
        .description("description")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.IoT;

var cfnStreamProps = new CfnStreamProps {
    Files = new [] { new StreamFileProperty {
        FileId = 123,
        S3Location = new S3LocationProperty {
            Bucket = "bucket",
            Key = "key",
            Version = "version"
        }
    } },
    RoleArn = "roleArn",
    StreamId = "streamId",

    // the properties below are optional
    Description = "description",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnStreamProps := &CfnStreamProps{
	Files: []interface{}{
		&StreamFileProperty{
			FileId: jsii.Number(123),
			S3Location: &S3LocationProperty{
				Bucket: jsii.String("bucket"),
				Key: jsii.String("key"),
				Version: jsii.String("version"),
			},
		},
	},
	RoleArn: jsii.String("roleArn"),
	StreamId: jsii.String("streamId"),

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description of the stream.
filesIResolvable | IResolvable | CfnStream.StreamFileProperty[]filestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StreamFileProperty]]]filesIResolvableFilesIResolvableFilesinterface{}required#
The files to stream.
roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*stringrequired#
An IAM role that allows the IoT service principal to access your S3 files.
streamIdstringstream_idstrstreamIdStringStreamIdstringStreamId*stringrequired#
The stream ID.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
Metadata which can be used to manage streams.