本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
您可以使用 Amazon S3 主控台、 AWS Command Line Interface (AWS CLI)、Amazon S3 REST API 和 AWS SDKs,取得在 SAmazon S3 Access Grants 執行個體中註冊的位置詳細資訊。 Amazon S3
檢視在 S3 Access Grants 執行個體中註冊的位置
登入 AWS Management Console ,並在 https://Amazon S3 主控台://https:/https://console.aws.amazon.com/s3/
://www..microsoft.com。 -
在左側導覽窗格中,選擇 Access Grants。
-
在 S3 Access Grants 頁面上,選擇包含您要使用之 S3 Access Grants 執行個體的區域。
-
選擇執行個體的檢視詳細資訊。
-
在執行個體的詳細資訊頁面上,選擇位置索引標籤。
-
尋找您要檢視的註冊位置。若要篩選註冊位置的清單,請使用搜尋方塊。
若要安裝 AWS CLI,請參閱AWS Command Line Interface 《 使用者指南》中的安裝 AWS CLI 。
若要使用下列範例命令,請以您自己的資訊取代
。user input
placeholders
範例 – 取得註冊位置的詳細資訊
aws s3control get-access-grants-location \ --account-id
111122223333
\ --access-grants-location-iddefault
回應:
{ "CreatedAt": "
2023-05-31T18:23:48.107000+00:00
", "AccessGrantsLocationId": "default
", "AccessGrantsLocationArn": "arn:aws:s3:us-east-2
:111122223333
:access-grants/default/location/default
", "IAMRoleArn": "arn:aws:iam::111122223333
:role/accessGrantsTestRole
" }
範例 – 列出在 S3 Access Grants 執行個體中註冊的所有位置
若要將結果限於 S3 字首或儲存貯體,您可以選擇使用 --location-scope
s3://
參數。bucket-and-or-prefix
aws s3control list-access-grants-locations \ --account-id
111122223333
\ --regionus-east-2
回應:
{"AccessGrantsLocationsList": [ { "CreatedAt": "
2023-05-31T18:23:48.107000+00:00
", "AccessGrantsLocationId": "default", "AccessGrantsLocationArn": "arn:aws:s3:us-east-2
:111122223333
:access-grants/default/location/default", "LocationScope": "s3://" "IAMRoleArn": "arn:aws:iam::111122223333
:role/accessGrantsTestRole
" }, { "CreatedAt": "2023-05-31T18:23:48.107000+00:00
", "AccessGrantsLocationId": "635f1139-1af2-4e43-8131-a4de006eb456
", "AccessGrantsLocationArn": "arn:aws:s3:us-east-2
:111122223333
:access-grants/default/location/635f1139-1af2-4e43-8131-a4de006eb888
", "LocationScope": "s3://amzn-s3-demo-bucket/prefixA*
", "IAMRoleArn": "arn:aws:iam::111122223333
:role/accessGrantsTestRole
" } ] }
如需有關取得已註冊位置的詳細資訊,或列出在 S3 Access Grants 執行個體註冊的所有位置的 Amazon S3 REST API 支援資訊,請參閱《Amazon Simple Storage Service API 參考》中的下列各節:
本節提供如何使用 AWS SDK 取得 S3 Access Grants 執行個體中已註冊位置的詳細資訊,或列出所有註冊位置的範例。
若要使用下列範例,請以您自己的資訊取代
。user input
placeholders