Class CfnFileCache

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

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:52.582Z") @Stability(Stable) public class CfnFileCache extends CfnResource implements IInspectable, IFileCacheRef, ITaggableV2
Resource Type definition for AWS::FSx::FileCache.

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.*;
 CfnFileCache cfnFileCache = CfnFileCache.Builder.create(this, "MyCfnFileCache")
         .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();
 

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

    • CfnFileCache

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

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

      @Stability(Stable) public CfnFileCache(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFileCacheProps props)
      Create a new AWS::FSx::FileCache.

      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

    • arnForFileCache

      @Stability(Stable) @NotNull public static String arnForFileCache(@NotNull IFileCacheRef resource)
      Parameters:
      resource - This parameter is required.
    • fromFileCacheId

      @Stability(Stable) @NotNull public static IFileCacheRef fromFileCacheId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String fileCacheId)
      Creates a new IFileCacheRef from a fileCacheId.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      fileCacheId - This parameter is required.
    • isCfnFileCache

      @Stability(Stable) @NotNull public static Boolean isCfnFileCache(@NotNull Object x)
      Checks whether the given object is a CfnFileCache.

      Parameters:
      x - This parameter is required.
    • 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.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The time the cache was created.
    • getAttrDataRepositoryAssociationIds

      @Stability(Stable) @NotNull public List<String> getAttrDataRepositoryAssociationIds()
      A list of IDs of data repository associations that are associated with this cache.
    • getAttrDnsName

      @Stability(Stable) @NotNull public String getAttrDnsName()
      The DNS name for the cache.
    • getAttrFileCacheId

      @Stability(Stable) @NotNull public String getAttrFileCacheId()
      The ID of the file cache.
    • getAttrLifecycle

      @Stability(Stable) @NotNull public String getAttrLifecycle()
      The lifecycle status of the cache.
    • getAttrLustreConfigurationLogConfiguration

      @Stability(Stable) @NotNull public IResolvable getAttrLustreConfigurationLogConfiguration()
    • getAttrLustreConfigurationMountName

      @Stability(Stable) @NotNull public String getAttrLustreConfigurationMountName()
    • getAttrNetworkInterfaceIds

      @Stability(Stable) @NotNull public List<String> getAttrNetworkInterfaceIds()
      Network interface IDs for the cache.
    • getAttrOwnerId

      @Stability(Stable) @NotNull public String getAttrOwnerId()
      The AWS account ID of the cache owner.
    • getAttrResourceArn

      @Stability(Stable) @NotNull public String getAttrResourceArn()
      The Amazon Resource Name (ARN) of the file cache.
    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The VPC ID of the cache.
    • getCdkTagManager

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

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

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getFileCacheRef

      @Stability(Stable) @NotNull public FileCacheReference getFileCacheRef()
      A reference to a FileCache resource.
      Specified by:
      getFileCacheRef in interface IFileCacheRef
    • getFileCacheType

      @Stability(Stable) @NotNull public String getFileCacheType()
      The type of cache, which must be LUSTRE.
    • setFileCacheType

      @Stability(Stable) public void setFileCacheType(@NotNull String value)
      The type of cache, which must be LUSTRE.
    • getFileCacheTypeVersion

      @Stability(Stable) @NotNull public String getFileCacheTypeVersion()
      The Lustre version of the cache, which must be 2.12.
    • setFileCacheTypeVersion

      @Stability(Stable) public void setFileCacheTypeVersion(@NotNull String value)
      The Lustre version of the cache, which must be 2.12.
    • getStorageCapacity

      @Stability(Stable) @NotNull public Number getStorageCapacity()
      The storage capacity of the cache in gibibytes (GiB).
    • setStorageCapacity

      @Stability(Stable) public void setStorageCapacity(@NotNull Number value)
      The storage capacity of the cache in gibibytes (GiB).
    • getSubnetIds

      @Stability(Stable) @NotNull public List<String> getSubnetIds()
      A list of subnet IDs for the cache.
    • setSubnetIds

      @Stability(Stable) public void setSubnetIds(@NotNull List<String> value)
      A list of subnet IDs for the cache.
    • getCopyTagsToDataRepositoryAssociations

      @Stability(Stable) @Nullable public Object getCopyTagsToDataRepositoryAssociations()
      Whether tags should be copied to data repository associations.

      Returns union: either Boolean or IResolvable

    • setCopyTagsToDataRepositoryAssociations

      @Stability(Stable) public void setCopyTagsToDataRepositoryAssociations(@Nullable Boolean value)
      Whether tags should be copied to data repository associations.
    • setCopyTagsToDataRepositoryAssociations

      @Stability(Stable) public void setCopyTagsToDataRepositoryAssociations(@Nullable IResolvable value)
      Whether tags should be copied to data repository associations.
    • getDataRepositoryAssociations

      @Stability(Stable) @Nullable public Object getDataRepositoryAssociations()
      Data repository associations for the cache.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnFileCache.DataRepositoryAssociationProperty>

    • setDataRepositoryAssociations

      @Stability(Stable) public void setDataRepositoryAssociations(@Nullable IResolvable value)
      Data repository associations for the cache.
    • setDataRepositoryAssociations

      @Stability(Stable) public void setDataRepositoryAssociations(@Nullable List<Object> value)
      Data repository associations for the cache.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The KMS key ID for encrypting data.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The KMS key ID for encrypting data.
    • getLustreConfiguration

      @Stability(Stable) @Nullable public Object getLustreConfiguration()
    • setLustreConfiguration

      @Stability(Stable) public void setLustreConfiguration(@Nullable IResolvable value)
    • setLustreConfiguration

      @Stability(Stable) public void setLustreConfiguration(@Nullable CfnFileCache.LustreConfigurationProperty value)
    • getSecurityGroupIds

      @Stability(Stable) @Nullable public List<String> getSecurityGroupIds()
      A list of security group IDs for the cache.
    • setSecurityGroupIds

      @Stability(Stable) public void setSecurityGroupIds(@Nullable List<String> value)
      A list of security group IDs for the cache.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to associate with the file cache.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to associate with the file cache.