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.
example
Use a bare-bones client and the command you need to make an API call.
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 notdeleted
.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.Use a bare-bones client and the command you need to make an API call.
import { EFSClient, ModifyMountTargetSecurityGroupsCommand } from "@aws-sdk/client-efs"; // ES Modules import // const { EFSClient, ModifyMountTargetSecurityGroupsCommand } = require("@aws-sdk/client-efs"); // CommonJS import const client = new EFSClient(config); const command = new ModifyMountTargetSecurityGroupsCommand(input); const response = await client.send(command);
ModifyMountTargetSecurityGroupsCommandInput for command's
input
shape.ModifyMountTargetSecurityGroupsCommandOutput for command's
response
shape.config for EFSClient's
config
shape.