file_system_policies
Creates, updates, deletes, gets or lists a file_system_policies resource.
Overview
| Name | file_system_policies |
| Type | Resource |
| Id | aws.efs.file_system_policies |
Fields
The following fields are returned by SELECT queries:
- describe_file_system_policy
| Name | Datatype | Description |
|---|---|---|
file_system_id | string | Specifies the EFS file system to which the FileSystemPolicy applies. (pattern: <code>^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$</code>) |
policy | string | The JSON formatted FileSystemPolicy for the EFS file system. (pattern: <code>[\s\S]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_file_system_policy | select | file_system_id, region | Returns the FileSystemPolicy for the specified EFS file system. This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy action. | |
put_file_system_policy | replace | file_system_id, region | Applies an Amazon EFS FileSystemPolicy to an Amazon EFS file system. A file system policy is an IAM resource-based policy and can contain multiple policy statements. A file system always has exactly one file system policy, which can be the default policy or an explicit policy set or updated using this API operation. EFS file system policies have a 20,000 character limit. When an explicit policy is set, it overrides the default policy. For more information about the default file system policy, see Default EFS file system policy. EFS file system policies have a 20,000 character limit. This operation requires permissions for the elasticfilesystem:PutFileSystemPolicy action. | |
delete_file_system_policy | delete | file_system_id, region | Deletes the FileSystemPolicy for the specified file system. The default FileSystemPolicy goes into effect once the existing policy is deleted. For more information about the default file system policy, see Using Resource-based Policies with EFS. This operation requires permissions for the elasticfilesystem:DeleteFileSystemPolicy action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
file_system_id | string | Specifies the EFS file system for which to delete the FileSystemPolicy. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_file_system_policy
Returns the FileSystemPolicy for the specified EFS file system. This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy action.
SELECT
file_system_id,
policy
FROM aws.efs.file_system_policies
WHERE file_system_id = '{{ file_system_id }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_file_system_policy
Applies an Amazon EFS FileSystemPolicy to an Amazon EFS file system. A file system policy is an IAM resource-based policy and can contain multiple policy statements. A file system always has exactly one file system policy, which can be the default policy or an explicit policy set or updated using this API operation. EFS file system policies have a 20,000 character limit. When an explicit policy is set, it overrides the default policy. For more information about the default file system policy, see Default EFS file system policy. EFS file system policies have a 20,000 character limit. This operation requires permissions for the elasticfilesystem:PutFileSystemPolicy action.
REPLACE aws.efs.file_system_policies
SET
Policy = '{{ Policy }}',
BypassPolicyLockoutSafetyCheck = {{ BypassPolicyLockoutSafetyCheck }}
WHERE
file_system_id = '{{ file_system_id }}' --required
AND region = '{{ region }}' --required
RETURNING
file_system_id,
policy;
DELETE examples
- delete_file_system_policy
Deletes the FileSystemPolicy for the specified file system. The default FileSystemPolicy goes into effect once the existing policy is deleted. For more information about the default file system policy, see Using Resource-based Policies with EFS. This operation requires permissions for the elasticfilesystem:DeleteFileSystemPolicy action.
DELETE FROM aws.efs.file_system_policies
WHERE file_system_id = '{{ file_system_id }}' --required
AND region = '{{ region }}' --required
;