列出 Amazon S3 on Outposts 存储桶 - Amazon Simple Storage Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

列出 Amazon S3 on Outposts 存储桶

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

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

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

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

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

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

以下 Amazon CLI 示例获取 Outpost 中的存储桶列表。要使用此命令,请将每个 user input placeholder 替换为您自己的信息。有关此命令的更多信息,请参阅《Amazon 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()); }