Pricing for service plans
The cost of a service is represented as a price of the plan selected at the time of deployment and unit of its measure is on a monthly, hourly, and weekly basis.
Currently, pricing in Managed services is at service level and this is expected to be consumed by the third-party applications integrating with Managed services using APIs. Managed services does only syntactic validations. It does not check price entered against Cloud or any other providers.
- List of pricing rules/conditions
- Pricing attributes
- Examples of pricing attribute and their usage in Service Composition Language
List of pricing rules/conditions
- Managed services validations ensure that the parameters used in pricing rules are based on service plan parameters. For example,
{"gt":["vm_disk",100,"gb"]},
herevm_disk
is a service plan parameter with size greater than100 gb
andvm_disk
has to be exposed as a service plan parameter. - The "any"/"all" condition - "all" specifies that all the conditions must satisfy for pricing. Whereas, "any" indicates that at least one condition must satisfy for pricing.
- Conditions can be defined only on exposed set of plan parameters. You can use only service plan input parameters in the pricing condition.
-
List of supported operators supported are "gt", "lt", "ge", "le", "members". The convention to follow for operators are as follows:
- First element must point to plan parameter. For example, "vm_disk".
- Seconnd element is the value of that parameter. For example, "40".
-
Third optional element is the unit. For example, "gb".
For example:
"condition":{ "all":[ {"gt":["disk_size",0,"gb"]}, {"le":["disk_size",40,"gb"]}, {"eq":["instance_type","x2.small"]} ] },
-
When defining an "amount", pricing can be a fixed value or it can have dependent plan parameters. You use the plan parameters with ‘incr’ of specified quantity and unit. For example:
"amount" : {"value" :49.0},
or
"amount" : { "value" :.99, "disk_size":["incr",1,"gb"] }
Pricing attributes
The Managed services captures the following attributes as a part of the Plan definition for the purpose of pricing:
-
currency
- It is a 3-character currency code. The default is "USD". For example:"currency": "USD",
-
paymentStrategy
- The values of payment strategy are "MONTHLY", "HOURLY", "YEARLY", "ONCE". For example,"paymentStrategy":"MONTHLY",
-
pricingStrategy
- The values of pricing strategy are as follows:- "FIXED" - The price is one time only and fixed for the plan.
- "RECURRING" - The price is recurring and fixed for the plan.
-
"USAGE" - The price is based on usage as per plan.
For example:
"pricingStrategy" :"RECURRING"
-
free
- It is a Boolean attribute at plan level and its default is ‘false’. For example:"free": false,
unitofMeasurement
andunitValue
- TheunitValue
is "1" andunitofMeasurement
is "gb" in this example"disk_size":["incr",1,"gb"]
Sample plan with pricing
The section provides two examples to illustrate pricing that is defined within plan parameters of a service. For more information about a plan structure, see Plans section in Managing service code structure.
-
The following basic pricing sample sets a fixed amount of 99 USD for a virtual server with single CPU, 1 GB RAM, and 50 GB disk on a by-monthly recurring basis.
{ "plans": [ { "name": "Basic", "description": " Virtual Server with Single CPU, 1 GB RAM and 50 GB Disk.", "metadata": { "currency": "USD", "prices": { "base": { "amount": { "value": 99.0 }, "paymentStrategy": "MONTHLY", "pricingStrategy": "RECURRING" } }, "bullets": [ "Fixed pricing", "Small virtual machine", "Limited storage" ], "free": false } } ] }
-
The following sample plan defines a base price and one additional price for a virtual machine disk. The base price is at a flat cost of 49 USD for a virtual machine disk of size that is between 0 and 40 GB. If the usage goes beyond 40 GB, then additional pricing is considered based on the availability. The condition defines the amount charged for any extra usage of the resource. With the increment of each gb after the base pricing is exhausted, the additional pricing amount of 1 USD is charged.
"plans": [{ "name": "The name of the plan. For example, Amsterdam", "description": "The description of the plan. For example, to deploy in Amsterdam", "plan_parameters" [ // In conditions of base and additional pricing section, you can define only those parameters that are defined here. { "name": "vm_disk", "label": "VM disk", "customtype": "string", "type": "string", "immutable": true, "hidden": true, "required": true, "secured": false, "description": "Virtual Machine disk", "default": "10" } ], "metadata": { "currency": "The currency used for the transaction. The default is USD.", "prices" :{ //This is the main section where you define the pricing. "base":{ // The main pricing is defined in base section. "amount" : {"value" : For example, 49.0}, // The charges for base pricing is mentioned in 'value' element under 'amount'. As long as the conditions for base pricing are met, this flat amount is charged. In this example, 49 USD is charged as long as the parameter "vm_disk" is between 0 to 40 GB. "condition":{ // This conditions section gives a set of rules which determines whether the base pricing is applicable or not. If the condition is not met, then base pricing becomes invalid and additional pricing is considered based on its availability. "all":[ // It implies the rule set for the price. {"gt":["vm_disk",0,"gb"]}, {"le":["vm_disk",40,"gb"]} //["resource name", value, unit of the resource] ---> {"le":["vm_disk",40,"gb"]} //In this example, if the usage is between 0 to 40 GB, then this base pricing is applicable. If it goes beyond 40 GB, then additional pricing is considered based on the availability. ] }, "paymentStrategy":"The values could be "MONTHLY", "HOURLY", "YEARLY", "ONCE", "pricingStrategy" : { - "FIXED" : the price is one time only and fixed for the plan. - "RECURRING": The price is recurring and fixed for the plan. }, "additional":[{ //Additional pricing is applicable whenever the base pricing is exhausted. "amount" : { //Defines the amount charged for any extra usage of the resource. ---> "amount" : { //Defines the amount charged for any extra usage of the resource under additional pricing. "value" :1, "vm_disk":["incr",1,"gb"] //[incr denotes incremental, value, unit]. With the increment of each gb after the base pricing is exhausted, the additional pricing amount is charged. }, "condition":{ // This condition section gives a set of rules to determine whether additional pricing is applicable. If the condition is not met, then this additional pricing becomes invalid. In case another additional pricing is defined, then it would be considered. "all":[ {"gt":["vm_disk",40,"gb"]} ] } } ] }, "bullets" :[ //Main features of pricing. "Flexible pricing", "Unlimited storage" ] "free": false, // It is a boolean attribute at plan level and its default is ‘false’. If there is no pricing attached to a plan, set this is set to true. } }, }; ]