

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 Snowball Edge 上的 Snowball Edge 上获取与亚马逊 S3 兼容存储空间的存储桶
<a name="working-s3-snow-buckets-get-bucket-s3-snow"></a>

以下示例使用在 Snowball Edge 存储桶上获取与 Amazon S3 兼容的存储空间。 AWS CLI要使用此命令，请将每个用户输入占位符替换为您自己的信息。

```
aws s3control get-bucket --account-id 123456789012 --bucket amzn-s3-demo-bucket --endpoint-url https://s3ctrlapi-endpoint-ip --profile your-profile
```

有关此命令的更多信息，请参阅《命令参考》中的 [get-buck](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3control/get-bucket.html) e AWS CLI t。

以下 Snowball Edge 上与 Amazon S3 兼容的存储示例使用适用于 Java 的 SDK 获取存储桶。有关更多信息，请参阅《Amazon Simple Storage Service API 参考》[https://docs.aws.amazon.com/AmazonS3/latest/API/](https://docs.aws.amazon.com/AmazonS3/latest/API/)中的 [GetBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucket.html)。

```
import com.amazonaws.services.s3control.model.*;

public void getBucket(String bucketName) {

    GetBucketRequest reqGetBucket = new GetBucketRequest()
            .withBucket(bucketName)
            .withAccountId(AccountId);

    GetBucketResult respGetBucket = s3ControlClient.getBucket(reqGetBucket);
    System.out.printf("GetBucket Response: %s%n", respGetBucket.toString());
}
```