简体   繁体   English

为什么在使用 s3api 获取存储桶 ACL 时缺少“DisplayName”?

[英]Why is the "DisplayName" missing when getting the bucket ACL using s3api?

I am trying to get the display name of the owner of a bucket using the following command:我正在尝试使用以下命令获取存储桶所有者的显示名称:

$ aws --profile <profile> s3api get-bucket-acl --bucket <bucket-name>

The response I get back is:我得到的回复是:

{
    "Owner": {
        "ID": "b<long-id>e"
    },
    "Grants": [
        {
            "Grantee": {
                "ID": "b<long-id>e",
                "Type": "CanonicalUser"
            },
            "Permission": "FULL_CONTROL"
        }
    ]
}

According to AWS s3api get-bucket-acl documentation the response should include the "DisplayName" such as:根据AWS s3api get-bucket-acl 文档,响应应包括"DisplayName" ,例如:

{
    "Owner": {
        "DisplayName": "my-username",
        "ID": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd087d36c32"
    },
    "Grants": [
        {
            "Grantee": {
                "DisplayName": "my-username",
                "ID": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd087d36c32"
            },
            "Permission": "FULL_CONTROL"
        }
    ]
}

Why don't I get the "DisplayName" back?为什么我得不到"DisplayName"

Note: The aws version I am using is aws-cli/2.4.25 Python/3.8.8 Darwin/20.6.0 exe/x86_64 prompt/off注意:我使用的aws版本是aws-cli/2.4.25 Python/3.8.8 Darwin/20.6.0 exe/x86_64 prompt/off

I checked with AWS Support on this and according to the service team you can't rely on this information being present in all regions.我就此与 AWS Support 核实过,根据服务团队的说法,您不能依赖此信息存在于所有区域。

Apparently, this data is only returned in the regions that also return e-mail-addresses .显然,此数据仅在也返回 e-mail-addresses的区域返回。

Note笔记

Using email addresses to specify a grantee is only supported in the following AWS Regions:仅以下 AWS 区域支持使用 email 地址指定受让人:

  • US East (N. Virginia)美国东部(弗吉尼亚北部)

  • US West (N. California)美国西部(加利福尼亚北部)

  • US West (Oregon)美国西部(俄勒冈)

  • Asia Pacific (Singapore)亚太地区(新加坡)

  • Asia Pacific (Sydney)亚太地区(悉尼)

  • Asia Pacific (Tokyo)亚太地区(东京)

  • Europe (Ireland)欧洲(爱尔兰)

  • South America (São Paulo)南美洲(圣保罗)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Terraform 脚本禁用 s3 存储桶 ACL? - How to disable s3 bucket ACL using Terraform scripts? 没有 ACL 的 S3 存储桶 - 无权限 - S3 Bucket without ACL - No permission 为什么在使用 dynamodb 和 s3 存储桶创建 lambda 函数时出现 IamRoleLambdaExecution 错误? - Why I am getting IamRoleLambdaExecution error when creating a lambda function with dynamodb and s3 bucket? 为什么在访问 AWS S3 存储桶时出现“CORS header 'Access-Control-Allow-Origin' missing”错误? - Why am I having the "CORS header ‘Access-Control-Allow-Origin’ missing" error when accessing an AWS S3 bucket? 使用 PySpark 从 S3 存储桶中获取对象 - Getting objects from S3 bucket using PySpark 在 C# 中使用 SFTP 将 MemoryStream 从 Amazon S3 存储桶发送到远程服务器时获取“无效路径” - Getting "Invalid path" when sending MemoryStream from Amazon S3 bucket to a remote server using SFTP in C# 使用 Api Gateway、Lambda 函数将图像上传到 S3 存储桶 - Upload Image into S3 bucket using Api Gateway, Lambda funnction 如果可以通过 mailFolder displayName 使用 msgraph API 搜索 mailFolder - If it is possible to search mailFolder using msgraph API by mailFolder displayName CarrierWave:启用统一桶级访问时,无法为 object 插入旧版 ACL - CarrierWave: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled 使用 axios 将文件上传到 S3 存储桶时出现 403 - 403 when upload file to S3 bucket using axios
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM