DescribeFileSystemPolicy
Returns the FileSystemPolicy
for the specified EFS file
system.
This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy
action.
Request Syntax
GET /2015-02-01/file-systems/FileSystemId
/policy HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- FileSystemId
-
Specifies which EFS file system to retrieve the
FileSystemPolicy
for.Length Constraints: Maximum length of 128.
Pattern:
^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[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
{
"FileSystemId": "string",
"Policy": "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.
- FileSystemId
-
Specifies the EFS file system to which the
FileSystemPolicy
applies.Type: String
Length Constraints: Maximum length of 128.
Pattern:
^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$
- Policy
-
The JSON formatted
FileSystemPolicy
for the EFS file system.Type: String
Length Constraints: Minimum length of 1. Maximum length of 20000.
Pattern:
[\s\S]+
Errors
- BadRequest
-
Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
- ErrorCode
-
The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type.
- Message
-
The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don't know how or don't care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.
HTTP Status Code: 400
- FileSystemNotFound
-
Returned if the specified
FileSystemId
value doesn't exist in the requester's Amazon Web Services account.- ErrorCode
-
The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type.
- Message
-
The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don't know how or don't care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.
HTTP Status Code: 404
- InternalServerError
-
Returned if an error occurred on the server side.
- ErrorCode
-
The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type.
- Message
-
The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don't know how or don't care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.
HTTP Status Code: 500
- PolicyNotFound
-
Returned if
no backup
is specified for a One Zone EFS file system.- ErrorCode
-
The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type.
- Message
-
The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don't know how or don't care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.
HTTP Status Code: 404
Examples
Example
This example illustrates one usage of DescribeFileSystemPolicy.
Sample Request
GET /2015-02-01/file-systems/fs-01234567/policy HTTP/1.1
Sample Response
{
"FileSystemId": "fs-01234567",
"Policy": "{
"Version": "2012-10-17",
"Id": "efs-policy-wizard-cdef0123-aaaa-6666-5555-444455556666",
"Statement": [
{
"Sid": "efs-statement-abcdef01-1111-bbbb-2222-111122224444",
"Effect" : "Deny",
"Principal": {
"AWS": "*"
},
"Action": "*",
"Resource": "arn:aws:elasticfilesystem:us-east-2:111122223333:file-system/fs-01234567",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
}
},
{
"Sid": "efs-statement-01234567-aaaa-3333-4444-111122223333",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"elasticfilesystem:ClientMount",
"elasticfilesystem:ClientWrite"
],
"Resource" : "arn:aws:elasticfilesystem:us-east-2:111122223333:file-system/fs-01234567"
}
]
}
}
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: