DescribeMountTargetSecurityGroups - Amazon Elastic File System


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.

Request Syntax

GET /2015-02-01/mount-targets/MountTargetId/security-groups HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


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

Length Constraints: Minimum length of 13. Maximum length of 45.

Pattern: ^fsmt-[0-9a-f]{8,40}$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "SecurityGroups": [ "string" ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


An array of security groups.

Type: Array of strings

Array Members: Maximum number of 100 items.

Length Constraints: Minimum length of 11. Maximum length of 43.

Pattern: ^sg-[0-9a-f]{8,40}



Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

HTTP Status Code: 400


Returned if the mount target is not in the correct state for the operation.

HTTP Status Code: 409


Returned if an error occurred on the server side.

HTTP Status Code: 500


Returned if there is no mount target with the specified ID found in the caller's AWS account.

HTTP Status Code: 404


Retrieve security groups in effect for a file system

The following example retrieves the security groups that are in effect for the network interface associated with a mount target.

Sample Request

GET /2015-02-01/mount-targets/fsmt-9a13661e/security-groups HTTP/1.1 Host: x-amz-date: 20140620T223513Z Authorization: <...>

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 01234567-89ab-cdef-0123-456789abcdef Content-Length: 57 { "SecurityGroups" : [ "sg-188d9f74" ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: