AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.efs.getFileSystem
Explore with Pulumi AI
Provides information about an Elastic File System (EFS) File System.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const fileSystemId = config.get("fileSystemId") || "";
const byId = aws.efs.getFileSystem({
    fileSystemId: fileSystemId,
});
const byTag = aws.efs.getFileSystem({
    tags: {
        Environment: "dev",
    },
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
file_system_id = config.get("fileSystemId")
if file_system_id is None:
    file_system_id = ""
by_id = aws.efs.get_file_system(file_system_id=file_system_id)
by_tag = aws.efs.get_file_system(tags={
    "Environment": "dev",
})
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		fileSystemId := ""
		if param := cfg.Get("fileSystemId"); param != "" {
			fileSystemId = param
		}
		_, err := efs.LookupFileSystem(ctx, &efs.LookupFileSystemArgs{
			FileSystemId: pulumi.StringRef(fileSystemId),
		}, nil)
		if err != nil {
			return err
		}
		_, err = efs.LookupFileSystem(ctx, &efs.LookupFileSystemArgs{
			Tags: map[string]interface{}{
				"Environment": "dev",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var fileSystemId = config.Get("fileSystemId") ?? "";
    var byId = Aws.Efs.GetFileSystem.Invoke(new()
    {
        FileSystemId = fileSystemId,
    });
    var byTag = Aws.Efs.GetFileSystem.Invoke(new()
    {
        Tags = 
        {
            { "Environment", "dev" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.efs.EfsFunctions;
import com.pulumi.aws.efs.inputs.GetFileSystemArgs;
import java.util.List;
import java.util.ArrayList;
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) {
        final var config = ctx.config();
        final var fileSystemId = config.get("fileSystemId").orElse("");
        final var byId = EfsFunctions.getFileSystem(GetFileSystemArgs.builder()
            .fileSystemId(fileSystemId)
            .build());
        final var byTag = EfsFunctions.getFileSystem(GetFileSystemArgs.builder()
            .tags(Map.of("Environment", "dev"))
            .build());
    }
}
configuration:
  fileSystemId:
    type: string
    default: ""
variables:
  byId:
    fn::invoke:
      function: aws:efs:getFileSystem
      arguments:
        fileSystemId: ${fileSystemId}
  byTag:
    fn::invoke:
      function: aws:efs:getFileSystem
      arguments:
        tags:
          Environment: dev
Using getFileSystem
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFileSystem(args: GetFileSystemArgs, opts?: InvokeOptions): Promise<GetFileSystemResult>
function getFileSystemOutput(args: GetFileSystemOutputArgs, opts?: InvokeOptions): Output<GetFileSystemResult>def get_file_system(creation_token: Optional[str] = None,
                    file_system_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetFileSystemResult
def get_file_system_output(creation_token: Optional[pulumi.Input[str]] = None,
                    file_system_id: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetFileSystemResult]func LookupFileSystem(ctx *Context, args *LookupFileSystemArgs, opts ...InvokeOption) (*LookupFileSystemResult, error)
func LookupFileSystemOutput(ctx *Context, args *LookupFileSystemOutputArgs, opts ...InvokeOption) LookupFileSystemResultOutput> Note: This function is named LookupFileSystem in the Go SDK.
public static class GetFileSystem 
{
    public static Task<GetFileSystemResult> InvokeAsync(GetFileSystemArgs args, InvokeOptions? opts = null)
    public static Output<GetFileSystemResult> Invoke(GetFileSystemInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFileSystemResult> getFileSystem(GetFileSystemArgs args, InvokeOptions options)
public static Output<GetFileSystemResult> getFileSystem(GetFileSystemArgs args, InvokeOptions options)
fn::invoke:
  function: aws:efs/getFileSystem:getFileSystem
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CreationToken string
- Restricts the list to the file system with this creation token.
- FileSystem stringId 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- Dictionary<string, string>
- Restricts the list to the file system with these tags.
- CreationToken string
- Restricts the list to the file system with this creation token.
- FileSystem stringId 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- map[string]string
- Restricts the list to the file system with these tags.
- creationToken String
- Restricts the list to the file system with this creation token.
- fileSystem StringId 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- Map<String,String>
- Restricts the list to the file system with these tags.
- creationToken string
- Restricts the list to the file system with this creation token.
- fileSystem stringId 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- {[key: string]: string}
- Restricts the list to the file system with these tags.
- creation_token str
- Restricts the list to the file system with this creation token.
- file_system_ strid 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- Mapping[str, str]
- Restricts the list to the file system with these tags.
- creationToken String
- Restricts the list to the file system with this creation token.
- fileSystem StringId 
- ID that identifies the file system (e.g., fs-ccfc0d65).
- Map<String>
- Restricts the list to the file system with these tags.
getFileSystem Result
The following output properties are available:
- Arn string
- Amazon Resource Name of the file system.
- AvailabilityZone stringId 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- AvailabilityZone stringName 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- CreationToken string
- DnsName string
- DNS name for the filesystem per documented convention.
- Encrypted bool
- Whether EFS is encrypted.
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- KmsKey stringId 
- ARN for the KMS encryption key.
- LifecyclePolicies List<GetFile System Lifecycle Policy> 
- LifecyclePolicy GetFile System Lifecycle Policy 
- File system lifecycle policy object.
- Name string
- The value of the file system's Nametag.
- PerformanceMode string
- File system performance mode.
- Protections
List<GetFile System Protection> 
- ProvisionedThroughput doubleIn Mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- SizeIn intBytes 
- Current byte count used by the file system.
- Dictionary<string, string>
- A map of tags to assign to the file system.
- ThroughputMode string
- Throughput mode for the file system.
- Arn string
- Amazon Resource Name of the file system.
- AvailabilityZone stringId 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- AvailabilityZone stringName 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- CreationToken string
- DnsName string
- DNS name for the filesystem per documented convention.
- Encrypted bool
- Whether EFS is encrypted.
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- KmsKey stringId 
- ARN for the KMS encryption key.
- LifecyclePolicies []GetFile System Lifecycle Policy 
- LifecyclePolicy GetFile System Lifecycle Policy 
- File system lifecycle policy object.
- Name string
- The value of the file system's Nametag.
- PerformanceMode string
- File system performance mode.
- Protections
[]GetFile System Protection 
- ProvisionedThroughput float64In Mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- SizeIn intBytes 
- Current byte count used by the file system.
- map[string]string
- A map of tags to assign to the file system.
- ThroughputMode string
- Throughput mode for the file system.
- arn String
- Amazon Resource Name of the file system.
- availabilityZone StringId 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- availabilityZone StringName 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- creationToken String
- dnsName String
- DNS name for the filesystem per documented convention.
- encrypted Boolean
- Whether EFS is encrypted.
- fileSystem StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- kmsKey StringId 
- ARN for the KMS encryption key.
- lifecyclePolicies List<GetFile System Lifecycle Policy> 
- lifecyclePolicy GetFile System Lifecycle Policy 
- File system lifecycle policy object.
- name String
- The value of the file system's Nametag.
- performanceMode String
- File system performance mode.
- protections
List<GetFile System Protection> 
- provisionedThroughput DoubleIn Mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- sizeIn IntegerBytes 
- Current byte count used by the file system.
- Map<String,String>
- A map of tags to assign to the file system.
- throughputMode String
- Throughput mode for the file system.
- arn string
- Amazon Resource Name of the file system.
- availabilityZone stringId 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- availabilityZone stringName 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- creationToken string
- dnsName string
- DNS name for the filesystem per documented convention.
- encrypted boolean
- Whether EFS is encrypted.
- fileSystem stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- kmsKey stringId 
- ARN for the KMS encryption key.
- lifecyclePolicies GetFile System Lifecycle Policy[] 
- lifecyclePolicy GetFile System Lifecycle Policy 
- File system lifecycle policy object.
- name string
- The value of the file system's Nametag.
- performanceMode string
- File system performance mode.
- protections
GetFile System Protection[] 
- provisionedThroughput numberIn Mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- sizeIn numberBytes 
- Current byte count used by the file system.
- {[key: string]: string}
- A map of tags to assign to the file system.
- throughputMode string
- Throughput mode for the file system.
- arn str
- Amazon Resource Name of the file system.
- availability_zone_ strid 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- availability_zone_ strname 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- creation_token str
- dns_name str
- DNS name for the filesystem per documented convention.
- encrypted bool
- Whether EFS is encrypted.
- file_system_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- kms_key_ strid 
- ARN for the KMS encryption key.
- lifecycle_policies Sequence[GetFile System Lifecycle Policy] 
- lifecycle_policy GetFile System Lifecycle Policy 
- File system lifecycle policy object.
- name str
- The value of the file system's Nametag.
- performance_mode str
- File system performance mode.
- protections
Sequence[GetFile System Protection] 
- provisioned_throughput_ floatin_ mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- size_in_ intbytes 
- Current byte count used by the file system.
- Mapping[str, str]
- A map of tags to assign to the file system.
- throughput_mode str
- Throughput mode for the file system.
- arn String
- Amazon Resource Name of the file system.
- availabilityZone StringId 
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
- availabilityZone StringName 
- The Availability Zone name in which the file system's One Zone storage classes exist.
- creationToken String
- dnsName String
- DNS name for the filesystem per documented convention.
- encrypted Boolean
- Whether EFS is encrypted.
- fileSystem StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- kmsKey StringId 
- ARN for the KMS encryption key.
- lifecyclePolicies List<Property Map>
- lifecyclePolicy Property Map
- File system lifecycle policy object.
- name String
- The value of the file system's Nametag.
- performanceMode String
- File system performance mode.
- protections List<Property Map>
- provisionedThroughput NumberIn Mibps 
- The throughput, measured in MiB/s, that you want to provision for the file system.
- sizeIn NumberBytes 
- Current byte count used by the file system.
- Map<String>
- A map of tags to assign to the file system.
- throughputMode String
- Throughput mode for the file system.
Supporting Types
GetFileSystemLifecyclePolicy    
- TransitionTo stringArchive 
- TransitionTo stringIa 
- TransitionTo stringPrimary Storage Class 
- TransitionTo stringArchive 
- TransitionTo stringIa 
- TransitionTo stringPrimary Storage Class 
- transitionTo StringArchive 
- transitionTo StringIa 
- transitionTo StringPrimary Storage Class 
- transitionTo stringArchive 
- transitionTo stringIa 
- transitionTo stringPrimary Storage Class 
- transitionTo StringArchive 
- transitionTo StringIa 
- transitionTo StringPrimary Storage Class 
GetFileSystemProtection   
- ReplicationOverwrite string
- ReplicationOverwrite string
- replicationOverwrite String
- replicationOverwrite string
- replicationOverwrite String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.