# CfnStreamProps

Properties for defining a `CfnStream`.

Used as props by: [CfnStream](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnStream.html)

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 2026

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `description`: string — The description of the stream.

- `files`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnStream.StreamFileProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnStream.StreamFileProperty.html)[] (required) — The files to stream.

- `roleArn`: string (required) — An IAM role that allows the IoT service principal to access your S3 files.

- `streamId`: string (required) — The stream ID.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Metadata which can be used to manage streams.
