Class CfnFileSystem

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-10-31T19:12:58.722Z") @Stability(Stable) public class CfnFileSystem extends CfnResource implements IInspectable, ITaggable
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:

 // 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")
                 .deploymentType("deploymentType")
                 .driveCacheType("driveCacheType")
                 .exportPath("exportPath")
                 .importedFileChunkSize(123)
                 .importPath("importPath")
                 .metadataConfiguration(MetadataConfigurationProperty.builder()
                         .iops(123)
                         .mode("mode")
                         .build())
                 .perUnitStorageThroughput(123)
                 .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                 .build())
         .ontapConfiguration(OntapConfigurationProperty.builder()
                 .deploymentType("deploymentType")
                 // the properties below are optional
                 .automaticBackupRetentionDays(123)
                 .dailyAutomaticBackupStartTime("dailyAutomaticBackupStartTime")
                 .diskIopsConfiguration(DiskIopsConfigurationProperty.builder()
                         .iops(123)
                         .mode("mode")
                         .build())
                 .endpointIpAddressRange("endpointIpAddressRange")
                 .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")
                 .options(List.of("options"))
                 .preferredSubnetId("preferredSubnetId")
                 .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())
                 .preferredSubnetId("preferredSubnetId")
                 .selfManagedActiveDirectoryConfiguration(SelfManagedActiveDirectoryConfigurationProperty.builder()
                         .dnsIps(List.of("dnsIps"))
                         .domainName("domainName")
                         .fileSystemAdministratorsGroup("fileSystemAdministratorsGroup")
                         .organizationalUnitDistinguishedName("organizationalUnitDistinguishedName")
                         .password("password")
                         .userName("userName")
                         .build())
                 .weeklyMaintenanceStartTime("weeklyMaintenanceStartTime")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFileSystem

      protected CfnFileSystem(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFileSystem

      protected CfnFileSystem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFileSystem

      @Stability(Stable) public CfnFileSystem(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFileSystemProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrDnsName

      @Stability(Stable) @NotNull public String getAttrDnsName()
      Returns the FSx for Windows file system's DNSName.

      Example: amznfsxp1honlek.corp.example.com

    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getAttrLustreMountName

      @Stability(Stable) @NotNull public String getAttrLustreMountName()
      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

    • getAttrResourceArn

      @Stability(Stable) @NotNull public String getAttrResourceArn()
      Returns the Amazon Resource Name (ARN) for the Amazon FSx file system.

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

    • getAttrRootVolumeId

      @Stability(Stable) @NotNull public String getAttrRootVolumeId()
      Returns the root volume ID of the FSx for OpenZFS file system.

      Example: fsvol-0123456789abcdefa

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getFileSystemType

      @Stability(Stable) @NotNull public String getFileSystemType()
      The type of Amazon FSx file system, which can be LUSTRE , WINDOWS , ONTAP , or OPENZFS .
    • setFileSystemType

      @Stability(Stable) public void setFileSystemType(@NotNull String value)
      The type of Amazon FSx file system, which can be LUSTRE , WINDOWS , ONTAP , or OPENZFS .
    • getSubnetIds

      @Stability(Stable) @NotNull public List<String> getSubnetIds()
      Specifies the IDs of the subnets that the file system will be accessible from.
    • setSubnetIds

      @Stability(Stable) public void setSubnetIds(@NotNull List<String> value)
      Specifies the IDs of the subnets that the file system will be accessible from.
    • getBackupId

      @Stability(Stable) @Nullable public String getBackupId()
      The ID of the file system backup that you are using to create a file system.
    • setBackupId

      @Stability(Stable) public void setBackupId(@Nullable String value)
      The ID of the file system backup that you are using to create a file system.
    • getFileSystemTypeVersion

      @Stability(Stable) @Nullable public String getFileSystemTypeVersion()
      For FSx for Lustre file systems, sets the Lustre version for the file system that you're creating.
    • setFileSystemTypeVersion

      @Stability(Stable) public void setFileSystemTypeVersion(@Nullable String value)
      For FSx for Lustre file systems, sets the Lustre version for the file system that you're creating.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The ID of the AWS Key Management Service ( AWS KMS ) key used to encrypt Amazon FSx file system data.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The ID of the AWS Key Management Service ( AWS KMS ) key used to encrypt Amazon FSx file system data.
    • getLustreConfiguration

      @Stability(Stable) @Nullable public Object getLustreConfiguration()
      The Lustre configuration for the file system being created.
    • setLustreConfiguration

      @Stability(Stable) public void setLustreConfiguration(@Nullable IResolvable value)
      The Lustre configuration for the file system being created.
    • setLustreConfiguration

      @Stability(Stable) public void setLustreConfiguration(@Nullable CfnFileSystem.LustreConfigurationProperty value)
      The Lustre configuration for the file system being created.
    • getOntapConfiguration

      @Stability(Stable) @Nullable public Object getOntapConfiguration()
      The ONTAP configuration properties of the FSx for ONTAP file system that you are creating.
    • setOntapConfiguration

      @Stability(Stable) public void setOntapConfiguration(@Nullable IResolvable value)
      The ONTAP configuration properties of the FSx for ONTAP file system that you are creating.
    • setOntapConfiguration

      @Stability(Stable) public void setOntapConfiguration(@Nullable CfnFileSystem.OntapConfigurationProperty value)
      The ONTAP configuration properties of the FSx for ONTAP file system that you are creating.
    • getOpenZfsConfiguration

      @Stability(Stable) @Nullable public Object getOpenZfsConfiguration()
      The Amazon FSx for OpenZFS configuration properties for the file system that you are creating.
    • setOpenZfsConfiguration

      @Stability(Stable) public void setOpenZfsConfiguration(@Nullable IResolvable value)
      The Amazon FSx for OpenZFS configuration properties for the file system that you are creating.
    • setOpenZfsConfiguration

      @Stability(Stable) public void setOpenZfsConfiguration(@Nullable CfnFileSystem.OpenZFSConfigurationProperty value)
      The Amazon FSx for OpenZFS configuration properties for the file system that you are creating.
    • getSecurityGroupIds

      @Stability(Stable) @Nullable public List<String> getSecurityGroupIds()
      A list of IDs specifying the security groups to apply to all network interfaces created for file system access.
    • setSecurityGroupIds

      @Stability(Stable) public void setSecurityGroupIds(@Nullable List<String> value)
      A list of IDs specifying the security groups to apply to all network interfaces created for file system access.
    • getStorageCapacity

      @Stability(Stable) @Nullable public Number getStorageCapacity()
      Sets the storage capacity of the file system that you're creating.
    • setStorageCapacity

      @Stability(Stable) public void setStorageCapacity(@Nullable Number value)
      Sets the storage capacity of the file system that you're creating.
    • getStorageType

      @Stability(Stable) @Nullable public String getStorageType()
      Sets the storage type for the file system that you're creating.

      Valid values are SSD and HDD .

    • setStorageType

      @Stability(Stable) public void setStorageType(@Nullable String value)
      Sets the storage type for the file system that you're creating.

      Valid values are SSD and HDD .

    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to associate with the file system.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to associate with the file system.
    • getWindowsConfiguration

      @Stability(Stable) @Nullable public Object getWindowsConfiguration()
      The configuration object for the Microsoft Windows file system you are creating.
    • setWindowsConfiguration

      @Stability(Stable) public void setWindowsConfiguration(@Nullable IResolvable value)
      The configuration object for the Microsoft Windows file system you are creating.
    • setWindowsConfiguration

      @Stability(Stable) public void setWindowsConfiguration(@Nullable CfnFileSystem.WindowsConfigurationProperty value)
      The configuration object for the Microsoft Windows file system you are creating.