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

3.2.2 RegisterUsagePoint (利用度数を登録)

利用度数を登録します。

リクエストボディ

《要素》

要素名

項目

項目説明

Request

説明

リクエスト情報を持つ要素

なし

出現回数

1

param

説明

パラメーター

・name : パラメーター名(注)を指定し、タグ内に値を入れます。
注) パラメーター一覧
・action : 固定。"RegisterUsagePoint"を指定します。
・version : APIのバージョンを指定します。省略した場合は最新のバージョンで動作します。

string ASCII

出現回数

1以上

Body

説明

ボディ

なし

出現回数

1

systems

説明

L-Platform一覧の情報を持つ要素。
date :登録するデータの日付。形式は"yyyy-MM-dd "。

なし

出現回数

1以上

system

説明

L-Platform情報の一式。以下のどれかになります。

・id : L-Platform ID
・name : L-Platform名
・tenantName : 管理元テナントのテナント名
・tenantDeleteDate : 管理元テナントの削除日。
形式は"yyyy-MM-dd THH:mm:ss.SSSZ "。
例) 2012年4月1日0時0分00.000秒 タイムゾーン UTC+9:00の場合、 2012-04-01T00:00:00.000+0900

削除されていないテナントの場合は、空を指定、または属性を省略します。

string ASCII

出現回数

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

servers

説明

L-Server一覧の情報を持つ要素

なし

出現回数

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

server

説明

L-Server情報の一式。固定。

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

string ASCII

出現回数

0以上

disks

説明

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

なし

出現回数

固定。

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

disk

説明

ディスク情報の一式。固定。

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

string ASCII

出現回数

0以上

images

説明

イメージリソース一覧のレスポンス情報を持つ要素

type : イメージ情報の種類
以下の値です。

・snapshot : スナップショット

string ASCII

出現回数

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

image

説明

イメージリソース情報の一式
・id : イメージリソースID

string ASCII

出現回数

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

accountingItems

説明

課金情報一覧の情報を持つ要素

なし

出現回数

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

accountingItem

説明

課金情報の一式

なし

出現回数

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

products

説明

商品情報一覧の情報を持つ要素

なし

出現回数

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 : ディスクサイズ
・sys_disk : ディスクサイズ
・snapshot : ディスクサイズ

なし

出現回数

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

usagePoint

説明

利用度数

decimal

出現回数

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

usagePointUnit

説明

度数単位。以下のどれかの値を指定します。

・minute (分)
・hour (時)
・month (月)

string ASCII

出現回数

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

サンプルリクエストボディ

<?xml version="1.0" encoding="UTF-8"?>
<Request>
<param name="action">RegisterUsagePoint</param>
<Body>
<systems date="2012-01-01">
  <system id="Tenant1-IYHPD30VJ" name="lplatform001" tenantName="Tenant1" tenantDeleteDate="" ownerUserId="tenant_user_001">
   <accountingItems>
    <accountingItem>
     <products>
      <product id="PID-TMP-001" category="template" resource="template-135562b98d2" usageUnit="month" unitPrice="1000.000" unitNum="1">
       <usagePoint>1440</usagePoint>
       <usagePointUnit>minute</usagePointUnit>
      </product>
     </products>
    </accountingItem>
   </accountingItems>
   <servers>
    <server id="Tenant1-IYHPD30VJ-S-0001" name="server01">
     <accountingItems>
      <accountingItem>
       <products>
        <product id="PID-VIM-001" category="vm" resource="/VMHostPool" usageUnit="month" unitPrice="800.000" unitNum="1">
         <usagePoint>1440</usagePoint>
         <usagePointUnit>minute</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>
      <accountingItem>
       <products>
        <product id="PID-MEM-001" category="memory" resource="/VMHostPool" usageUnit="hour" unitPrice="0.150" unitNum="40">
         <usagePoint>480</usagePoint>
         <usagePointUnit>minute</usagePointUnit>
        </product>
       </products>
      </accountingItem>
      <accountingItem>
       <products>
        <product id="PID-SYS-001" category="sys_disk" resource="/StoragePool" usageUnit="month" unitPrice="10.000" unitNum="200">
         <usagePoint>1440</usagePoint>
         <usagePointUnit>minute</usagePointUnit>
        </product>
       </products>
      </accountingItem>
     </accountingItems>
     <disks>
      <disk id="Tenant1-IYHPD30VJ-D-0002" name="DISK01">
       <accountingItems>
        <accountingItem>
         <products>
          <product id="PID-DSK-001" category="disk" resource="VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="200">
           <usagePoint>1440</usagePoint>
           <usagePointUnit>minute</usagePointUnit>
          </product>
         </products>
        </accountingItem>
       </accountingItems>
      </disk>
      <disk id="Tenant1-IYHPD30VJ-D-0002" name="DISK02">
       <accountingItems>
        <accountingItem>
         <products>
          <product id="PID-DSK-002" category="disk" resource="VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="300">
           <usagePoint>1440</usagePoint>
           <usagePointUnit>minute</usagePointUnit>
          </product>
         </products>
        </accountingItem>
       </accountingItems>
      </disk>
     </disks>
     <images type="snapshot">
      <image id="Tenant1-IYHPD30VJ-SS-0001">
       <accountingItems>
        <accountingItem>
         <products>
          <product id="PID-SS-001" category="snapshot" resource="VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="300">
           <usagePoint>1440</usagePoint>
           <usagePointUnit>minute</usagePointUnit>
          </product>
         </products>
        </accountingItem>
       </accountingItems>
      </image>
     </images>
    </server>
   </servers>
  </system>
 </systems>
</Body>
</Request>

レスポンス

《ステータスコード》

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

《XML》

<?xml version="1.0" encoding="UTF-8"?>
<RegisterUsagePointResponse>
 <responseMessage>[メッセージ]</responseMessage>
 <responseStatus>[ステータス]</responseStatus>
 <version>[バージョン]</version>
</RegisterUsagePointResponse>

《要素》

要素名

項目

項目説明

RegisterUsagePointResponse

説明

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

なし

出現回数

1

responseMessage

説明

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

string UTF-8

出現回数

1

responseStatus

説明

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

string ASCII

出現回数

1

version

説明

APIのバージョン

string ASCII

出現回数

1


サンプルレスポンス

<?xml version="1.0" encoding="UTF-8"?>
<RegisterUsagePointResponse>
 <responseMessage>PAPI00000 Process completed.</responseMessage>
 <responseStatus>SUCCESS</responseStatus>
 <version>1.0</version>
</RegisterUsagePointResponse>