ページの先頭行へ戻る
ServerView Resource Orchestrator Cloud Edition V3.1.0 リファレンスガイド (API編)
ServerView

3.2.1 GetUsagePoint (利用度数を取得)

利用度数を取得します。

リクエストパラメーター

パラメーター名

項目

項目説明

[version]

説明

課金APIのバージョンID

string ASCII

設定内容

"1.0"を指定してください。省略した場合は最新のバージョンで動作します

action

説明

実行する課金APIの名称

string ASCII

設定内容

固定。"GetUsagePoint"を指定してください。

[startDate]

説明

取得する情報の開始日

string ASCII

設定内容

"yyyy-MM-dd"形式で指定してください。
endDateの翌日以降の日付、API実行日、およびそれより先の日付は指定できません。
省略した場合は、API実行時点の前日として動作します。

[endDate]

説明

取得する情報の終了日

string ASCII

設定内容

"yyyy-MM-dd"形式で指定してください。
startDate以前の日付、API実行日、およびそれより先の日付は指定できません。
省略した場合は、API実行時点の前日として動作します。

[sum]

説明

取得した情報を日にちごとに出力するか、まとめた集計値を出力するかのオプション

string ASCII

設定内容

以下のどちらかを指定します。

・true : 集計値を出力

・false : 日にちごとに出力

省略した場合は、"false"として動作します。

[lplatformId]

説明

指定したL-Platformの情報を取得

string ASCII

設定内容

複数指定する場合はパラメーターをそれぞれに指定します。

例) lplatformId=aaa&lplatformId=bbb&…

なお、"lplatformId"を指定した場合は、"tenantName"は指定できません(逆も同様)。

[tenantName]

説明

指定したテナントの情報を取得

string ASCII

設定内容

複数指定する場合はパラメーターをそれぞれに指定します。

例) tenantName=aaa&tenantName=bbb&…

なお、"lplatformId"を指定した場合は、"tenantName"は指定できません(逆も同様)。

[recordStatus]

説明

取得する配備、稼働時間情報の状態フラグ

string ASCII

設定内容

以下のどれかを指定します。複数指定できます。

・NORMAL

・WARNING

・ERROR

なお、省略した場合はNORMALとWARNINGだけ取得します。


レスポンス

《ステータスコード》

正常に終了した場合に"200 OK"を返します。

《XML》

<?xml version="1.0" encoding="UTF-8"?>
<GetUsagePointResponse>
 <responseMessage>[メッセージ]</responseMessage>
 <responseStatus>[ステータス]</responseStatus>
 <version>[バージョン]</version>
 <startDate>[参照情報の開始日]</startDate>
 <endDate>[参照情報の終了日]</endDate>
 <systems date="[取得するデータの日付]">
  <system id="[L-Platform ID]" name="[L-Platform名]" tenantName="[管理元テナントのテナント名]" tenantDeleteDate="[管理元テナントの削除日]">
   <accountingItems>
    <accountingItem>
     <products>
      <product id="[商品ID]" category="[カテゴリーコード]" resource="[リソース識別子]" usageUnit="[課金単位]" unitPrice="[単価]" unitNum="[単位数]">
       <usagePoint>[利用度数]</usagePoint>
       <usagePointUnit>[度数単位]</usagePointUnit>
      </product>
     </products>
    </accountingItem>
   </accountingItems>
   <servers>
    <server id="[L-Server ID]" name="[L-Server名]">
     </accountingItems>
     <disks>
      <disk id="[ディスクID]" name="[ディスク名]">
      </disk>
     </disks>
    </server>
   </servers>
  </system>
 </systems>
</GetUsagePointResponse>

《要素》

要素名

項目

項目説明

GetUsagePointResponse

説明

レスポンスの情報を持つ要素

なし

出現回数

1

responseMessage

説明

メッセージ。リクエストが正しく処理されたかどうかを表します。
メッセージの詳細については、「メッセージ集」の「第5章 AAPIで始まるメッセージ」を参照してください。

string UTF-8

出現回数

1

responseStatus

説明

ステータス。リクエストが正常に処理されたかどうかを表します。正常に処理された場合は "SUCCESS" が返却されます。それ以外の場合はエラーコードが返却されます。
エラーコードの詳細については、「付録B レスポンスステータス・エラーコード一覧(課金API)」を参照してください。

string ASCII

出現回数

1

version

説明

APIのバージョン

string ASCII

出現回数

1

startDate

説明

参照情報の開始日

string ASCII

出現回数

1

endDate

説明

参照情報の終了日

string ASCII

出現回数

1

systems

説明

L-Platform一覧のレスポンス情報を持つ要素。
date :取得するデータの日付。形式は"yyyy-MM-dd"。
パラメーターに "sum=true"指定時は属性なし

なし

出現回数

1以上

system

説明

L-Platformテンプレート情報の一式。

・id : L-Platform ID
・name : L-Platform名
・tenantName : 管理元テナントのテナント名
・tenantDeleteDate : 管理元テナントの削除日。形式は"yyyy-MM-dd'T'HH:mm:ss.SSSZ"。
削除されていないテナントの場合は、空が返却されます。属性は省略されません。

