Top
ServerView Resource Orchestrator Cloud Edition V3.2.0 Reference Guide (API)
FUJITSU Software

3.4.2 RegisterMonthlyCharge (Register Monthly Usage Charges)

Register the monthly usage charges.

Request body

<Elements>

Element name

Item

Item description

Request

Description

Element holding the request information

Type

None

Number of occurrences

1

param

Description

Parameter.
- name: Specify the parameter name(*), set the value into tag.
* Note: list of parameter
- action: Fixed. Specify "RegisterMonthlyCharge".
- version: Specify version of API. If this parameter is omitted, the default value is the newest version.

Type

string

Number of occurrences

1 or more

Body

Description

Body.

Type

None

Number of occurrences

1

systems

Description

Element holding the information for the list of L-Platform.
date: Date of registered data. Format is "yyyy-MM ".

Type

None

Number of occurrences

1 or more

system

Description

Set of additional L-Platform information. Specify one of the following:
- id: L-Platform ID
- name: L-Platform name
- tenantName: Tenant name
- tenantDeleteDate: Date when tenant was deleted.
Format is "yyyy-MM-dd THH:mm:ss.SSSZ ".
For example, use 2012-04-01T00:00:00.000+0900 for the 12:00 A.M. and 00.000 seconds on April 1, 2012 in timezone UTC+9:00.

Specify empty if the tenant has not been deleted. This attribute cannot be omitted.

Type

string

Number of occurrences

As many as there are systems elements (0 or more elements for each systems element).

totalCharge

Description

Total of monthly usage charges.If omitted, the API will sum the subtotalCharge values and register them in the DB.

Type

decimal

Number of occurrences

As many as there are system elements (0 or 1 element for each system element).

servers

Description

Element holding the information for the list of L-Server.

Type

None

Number of occurrences

As many as there are syetem elements (0 or 1 element for each syetem element).

server

Description

Set of additional L-Server information.
- id: L-Server ID
- name: L-Server name

Type

string

Number of occurrences

As many as there are servers elements (0 or more elements for each servers element).

disks

Description

Element holding the information for the list of disk.

Type

None

Number of occurrences

As many as there are system elements (0 or 1 elements for each system element).

disk

Description

Set of additional disk information.
- id: L-Platform ID
- name: L-Platform name

Type

string

Number of occurrences

As many as there are disks elements (0 or more elements for each disks element).

images

Description

Element holding the response information for the list of image resources.
- type: Image information type

Possible values:
- snapshot: snapshot

Type

string

Number of occurrences

As many as there are server elements (0 or 1 elements for each server element).

image

Description

Set of image resource information.
- id: Image resource ID

Type

string

Number of occurrences

As many as there are images elements (0 or more elements for each images element).

networks

Description

Element holding the response information for the network information.
- type: Network information type

Possible values:
- nic: NIC

Type

string

Number of occurrences

As many as there are server elements (0 or more elements for each server element).

network

Description

Set of network information

Type

string

Number of occurrences

As many as there are networks elements (0 or more elements for each networks element).

accountingItems

Description

Element holding the response information for the list of accounting information.

Type

None

Number of occurrences

As many as there are system, server, disk, or network elements (0 or more elements for each element).

accountingItem

Description

Set of additional list of accounting information.

Type

None

Number of occurrences

As many as there are accountingItems elements (1 or more elements for each accountingItems element).

subtotalCharge

Description

Subtotal of monthly usage charges.

Type

decimal

Number of occurrences

As many as there are accountingItem elements (1 element for each accountingItem element).

products

Description

Element holding the response information for the list of product information.

Type

None

Number of occurrences

As many as there are accountingItem elements (0 or 1 element for each element).

product

Description

Set of product information
- id: Product ID (*1)
- category: Category code (*1)
- resource: Resource ID (*1)
- usageUnit: Accounting unit (*1)
- unitPrice: Unit price (*1)
- unitNum: Unit number (number of pieces, frequency, size, etc.) (* 2)

* 1: Values taken are based on the use of a product master. If products are not registered, the attributes are not omitted, but rather the return is empty.

* 2: Performance values for each product are returned.
- template: 1 (fixed)
- vm: 1 (fixed)
- pm: 1 (fixed)
- cpu: Number of CPUs
- cpu_clock: CPU frequency
- memory: Memory size
- disk: Disk size
- sys_disk: Disk size
- snapshot: Disk size
- nic: Number of NICs

Type

None

Number of occurrences

As many as there are products elements (0 or more elements for each products element).

usagePoint

Description

Usage point.

Type

decimal

Number of occurrences

As many as there are products elements (1 element for each products element).

usagePointUnit

Description

Unit of usage point. Specify one of the following:
- minute (minutes)
- hour (hours)
- month (months)

Type

string

Number of occurrences

As many as there are products elements (1 elements for each products element).

usageCharge

Description

Monthly usage charges.

Type

decimal

Number of occurrences

As many as there are products elements (1 element for each products element).

Sample request body

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

Response

<Status code>

The API returns "200 OK" if it terminates normally.


<XML>

<?xml version="1.0" encoding="UTF-8"?>
<RegisterMonthlyChargeResponse>
 <responseMessage>[Message]</responseMessage>
 <responseStatus>[Status]</responseStatus>
 <version>[Version]</version>
</RegisterMonthlyChargeResponse>

<Elements>

Element name

Item

Item description

RegisterMonthlyChargeResponse

Description

Element holding the response information.

Type

None

Number of occurrences

1

responseMessage

Description

Message. This element indicates whether the request has been processed correctly.
Refer to "Chapter 5 Messages Starting with AAPI" in the "Messages" for message details.

Type

string

Number of occurrences

1

responseStatus

Description

Status. This element indicates whether the request has been processed normally. "SUCCESS" is returned if the request is processed normally. Otherwise, an error code is returned.
Refer to "Appendix B List of Response Status Error Codes(Accounting APIs)" for information on error codes.

Type

string

Number of occurrences

1

version

Description

The version of the API.

Type

string

Number of occurrences

1

Sample response

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