Class FileSystem


  • public class FileSystem
    extends com.pulumi.resources.CustomResource
    Provides an Elastic File System (EFS) File System resource. ## Example Usage ### EFS File System w/ tags
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.efs.FileSystem;
     import com.pulumi.aws.efs.FileSystemArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new FileSystem("example", FileSystemArgs.builder()
                 .creationToken("my-product")
                 .tags(Map.of("Name", "MyProduct"))
                 .build());
     
         }
     }
     
     
    ### Using lifecycle policy
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.efs.FileSystem;
     import com.pulumi.aws.efs.FileSystemArgs;
     import com.pulumi.aws.efs.inputs.FileSystemLifecyclePolicyArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var fooWithLifecylePolicy = new FileSystem("fooWithLifecylePolicy", FileSystemArgs.builder()
                 .lifecyclePolicies(FileSystemLifecyclePolicyArgs.builder()
                     .transitionToIa("AFTER_30_DAYS")
                     .build())
                 .creationToken("my-product")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `id` (String) ID of the file system. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import the EFS file systems using the `id`. For example: ```sh $ pulumi import aws:efs/fileSystem:FileSystem example fs-6fa144c6 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> availabilityZoneId()  
      com.pulumi.core.Output<java.lang.String> availabilityZoneName()  
      com.pulumi.core.Output<java.lang.String> creationToken()  
      com.pulumi.core.Output<java.lang.String> dnsName()  
      com.pulumi.core.Output<java.lang.Boolean> encrypted()  
      static FileSystem get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FileSystemState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> kmsKeyId()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<FileSystemLifecyclePolicy>>> lifecyclePolicies()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.Integer> numberOfMountTargets()  
      com.pulumi.core.Output<java.lang.String> ownerId()  
      com.pulumi.core.Output<java.lang.String> performanceMode()  
      com.pulumi.core.Output<FileSystemProtection> protection()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Double>> provisionedThroughputInMibps()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.List<FileSystemSizeInByte>> sizeInBytes()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> throughputMode()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileSystem

        public FileSystem​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • FileSystem

        public FileSystem​(java.lang.String name,
                          @Nullable
                          FileSystemArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • FileSystem

        public FileSystem​(java.lang.String name,
                          @Nullable
                          FileSystemArgs args,
                          @Nullable
                          com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the file system.
      • availabilityZoneId

        public com.pulumi.core.Output<java.lang.String> availabilityZoneId()
        Returns:
        The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
      • availabilityZoneName

        public com.pulumi.core.Output<java.lang.String> availabilityZoneName()
        Returns:
        the AWS Availability Zone in which to create the file system. Used to create a file system that uses One Zone storage classes. See [user guide](https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html) for more information.
      • creationToken

        public com.pulumi.core.Output<java.lang.String> creationToken()
        Returns:
        A unique name (a maximum of 64 characters are allowed) used as reference when creating the Elastic File System to ensure idempotent file system creation. By default generated by this provider. See [Elastic File System] user guide for more information.
      • dnsName

        public com.pulumi.core.Output<java.lang.String> dnsName()
        Returns:
        The DNS name for the filesystem per [documented convention](http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html).
      • encrypted

        public com.pulumi.core.Output<java.lang.Boolean> encrypted()
        Returns:
        If true, the disk will be encrypted.
      • kmsKeyId

        public com.pulumi.core.Output<java.lang.String> kmsKeyId()
        Returns:
        The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
      • lifecyclePolicies

        public com.pulumi.core.Output<java.util.Optional<java.util.List<FileSystemLifecyclePolicy>>> lifecyclePolicies()
        Returns:
        A file system [lifecycle policy](https://docs.aws.amazon.com/efs/latest/ug/API_LifecyclePolicy.html) object. See `lifecyclePolicy` block below for details.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The value of the file system's `Name` tag.
      • numberOfMountTargets

        public com.pulumi.core.Output<java.lang.Integer> numberOfMountTargets()
        Returns:
        The current number of mount targets that the file system has.
      • ownerId

        public com.pulumi.core.Output<java.lang.String> ownerId()
        Returns:
        The AWS account that created the file system. If the file system was createdby an IAM user, the parent account to which the user belongs is the owner.
      • performanceMode

        public com.pulumi.core.Output<java.lang.String> performanceMode()
        Returns:
        The file system performance mode. Can be either `"generalPurpose"` or `"maxIO"` (Default: `"generalPurpose"`).
      • protection

        public com.pulumi.core.Output<FileSystemProtection> protection()
        Returns:
        A file system [protection](https://docs.aws.amazon.com/efs/latest/ug/API_FileSystemProtectionDescription.html) object. See `protection` block below for details.
      • provisionedThroughputInMibps

        public com.pulumi.core.Output<java.util.Optional<java.lang.Double>> provisionedThroughputInMibps()
        Returns:
        The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with `throughputMode` set to `provisioned`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • sizeInBytes

        public com.pulumi.core.Output<java.util.List<FileSystemSizeInByte>> sizeInBytes()
        Returns:
        The latest known metered size (in bytes) of data stored in the file system, the value is not the exact size that the file system was at any point in time. See Size In Bytes.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • throughputMode

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> throughputMode()
        Returns:
        Throughput mode for the file system. Defaults to `bursting`, matching the [`CreateFileSystem`](https://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html) API default. Note that AWS [recommends `elastic` for most use cases](https://docs.aws.amazon.com/efs/latest/ug/managing-throughput.html), and `elastic` is the default in the Amazon EFS console. Valid values: `bursting`, `provisioned`, or `elastic`. When using `provisioned`, also set `provisionedThroughputInMibps`.
      • get

        public static FileSystem get​(java.lang.String name,
                                     com.pulumi.core.Output<java.lang.String> id,
                                     @Nullable
                                     FileSystemState state,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.