なし

出現回数

0以上

servers

説明

L-Server一覧のレスポンス情報を持つ要素

string ASCII

出現回数

systemの数分(それぞれに対して0または1)

server

説明

L-Server情報の一式

id : L-Server ID
name:L-Server名

string UTF-8

出現回数

serversの数分(それぞれに対して0または1)

disks

説明

ディスク一覧のレスポンス情報を持つ要素

string ASCII

出現回数

serverの数分(それぞれに対して0または1)

disk

説明

L-Server情報の一式

id : ディスクID
name:ディスク名

string ASCII

出現回数

disksの数分(それぞれに対して0以上)

accountingItems

説明

課金情報一覧のレスポンス情報を持つ要素

string ASCII

出現回数

systemまたはserverまたはdiskの数分(それぞれに対して0以上)

accountingItem

説明

L-Server情報の一式

string ASCII

出現回数

accountingItemsの数分(それぞれに対して1以上)

products

説明

商品情報一覧のレスポンス情報を持つ要素

string ASCII

出現回数

accountingItemの数分(それぞれに対して0または1)

product

説明

商品情報の一式

・id : 商品ID (注1)

・category : カテゴリーコード (注1)

・resource : リソース識別子 (注1)

・usageUnit : 課金単位 (注1)

・unitPrice : 単価 (注1)

・unitNum : 単位数(個数、周波数、サイズ、etc) (注2)

注1)とりうる値は商品マスタの使用に準じます。商品が登録されていない場合は、属性は省略されず、空を返却します。

注2)商品ごとに性能値などを返却します。

- template : 1 (固定)

- vm : 1 (固定)

- pm : 1 (固定)

- cpu : CPU個数

- cpu_clock : CPU周波数

- memory : メモリサイズ

- disk : ディスクサイズ

string ASCII

出現回数

productsの数分(それぞれに対して0以上)

usagePoint

説明

利用度数

decimal

出現回数

productの数分(それぞれに対して1)

usagePointUnit

説明

度数単位。以下のどれかを指摘します。
・minute (分)

・hour (時)

・month (月)

string ASCII

出現回数

productの数分(それぞれに対して1)


サンプルレスポンス

<?xml version="1.0" encoding="UTF-8" ?>
<GetUsagePointResponse>
 <responseMessage>AAPI00000 Process completed.</responseMessage>
 <responseStatus>SUCCESS</responseStatus>
 <version>1.0</version>
 <startDate>2012-01-01</startDate>
 <endDate>2012-01-02</endDate>
 <systems>
  <system id="Tenant1-IYHPD30VJ" name="lplatform001" tenantName="Tenant1" tenantDeleteDate="">
   <accountingItems>
    <accountingItem>
     <products>
      <product id="PID-TMP-001" category="template" resource="template-135562b98d2" usageUnit="month" unitPrice="1000.000" unitNum="1">
       <usagePoint>1</usagePoint>
       <usagePointUnit>month</usagePointUnit>
      </product>
     </products>
    </accountingItem>
   </accountingItems>
   <servers>
    <server id="Tenant1-IYHPD30VJ-S-0001" name="lserver001">
     <accountingItems>
      <accountingItem>
       <products>
        <product id="PID-VIM-001" category="vm" resource="/VMHostPool" usageUnit="month" unitPrice="800.000" unitNum="1">
         <usagePoint>1</usagePoint>
         <usagePointUnit>month</usagePointUnit>
        </product>
       </products>
      </accountingItem>
      <accountingItem>
       <products>
        <product id="PID-CPU-001" category="cpu" resource="/VMHostPool" usageUnit="hour" unitPrice="0.150" unitNum="2">
         <usagePoint>630</usagePoint>
         <usagePointUnit>minute</usagePointUnit>
        </product>
        <product id="PID-CLK-001" category="cpu_clock" resource="/VMHostPool" usageUnit="hour" unitPrice="0.100" unitNum="10">
         <usagePoint>630</usagePoint>
         <usagePointUnit>minute</usagePointUnit>
        </product>
       </products>
      </accountingItem>
      <accountingItem>
       <products>
        <product id="PID-MEM-001" category="memory" resource="/VMHostPool" usageUnit="hour" unitPrice="0.100" unitNum="40">
         <usagePoint>150</usagePoint>
         <usagePointUnit>minute</usagePointUnit>
        </product>
       </products>
      </accountingItem>
     </accountingItems>
     <disks>
      <disk id="Tenant1-IYHPD30VJ-D-0001" name="disk001">
       <accountingItems>
        <accountingItem>
         <products>
          <product id="PID-DSK-001" category="disk" resource="/VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="200">
           <usagePoint>1</usagePoint>
           <usagePointUnit>month</usagePointUnit>
          </product>
         </products>
        </accountingItem>
       </accountingItems>
      </disk>
     </disks>
    </server>
   </servers>
  </system>
 </systems>
</GetUsagePointResponse>