Skip to content
v2.274.0

CfnFileSystem L1 construct ​

The AWS::FSx::FileSystem resource is an Amazon FSx resource type that specifies an Amazon FSx file system.

You can create any of the following supported file system types:

  • Amazon FSx for Lustre
  • Amazon FSx for NetApp ONTAP
  • FSx for OpenZFS
  • Amazon FSx for Windows File Server

Example ​

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 cfnFileSystem = new fsx.CfnFileSystem(this, 'MyCfnFileSystem', {
  fileSystemType: 'fileSystemType',
  subnetIds: ['subnetIds'],

  // the properties below are optional
  backupId: 'backupId',
  fileSystemTypeVersion: 'fileSystemTypeVersion',
  kmsKeyId: 'kmsKeyId',
  lustreConfiguration: {
    autoImportPolicy: 'autoImportPolicy',
    automaticBackupRetentionDays: 123,
    copyTagsToBackups: false,
    dailyAutomaticBackupStartTime: 'dailyAutomaticBackupStartTime',
    dataCompressionType: 'dataCompressionType',
    dataReadCacheConfiguration: {
      sizeGiB: 123,
      sizingMode: 'sizingMode',
    },
    deploymentType: 'deploymentType',
    driveCacheType: 'driveCacheType',
    efaEnabled: false,
    exportPath: 'exportPath',
    importedFileChunkSize: 123,
    importPath: 'importPath',
    logConfiguration: {
      level: 'level',

      // the properties below are optional
      destination: 'destination',
    },
    metadataConfiguration: {
      iops: 123,
      mode: 'mode',
    },
    perUnitStorageThroughput: 123,
    throughputCapacity: 123,
    weeklyMaintenanceStartTime: 'weeklyMaintenanceStartTime',
  },
  networkType: 'networkType',
  ontapConfiguration: {
    deploymentType: 'deploymentType',

    // the properties below are optional
    automaticBackupRetentionDays: 123,
    dailyAutomaticBackupStartTime: 'dailyAutomaticBackupStartTime',
    diskIopsConfiguration: {
      iops: 123,
      mode: 'mode',
    },
    endpointIpAddressRange: 'endpointIpAddressRange',
    endpointIpv6AddressRange: 'endpointIpv6AddressRange',
    fsxAdminPassword: 'fsxAdminPassword',
    haPairs: 123,
    preferredSubnetId: 'preferredSubnetId',
    routeTableIds: ['routeTableIds'],
    throughputCapacity: 123,
    throughputCapacityPerHaPair: 123,
    weeklyMaintenanceStartTime: 'weeklyMaintenanceStartTime',
  },
  openZfsConfiguration: {
    deploymentType: 'deploymentType',

    // the properties below are optional
    automaticBackupRetentionDays: 123,
    copyTagsToBackups: false,
    copyTagsToVolumes: false,
    dailyAutomaticBackupStartTime: 'dailyAutomaticBackupStartTime',
    diskIopsConfiguration: {
      iops: 123,
      mode: 'mode',
    },
    endpointIpAddressRange: 'endpointIpAddressRange',
    endpointIpv6AddressRange: 'endpointIpv6AddressRange',
    options: ['options'],
    preferredSubnetId: 'preferredSubnetId',
    readCacheConfiguration: {
      sizeGiB: 123,
      sizingMode: 'sizingMode',
    },
    rootVolumeConfiguration: {
      copyTagsToSnapshots: false,
      dataCompressionType: 'dataCompressionType',
      nfsExports: [{
        clientConfigurations: [{
          clients: 'clients',
          options: ['options'],
        }],
      }],
      readOnly: false,
      recordSizeKiB: 123,
      userAndGroupQuotas: [{
        id: 123,
        storageCapacityQuotaGiB: 123,
        type: 'type',
      }],
    },
    routeTableIds: ['routeTableIds'],
    throughputCapacity: 123,
    weeklyMaintenanceStartTime: 'weeklyMaintenanceStartTime',
  },
  securityGroupIds: ['securityGroupIds'],
  storageCapacity: 123,
  storageType: 'storageType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  windowsConfiguration: {
    throughputCapacity: 123,

    // the properties below are optional
    activeDirectoryId: 'activeDirectoryId',
    aliases: ['aliases'],
    auditLogConfiguration: {
      fileAccessAuditLogLevel: 'fileAccessAuditLogLevel',
      fileShareAccessAuditLogLevel: 'fileShareAccessAuditLogLevel',

      // the properties below are optional
      auditLogDestination: 'auditLogDestination',
    },
    automaticBackupRetentionDays: 123,
    copyTagsToBackups: false,
    dailyAutomaticBackupStartTime: 'dailyAutomaticBackupStartTime',
    deploymentType: 'deploymentType',
    diskIopsConfiguration: {
      iops: 123,
      mode: 'mode',
    },
    fsrmConfiguration: {
      fsrmServiceEnabled: false,

      // the properties below are optional
      eventLogDestination: 'eventLogDestination',
    },
    preferredSubnetId: 'preferredSubnetId',
    selfManagedActiveDirectoryConfiguration: {
      dnsIps: ['dnsIps'],
      domainJoinServiceAccountSecret: 'domainJoinServiceAccountSecret',
      domainName: 'domainName',
      fileSystemAdministratorsGroup: 'fileSystemAdministratorsGroup',
      organizationalUnitDistinguishedName: 'organizationalUnitDistinguishedName',
      password: 'password',
      userName: 'userName',
    },
    weeklyMaintenanceStartTime: 'weeklyMaintenanceStartTime',
  },
});
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_system = fsx.CfnFileSystem(self, "MyCfnFileSystem",
    file_system_type="fileSystemType",
    subnet_ids=["subnetIds"],

    # the properties below are optional
    backup_id="backupId",
    file_system_type_version="fileSystemTypeVersion",
    kms_key_id="kmsKeyId",
    lustre_configuration=fsx.CfnFileSystem.LustreConfigurationProperty(
        auto_import_policy="autoImportPolicy",
        automatic_backup_retention_days=123,
        copy_tags_to_backups=False,
        daily_automatic_backup_start_time="dailyAutomaticBackupStartTime",
        data_compression_type="dataCompressionType",
        data_read_cache_configuration=fsx.CfnFileSystem.DataReadCacheConfigurationProperty(
            size_gi_b=123,
            sizing_mode="sizingMode"
        ),
        deployment_type="deploymentType",
        drive_cache_type="driveCacheType",
        efa_enabled=False,
        export_path="exportPath",
        imported_file_chunk_size=123,
        import_path="importPath",
        log_configuration=fsx.CfnFileSystem.LogConfigurationProperty(
            level="level",

            # the properties below are optional
            destination="destination"
        ),
        metadata_configuration=fsx.CfnFileSystem.MetadataConfigurationProperty(
            iops=123,
            mode="mode"
        ),
        per_unit_storage_throughput=123,
        throughput_capacity=123,
        weekly_maintenance_start_time="weeklyMaintenanceStartTime"
    ),
    network_type="networkType",
    ontap_configuration=fsx.CfnFileSystem.OntapConfigurationProperty(
        deployment_type="deploymentType",

        # the properties below are optional
        automatic_backup_retention_days=123,
        daily_automatic_backup_start_time="dailyAutomaticBackupStartTime",
        disk_iops_configuration=fsx.CfnFileSystem.DiskIopsConfigurationProperty(
            iops=123,
            mode="mode"
        ),
        endpoint_ip_address_range="endpointIpAddressRange",
        endpoint_ipv6_address_range="endpointIpv6AddressRange",
        fsx_admin_password="fsxAdminPassword",
        ha_pairs=123,
        preferred_subnet_id="preferredSubnetId",
        route_table_ids=["routeTableIds"],
        throughput_capacity=123,
        throughput_capacity_per_ha_pair=123,
        weekly_maintenance_start_time="weeklyMaintenanceStartTime"
    ),
    open_zfs_configuration=fsx.CfnFileSystem.OpenZFSConfigurationProperty(
        deployment_type="deploymentType",

        # the properties below are optional
        automatic_backup_retention_days=123,
        copy_tags_to_backups=False,
        copy_tags_to_volumes=False,
        daily_automatic_backup_start_time="dailyAutomaticBackupStartTime",
        disk_iops_configuration=fsx.CfnFileSystem.DiskIopsConfigurationProperty(
            iops=123,
            mode="mode"
        ),
        endpoint_ip_address_range="endpointIpAddressRange",
        endpoint_ipv6_address_range="endpointIpv6AddressRange",
        options=["options"],
        preferred_subnet_id="preferredSubnetId",
        read_cache_configuration=fsx.CfnFileSystem.ReadCacheConfigurationProperty(
            size_gi_b=123,
            sizing_mode="sizingMode"
        ),
        root_volume_configuration=fsx.CfnFileSystem.RootVolumeConfigurationProperty(
            copy_tags_to_snapshots=False,
            data_compression_type="dataCompressionType",
            nfs_exports=[fsx.CfnFileSystem.NfsExportsProperty(
                client_configurations=[fsx.CfnFileSystem.ClientConfigurationsProperty(
                    clients="clients",
                    options=["options"]
                )]
            )],
            read_only=False,
            record_size_ki_b=123,
            user_and_group_quotas=[fsx.CfnFileSystem.UserAndGroupQuotasProperty(
                id=123,
                storage_capacity_quota_gi_b=123,
                type="type"
            )]
        ),
        route_table_ids=["routeTableIds"],
        throughput_capacity=123,
        weekly_maintenance_start_time="weeklyMaintenanceStartTime"
    ),
    security_group_ids=["securityGroupIds"],
    storage_capacity=123,
    storage_type="storageType",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    windows_configuration=fsx.CfnFileSystem.WindowsConfigurationProperty(
        throughput_capacity=123,

        # the properties below are optional
        active_directory_id="activeDirectoryId",
        aliases=["aliases"],
        audit_log_configuration=fsx.CfnFileSystem.AuditLogConfigurationProperty(
            file_access_audit_log_level="fileAccessAuditLogLevel",
            file_share_access_audit_log_level="fileShareAccessAuditLogLevel",

            # the properties below are optional
            audit_log_destination="auditLogDestination"
        ),
        automatic_backup_retention_days=123,
        copy_tags_to_backups=False,
        daily_automatic_backup_start_time="dailyAutomaticBackupStartTime",
        deployment_type="deploymentType",
        disk_iops_configuration=fsx.CfnFileSystem.DiskIopsConfigurationProperty(
            iops=123,
            mode="mode"
        ),
        fsrm_configuration=fsx.CfnFileSystem.FsrmConfigurationProperty(
            fsrm_service_enabled=False,

            # the properties below are optional
            event_log_destination="eventLogDestination"
        ),
        preferred_subnet_id="preferredSubnetId",
        self_managed_active_directory_configuration=fsx.CfnFileSystem.SelfManagedActiveDirectoryConfigurationProperty(
            dns_ips=["dnsIps"],
            domain_join_service_account_secret="domainJoinServiceAccountSecret",
            domain_name="domainName",
            file_system_administrators_group="fileSystemAdministratorsGroup",
            organizational_unit_distinguished_name="organizationalUnitDistinguishedName",
            password="password",
            user_name="userName"
        ),
        weekly_maintenance_start_time="weeklyMaintenanceStartTime"
    )
)
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.*;

