mount_target_security_groups
Creates, updates, deletes, gets or lists a mount_target_security_groups resource.
Overview
| Name | mount_target_security_groups |
| Type | Resource |
| Id | aws.efs.mount_target_security_groups |
Fields
The following fields are returned by SELECT queries:
- describe_mount_target_security_groups
| Name | Datatype | Description |
|---|---|---|
security_group | string | An array of security groups. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_mount_target_security_groups | select | mount_target_id, region | 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. | |
modify_mount_target_security_groups | update | mount_target_id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
mount_target_id | string | The ID of the mount target whose security groups you want to modify. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_mount_target_security_groups
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
- modify_mount_target_security_groups
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;