Skip to content

/AWS1/CL_EFS=>MODIFYMOUNTTARGETSECGROUPS()

About ModifyMountTargetSecurityGroups

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.

Method Signature

IMPORTING

Required arguments:

iv_mounttargetid TYPE /AWS1/EFSMOUNTTARGETID /AWS1/EFSMOUNTTARGETID

The ID of the mount target whose security groups you want to modify.

Optional arguments:

it_securitygroups TYPE /AWS1/CL_EFSSECURITYGROUPS_W=>TT_SECURITYGROUPS TT_SECURITYGROUPS

An array of VPC security group IDs.

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

lo_client->/aws1/if_efs~modifymounttargetsecgroups(
  it_securitygroups = VALUE /aws1/cl_efssecuritygroups_w=>tt_securitygroups(
    ( new /aws1/cl_efssecuritygroups_w( |string| ) )
  )
  iv_mounttargetid = |string|
).

To modify the security groups associated with a mount target for a file system

This operation modifies the security groups associated with a mount target for a file system.

lo_client->/aws1/if_efs~modifymounttargetsecgroups(
  it_securitygroups = VALUE /aws1/cl_efssecuritygroups_w=>tt_securitygroups(
    ( new /aws1/cl_efssecuritygroups_w( |sg-abcd1234| ) )
  )
  iv_mounttargetid = |fsmt-12340abc|
).