CfnFileSystem cfnFileSystem = CfnFileSystem.Builder.create(this, "MyCfnFileSystem")
        .fileSystemType("fileSystemType")
        .subnetIds(List.of("subnetIds"))

        // the properties below are optional
        .backupId("backupId")
        .fileSystemTypeVersion("fileSystemTypeVersion")
        .kmsKeyId("kmsKeyId")
        .lustreConfiguration(LustreConfigurationProperty.builder()
                .autoImportPolicy("autoImportPolicy")
                .automaticBackupRetentionDays(123)
                .copyTagsToBackups(false)
                .dailyAutomaticBackupStartTime("dailyAutomaticBackupStartTime")
                .dataCompressionType("dataCompressionType")
                .dataReadCacheConfiguration(DataReadCacheConfigurationProperty.builder()
                        .sizeGiB(123)
                        .sizingMode("sizingMode")
                        .build())
                .deploymentType("deploymentType")
                .driveCacheType("driveCacheType")
                .efaEnabled(false)
                .exportPath("exportPath")
                .importedFileChunkSize(123)
                .importPath("importPath")
                .logConfiguration(LogConfigurationProperty.builder()
                        .level("level")

                        // the properties below are optional
                        .destination("destination")
                        .build())
                .metadataConfiguration(MetadataConfigurationProperty.builder()
                        .iops(123)
                        .mode("mode")
                        .build())
                .perUnitStorageThroughput(123)
                .throughputCapacity(123)
                .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                .build())
        .networkType("networkType")
        .ontapConfiguration(OntapConfigurationProperty.builder()
                .deploymentType("deploymentType")

                // the properties below are optional
                .automaticBackupRetentionDays(123)
                .dailyAutomaticBackupStartTime("dailyAutomaticBackupStartTime")
                .diskIopsConfiguration(DiskIopsConfigurationProperty.builder()
                        .iops(123)
                        .mode("mode")
                        .build())
                .endpointIpAddressRange("endpointIpAddressRange")
                .endpointIpv6AddressRange("endpointIpv6AddressRange")
                .fsxAdminPassword("fsxAdminPassword")
                .haPairs(123)
                .preferredSubnetId("preferredSubnetId")
                .routeTableIds(List.of("routeTableIds"))
                .throughputCapacity(123)
                .throughputCapacityPerHaPair(123)
                .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                .build())
        .openZfsConfiguration(OpenZFSConfigurationProperty.builder()
                .deploymentType("deploymentType")

                // the properties below are optional
                .automaticBackupRetentionDays(123)
                .copyTagsToBackups(false)
                .copyTagsToVolumes(false)
                .dailyAutomaticBackupStartTime("dailyAutomaticBackupStartTime")
                .diskIopsConfiguration(DiskIopsConfigurationProperty.builder()
                        .iops(123)
                        .mode("mode")
                        .build())
                .endpointIpAddressRange("endpointIpAddressRange")
                .endpointIpv6AddressRange("endpointIpv6AddressRange")
                .options(List.of("options"))
                .preferredSubnetId("preferredSubnetId")
                .readCacheConfiguration(ReadCacheConfigurationProperty.builder()
                        .sizeGiB(123)
                        .sizingMode("sizingMode")
                        .build())
                .rootVolumeConfiguration(RootVolumeConfigurationProperty.builder()
                        .copyTagsToSnapshots(false)
                        .dataCompressionType("dataCompressionType")
                        .nfsExports(List.of(NfsExportsProperty.builder()
                                .clientConfigurations(List.of(ClientConfigurationsProperty.builder()
                                        .clients("clients")
                                        .options(List.of("options"))
                                        .build()))
                                .build()))
                        .readOnly(false)
                        .recordSizeKiB(123)
                        .userAndGroupQuotas(List.of(UserAndGroupQuotasProperty.builder()
                                .id(123)
                                .storageCapacityQuotaGiB(123)
                                .type("type")
                                .build()))
                        .build())
                .routeTableIds(List.of("routeTableIds"))
                .throughputCapacity(123)
                .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                .build())
        .securityGroupIds(List.of("securityGroupIds"))
        .storageCapacity(123)
        .storageType("storageType")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .windowsConfiguration(WindowsConfigurationProperty.builder()
                .throughputCapacity(123)

                // the properties below are optional
                .activeDirectoryId("activeDirectoryId")
                .aliases(List.of("aliases"))
                .auditLogConfiguration(AuditLogConfigurationProperty.builder()
                        .fileAccessAuditLogLevel("fileAccessAuditLogLevel")
                        .fileShareAccessAuditLogLevel("fileShareAccessAuditLogLevel")

                        // the properties below are optional
                        .auditLogDestination("auditLogDestination")
                        .build())
                .automaticBackupRetentionDays(123)
                .copyTagsToBackups(false)
                .dailyAutomaticBackupStartTime("dailyAutomaticBackupStartTime")
                .deploymentType("deploymentType")
                .diskIopsConfiguration(DiskIopsConfigurationProperty.builder()
                        .iops(123)
                        .mode("mode")
                        .build())
                .fsrmConfiguration(FsrmConfigurationProperty.builder()
                        .fsrmServiceEnabled(false)

                        // the properties below are optional
                        .eventLogDestination("eventLogDestination")
                        .build())
                .preferredSubnetId("preferredSubnetId")
                .selfManagedActiveDirectoryConfiguration(SelfManagedActiveDirectoryConfigurationProperty.builder()
                        .dnsIps(List.of("dnsIps"))
                        .domainJoinServiceAccountSecret("domainJoinServiceAccountSecret")
                        .domainName("domainName")
                        .fileSystemAdministratorsGroup("fileSystemAdministratorsGroup")
                        .organizationalUnitDistinguishedName("organizationalUnitDistinguishedName")
                        .password("password")
                        .userName("userName")
                        .build())
                .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                .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.FSx;

var cfnFileSystem = new CfnFileSystem(this, "MyCfnFileSystem", new CfnFileSystemProps {
    FileSystemType = "fileSystemType",
    SubnetIds = new [] { "subnetIds" },

    // the properties below are optional
    BackupId = "backupId",
    FileSystemTypeVersion = "fileSystemTypeVersion",
    KmsKeyId = "kmsKeyId",
    LustreConfiguration = new LustreConfigurationProperty {
        AutoImportPolicy = "autoImportPolicy",
        AutomaticBackupRetentionDays = 123,
        CopyTagsToBackups = false,
        DailyAutomaticBackupStartTime = "dailyAutomaticBackupStartTime",
        DataCompressionType = "dataCompressionType",
        DataReadCacheConfiguration = new DataReadCacheConfigurationProperty {
            SizeGiB = 123,
            SizingMode = "sizingMode"
        },
        DeploymentType = "deploymentType",
        DriveCacheType = "driveCacheType",
        EfaEnabled = false,
        ExportPath = "exportPath",
        ImportedFileChunkSize = 123,
        ImportPath = "importPath",
        LogConfiguration = new LogConfigurationProperty {
            Level = "level",

            // the properties below are optional
            Destination = "destination"
        },
        MetadataConfiguration = new MetadataConfigurationProperty {
            Iops = 123,
            Mode = "mode"
        },
        PerUnitStorageThroughput = 123,
        ThroughputCapacity = 123,
        WeeklyMaintenanceStartTime = "weeklyMaintenanceStartTime"
    },
    NetworkType = "networkType",
    OntapConfiguration = new OntapConfigurationProperty {
        DeploymentType = "deploymentType",

        // the properties below are optional
        AutomaticBackupRetentionDays = 123,
        DailyAutomaticBackupStartTime = "dailyAutomaticBackupStartTime",
        DiskIopsConfiguration = new DiskIopsConfigurationProperty {
            Iops = 123,
            Mode = "mode"
        },
        EndpointIpAddressRange = "endpointIpAddressRange",
        EndpointIpv6AddressRange = "endpointIpv6AddressRange",
        FsxAdminPassword = "fsxAdminPassword",
        HaPairs = 123,
        PreferredSubnetId = "preferredSubnetId",
        RouteTableIds = new [] { "routeTableIds" },
        ThroughputCapacity = 123,
        ThroughputCapacityPerHaPair = 123,
        WeeklyMaintenanceStartTime = "weeklyMaintenanceStartTime"
    },
    OpenZfsConfiguration = new OpenZFSConfigurationProperty {
        DeploymentType = "deploymentType",

        // the properties below are optional
        AutomaticBackupRetentionDays = 123,
        CopyTagsToBackups = false,
        CopyTagsToVolumes = false,
        DailyAutomaticBackupStartTime = "dailyAutomaticBackupStartTime",
        DiskIopsConfiguration = new DiskIopsConfigurationProperty {
            Iops = 123,
            Mode = "mode"
        },
        EndpointIpAddressRange = "endpointIpAddressRange",
        EndpointIpv6AddressRange = "endpointIpv6AddressRange",
        Options = new [] { "options" },
        PreferredSubnetId = "preferredSubnetId",
        ReadCacheConfiguration = new ReadCacheConfigurationProperty {
            SizeGiB = 123,
            SizingMode = "sizingMode"
        },
        RootVolumeConfiguration = new RootVolumeConfigurationProperty {
            CopyTagsToSnapshots = false,
            DataCompressionType = "dataCompressionType",
            NfsExports = new [] { new NfsExportsProperty {
                ClientConfigurations = new [] { new ClientConfigurationsProperty {
                    Clients = "clients",
                    Options = new [] { "options" }
                } }
            } },
            ReadOnly = false,
            RecordSizeKiB = 123,
            UserAndGroupQuotas = new [] { new UserAndGroupQuotasProperty {
                Id = 123,
                StorageCapacityQuotaGiB = 123,
                Type = "type"
            } }
        },
        RouteTableIds = new [] { "routeTableIds" },
        ThroughputCapacity = 123,
        WeeklyMaintenanceStartTime = "weeklyMaintenanceStartTime"
    },
    SecurityGroupIds = new [] { "securityGroupIds" },
    StorageCapacity = 123,
    StorageType = "storageType",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    WindowsConfiguration = new WindowsConfigurationProperty {
        ThroughputCapacity = 123,

        // the properties below are optional
        ActiveDirectoryId = "activeDirectoryId",
        Aliases = new [] { "aliases" },
        AuditLogConfiguration = new AuditLogConfigurationProperty {
            FileAccessAuditLogLevel = "fileAccessAuditLogLevel",
            FileShareAccessAuditLogLevel = "fileShareAccessAuditLogLevel",

            // the properties below are optional
            AuditLogDestination = "auditLogDestination"
        },
        AutomaticBackupRetentionDays = 123,
        CopyTagsToBackups = false,
        DailyAutomaticBackupStartTime = "dailyAutomaticBackupStartTime",
        DeploymentType = "deploymentType",
        DiskIopsConfiguration = new DiskIopsConfigurationProperty {
            Iops = 123,
            Mode = "mode"
        },
        FsrmConfiguration = new FsrmConfigurationProperty {
            FsrmServiceEnabled = false,

            // the properties below are optional
            EventLogDestination = "eventLogDestination"
        },
        PreferredSubnetId = "preferredSubnetId",
        SelfManagedActiveDirectoryConfiguration = new SelfManagedActiveDirectoryConfigurationProperty {
            DnsIps = new [] { "dnsIps" },
            DomainJoinServiceAccountSecret = "domainJoinServiceAccountSecret",
            DomainName = "domainName",
            FileSystemAdministratorsGroup = "fileSystemAdministratorsGroup",
            OrganizationalUnitDistinguishedName = "organizationalUnitDistinguishedName",
            Password = "password",
            UserName = "userName"
        },
        WeeklyMaintenanceStartTime = "weeklyMaintenanceStartTime"
    }
});
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"

cfnFileSystem := awscdk.Aws_fsx.NewCfnFileSystem(this, jsii.String("MyCfnFileSystem"), &CfnFileSystemProps{
	FileSystemType: jsii.String("fileSystemType"),
	SubnetIds: []*string{
		jsii.String("subnetIds"),
	},

	// the properties below are optional
	BackupId: jsii.String("backupId"),
	FileSystemTypeVersion: jsii.String("fileSystemTypeVersion"),
	KmsKeyId: jsii.String("kmsKeyId"),
	LustreConfiguration: &LustreConfigurationProperty{
		AutoImportPolicy: jsii.String("autoImportPolicy"),
		AutomaticBackupRetentionDays: jsii.Number(123),
		CopyTagsToBackups: jsii.Boolean(false),
		DailyAutomaticBackupStartTime: jsii.String("dailyAutomaticBackupStartTime"),
		DataCompressionType: jsii.String("dataCompressionType"),
		DataReadCacheConfiguration: &DataReadCacheConfigurationProperty{
			SizeGiB: jsii.Number(123),
			SizingMode: jsii.String("sizingMode"),
		},
		DeploymentType: jsii.String("deploymentType"),
		DriveCacheType: jsii.String("driveCacheType"),
		EfaEnabled: jsii.Boolean(false),
		ExportPath: jsii.String("exportPath"),
		ImportedFileChunkSize: jsii.Number(123),
		ImportPath: jsii.String("importPath"),
		LogConfiguration: &LogConfigurationProperty{
			Level: jsii.String("level"),

			// the properties below are optional
			Destination: jsii.String("destination"),
		},
		MetadataConfiguration: &MetadataConfigurationProperty{
			Iops: jsii.Number(123),
			Mode: jsii.String("mode"),
		},
		PerUnitStorageThroughput: jsii.Number(123),
		ThroughputCapacity: jsii.Number(123),
		WeeklyMaintenanceStartTime: jsii.String("weeklyMaintenanceStartTime"),
	},
	NetworkType: jsii.String("networkType"),
	OntapConfiguration: &OntapConfigurationProperty{
		DeploymentType: jsii.String("deploymentType"),

		// the properties below are optional
		AutomaticBackupRetentionDays: jsii.Number(123),
		DailyAutomaticBackupStartTime: jsii.String("dailyAutomaticBackupStartTime"),
		DiskIopsConfiguration: &DiskIopsConfigurationProperty{
			Iops: jsii.Number(123),
			Mode: jsii.String("mode"),
		},
		EndpointIpAddressRange: jsii.String("endpointIpAddressRange"),
		EndpointIpv6AddressRange: jsii.String("endpointIpv6AddressRange"),
		FsxAdminPassword: jsii.String("fsxAdminPassword"),
		HaPairs: jsii.Number(123),
		PreferredSubnetId: jsii.String("preferredSubnetId"),
		RouteTableIds: []*string{
			jsii.String("routeTableIds"),
		},
		ThroughputCapacity: jsii.Number(123),
		ThroughputCapacityPerHaPair: jsii.Number(123),
		WeeklyMaintenanceStartTime: jsii.String("weeklyMaintenanceStartTime"),
	},
	OpenZfsConfiguration: &OpenZFSConfigurationProperty{
		DeploymentType: jsii.String("deploymentType"),

		// the properties below are optional
		AutomaticBackupRetentionDays: jsii.Number(123),
		CopyTagsToBackups: jsii.Boolean(false),
		CopyTagsToVolumes: jsii.Boolean(false),
		DailyAutomaticBackupStartTime: jsii.String("dailyAutomaticBackupStartTime"),
		DiskIopsConfiguration: &DiskIopsConfigurationProperty{
			Iops: jsii.Number(123),
			Mode: jsii.String("mode"),
		},
		EndpointIpAddressRange: jsii.String("endpointIpAddressRange"),
		EndpointIpv6AddressRange: jsii.String("endpointIpv6AddressRange"),
		Options: []*string{
			jsii.String("options"),
		},
		PreferredSubnetId: jsii.String("preferredSubnetId"),
		ReadCacheConfiguration: &ReadCacheConfigurationProperty{
			SizeGiB: jsii.Number(123),
			SizingMode: jsii.String("sizingMode"),
		},
		RootVolumeConfiguration: &RootVolumeConfigurationProperty{
			CopyTagsToSnapshots: jsii.Boolean(false),
			DataCompressionType: jsii.String("dataCompressionType"),
			NfsExports: []interface{}{
				&NfsExportsProperty{
					ClientConfigurations: []interface{}{
						&ClientConfigurationsProperty{
							Clients: jsii.String("clients"),
							Options: []*string{
								jsii.String("options"),
							},
						},
					},
				},
			},
			ReadOnly: jsii.Boolean(false),
			RecordSizeKiB: jsii.Number(123),
			UserAndGroupQuotas: []interface{}{
				&UserAndGroupQuotasProperty{
					Id: jsii.Number(123),
					StorageCapacityQuotaGiB: jsii.Number(123),
					Type: jsii.String("type"),
				},
			},
		},
		RouteTableIds: []*string{
			jsii.String("routeTableIds"),
		},
		ThroughputCapacity: jsii.Number(123),
		WeeklyMaintenanceStartTime: jsii.String("weeklyMaintenanceStartTime"),
	},
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	StorageCapacity: jsii.Number(123),
	StorageType: jsii.String("storageType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	WindowsConfiguration: &WindowsConfigurationProperty{
		ThroughputCapacity: jsii.Number(123),

		// the properties below are optional
		ActiveDirectoryId: jsii.String("activeDirectoryId"),
		Aliases: []*string{
			jsii.String("aliases"),
		},
		AuditLogConfiguration: &AuditLogConfigurationProperty{
			FileAccessAuditLogLevel: jsii.String("fileAccessAuditLogLevel"),
			FileShareAccessAuditLogLevel: jsii.String("fileShareAccessAuditLogLevel"),

			// the properties below are optional
			AuditLogDestination: jsii.String("auditLogDestination"),
		},
		AutomaticBackupRetentionDays: jsii.Number(123),
		CopyTagsToBackups: jsii.Boolean(false),
		DailyAutomaticBackupStartTime: jsii.String("dailyAutomaticBackupStartTime"),
		DeploymentType: jsii.String("deploymentType"),
		DiskIopsConfiguration: &DiskIopsConfigurationProperty{
			Iops: jsii.Number(123),
			Mode: jsii.String("mode"),
		},
		FsrmConfiguration: &FsrmConfigurationProperty{
			FsrmServiceEnabled: jsii.Boolean(false),

			// the properties below are optional
			EventLogDestination: jsii.String("eventLogDestination"),
		},
		PreferredSubnetId: jsii.String("preferredSubnetId"),
		SelfManagedActiveDirectoryConfiguration: &SelfManagedActiveDirectoryConfigurationProperty{
			DnsIps: []*string{
				jsii.String("dnsIps"),
			},
			DomainJoinServiceAccountSecret: jsii.String("domainJoinServiceAccountSecret"),
			DomainName: jsii.String("domainName"),
			FileSystemAdministratorsGroup: jsii.String("fileSystemAdministratorsGroup"),
			OrganizationalUnitDistinguishedName: jsii.String("organizationalUnitDistinguishedName"),
			Password: jsii.String("password"),
			UserName: jsii.String("userName"),
		},
		WeeklyMaintenanceStartTime: jsii.String("weeklyMaintenanceStartTime"),
	},
})

Initializer ​

ts
new CfnFileSystem(scope: Construct, id: string, props: CfnFileSystemProps)
python
CfnFileSystem(scope: Construct, id: str, props: CfnFileSystemProps)
java
new CfnFileSystem(Construct scope, String id, CfnFileSystemProps props)
csharp
new CfnFileSystem(Construct scope, string id, CfnFileSystemProps props)
go
NewCfnFileSystem(Scope Construct, Id *string, Props CfnFileSystemProps)

Construct Props ​

backupIdoptionalstringbackup_idoptionalstrbackupIdoptionalStringBackupIdoptionalstringBackupIdoptional*string#
The ID of the file system backup that you are using to create a file system.

For more information, see CreateFileSystemFromBackup .

fileSystemTypestringfile_system_typestrfileSystemTypeStringFileSystemTypestringFileSystemType*stringrequired#
The type of Amazon FSx file system, which can be `LUSTRE` , `WINDOWS` , `ONTAP` , or `OPENZFS` .
fileSystemTypeVersionoptionalstringfile_system_type_versionoptionalstrfileSystemTypeVersionoptionalStringFileSystemTypeVersionoptionalstringFileSystemTypeVersionoptional*string#
For FSx for Lustre file systems, sets the Lustre version for the file system that you're creating.
notes

Valid values are 2.10 , 2.12 , and 2.15 :

  • 2.10 is supported by the Scratch and Persistent_1 Lustre deployment types.
  • 2.12 is supported by all Lustre deployment types, except for PERSISTENT_2 with a metadata configuration mode.
  • 2.15 is supported by all Lustre deployment types and is recommended for all new file systems.

Default value is 2.10 , except for the following deployments:

  • Default value is 2.12 when DeploymentType is set to PERSISTENT_2 without a metadata configuration mode.
  • Default value is 2.15 when DeploymentType is set to PERSISTENT_2 with a metadata configuration mode.
kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string#
The ID of the AWS Key Management Service ( AWS ) key used to encrypt Amazon FSx file system data.
notes

Used as follows with Amazon FSx file system types:

  • Amazon FSx for Lustre PERSISTENT_1 and PERSISTENT_2 deployment types only.

SCRATCH_1 and SCRATCH_2 types are encrypted using the Amazon FSx service AWS key for your account.

  • Amazon FSx for NetApp ONTAP
  • Amazon FSx for OpenZFS
  • Amazon FSx for Windows File Server

If this ID isn't specified, the Amazon FSx-managed key for your account is used. For more information, see Encrypt in the AWS Key Management Service API Reference .

lustreConfigurationoptionalIResolvable | CfnFileSystem.LustreConfigurationPropertylustre_configurationoptionaltyping.Union[IResolvable, LustreConfigurationProperty]lustreConfigurationoptionalIResolvableLustreConfigurationoptionalIResolvableLustreConfigurationoptionalinterface{}#
The Lustre configuration for the file system being created.
notes

This configuration is required if the FileSystemType is set to LUSTRE .

The following parameters are not supported when creating Lustre file systems with a data repository association.

  • AutoImportPolicy
  • ExportPath
  • ImportedChunkSize
  • ImportPath
networkTypeoptionalstringnetwork_typeoptionalstrnetworkTypeoptionalStringNetworkTypeoptionalstringNetworkTypeoptional*string#
The network type of the file system.
ontapConfigurationoptionalIResolvable | CfnFileSystem.OntapConfigurationPropertyontap_configurationoptionaltyping.Union[IResolvable, OntapConfigurationProperty]ontapConfigurationoptionalIResolvableOntapConfigurationoptionalIResolvableOntapConfigurationoptionalinterface{}#
The ONTAP configuration properties of the FSx for ONTAP file system that you are creating.

This configuration is required if the FileSystemType is set to ONTAP .

openZfsConfigurationoptionalIResolvable | CfnFileSystem.OpenZFSConfigurationPropertyopen_zfs_configurationoptionaltyping.Union[IResolvable, OpenZFSConfigurationProperty]openZfsConfigurationoptionalIResolvableOpenZfsConfigurationoptionalIResolvableOpenZfsConfigurationoptionalinterface{}#
The Amazon FSx for OpenZFS configuration properties for the file system that you are creating.

This configuration is required if the FileSystemType is set to OPENZFS .

securityGroupIdsoptionalstring[]security_group_idsoptionaltyping.List[str]securityGroupIdsoptionalList<String>SecurityGroupIdsoptionalstring[]SecurityGroupIdsoptional*[]*string#
A list of IDs specifying the security groups to apply to all network interfaces created for file system access.

This list isn't returned in later requests to describe the file system.

You must specify a security group if you are creating a Multi-AZ FSx for ONTAP file system in a VPC subnet that has been shared with you.

storageCapacityoptionalnumberstorage_capacityoptionalint | floatstorageCapacityoptionalNumberStorageCapacityoptionaldoubleStorageCapacityoptional*float64#
Sets the storage capacity of the file system that you're creating.
notes

StorageCapacity is required if you are creating a new file system. It is not required if you are creating a file system by restoring a backup.

FSx for Lustre file systems - The amount of storage capacity that you can configure depends on the value that you set for StorageType and the Lustre DeploymentType , as follows:

  • For SCRATCH_2 , PERSISTENT_2 and PERSISTENT_1 deployment types using SSD storage type, the valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB.
  • For PERSISTENT_1 HDD file systems, valid values are increments of 6000 GiB for 12 MB/s/TiB file systems and increments of 1800 GiB for 40 MB/s/TiB file systems.
  • For SCRATCH_1 deployment type, valid values are 1200 GiB, 2400 GiB, and increments of 3600 GiB.

FSx for ONTAP file systems - The amount of SSD storage capacity that you can configure depends on the value of the HAPairs property. The minimum value is calculated as 1,024 GiB * HAPairs and the maximum is calculated as 524,288 GiB * HAPairs, up to a maximum amount of SSD storage capacity of 1,048,576 GiB (1 pebibyte).

FSx for OpenZFS file systems - The amount of storage capacity that you can configure is from 64 GiB up to 524,288 GiB (512 TiB). If you are creating a file system from a backup, you can specify a storage capacity equal to or greater than the original file system's storage capacity.

FSx for Windows File Server file systems - The amount of storage capacity that you can configure depends on the value that you set for StorageType as follows:

  • For SSD storage, valid values are 32 GiB-65,536 GiB (64 TiB).
  • For HDD storage, valid values are 2000 GiB-65,536 GiB (64 TiB).
storageTypeoptionalstringstorage_typeoptionalstrstorageTypeoptionalStringStorageTypeoptionalstringStorageTypeoptional*string#
Sets the storage class for the file system that you're creating.
notes

Valid values are SSD , HDD , and INTELLIGENT_TIERING .

  • Set to SSD to use solid state drive storage. SSD is supported on all Windows, Lustre, ONTAP, and OpenZFS deployment types.
  • Set to HDD to use hard disk drive storage, which is supported on SINGLE_AZ_2 and MULTI_AZ_1 Windows file system deployment types, and on PERSISTENT_1 Lustre file system deployment types.
  • Set to INTELLIGENT_TIERING to use fully elastic, intelligently-tiered storage. Intelligent-Tiering is only available for OpenZFS file systems with the Multi-AZ deployment type and for Lustre file systems with the Persistent_2 deployment type.

Default value is SSD . For more information, see Storage type options in the FSx for Windows File Server User Guide , FSx for Lustre storage classes in the FSx for Lustre User Guide , and Working with Intelligent-Tiering in the Amazon FSx for OpenZFS User Guide .

subnetIdsstring[]subnet_idstyping.List[str]subnetIdsList<String>SubnetIdsstring[]SubnetIds*[]*stringrequired#
Specifies the IDs of the subnets that the file system will be accessible from.
notes

For Windows and ONTAP MULTI_AZ_1 deployment types,provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the WindowsConfiguration > PreferredSubnetID or OntapConfiguration > PreferredSubnetID properties. For more information about Multi-AZ file system configuration, see Availability and durability: Single-AZ and Multi-AZ file systems in the Amazon FSx for Windows User Guide and Availability and durability in the Amazon FSx for ONTAP User Guide .

For Windows SINGLE_AZ_1 and SINGLE_AZ_2 and all Lustre deployment types, provide exactly one subnet ID. The file server is launched in that subnet's Availability Zone.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
The tags to associate with the file system.

For more information, see Tagging your Amazon FSx resources in the Amazon FSx for Lustre User Guide .

windowsConfigurationoptionalIResolvable | CfnFileSystem.WindowsConfigurationPropertywindows_configurationoptionaltyping.Union[IResolvable, WindowsConfigurationProperty]windowsConfigurationoptionalIResolvableWindowsConfigurationoptionalIResolvableWindowsConfigurationoptionalinterface{}#
The configuration object for the Microsoft Windows file system you are creating.

This configuration is required if FileSystemType is set to WINDOWS .

Properties ​

attrDnsNamestringattr_dns_namestrattrDnsNameStringAttrDnsNamestringAttrDnsName*stringrequired#
Returns the FSx for Windows file system's DNSName.

Example: amznfsxp1honlek.corp.example.com

attrIdstringattr_idstrattrIdStringAttrIdstringAttrId*stringrequired#
attrLustreMountNamestringattr_lustre_mount_namestrattrLustreMountNameStringAttrLustreMountNamestringAttrLustreMountName*stringrequired#
Returns the Lustre file system's `LustreMountName` .

Example for SCRATCH_1 deployment types: This value is always fsx .

Example for SCRATCH_2 and PERSISTENT deployment types: 2p3fhbmv

attrResourceArnstringattr_resource_arnstrattrResourceArnStringAttrResourceArnstringAttrResourceArn*stringrequired#
Returns the Amazon Resource Name (ARN) for the Amazon FSx file system.

Example: arn:aws:fsx:us-east-2:111122223333:file-system/fs-0123abcd56789ef0a

attrRootVolumeIdstringattr_root_volume_idstrattrRootVolumeIdStringAttrRootVolumeIdstringAttrRootVolumeId*stringrequired#
Returns the root volume ID of the FSx for OpenZFS file system.

Example: fsvol-0123456789abcdefa

backupIdmay be undefinedstringbackup_idmay be undefinedstrbackupIdmay be undefinedStringBackupIdmay be undefinedstringBackupIdmay be undefined*string#
The ID of the file system backup that you are using to create a file system.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringrequiredstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*stringrequired#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#
fileSystemRefFileSystemReferencefile_system_refFileSystemReferencefileSystemRefFileSystemReferenceFileSystemRefFileSystemReferenceFileSystemRefFileSystemReferencerequired#
A reference to a FileSystem resource.
fileSystemTypestringfile_system_typestrfileSystemTypeStringFileSystemTypestringFileSystemType*stringrequired#
The type of Amazon FSx file system, which can be `LUSTRE` , `WINDOWS` , `ONTAP` , or `OPENZFS` .
fileSystemTypeVersionmay be undefinedstringfile_system_type_versionmay be undefinedstrfileSystemTypeVersionmay be undefinedStringFileSystemTypeVersionmay be undefinedstringFileSystemTypeVersionmay be undefined*string#
For FSx for Lustre file systems, sets the Lustre version for the file system that you're creating.
kmsKeyIdmay be undefinedstringkms_key_idmay be undefinedstrkmsKeyIdmay be undefinedStringKmsKeyIdmay be undefinedstringKmsKeyIdmay be undefined*string#
The ID of the AWS Key Management Service ( AWS ) key used to encrypt Amazon FSx file system data.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*stringrequired#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

lustreConfigurationmay be undefinedIResolvable | CfnFileSystem.LustreConfigurationPropertylustre_configurationmay be undefinedtyping.Union[IResolvable, LustreConfigurationProperty]lustreConfigurationmay be undefinedIResolvableLustreConfigurationmay be undefinedIResolvableLustreConfigurationmay be undefinedinterface{}#
The Lustre configuration for the file system being created.
networkTypemay be undefinedstringnetwork_typemay be undefinedstrnetworkTypemay be undefinedStringNetworkTypemay be undefinedstringNetworkTypemay be undefined*string#
The network type of the file system.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
ontapConfigurationmay be undefinedIResolvable | CfnFileSystem.OntapConfigurationPropertyontap_configurationmay be undefinedtyping.Union[IResolvable, OntapConfigurationProperty]ontapConfigurationmay be undefinedIResolvableOntapConfigurationmay be undefinedIResolvableOntapConfigurationmay be undefinedinterface{}#
The ONTAP configuration properties of the FSx for ONTAP file system that you are creating.
openZfsConfigurationmay be undefinedIResolvable | CfnFileSystem.OpenZFSConfigurationPropertyopen_zfs_configurationmay be undefinedtyping.Union[IResolvable, OpenZFSConfigurationProperty]openZfsConfigurationmay be undefinedIResolvableOpenZfsConfigurationmay be undefinedIResolvableOpenZfsConfigurationmay be undefinedinterface{}#
The Amazon FSx for OpenZFS configuration properties for the file system that you are creating.
refstringrefstrrefStringRefstringRef*stringrequired#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

securityGroupIdsmay be undefinedstring[]security_group_idsmay be undefinedtyping.List[str]securityGroupIdsmay be undefinedList<String>SecurityGroupIdsmay be undefinedstring[]SecurityGroupIdsmay be undefined*[]*string#
A list of IDs specifying the security groups to apply to all network interfaces created for file system access.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

storageCapacitymay be undefinednumberstorage_capacitymay be undefinedint | floatstorageCapacitymay be undefinedNumberStorageCapacitymay be undefineddoubleStorageCapacitymay be undefined*float64#
Sets the storage capacity of the file system that you're creating.
storageTypemay be undefinedstringstorage_typemay be undefinedstrstorageTypemay be undefinedStringStorageTypemay be undefinedstringStorageTypemay be undefined*string#
Sets the storage class for the file system that you're creating.
subnetIdsstring[]subnet_idstyping.List[str]subnetIdsList<String>SubnetIdsstring[]SubnetIds*[]*stringrequired#
Specifies the IDs of the subnets that the file system will be accessible from.
Tag Manager which manages the tags for this resource.
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#
The tags to associate with the file system.
windowsConfigurationmay be undefinedIResolvable | CfnFileSystem.WindowsConfigurationPropertywindows_configurationmay be undefinedtyping.Union[IResolvable, WindowsConfigurationProperty]windowsConfigurationmay be undefinedIResolvableWindowsConfigurationmay be undefinedIResolvableWindowsConfigurationmay be undefinedinterface{}#
The configuration object for the Microsoft Windows file system you are creating.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnFileSystem(x: any): boolean@staticmethod def is_cfn_file_system(x: Any) -> boolpublic static Boolean isCfnFileSystem(Object x)public static bool IsCfnFileSystem(object x)func IsCfnFileSystem(X interface{}) *boolstatic#
Checks whether the given object is a CfnFileSystem.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.