

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Snowball Edge の Snowball Edge で Amazon 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
```

このコマンドの詳細については、 AWS CLI 「 コマンドリファレンス」の[「get-bucket](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3control/get-bucket.html)」を参照してください。

次の Snowball Edge 上の Amazon S3 互換ストレージの例では、 SDK for Java を使用してバケットを取得します。詳細については、「[Amazon Simple Storage Service 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());
}
```