Skip to main content

mount_target_security_groups

Creates, updates, deletes, gets or lists a mount_target_security_groups resource.

Overview

Namemount_target_security_groups
TypeResource
Idaws.efs.mount_target_security_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
security_groupstringAn array of security groups.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_mount_target_security_groupsselectmount_target_id, regionReturns 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 deleted. This operation requires permissions for the following actions: elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount target's file system. ec2:DescribeNetworkInterfaceAttribute action on the mount target's network interface.
modify_mount_target_security_groupsupdatemount_target_id, regionModifies 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 SecurityGroups provided in the request. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not deleted. The operation requires permissions for the following actions: elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount target's file system. ec2:ModifyNetworkInterfaceAttribute action on the mount target's network interface.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
mount_target_idstringThe ID of the mount target whose security groups you want to modify.
regionstringAWS region (default: us-east-1)

SELECT examples

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 deleted. This operation requires permissions for the following actions: elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount target's file system. ec2:DescribeNetworkInterfaceAttribute action on the mount target's network interface.

SELECT
security_group
FROM aws.efs.mount_target_security_groups
WHERE mount_target_id = '{{ mount_target_id }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

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 SecurityGroups provided in the request. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not deleted. The operation requires permissions for the following actions: elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount target's file system. ec2:ModifyNetworkInterfaceAttribute action on the mount target's network interface.

UPDATE aws.efs.mount_target_security_groups
SET
SecurityGroups = '{{ SecurityGroups }}'
WHERE
mount_target_id = '{{ mount_target_id }}' --required
AND region = '{{ region }}' --required;