# CfnFileCacheProps

Properties for defining a `CfnFileCache`.

Used as props by: [CfnFileCache](/cdk/api/v2/docs/aws-cdk-lib.aws_fsx.CfnFileCache.html)

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 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_fsx as fsx } from 'aws-cdk-lib';
const cfnFileCacheProps: fsx.CfnFileCacheProps = {
  fileCacheType: 'fileCacheType',
  fileCacheTypeVersion: 'fileCacheTypeVersion',
  storageCapacity: 123,
  subnetIds: ['subnetIds'],

  // the properties below are optional
  copyTagsToDataRepositoryAssociations: false,
  dataRepositoryAssociations: [{
    dataRepositoryPath: 'dataRepositoryPath',
    fileCachePath: 'fileCachePath',
  }],
  kmsKeyId: 'kmsKeyId',
  lustreConfiguration: {
    deploymentType: 'deploymentType',
    metadataConfiguration: {
      storageCapacity: 123,
    },
    perUnitStorageThroughput: 123,

    // the properties below are optional
    logConfiguration: {
      level: 'level',

      // the properties below are optional
      destination: 'destination',
    },
    mountName: 'mountName',
    weeklyMaintenanceStartTime: 'weeklyMaintenanceStartTime',
  },
  securityGroupIds: ['securityGroupIds'],
  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_fsx as fsx

cfn_file_cache_props = fsx.CfnFileCacheProps(
    file_cache_type="fileCacheType",
    file_cache_type_version="fileCacheTypeVersion",
    storage_capacity=123,
    subnet_ids=["subnetIds"],

    # the properties below are optional
    copy_tags_to_data_repository_associations=False,
    data_repository_associations=[fsx.CfnFileCache.DataRepositoryAssociationProperty(
        data_repository_path="dataRepositoryPath",
        file_cache_path="fileCachePath"
    )],
    kms_key_id="kmsKeyId",
    lustre_configuration=fsx.CfnFileCache.LustreConfigurationProperty(
        deployment_type="deploymentType",
        metadata_configuration=fsx.CfnFileCache.MetadataConfigurationProperty(
            storage_capacity=123
        ),
        per_unit_storage_throughput=123,

        # the properties below are optional
        log_configuration=fsx.CfnFileCache.LogConfigurationProperty(
            level="level",

            # the properties below are optional
            destination="destination"
        ),
        mount_name="mountName",
        weekly_maintenance_start_time="weeklyMaintenanceStartTime"
    ),
    security_group_ids=["securityGroupIds"],
    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.fsx.*;

CfnFileCacheProps cfnFileCacheProps = CfnFileCacheProps.builder()
        .fileCacheType("fileCacheType")
        .fileCacheTypeVersion("fileCacheTypeVersion")
        .storageCapacity(123)
        .subnetIds(List.of("subnetIds"))

        // the properties below are optional
        .copyTagsToDataRepositoryAssociations(false)
        .dataRepositoryAssociations(List.of(DataRepositoryAssociationProperty.builder()
                .dataRepositoryPath("dataRepositoryPath")
                .fileCachePath("fileCachePath")
                .build()))
        .kmsKeyId("kmsKeyId")
        .lustreConfiguration(LustreConfigurationProperty.builder()
                .deploymentType("deploymentType")
                .metadataConfiguration(MetadataConfigurationProperty.builder()
                        .storageCapacity(123)
                        .build())
                .perUnitStorageThroughput(123)

                // the properties below are optional
                .logConfiguration(LogConfigurationProperty.builder()
                        .level("level")

                        // the properties below are optional
                        .destination("destination")
                        .build())
                .mountName("mountName")
                .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                .build())
        .securityGroupIds(List.of("securityGroupIds"))
        .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.FSx;

var cfnFileCacheProps = new CfnFileCacheProps {
    FileCacheType = "fileCacheType",
    FileCacheTypeVersion = "fileCacheTypeVersion",
    StorageCapacity = 123,
    SubnetIds = new [] { "subnetIds" },

    // the properties below are optional
    CopyTagsToDataRepositoryAssociations = false,
    DataRepositoryAssociations = new [] { new DataRepositoryAssociationProperty {
        DataRepositoryPath = "dataRepositoryPath",
        FileCachePath = "fileCachePath"
    } },
    KmsKeyId = "kmsKeyId",
    LustreConfiguration = new LustreConfigurationProperty {
        DeploymentType = "deploymentType",
        MetadataConfiguration = new MetadataConfigurationProperty {
            StorageCapacity = 123
        },
        PerUnitStorageThroughput = 123,

        // the properties below are optional
        LogConfiguration = new LogConfigurationProperty {
            Level = "level",

            // the properties below are optional
            Destination = "destination"
        },
        MountName = "mountName",
        WeeklyMaintenanceStartTime = "weeklyMaintenanceStartTime"
    },
    SecurityGroupIds = new [] { "securityGroupIds" },
    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"

cfnFileCacheProps := &CfnFileCacheProps{
	FileCacheType: jsii.String("fileCacheType"),
	FileCacheTypeVersion: jsii.String("fileCacheTypeVersion"),
	StorageCapacity: jsii.Number(123),
	SubnetIds: []*string{
		jsii.String("subnetIds"),
	},

	// the properties below are optional
	CopyTagsToDataRepositoryAssociations: jsii.Boolean(false),
	DataRepositoryAssociations: []interface{}{
		&DataRepositoryAssociationProperty{
			DataRepositoryPath: jsii.String("dataRepositoryPath"),
			FileCachePath: jsii.String("fileCachePath"),
		},
	},
	KmsKeyId: jsii.String("kmsKeyId"),
	LustreConfiguration: &LustreConfigurationProperty{
		DeploymentType: jsii.String("deploymentType"),
		MetadataConfiguration: &MetadataConfigurationProperty{
			StorageCapacity: jsii.Number(123),
		},
		PerUnitStorageThroughput: jsii.Number(123),

		// the properties below are optional
		LogConfiguration: &LogConfigurationProperty{
			Level: jsii.String("level"),

			// the properties below are optional
			Destination: jsii.String("destination"),
		},
		MountName: jsii.String("mountName"),
		WeeklyMaintenanceStartTime: jsii.String("weeklyMaintenanceStartTime"),
	},
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `copyTagsToDataRepositoryAssociations`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether tags should be copied to data repository associations.

- `dataRepositoryAssociations`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFileCache.DataRepositoryAssociationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_fsx.CfnFileCache.DataRepositoryAssociationProperty.html)[] — Data repository associations for the cache.

- `fileCacheType`: string (required) — The type of cache, which must be LUSTRE.

- `fileCacheTypeVersion`: string (required) — The Lustre version of the cache, which must be 2.12.

- `kmsKeyId`: string — The KMS key ID for encrypting data.

- `lustreConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFileCache.LustreConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_fsx.CfnFileCache.LustreConfigurationProperty.html)

- `securityGroupIds`: string[] — A list of security group IDs for the cache.

- `storageCapacity`: number (required) — The storage capacity of the cache in gibibytes (GiB).

- `subnetIds`: string[] (required) — A list of subnet IDs for the cache.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags to associate with the file cache.
