Skip to main content

mount_targets

Creates, updates, deletes or gets a mount_target resource or lists mount_targets in a region

Overview

Namemount_targets
TypeResource
DescriptionThe AWS::EFS::MountTarget resource is an Amazon EFS resource that creates a mount target for an EFS file system. You can then mount the file system on Amazon EC2 instances or other resources by using the mount target.
Idaws.efs.mount_targets

Fields

NameDatatypeDescription
idstring
ip_addressstringValid IPv4 address within the address range of the specified subnet.
file_system_idstringThe ID of the file system for which to create the mount target.
security_groupsarrayUp to five VPC security group IDs, of the form sg-xxxxxxxx. These must be for the same VPC as subnet specified.
subnet_idstringThe ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTFileSystemId, SecurityGroups, SubnetId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all mount_targets in a region.

SELECT
region,
id,
ip_address,
file_system_id,
security_groups,
subnet_id
FROM aws.efs.mount_targets
WHERE region = 'us-east-1';

Gets all properties from an individual mount_target.

SELECT
region,
id,
ip_address,
file_system_id,
security_groups,
subnet_id
FROM aws.efs.mount_targets
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new mount_target resource, using stack-deploy.

/*+ create */
INSERT INTO aws.efs.mount_targets (
FileSystemId,
SecurityGroups,
SubnetId,
region
)
SELECT
'{{ FileSystemId }}',
'{{ SecurityGroups }}',
'{{ SubnetId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.efs.mount_targets
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the mount_targets resource, the following permissions are required:

Create

elasticfilesystem:CreateMountTarget,
elasticfilesystem:DescribeMountTargets

Read

elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DescribeMountTargetSecurityGroups

Update

elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DescribeMountTargetSecurityGroups,
elasticfilesystem:ModifyMountTargetSecurityGroups

Delete

elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DeleteMountTarget

List

elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DescribeMountTargetSecurityGroups