バケットリスト照会
    • PDF

    バケットリスト照会

    • PDF

    Article Summary

    VPC環境で利用できます。

    説明

    Object Storage Bucketのリストを照会します。

    • 設定したAPI認証キーに基づいてBucketの権限を確認します。

    リクエスト

    リクエストURL

    GET https://vpcsearchengine.apigw.ntruss.com/api/v2/snapshot/getBucketList/{service-group-instance-no} [KR]
    GET https://vpcsearchengine.apigw.ntruss.com/api/sgn-v2/snapshot/getBucketList/{service-group-instance-no} [SGN]
    

    リクエストヘッダ

    ヘッダ名説明
    x-ncp-apigw-timestamp1970年1月1日 00:00:00 協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表し、
    API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyNAVERクラウドプラットフォームポータルから発行されたAccess Key ID値
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Access Key ID値とSecret Keyで暗号化した署名
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeRequest body content typeをapplication/jsonに指定
    Content-Type: application/json

    リクエスト例

    GET https://vpcsearchengine.apigw.ntruss.com/api/v2/snapshot/getBucketList/1789920
    HOST: vpcsearchengine.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: zq0FrtlU8JZJi9esTK31bCQUNG3H+jo4CMjMkJDoWSc=
    x-ncp-apigw-timestamp: 1593848345548
    x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw
    
    curl -X GET "https://vpcsearchengine.apigw.ntruss.com/api/v2/snapshot/getBucketList/1789920 \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw" \
    -H "x-ncp-apigw-timestamp: 1601971222179" \
    -H "x-ncp-apigw-signature-v2: zrCelnR48AADdK/uh6Xe3yy468i8KpQoewYHUmeqYh4=" 
    

    レスポンスパラメータ

    public class GetObjectStorageBucketList {
        List<BucketInfo> bucketList;
    }
    
    public class BucketInfo {
        String name;
        Long bytesUsed;
        Long  objectCount;
        Long creationTime;
    }
    

    レスポンス例

    {
      "code": 0,
      "message": "SUCCESS",
      "result": {
        "bucketList": [
          {
            "name": "common",
            "bytesUsed": 8053428730,
            "objectCount": 1174,
            "creationTime": 1626053207541,
            "bucketProtectionState": "DISABLED",
            "permission": "Allow"
          },
          {
            "name": "common2",
            "bytesUsed": 25542177823,
            "objectCount": 227,
            "creationTime": 1626054508184,
            "bucketProtectionState": "DISABLED",
            "permission": "Allow"
          },
          {
            "name": "estest",
            "bytesUsed": 981474971046,
            "objectCount": 11508,
            "creationTime": 1626053041402,
            "bucketProtectionState": "DISABLED",
            "permission": "Allow"
          }
        ]
      },
      "requestId": "d7ea6d82-afcc-4675-886a-f304497ea465"
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.