MENU
      getContractUsageList
        • PDF

        getContractUsageList

        • PDF

        記事の要約

        Classic/VPC環境で利用できます。

        契約使用量リストを照会します。

        リクエスト

        リクエスト形式を説明します。リクエスト形式は次の通りです。

        メソッドURI
        GET/cost/getContractUsageList

        リクエストヘッダ

        Cost and Usage APIで共通して使用されるヘッダの詳細は、Cost And Usageの共通ヘッダをご参照ください。

        リクエストクエリパラメータ

        パラメータの説明は次の通りです。

        フィールドタイプ必須の有無説明
        pageNoIntegerOptionalページ番号
        pageSizeIntegerOptionalページサイズ
        • 1,000以下(デフォルト: 1,000)
        isOrganizationBooleanOptionalOrganizationサービスアカウントの統合照会かどうか
        • マスターのみ使用可能
        • isOrganizationisPartnerのいずれもtrueの場合、エラーを返す
        isPartnerBooleanOptionalパートナーアカウントの照会かどうか
        • パートナー代表のみ使用可能
        • isOrganizationisPartnerのいずれもtrueの場合、エラーを返す
        memberNoListList<String>Optional会員番号リスト
        • マスターまたはパートナー代表のみ使用可能
        contractNoStringOptional契約番号
        startMonthStringRequired照会開始月(yyyyMM)
        • 最大3か月照会可能
        • <例> 202401
        endMonthStringRequired照会最終月(yyyyMM)
        • 最大3か月照会可能
        • <例> 202403
        contractTypeCodeStringOptional契約タイプコード
        contractStatusCodeStringOptional契約状態コード
        • ALL(デフォルト) | NOML | NLEND
          • ALL: すべて
          • NOML: 正常
          • NLEND: 終了
        regionCodeStringOptionalリージョンコード
        responseFormatTypeStringOptionalレスポンス結果の形式
        • xml(デフォルト) | json

        リクエスト例

        リクエストのサンプルコードは次の通りです。

        curl --location 'https://billingapi.apigw.ntruss.com/billing/v1/cost/getContractUsageList?startMonth=202402&endMonth=202404'
        --header 'x-ncp-apigw-timestamp: {Timestamp}' \
        --header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
        Curl

        レスポンス

        レスポンス形式を説明します。

        レスポンスボディ

        レスポンスボディの詳細は、ContractListをご参照ください。

        レスポンスステータスコード

        NAVERクラウドプラットフォームでで共通して使用されるレスポンスステータスコードの詳細は、Ncloud APIのレスポンスステータスコードをご参照ください。

        レスポンス例

        レスポンスのサンプルコードは次の通りです。

        <?xml version="1.0" encoding="UTF-8"?>
        <getContractUsageListResponse>
            <requestId>e05dd3ef-****-****-****-bb973f080144</requestId>
            <returnCode>0</returnCode>
            <returnMessage>success</returnMessage>
            <totalRows>1</totalRows>
            <contractList>
                <contract>
                    <memberNo>******</memberNo>
                    <contractNo>9294191</contractNo>
                    <conjunctionContractNo></conjunctionContractNo>
                    <contractType>
                        <code>VSVR</code>
                        <codeName>Server (VPC)</codeName>
                    </contractType>
                    <contractStatus>
                        <code>NOML</code>
                        <codeName>Normal</codeName>
                    </contractStatus>
                    <contractStartDate>2022-05-17T14:57:54+0900</contractStartDate>
                    <contractEndDate>2999-12-31T23:59:59+0900</contractEndDate>
                    <instanceName>nas-linux</instanceName>
                    <regionCode>KR</regionCode>
                    <platformType>
                        <code>VPC</code>
                        <codeName>VPC</codeName>
                    </platformType>
                    <contractProductList>
                        <contractProduct>
                            <contractProductSequence>1</contractProductSequence>
                            <beforeContractProductSequence></beforeContractProductSequence>
                            <productCode>SVR.VSVR.HICPU.C002.M004.NET.SSD.B050.G002</productCode>
                            <priceNo>10525</priceNo>
                            <promiseNo></promiseNo>
                            <instanceNo>11025677</instanceNo>
                            <productItemKind>
                                <code>VSVR</code>
                                <codeName>Server (VPC)</codeName>
                            </productItemKind>
                            <productRatingType>
                                <code>VSVR</code>
                                <codeName>Server (VPC) Usage</codeName>
                            </productRatingType>
                            <serviceStatus>
                                <code>NOML</code>
                                <codeName>Normal</codeName>
                            </serviceStatus>
                            <serviceStartDate>2022-05-17T14:57:54+0900</serviceStartDate>
                            <serviceEndDate>2999-12-31T23:59:59+0900</serviceEndDate>
                            <productSize>0</productSize>
                            <productCount>0</productCount>
                            <usageList>
                                <usage>
                                    <meteringType>
                                        <code>VSVR</code>
                                        <codeName>Server (VPC) Usage</codeName>
                                    </meteringType>
                                    <useMonth>202404</useMonth>
                                    <usageQuantity>864000</usageQuantity>
                                    <unit>
                                        <code>USAGE_SEC</code>
                                        <codeName>Usage time (per second)</codeName>
                                    </unit>
                                    <userUsageQuantity>240</userUsageQuantity>
                                    <userUnit>
                                        <code>HOUR</code>
                                        <codeName>Hour(s)</codeName>
                                    </userUnit>
                                </usage>
                            </usageList>
                        </contractProduct>
                    </contractProductList>
                </contract>
            </contractList>
        </getContractUsageListResponse>
        XML

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

        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.