- Navigation GuideYou are on a Client landing page. Commands (operations) are listed on this page. The Client constructor type is linked at the bottom.
EFSClient
Amazon Elastic File System (Amazon EFS) provides simple, scalable file storage for use with Amazon EC2 Linux and Mac instances in the Amazon Web Services Cloud. With Amazon EFS, storage capacity is elastic, growing and shrinking automatically as you add and remove files, so that your applications have the storage they need, when they need it. For more information, see the Amazon Elastic File System API Reference and the Amazon Elastic File System User Guide .
Installation
npm install @aws-sdk/client-efs
yarn add @aws-sdk/client-efs
pnpm add @aws-sdk/client-efs
EFSClient Operations
Command | Summary |
---|
Command | Summary |
---|---|
CreateAccessPointCommand | Creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in the application's own directory and any subdirectories. To learn more, see Mounting a file system using EFS access points . If multiple requests to create access points on the same file system are sent in quick succession, and the file system is near the limit of 1,000 access points, you may experience a throttling response for these requests. This is to ensure that the file system does not exceed the stated access point limit. This operation requires permissions for the Access points can be tagged on creation. If tags are specified in the creation action, IAM performs additional authorization on the |
CreateFileSystemCommand | Creates a new, empty file system. The operation requires a creation token in the request that Amazon EFS uses to ensure idempotent creation (calling the operation with same creation token has no effect). If a file system does not currently exist that is owned by the caller's Amazon Web Services account with the specified creation token, this operation does the following:
Otherwise, this operation returns a For basic use cases, you can use a randomly generated UUID for the creation token. The idempotent operation allows you to retry a For more information, see Creating a file system in the Amazon EFS User Guide. The This operation accepts an optional The You can set the throughput mode for the file system using the After the file system is fully created, Amazon EFS sets its lifecycle state to This operation requires permissions for the File systems can be tagged on creation. If tags are specified in the creation action, IAM performs additional authorization on the |
CreateMountTargetCommand | Creates a mount target for a file system. You can then mount the file system on EC2 instances by using the mount target. You can create one mount target in each Availability Zone in your VPC. All EC2 instances in a VPC within a given Availability Zone share a single mount target for a given file system. If you have multiple subnets in an Availability Zone, you create a mount target in one of the subnets. EC2 instances do not need to be in the same subnet as the mount target in order to access their file system. You can create only one mount target for a One Zone file system. You must create that mount target in the same Availability Zone in which the file system is located. Use the For more information, see Amazon EFS: How it Works . To create a mount target for a file system, the file system's lifecycle state must be In the request, provide the following:
After creating the mount target, Amazon EFS returns a response that includes, a Note that you can create mount targets for a file system in only one VPC, and there can be only one mount target per Availability Zone. That is, if the file system already has one or more mount targets created for it, the subnet specified in the request to add another mount target must meet the following requirements:
If the request satisfies the requirements, Amazon EFS does the following:
The We recommend that you create a mount target in each of the Availability Zones. There are cost considerations for using a file system in an Availability Zone through a mount target created in another Availability Zone. For more information, see Amazon EFS . In addition, by always using a mount target local to the instance's Availability Zone, you eliminate a partial failure scenario. If the Availability Zone in which your mount target is created goes down, then you can't access your file system through that mount target. This operation requires permissions for the following action on the file system:
This operation also requires permissions for the following Amazon EC2 actions:
|
CreateReplicationConfigurationCommand | Creates a replication configuration to either a new or existing EFS file system. For more information, see Amazon EFS replication in the Amazon EFS User Guide. The replication configuration specifies the following:
This operation requires permissions for the |
CreateTagsCommand | DEPRECATED - Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the This operation requires permission for the |
DeleteAccessPointCommand | Deletes the specified access point. After deletion is complete, new clients can no longer connect to the access points. Clients connected to the access point at the time of deletion will continue to function until they terminate their connection. This operation requires permissions for the |
DeleteFileSystemCommand | Deletes a file system, permanently severing access to its contents. Upon return, the file system no longer exists and you can't access any contents of the deleted file system. You need to manually delete mount targets attached to a file system before you can delete an EFS file system. This step is performed for you when you use the Amazon Web Services console to delete a file system. You cannot delete a file system that is part of an EFS replication configuration. You need to delete the replication configuration first. You can't delete a file system that is in use. That is, if the file system has any mount targets, you must first delete them. For more information, see DescribeMountTargets and DeleteMountTarget. The This operation requires permissions for the |
DeleteFileSystemPolicyCommand | Deletes the This operation requires permissions for the |
DeleteMountTargetCommand | Deletes the specified mount target. This operation forcibly breaks any mounts of the file system by using the mount target that is being deleted, which might disrupt instances or applications using those mounts. To avoid applications getting cut off abruptly, you might consider unmounting any mounts of the mount target, if feasible. The operation also deletes the associated network interface. Uncommitted writes might be lost, but breaking a mount target using this operation does not corrupt the file system itself. The file system you created remains. You can mount an EC2 instance in your VPC by using another mount target. This operation requires permissions for the following action on the file system:
The The operation also requires permissions for the following Amazon EC2 action on the mount target's network interface:
|
DeleteReplicationConfigurationCommand | Deletes a replication configuration. Deleting a replication configuration ends the replication process. After a replication configuration is deleted, the destination file system becomes This operation requires permissions for the |
DeleteTagsCommand | DEPRECATED - Deletes the specified tags from a file system. If the This operation requires permissions for the |
DescribeAccessPointsCommand | Returns the description of a specific Amazon EFS access point if the This operation requires permissions for the |
DescribeAccountPreferencesCommand | Returns the account preferences settings for the Amazon Web Services account associated with the user making the request, in the current Amazon Web Services Region. |
DescribeBackupPolicyCommand | Returns the backup policy for the specified EFS file system. |
DescribeFileSystemPolicyCommand | Returns the This operation requires permissions for the |
DescribeFileSystemsCommand | Returns the description of a specific Amazon EFS file system if either the file system When retrieving all file system descriptions, you can optionally specify the To retrieve a list of your file system descriptions, this operation is used in an iterative process, where The order of file systems returned in the response of one This operation requires permissions for the |
DescribeLifecycleConfigurationCommand | Returns the current This operation requires permissions for the |
DescribeMountTargetSecurityGroupsCommand | Returns the security groups currently in effect for a mount target. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not This operation requires permissions for the following actions:
|
DescribeMountTargetsCommand | Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified. This operation requires permissions for the |
DescribeReplicationConfigurationsCommand | Retrieves the replication configuration for a specific file system. If a file system is not specified, all of the replication configurations for the Amazon Web Services account in an Amazon Web Services Region are retrieved. |
DescribeTagsCommand | DEPRECATED - The Returns the tags associated with a file system. The order of tags returned in the response of one This operation requires permissions for the |
ListTagsForResourceCommand | Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for. This operation requires permissions for the |
ModifyMountTargetSecurityGroupsCommand | Modifies the set of security groups in effect for a mount target. When you create a mount target, Amazon EFS also creates a new network interface. For more information, see CreateMountTarget. This operation replaces the security groups in effect for the network interface associated with a mount target, with the The operation requires permissions for the following actions:
|
PutAccountPreferencesCommand | Use this operation to set the account preference in the current Amazon Web Services Region to use long 17 character (63 bit) or short 8 character (32 bit) resource IDs for new EFS file system and mount target resources. All existing resource IDs are not affected by any changes you make. You can set the ID preference during the opt-in period as EFS transitions to long resource IDs. For more information, see Managing Amazon EFS resource IDs . Starting in October, 2021, you will receive an error if you try to set the account preference to use the short 8 character format resource ID. Contact Amazon Web Services support if you receive an error and must use short IDs for file system and mount target resources. |
PutBackupPolicyCommand | Updates the file system's backup policy. Use this action to start or stop automatic backups of the file system. |
PutFileSystemPolicyCommand | Applies an Amazon EFS EFS file system policies have a 20,000 character limit. This operation requires permissions for the |
PutLifecycleConfigurationCommand | Use this action to manage storage for your file system. A
For more information, see Managing file system storage . Each Amazon EFS file system supports one lifecycle configuration, which applies to all files in the file system. If a
This operation requires permissions for the To apply a |
TagResourceCommand | Creates a tag for an EFS resource. You can create tags for EFS file systems and access points using this API operation. This operation requires permissions for the |
UntagResourceCommand | Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation. This operation requires permissions for the |
UpdateFileSystemCommand | Updates the throughput mode or the amount of provisioned throughput of an existing file system. |
UpdateFileSystemProtectionCommand | Updates protection on the file system. This operation requires permissions for the |
EFSClient Configuration
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
defaultsMode Optional | DefaultsMode | Provider<DefaultsMode> | The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK. |
disableHostPrefix Optional | boolean | Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation. |
extensions Optional | RuntimeExtension[] | Optional extensions |
logger Optional | Logger | Optional logger for logging debug/info/warn/error. |
maxAttempts Optional | number | Provider<number> | Value for how many times a request will be made at most in case of retry. |
profile Optional | string | Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options. |
region Optional | string | Provider<string> | The AWS region to which this client will send requests |
requestHandler Optional | __HttpHandlerUserInput | The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. |
retryMode Optional | string | Provider<string> | Specifies which retry algorithm to use. |
useDualstackEndpoint Optional | boolean | Provider<boolean> | Enables IPv6/IPv4 dualstack endpoint. |
useFipsEndpoint Optional | boolean | Provider<boolean> | Enables FIPS compatible endpoints. |
Additional config fields are described in the full configuration type: EFSClientConfig