月次利用料金を取得します。
リクエストパラメーター
パラメーター名 | 項目 | 項目説明 |
---|---|---|
[version] | 説明 | 課金APIのバージョンID |
型 | string ASCII | |
設定内容 | "1.0"を指定してください。省略した場合は最新のバージョンで動作します | |
action | 説明 | 実行する課金APIの名称 |
型 | string ASCII | |
設定内容 | 固定。"GetMonthlyCharge"を指定してください。 | |
[startDate] | 説明 | 取得する情報の開始年月 |
型 | string ASCII | |
設定内容 | yyyy-MM endDateの翌月以降の年月、API実行月、およびそれより先の年月は指定不可 省略した場合は、API実行時点の前月として動作します。 | |
[endDate] | 説明 | 取得する情報の終了年月 |
型 | string ASCII | |
設定内容 | yyyy-MM 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"は指定できません(逆も同様)。 |
レスポンス
《ステータスコード》
正常に終了した場合に"200 OK"を返します。
《XML》
<?xml version="1.0" encoding="UTF-8"?> <GetMonthlyChargeResponse> <responseMessage>[メッセージ]</responseMessage> <responseStatus>[ステータス]</responseStatus> <version>[バージョン]</version> <startDate>[参照情報の開始年月]</startDate> <endDate>>[参照情報の終了年月]</endDate> <systems date="2012-01"> <system id="[L-Platform ID]" name="[L-Platform名]" tenantName="[管理元テナントのテナント名]" tenantDeleteDate="[管理元テナントの削除日]"> <totalCharge>[月次利用料金の合計]</totalCharge> <accountingItems> <accountingItem> <subtotalCharge>[月次利用料金の小計]</subtotalCharge> <products> <product id="[商品ID]" category="[カテゴリーコード]" resource="[リソース識別子]" usageUnit="[課金単位]" unitPrice="[単価]" unitNum="[単位数]"> <usagePoint>[利用度数]</usagePoint> <usagePointUnit>[度数単位]</usagePointUnit> <usageCharge>[月次利用料金]</usageCharge> </product> </products> </accountingItem> </accountingItems> <servers> <server id="[L-Server ID]" name="[L-Server名]"> <disks> <disk id="[ディスクID]" name="[ディスク名]"> </disk> </disks> </server> </servers> </system> </systems> </GetMonthlyChargeResponse>
《要素》
要素名 | 項目 | 項目説明 |
---|---|---|
GetMonthlyChargeResponse | 説明 | レスポンスの情報を持つ要素 |
型 | なし | |
出現回数 | 1 | |
responseMessage | 説明 | メッセージ。リクエストが正しく処理されたかどうかを表します。 |
型 | string UTF-8 | |
出現回数 | 1 | |
responseStatus | 説明 | ステータス。リクエストが正常に処理されたかどうかを表します。正常に処理された場合は "SUCCESS" が返却されます。それ以外の場合はエラーコードが返却されます。 |
型 | string ASCII | |
出現回数 | 1 | |
version | 説明 | APIのバージョン |
型 | string ASCII | |
出現回数 | 1 | |
startDate | 説明 | 参照情報の開始年月 |
型 | string ASCII | |
出現回数 | 1 | |
endDate | 説明 | 参照情報の終了年月 |
型 | string ASCII | |
出現回数 | 1 | |
systems | 説明 | L-Platform一覧のレスポンス情報を持つ要素。 |
型 | なし | |
出現回数 | 1以上 | |
system | 説明 | L-Platformテンプレート情報の一式。 ・id : L-Platform ID |
型 | なし | |
出現回数 | 0以上 | |
totalCharge | 説明 | 月次利用料金の合計 |
型 | decimal | |
出現回数 | systemの数分(それぞれに対して1) | |
servers | 説明 | L-Server一覧のレスポンス情報を持つ要素 |
型 | string ASCII | |
出現回数 | systemの数分(それぞれに対して0または1) | |
server | 説明 | L-Server情報の一式 id : L-Server ID |
型 | string UTF-8 | |
出現回数 | serversの数分(それぞれに対して0または1) | |
disks | 説明 | ディスク一覧のレスポンス情報を持つ要素 |
型 | string ASCII | |
出現回数 | serverの数分(それぞれに対して0または1) | |
disk | 説明 | L-Server情報の一式 id : ディスクID |
型 | string ASCII | |
出現回数 | disksの数分(それぞれに対して0以上) | |
accountingItems | 説明 | 課金情報一覧のレスポンス情報を持つ要素 |
型 | string ASCII | |
出現回数 | systemまたはserverまたはdiskの数分(それぞれに対して0以上) | |
accountingItem | 説明 | L-Server情報の一式 |
型 | string ASCII | |
出現回数 | accountingItemsの数分(それぞれに対して1以上) | |
subtotalCharge | 説明 | 月次利用料金の小計 |
型 | decimal | |
出現回数 | accountingItemの数分(それぞれに対して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 | 説明 | 度数単位。以下のどれかを指摘します。 ・hour (時) ・month (月) |
型 | string ASCII | |
出現回数 | productの数分(それぞれに対して1) | |
usageCharge | 説明 | 月次利用料金 |
型 | decimal | |
出現回数 | productの数分(それぞれに対して1) |
サンプルレスポンス
<?xml version="1.0" encoding="UTF-8" ?> <GetMonthlyChargeResponse> <responseMessage>AAPI00000 Process completed.</responseMessage> <responseStatus>SUCCESS</responseStatus> <version>1.0</version> <startDate>2012-01</startDate> <endDate>2012-01</endDate> <systems date="2012-01"> <system id="Tenant1-IYHPD30VJ" name="lplatform001" tenantName="Tenant1" tenantDeleteDate=""> <totalCharge>3504.000</totalCharge> <accountingItems> <accountingItem> <subtotalCharge>1000.000</subtotalCharge> <products> <product id="PID-TMP-001" category="template" resource="template-135562b98d2" usageUnit="month" unitPrice="1000.000" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>1000.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>1000.000</subtotalCharge> <products> <product id="PID-TMP-002" category="template" resource="template-135562b98d2" usageUnit="month" unitPrice="500.000" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>1000.000</usageCharge> </product> </products> </accountingItem> </accountingItems> <servers> <server id="Tenant1-IYHPD30VJ-S-0001" name="lserver001"> <accountingItems> <accountingItem> <subtotalCharge>800.000</subtotalCharge> <products> <product id="PID-VIM-001" category="vm" resource="/VMHostPool" usageUnit="month" unitPrice="800.000" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>800.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>50.000</subtotalCharge> <products> <product id="PID-VIM-002" category="vm" resource="/VMHostPool" usageUnit="month" unitPrice="50.000" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>50.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>24.150</subtotalCharge> <products> <product id="PID-CPU-001" category="cpu" resource="/VMHostPool" usageUnit="hour" unitPrice="0.150" unitNum="2"> <usagePoint>630</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>3.150</usageCharge> </product> <product id="PID-CLK-001" category="cpu_clock" resource="/VMHostPool" usageUnit="hour" unitPrice="0.100" unitNum="10"> <usagePoint>630</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>21.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>10.000</subtotalCharge> <products> <product id="PID-CPU-002" category="cpu" resource="/VMHostPool" usageUnit="hour" unitPrice="5.0" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>5.0</usageCharge> </product> <product id="PID-CLK-002" category="cpu_clock" resource="/VMHostPool" usageUnit="hour" unitPrice="5.0" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>5.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>10.000</subtotalCharge> <products> <product id="PID-MEM-001" category="memory" resource="/VMHostPool" usageUnit="hour" unitPrice="0.100" unitNum="40"> <usagePoint>150</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>10.000</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>10.000</subtotalCharge> <products> <product id="PID-MEM-002" category="memory" resource="/VMHostPool" usageUnit="hour" unitPrice="10.00" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>minute</usagePointUnit> <usageCharge>10.000</usageCharge> </product> </products> </accountingItem> </accountingItems> <disks> <disk id="Tenant1-IYHPD30VJ-D-0001" name="disk001"> <accountingItems> <accountingItem> <subtotalCharge>200</subtotalCharge> <products> <product id="PID-DSK-001" category="disk" resource="/VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="200"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>200</usageCharge> </product> </products> </accountingItem> <accountingItem> <subtotalCharge>100</subtotalCharge> <products> <product id="PID-DSK-001" category="disk" resource="/VMStoragePool" usageUnit="month" unitPrice="100.000" unitNum="1"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>100</usageCharge> </product> </products> </accountingItem> </accountingItems> </disk> <disk id="Tenant1-IYHPD30VJ-D-0002" name="disk002"> <accountingItems> <accountingItem> <subtotalCharge>300</subtotalCharge> <products> <product id="PID-DSK-002" category="disk" resource="/VMStoragePool" usageUnit="month" unitPrice="1.000" unitNum="300"> <usagePoint>1</usagePoint> <usagePointUnit>month</usagePointUnit> <usageCharge>300</usageCharge> </product> </products> </accountingItem> </accountingItems> </disk> </disks> </server> </servers> </system> </systems> </GetMonthlyChargeResponse>