import boto3
efs_client = boto3.client('efs')
response = efs_client.put_file_system_policy(
FileSystemId='fs-0123456789abcdef',
Policy='{\
"Version": "2012-10-17",\
"Statement": [\
{\
"Sid": "Example permissions",\
"Effect": "Allow",\
"Principal": "*",\
"Action": [\
"elasticfilesystem:ClientMount",\
"elasticfilesystem:ClientWrite",\
"elasticfilesystem:ClientRootAccess",\
"elasticfilesystem:ClientMountSelf",\
"elasticfilesystem:DescribeTags"\
],\
"Resource": "arn:aws:elasticfilesystem:us-west-2:111122223333:file-system/fs-0123456789abcdef",\
"Condition": {\
"Bool": {\
"elasticfilesystem:maxIO": "true"\
}\
}\
}\
]\
}'
)
print(response)
以上代码示例使用 AWS SDK for Python(boto3)将 EFS 的吞吐量模式更改为 Max I/O 模式。请更改“FileSystemId”的值,使其与您自己的 EFS 文件系统 ID 匹配。注意:一旦 EFS 文件系统转换为 Max I/O 模式,您将
上一篇:AwsEFS顺序写性能
下一篇:AWSEFS暂存文件的定价。