EFS / Client / put_file_system_policy
put_file_system_policy#
- EFS.Client.put_file_system_policy(**kwargs)#
- Applies an Amazon EFS - FileSystemPolicyto 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.- Note- EFS file system policies have a 20,000 character limit. - This operation requires permissions for the - elasticfilesystem:PutFileSystemPolicyaction.- See also: AWS API Documentation - Request Syntax- response = client.put_file_system_policy( FileSystemId='string', Policy='string', BypassPolicyLockoutSafetyCheck=True|False ) - Parameters:
- FileSystemId (string) – - [REQUIRED] - The ID of the EFS file system that you want to create or update the - FileSystemPolicyfor.
- Policy (string) – - [REQUIRED] - The - FileSystemPolicythat you’re creating. Accepts a JSON formatted policy definition. EFS file system policies have a 20,000 character limit. To find out more about the elements that make up a file system policy, see EFS Resource-based Policies.
- BypassPolicyLockoutSafetyCheck (boolean) – (Optional) A boolean that specifies whether or not to bypass the - FileSystemPolicylockout safety check. The lockout safety check determines whether the policy in the request will lock out, or prevent, the IAM principal that is making the request from making future- PutFileSystemPolicyrequests on this file system. Set- BypassPolicyLockoutSafetyCheckto- Trueonly when you intend to prevent the IAM principal that is making the request from making subsequent- PutFileSystemPolicyrequests on this file system. The default value is- False.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'FileSystemId': 'string', 'Policy': 'string' } - Response Structure- (dict) – - FileSystemId (string) – - Specifies the EFS file system to which the - FileSystemPolicyapplies.
- Policy (string) – - The JSON formatted - FileSystemPolicyfor the EFS file system.
 
 
 - Exceptions- EFS.Client.exceptions.BadRequest
- EFS.Client.exceptions.InternalServerError
- EFS.Client.exceptions.FileSystemNotFound
- EFS.Client.exceptions.InvalidPolicyException
- EFS.Client.exceptions.IncorrectFileSystemLifeCycleState