# ChannelStorageProperty

Where channel data is stored.

You may choose one of `serviceManagedS3` , `customerManagedS3` storage. If not specified, the default is `serviceManagedS3` . This can't be changed after creation of the channel.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotanalytics as iotanalytics } from 'aws-cdk-lib';

declare const serviceManagedS3: any;
const channelStorageProperty: iotanalytics.CfnChannel.ChannelStorageProperty = {
  customerManagedS3: {
    bucket: 'bucket',
    roleArn: 'roleArn',

    // the properties below are optional
    keyPrefix: 'keyPrefix',
  },
  serviceManagedS3: serviceManagedS3,
};
```

Python:

```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_iotanalytics as iotanalytics

# service_managed_s3: Any

channel_storage_property = iotanalytics.CfnChannel.ChannelStorageProperty(
    customer_managed_s3=iotanalytics.CfnChannel.CustomerManagedS3Property(
        bucket="bucket",
        role_arn="roleArn",

        # the properties below are optional
        key_prefix="keyPrefix"
    ),
    service_managed_s3=service_managed_s3
)
```

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.iotanalytics.*;

Object serviceManagedS3;

ChannelStorageProperty channelStorageProperty = ChannelStorageProperty.builder()
        .customerManagedS3(CustomerManagedS3Property.builder()
                .bucket("bucket")
                .roleArn("roleArn")

                // the properties below are optional
                .keyPrefix("keyPrefix")
                .build())
        .serviceManagedS3(serviceManagedS3)
        .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.IoTAnalytics;

var serviceManagedS3;

var channelStorageProperty = new ChannelStorageProperty {
    CustomerManagedS3 = new CustomerManagedS3Property {
        Bucket = "bucket",
        RoleArn = "roleArn",

        // the properties below are optional
        KeyPrefix = "keyPrefix"
    },
    ServiceManagedS3 = serviceManagedS3
};
```

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"

var serviceManagedS3 interface{}

channelStorageProperty := &ChannelStorageProperty{
	CustomerManagedS3: &CustomerManagedS3Property{
		Bucket: jsii.String("bucket"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		KeyPrefix: jsii.String("keyPrefix"),
	},
	ServiceManagedS3: serviceManagedS3,
}
```

## Properties

- `customerManagedS3`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnChannel.CustomerManagedS3Property](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnChannel.CustomerManagedS3Property.html) — Used to store channel data in an S3 bucket that you manage.

  If customer managed storage is selected, the `retentionPeriod` parameter is ignored. You can't change the choice of S3 storage after the data store is created.

- `serviceManagedS3`: any — Used to store channel data in an S3 bucket managed by ITA .

  You can't change the choice of S3 storage after the data store is created.
