Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ModifyMountTargetSecurityGroupsCommand

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.

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);
see

ModifyMountTargetSecurityGroupsCommandInput for command's input shape.

see

ModifyMountTargetSecurityGroupsCommandOutput for command's response shape.

see

config for EFSClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: ModifyMountTargetSecurityGroupsCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions