Apply Fixed Cost on Guest Operating System

This API applies a fixed cost on a given guest operating system and cost model.  To add a cost, the operating system name in the request XML can be any alphanumeric string.

Syntax

The syntax for calling this method is:

PUT <Base_Url> /costModel/{costModelId}/guestOperatingSystems

A sample API call is as follows:

PUT https://123.123.123.123/vCenter-CB/api/costModel/5/guestOperatingSystems

User Privilege

You must have Update privilege on cost model.

Request Body Parameters

In the request XML, specify the following parameters.

XPath

Type

Min Occurs

Max Occurs

Description

GuestOperatingSystems/GuestOperatingSystem

1

unbounded

Represents the guest operating system on which you want to apply the fixed cost.

GuestOperatingSystems/GuestOperatingSystem/Name

xs:string

1

1

Name of the guest operating system to which you want to apply the fixed cost.

GuestOperatingSystems/GuestOperatingSystem/FixedCosts/FixedCost/@id

xs:int

1

1

ID of the fixed cost to be applied to the guest operating system.

A sample request XML is provided here

Response Type

The API returns a response XML that indicates whether the operation was successful.

A sample response is provided here.

Error Response

The following table explains the error codes displayed by the API.

Error Code

Description

VCB_ERR_INVALID_COST_MODEL_ID

The specified Cost Model ID is invalid.

VCB_ERR_INVALID_FIXED_COST_ID

The specified fixed cost ID is invalid.

VCB_ERR_INVALID_GUEST_OPERATING_SYSTEM

Fixed cost ID is not specified and the name does not match any operating system set with the fixed cost in the cost model.