Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . efs ]

put-file-system-policy

Description

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.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  put-file-system-policy
--file-system-id <value>
--policy <value>
[--bypass-policy-lockout-safety-check | --no-bypass-policy-lockout-safety-check]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--file-system-id (string)

The ID of the EFS file system that you want to create or update the FileSystemPolicy for.

--policy (string)

The FileSystemPolicy that 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 .

--bypass-policy-lockout-safety-check | --no-bypass-policy-lockout-safety-check (boolean)

(Optional) A flag to indicate whether to bypass the FileSystemPolicy lockout safety check. The policy lockout safety check determines whether the policy in the request will prevent the principal making the request will be locked out from making future PutFileSystemPolicy requests on the file system. Set BypassPolicyLockoutSafetyCheck to True only when you intend to prevent the principal that is making the request from making a subsequent PutFileSystemPolicy request on the file system. The default value is False.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

FileSystemId -> (string)

Specifies the EFS file system to which the FileSystemPolicy applies.

Policy -> (string)

The JSON formatted FileSystemPolicy for the EFS file system.