简体   繁体   中英

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:

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

Why don't I get the "DisplayName" back?

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

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.

Apparently, this data is only returned in the regions that also return e-mail-addresses .

Note

Using email addresses to specify a grantee is only supported in the following AWS Regions:

  • 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM