describeMountTargetSecurityGroups method

Future<DescribeMountTargetSecurityGroupsResponse> describeMountTargetSecurityGroups({
  1. required String mountTargetId,
})

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.

May throw BadRequest. May throw InternalServerError. May throw MountTargetNotFound. May throw IncorrectMountTargetState.

Parameter mountTargetId : The ID of the mount target whose security groups you want to retrieve.

Implementation

Future<DescribeMountTargetSecurityGroupsResponse>
    describeMountTargetSecurityGroups({
  required String mountTargetId,
}) async {
  ArgumentError.checkNotNull(mountTargetId, 'mountTargetId');
  _s.validateStringLength(
    'mountTargetId',
    mountTargetId,
    13,
    45,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2015-02-01/mount-targets/${Uri.encodeComponent(mountTargetId)}/security-groups',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeMountTargetSecurityGroupsResponse.fromJson(response);
}