列出 Amazon S3 on Outposts 存储桶 - Amazon S3 on Outposts

列出 Amazon S3 on Outposts 存储桶

通过使用 Amazon S3 on Outposts,您可以在 AWS Outposts 上创建 S3 桶,并在本地为需要本地数据访问、本地数据处理和数据驻留的应用程序轻松存储和检索对象。S3 on Outposts 提供了一个新的存储类 S3 Outposts (OUTPOSTS);该存储类使用 Amazon S3 API,并且用于在 AWS Outposts 上的多个设备和服务器之间持久冗余地存储数据。您通过 Virtual Private Cloud(VPC)使用接入点和端点连接与 Outposts 桶进行通信。您可以像在 Amazon S3 桶中一样在 Outpost 桶上使用相同的 API 和功能,包括访问策略、加密和标记。您可以通过 AWS Management Console、AWS Command Line Interface (AWS CLI)、AWS SDK 或 REST API 使用 S3 on Outposts。有关更多信息,请参阅什么是 Amazon S3 on Outposts?

有关使用 S3 on Outposts 中的存储桶的更多信息,请参阅使用 S3 on Outposts 存储桶

以下示例介绍了如何使用 AWS Management Console、AWS CLI 和 适用于 Java 的 AWS SDK 返回 S3 on Outposts 存储桶的列表。

  1. 通过以下网址打开 Amazon S3 控制台:https://console.aws.amazon.com/s3/

  2. 在左侧导航窗格中,选择 Outposts buckets(Outposts 桶)。

  3. Outposts buckets(Outposts 存储桶)下,查看 S3 on Outposts 存储桶的列表。

以下 AWS CLI 示例获取 Outpost 中的存储桶列表。要使用此命令,请将每个 user input placeholder 替换为您自己的信息。有关此命令的更多信息,请参阅《AWS CLI 参考》中的 list-regional-buckets

aws s3control list-regional-buckets --account-id 123456789012 --outpost-id op-01ac5d28a6a232904

以下适用于 Java 的 SDK 示例获取 Outpost 中的存储桶列表。有关更多信息,请参阅《Amazon Simple Storage Service API 参考》中的 ListRegionalBuckets

import com.amazonaws.services.s3control.model.*; public void listRegionalBuckets() { ListRegionalBucketsRequest reqListBuckets = new ListRegionalBucketsRequest() .withAccountId(AccountId) .withOutpostId(OutpostId); ListRegionalBucketsResult respListBuckets = s3ControlClient.listRegionalBuckets(reqListBuckets); System.out.printf("ListRegionalBuckets Response: %s%n", respListBuckets.toString()); }