# ManagedStorageConfigurationProperty

The managed storage configuration for the cluster.

- Source: Generated at build time
- Type last changed: v2.146.0 · 13 Jun 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const managedStorageConfigurationProperty: ecs.CfnCluster.ManagedStorageConfigurationProperty = {
  fargateEphemeralStorageKmsKeyId: 'fargateEphemeralStorageKmsKeyId',
  kmsKeyId: 'kmsKeyId',
};
```

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_ecs as ecs

managed_storage_configuration_property = ecs.CfnCluster.ManagedStorageConfigurationProperty(
    fargate_ephemeral_storage_kms_key_id="fargateEphemeralStorageKmsKeyId",
    kms_key_id="kmsKeyId"
)
```

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

ManagedStorageConfigurationProperty managedStorageConfigurationProperty = ManagedStorageConfigurationProperty.builder()
        .fargateEphemeralStorageKmsKeyId("fargateEphemeralStorageKmsKeyId")
        .kmsKeyId("kmsKeyId")
        .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.ECS;

var managedStorageConfigurationProperty = new ManagedStorageConfigurationProperty {
    FargateEphemeralStorageKmsKeyId = "fargateEphemeralStorageKmsKeyId",
    KmsKeyId = "kmsKeyId"
};
```

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"

managedStorageConfigurationProperty := &ManagedStorageConfigurationProperty{
	FargateEphemeralStorageKmsKeyId: jsii.String("fargateEphemeralStorageKmsKeyId"),
	KmsKeyId: jsii.String("kmsKeyId"),
}
```

## Properties

- `fargateEphemeralStorageKmsKeyId`: string — Specify the AWS Key Management Service key ID for Fargate ephemeral storage.

  When you specify a `fargateEphemeralStorageKmsKeyId` , AWS Fargate uses the key to encrypt data at rest in ephemeral storage. For more information about Fargate ephemeral storage encryption, see [Customer managed keys for AWS Fargate ephemeral storage for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-storage-encryption.html) in the *Amazon Elastic Container Service Developer Guide* .

  The key must be a single Region key.

- `kmsKeyId`: string — Specify a AWS Key Management Service key ID to encrypt Amazon ECS managed storage.

  When you specify a `kmsKeyId` , Amazon ECS uses the key to encrypt data volumes managed by Amazon ECS that are attached to tasks in the cluster. The following data volumes are managed by Amazon ECS: Amazon EBS. For more information about encryption of Amazon EBS volumes attached to Amazon ECS tasks, see [Encrypt data stored in Amazon EBS volumes for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-kms-encryption.html) in the *Amazon Elastic Container Service Developer Guide* .

  The key must be a single Region key.
