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.
Idawscc.efs.mount_targets

Fields

NameDatatypeDescription
idstring
ip_addressstringIf the ``IpAddressType`` for the mount target is IPv4 ( ``IPV4_ONLY`` or ``DUAL_STACK``), then specify the IPv4 address to use. If you do not specify an ``IpAddress``, then Amazon EFS selects an unused IP address from the subnet specified for ``SubnetId``.
ipv6_addressstringIf the ``IPAddressType`` for the mount target is IPv6 (``IPV6_ONLY`` or ``DUAL_STACK``), then specify the IPv6 address to use. If you do not specify an ``Ipv6Address``, then Amazon EFS selects an unused IP address from the subnet specified for ``SubnetId``.
ip_address_typestringThe IP address type for the mount target. The possible values are &#96;&#96;IPV4&#95;ONLY&#96;&#96; (only IPv4 addresses), &#96;&#96;IPV6&#95;ONLY&#96;&#96; (only IPv6 addresses), and &#96;&#96;DUAL&#95;STACK&#96;&#96; (dual-stack, both IPv4 and IPv6 addresses). If you don’t specify an &#96;&#96;IpAddressType&#96;&#96;, then &#96;&#96;IPV4&#95;ONLY&#96;&#96; is used.<br />The &#96;&#96;IPAddressType&#96;&#96; must match the IP type of the subnet. Additionally, the &#96;&#96;IPAddressType&#96;&#96; parameter overrides the value set as the default IP address for the subnet in the VPC. For example, if the &#96;&#96;IPAddressType&#96;&#96; is &#96;&#96;IPV4&#95;ONLY&#96;&#96; and &#96;&#96;AssignIpv6AddressOnCreation&#96;&#96; is &#96;&#96;true&#96;&#96;, then IPv4 is used for the mount target. For more information, see &#91;Modify the IP addressing attributes of your subnet&#93;(https://docs.aws.amazon.com/vpc/latest/userguide/subnet-public-ip.html).
file_system_idstringThe ID of the file system for which to create the mount target.
security_groupsarrayVPC security group IDs, of the form &#96;&#96;sg-xxxxxxxx&#96;&#96;. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see &#91;Amazon VPC Quotas&#93;(https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html) in the &#42;Amazon VPC User Guide&#42; (see the &#42;Security Groups&#42; table). If you don't specify a security group, then Amazon EFS uses the default security group for the subnet's VPC.
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. The subnet type must be the same type as the &#96;&#96;IpAddressType&#96;&#96;.
regionstringAWS region.

For more information, see AWS::EFS::MountTarget.

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 properties from an individual mount_target.

SELECT
region,
id,
ip_address,
ipv6_address,
ip_address_type,
file_system_id,
security_groups,
subnet_id
FROM awscc.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 awscc.efs.mount_targets (
FileSystemId,
SecurityGroups,
SubnetId,
region
)
SELECT
'{{ FileSystemId }}',
'{{ SecurityGroups }}',
'{{ SubnetId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.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