Cloud Services

Enterprise Marketplace

Creating rate cards in Enterprise Marketplace
Published On Dec 17, 2024 - 12:41 PM

Creating rate cards in Enterprise Marketplace

Provides information about creating rate cards to add pricing to catalogs in Enterprise Marketplace.
To have pricing information for catalogs in Kyndryl Platform, you need to create a rate card for each of them. These rate cards take the form of comma-separated value (CSV) files.
The process of creating rate cards involves the following steps:
  1. Go through the pricing documentation for the provider that you want to use so that you understand the types of pricing available.
  2. Based on your understanding of pricing from that provider, creating a CSV file using the parameters and examples in Rate card formatting.
  3. Upload the CSV file using the REST API provided to create a rate card. For more information, see Create rate card API.

Types of pricing supported

You will be able to define fixed or configuration-based pricing for your individual resource types or for catalogs. This pricing is displayed to the Buyer so that they have an estimate of their costs before they submit an order.
  • Fixed pricing:
    Fixed prices do not change based on how the resource or catalog is configured. This price overrides the pricing from the providers, if available.
  • Configuration-based pricing:
    Configuration-based pricing varies based on how the Buyer configures the catalog or resource. For example, the pricing of virtual machines might depend on the specific instance type, amount of memory, and other configuration. The Buyer sees the price based on the results of these calculations.
In addition, you have two options when it comes to what the pricing will be based on. Both of these options can be used at the same time, subject to the rules for Rate card precedence.
  • Resource-based rate cards:
    These cards provide pricing on the resources themselves, such as VMs and the like. This allows you to create consistent pricing across your catalogs.
  • Catalog rate cards:
    These cards provide pricing for a catalog or a group of catalogs. This technique allows you tighter control of the pricing of your offerings.

Rate card precedence

When a Buyer configures a catalog, they will choose a specific version of the catalog for configuring an order. The prices that will be shown to them will depend on the types of Rate Cards you have defined, with this order of precedence:
  • Catalog Rate Card for a specific version of the catalog
  • Catalog Rate Cards defined for the Catalog Group (all available versions of the catalog)
  • Individual Resource Type Rate Cards

Supported providers

The types of providers supported depends on how the providers were imported into the system, whether you want to create pricing based on resource or catalog, and what technology they are supported by (either native or Terraform).
Supportability for public cloud providers
Resource type pricing
Provider
Native
Terraform
Alibaba Cloud
Not supported
Not supported
Amazon Web Services
Not supported
Supported
Google Cloud Platform
Not supported
Supported
IBM Cloud
Not supported
Not supported
Microsoft Azure
Supported
Supported
Red Hat Marketplace
Not supported
Not supported
vRA
Not supported
Not supported
ServiceNow
Not supported
Not supported
CP4MCM
Not supported
Not supported
Custom providers
Not supported
Not supported
Catalog pricing based on static or dynamic pricing
Provider
Native
Terraform
Alibaba Cloud
Not supported
Not supported
Amazon Web Services
Supported
Supported
Google Cloud Platform
Supported
Supported
IBM Cloud
Not supported
Not supported
Microsoft Azure
Supported
Supported
Red Hat Marketplace
Not supported
Not supported
vRA
Not supported
Not supported
ServiceNow
Not supported
Not supported
CP4MCM
Not supported
Not supported
Custom providers
Not supported
Not supported
Supportability for Terraform providers added using the Bring Your Own Provider tool
All Terraform providers integrated using the Bring Your Own Catalog Item tool are supported.

Rate card formatting

Before you can create rate cards, you must create a CSV file that provides the rules that the card will contain. After you have created this card, you can then upload it into Kyndryl Platform. A slightly different schema is used for each type of rate card. The schema for the cards varies based on the type of rate card:

Resource-based rate card schema

This method is used for Pricing for individual Resource Types. This rate card pricing strategy should be used where a certain resource type for a given resource type for a given provider is used for several catalogs.
The following table lists the fields needed for a resource-based rate card.
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
Resource Type/ Service Id/ Service Group Id
The type of resource that you are setting the rate for. Multiple resource types entries can be added in a single rate card
google_compute_instance
N/A
String
N/A
Yes
Type
Whether value entered in
Resource Type/ Service Id/ Service Group Id
field is a
resource
,
serviceOffering
or
serviceGroup
.
resource
serviceOffering
string
N/A
Yes
Region
The physical location of the resource being configured.
If the resource does not has
location
attribute or if the price is region independent, it should be left blank.
eastus
is the Azure location
us‑west‑1
is the GCP location
us‑east‑2
is the AWS location
N/A
string
N/A
No
SKU Name - Unique
A unique identifier for a rate-card item.
Can be any name that uniquely identifies the item/row such as
Managed disk S4
.
N/A
string
64
Yes
SKU Description
A description for your rate-card item that appears in the Bill of Materials as a label for the line item. If you do not enter this, that description will be formed using the
SKU Name
and
Region
.
Standard HDD disk for eastus region of type S4
N/A
string
256
No
Expression
Contains string expression/condition to determine whether the item will be picked.
Nested attributes are supported in the expression by giving the JSON path of the attribute
You can combine multiple expressions with the "and" operator. The comparison operators that are supported are "==", "<=", ">=", "<", ">". If the rate is static and does not depend on any resource attribute, set the expression value to "TRUE".
This field can be left blank if  the price is dependent on just region.
You cannot leave both
Expression
and
Region
blank.
storage_account_type == Standard_LRS and disk_size_gb >= 32
and
disk_size_gb < 65
.
In this example,
storage_account_type
and
disk_size_gb
are the attributes of the resource
managed_disk
.
Nested attribute example:
property.type
==
Standard_LRS
N/A
string
N/A
No
Unit of Measure
Describes the unit that is used to determine the price. The unit of measure also determines whether it is a Recurring charge or Usage charge. If the unit is "Hour", "Month", "Day", or "1 Hour", then it will be a Recurring charge. Units like "1/Month", "GB/Month", and so on are considered Usage charges.
Recurring charge examples: "Hour", "Month", "Day",  "1 Hour"
Usage charge examples: "1/Month", "1 GB/Month",”Size/Month”, ”100/Month”, ”1/Day”, ”1 GB/Hour”
N/A
string
N/A
Yes
Rate
Provides the rate for the resource type, which is either per time frame (recurring charge) or per unit (usage charge). This is applied when the expression condition is satisfied.
0 , .1,  0.5, 1.24,  5
N/A
Float
Integer
N/A
Yes
Tier Config
For this field, a resource attribute can be provided for which we want to calculate price based on tier. The rate will be multiplied by the resource attribute value for the final price. Nested resource attribute path is supported.
Also, operation multiplication, division, addition and subtraction operations are supported for conversions.
Example:
node_count
is the attribute for the resource
kubernetes_cluster_node_pool
. Its value tells us how many nodes will be created in the pool. So, the final price will be the
rate
multiplied by the
node_count
value.
Operation example:  disk_size_gb*1024 will convert the disk size into MB. This can be used in a scenario if the Unit of measure is 1/MB.
Nested resource attribute path example:
boot_disk[0].initialize_params[0].size
. This example is the boot disk size path of
google_compute_instance
Terraform resource.
N/A
string
N/A
No
Keep in mind the following when creating a resource-based rate card:
  • The Resource Type should match the resource type.
  • The variables inside the expression should match the attributes inside the resource type.
  • Multiple resource types can be added in a single CSV file.
  • The Resource Type based pricing is dependent on the attributes inside the resource type. So, while writing the expression the variables should match with the attributes inside the resource type.
  • For a fixed rate, set the expression value to "
    TRUE
    ".
  • If there are multiple attributes with the same names, you can include the JSON path of that attribute in the expression.
The following is an example of a Terraform resource type.
resource "google_compute_instance" "newtest" { name = "mybasicinstance" zone = "asia-east1-a" machine_type = "f1-micro" boot_disk { auto_delete = false initialize_params { size = 20 type = "pd-standard" image = "debian-cloud/debian-9" } } attached_disk { source = google_compute_disk.disk_add.name mode = "READ_WRITE" } network_interface { network = google_compute_network.netnew.name } scheduling { automatic_restart = false on_host_maintenance = "TERMINATE" preemptible = true } }
The CSV format for this Terraform resource type is shown in the following table.
Resource Type/ Service Id/ Service Group Id
Type
SKU Name
SKU Description
Expression
Unit of Measure
Rate
Tier Config
google_compute_instance
resource
Compute Engine
f1-micro machine Asia-East1
machine_type==f1-micro and zone==asia-east1-a
1/Month
6.7
google_compute_instance
resource
Compute Engine Boot disk
Standard persistent disk size less than 30 GB for Asia-East1
boot_disk[0].initialize_params[0].size<=30  and zone==asia-east1-a
1 GB/Month
0
google_compute_instance
resource
Compute Engine Boot disk 2
Standard persistent disk size greater than 30 GB for Asia-East1
boot_disk[0].initialize_params[0].size<=30 and zone==asia-east1-a
1 GB/Month
.04
machine_type==f1-micro and boot_disk[0].initialize_params[0].size-30
google_compute_instance
resource
Licensing Fee for RedHat Enterprise Linux 8 on f1-micro
Licensing Fee for RedHat Enterprise Linux 8 on f1-micro
machine_type==f1-micro and boot_disk[0].initialize_params[0].image==rhel-cloud/rhel-8
1 Hour
.06
google_compute_instance
resource
Licensing Fee for Debian 9 Stretch on f1-micro
Licensing Fee for Debian 9 Stretch on f1-micro
machine_type==f1-micro and boot_disk[0].initialize_params[0].image==debian-cloud/debian-9
1 Hour
0

Catalog rate card schema

This method can be used for catalogs created using cloud native technologies such as CloudFormation for AWS, Azure ARM for Azure, and Google Deployment Manager for Google Cloud Platform (GCP). You can also define catalog rate cards for catalogs created using Terraform. You can set pricing for a specific catalog, or set pricing for a category of catalogs, which is called a catalog group. You can create catalog groups while creating catalogs.
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
Resource Type/ Service Id/ Service Group Id
The unique ID of the catalog (Service Id) or catalog group (Service Group Id).
CB_AZ_ARM_LIN_VM_S00
N/A
string
N/A
Yes
Type
It tells us whether value entered in the
Resource Type/ Service Id/ Service Group Id
field is a
resource
or
serviceOffering
or
serviceGroup
.
serviceOffering
or
serviceGroup
serviceOffering
string
N/A
No
Region
The physical location of the resource being configured.
Value of the
location
config id should be filled
If the
location
config does not exist, it should be left blank.
eastus
is the Azure location
us‑west‑1
is the GCP location
us‑east‑2
is the AWS location
N/A
string
N/A
No
SKU Name - Unique
A unique identifier for a rate-card item.
It can be any name that uniquely identifies the item/row such as Managed disk S4
N/A
string
64
Yes
SKU Description
An optional description for your rate-card item. This description appears in the Bill of Materials as a label for the line item. If you do not enter this, that description will be formed using the SKU Name and Region.
Standard HDD disk for eastus region of type S4
N/A
string
256
No
Expression
Contains string expression/condition to determine whether the item will be picked
You can combine multiple expressions with the "and" operator. The comparison operators that are supported are "==", "<=", ">=", "<", ">". If the rate is static and does not depend on any resource attribute, set the expression value to "TRUE".
This field can be left blank if  the price is dependent on just ularregion.
Both
Expression
and
Region
can not be left blank.
storage_account_type == Standard_LRS and disk_size_gb >= 32 and disk_size_gb < 65.
In this example,
type
and
disk_size
are the attributes of the resource catalog
al67kMbLm2GErYTfaR2Q4e
.
N/A
string
N/A
No
Unit of Measure
Describes the unit that is used to determine the price. The unit of measure also determines whether it is a Recurring charge or Usage charge. If the unit is "Hour", "Month", "Day", or "1 Hour", then it will be a Recurring charge. Units like "1/Month", "GB/Month", and so on are considered Usage charges.
Recurring charge examples: "Hour", "Month", "Day",  "1 Hour"
Usage charge examples: "1/Month", "1 GB/Month",”Size/Month”, ”100/Month”, ”1/Day”, ”1 GB/Hour”
N/A
string
N/A
Yes
Rate
Provides the rate for the resource type, which is either per time frame (recurring charge) or per unit (usage charge). This is applied when the expression condition is satisfied.
0 , .1,  0.5, 1.24,  5
N/A
Float
Integer
N/A
Yes
Tier Config
For this field, config id can be provided for which we want to calculate price based on tier. The rate will be multiplied by the config value to generate the final price.
Also, operation multiplication, division, addition and subtraction operations are supported for conversions.
Example:
memory
is the config id of catalog
dC77kMbTm2fErYcfaR2Q3d
. Its value tells us how much memory is assigned. So, the final price will be the
rate
multiplied by the
memory
value.
Memory/1024 will convert the memory value from MB to GB.
N/A
string
N/A
No
Keep in mind the following when creating a resource-based rate card:
  • The
    serviceId
    should match the
    serviceId
    of the catalog/catalog group.
  • The variables inside the expression should match the variables inside the template
  • Multiple
    serviceIds
    can be added in a single CSV file.
  • The service-based pricing is dependent on the variables inside the template. So, while writing the expression the variables should match the variables inside the template.
  • If the rate is static and does not depend on any variable, expression value can be set as "
    TRUE
    "
The following is an example of Terraform template variables.
variable "vn_name" { type = string default = "foo" } variable "cpus" { type = number default = 1 } variable "memory" { type = number default = 1024 } variable "disk_size" { type = number default = 20 }
The following table shows the CSV file parameters for the above template.
Resource Type/ Service Id/ Service Group Id
Type
Region
SKU Name
SKU Description
Expression
Unit of Measure
Rate
Tier Config
4SVH5mpD9YFiienhgwXSiD
serviceOffering
eastus
Disk1
Disk size less than 30
disk_size<=30
GB/Month
0
disk_size
4SVH5mpD9YFiienhgwXSiD
serviceOffering
eastus
Disk2
Disk size greater than 30
disk_size>=31
GB/Month
0.3
disk_size
The following as an example of a fixed pricing rate card based on a Terraform template.
variable "vn_name" { type = string default = "foo" } variable "cpus" { type = number default = 1 } variable "memory" { type = number default = 1024 } variable "disk_size" { type = number default = 20 }
The CSV file for the above Terraform template contains the parameters shown in the following table.
Resource Type/ Service Id/ Service Group Id
Type
Region
SKU Name
SKU Description
Expression
Unit of Measure
Rate
Tier Config
4SVH5mpD9YFiienhgwXSiD
serviceOffering
eastus
Disk1
Disk size less than 30
TRUE
GB/Month
5
4SVH5mpD9YFiienhgwXSiD
serviceOffering
eastus
Disk2
Disk size greater than 30
TRUE
GB/Month
10

Managing rate cards

Managing your rate cards is done using APIs. To reach these APIs, complete these steps:
  1. Log in to the Kyndryl Platform.
  2. Click the
    User
    icon in the upper right and select
    Developer Console
    .
  3. In the
    Application
    field, select
    consume
    .
  4. In the
    Service
    field, select
    Pricing_Engine_Api
    .
There are two sets of APIs. The first set (
/provider/{provider_code}/price/ratecard/ratecards
) are for client tenants, and the second set (
/provider/{provider_code}/price/ratecard/sp_ratecards
) are for Service Provider tenants. They are identical except the different base path.
The following APIs can be used to manage your rate cards:
This section assumes that you have already created your rate card CSV files. If you have not, see Rate card formatting.

Create rate card API

Converts a rate CSV file into a rate card.
  • Method:
    POST
  • API:
    /provider/{provider_code}/price/ratecard/ratecards
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
file
Upload the rate CSV file that you want to turn into a rate card. File needs to be uploaded with form data payload. Key should be
file
and uploaded file type should be csv.
Curl  with --form 'file=@"/BCM-6213/aws.csv"'
N/A
CSV file
N/A
Yes
provider_code
The path param that identifies the provider associated with the rate card. Provider code needs to be given for which rate card needs to be uploaded.
Api examples: /provider/
aws
/price/ratecard/ratecards
/provider/
hashicorpvsphere1cMPg81Q
/price/ratecard/ratecards
N/A
azure, gcp, aws
Default and custom providers from
Terraform provider management
are also supported such as
hashicorpvsphere1cMPg81Q
N/A
Yes

Update rate card

Updates a rate card using the indicated rate CSV file.
  • Method:
    PUT
  • API:
    /provider/{provider_code}/price/ratecard/ratecards/{rc_id}
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
file
Upload the updated rate CSV file
File needs to be uploaded with form data payload. Key should be
file
and uploaded file type should be csv.
Curl  with --form 'file=@"/BCM-6213/aws.csv"'
N/A
CSV file
N/A
Yes
provider_code
The path parameter that identifies the provider associated with the rate card. Provider code needs to be given for which rate card needs to be uploaded.
Api examples: /provider/
aws
/price/ratecard/ratecards/49b00145-8608-4d31-986c-538431345e0a
/provider/
hashicorpvsphere1cMPg81Q
/price/ratecard/ratecards/49b00145-8608-4d31-986c-538431345e0a
N/A
azure, gcp, aws
Default and custom providers from
Terraform provider management
are also supported such as
hashicorpvsphere1cMPg81Q
N/A
Yes
rc_id
The ID of the rate card you want to update
49b00145-8608-4d31-986c-538431345e0a
N/A
Valid rate card IDs
36
Yes

Fetch rate card IDs

Fetches the IDs of rate cards based on the parameters set. If you do not supply any query parameters, it returns the entire CSV file as a JSON response.
  • Method:
    GET
  • API:
    /provider/{provider_code}/price/ratecard/ratecards/
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
short
If true, the query returns only the ID, name and description of the rate card. If false, it returns the entire CSV file as a JSON response.
true
false
true, false
N/A
No
provider_code
The path param that identifies the provider associated with the rate card. The Provider code needs to be given for the rate card that needs to be uploaded.
API examples: /provider/
aws
/price/ratecard/ratecards
/provider/hashicorpvsphere1cMPg81Q /price/ratecard/ratecards
N/A
azure, gcp, aws
Default and custom providers from
Terraform provider management
are also supported such as
hashicorpvsphere1cMPg81Q
N/A
Yes

Fetch rate card details by ID

Fetches the details for the specified rate card.
  • Method:
    GET
  • API:
    /provider/{provider_code}/price/ratecard/ratecards/{rc_id}
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
csv
Determines whether to return a CSV file (true) or JSON format of the rate card (false) If true, the exported CSV file also contains an ID column that is used to identify the row item
true
true
true, false
N/A
No
provider_code
The path parameter that identifies the provider associated with the rate card. The provider code needs to be given for the rate card that needs to be fetched.
API examples: /provider/
aws
/price/ratecard/ratecards//49b00145-8608-4d31-986c-538431345e0a
/provider/
hashicorpvsphere1cMPg81Q
/price/ratecard/ratecards/49b00145-8608-4d31-986c-538431345e0a
N/A
azure, gcp, aws
Custom values are supported
N/A
Yes
rc_id
The ID of the rate card you want to fetch the details for
49b00145-8608-4d31-986c-538431345e0a
N/A
Valid rc_ids
36
Yes

Patch rate card

Patches a rate card identified by ID with the contents of the file provided.
  • Method:
    PATCH
  • API:
    /provider/{provider_code}/price/ratecard/ratecards/{rc_id}
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
file
Upload the rate CSV file containing the rows that you want to update in the existing rate card. Rows to be updated need to be copied from the exported CSV file received from the
Fetch rate card by ID
API. The exported CSV file contains an ID column that identifies the row that needs to be updated.
File needs to be uploaded with the form data payload. Key should be
file
and the uploaded file type should be CSV.
Curl  with --form 'file=@"/BCM-6213/exported_aws_with_selected_rows.csv"'
N/A
CSV file
N/A
Yes
action
Select the type of update action that you are performing
set
set
set
N/A
No
provider_code
The path parameter that identifies the provider associated with the rate card. The provider code needs to be given for the rate card that needs to be patched.
/provider/
aws
/price/ratecard/ratecards//49b00145-8608-4d31-986c-538431345e0a
/provider/
hashicorpvsphere1cMPg81Q
/price/ratecard/ratecards//49b00145-8608-4d31-986c-538431345e0a
N/A
azure, gcp, aws
Default and custom providers from
Terraform provider management
are also supported such as
hashicorpvsphere1cMPg81Q
N/A
Yes
rc_id
The ID of the rate card you want to patch
49b00145-8608-4d31-986c-538431345e0a
N/A
Valid rate card IDs
36
Yes

Delete rate card

Deletes the rate card identified by the supplied ID.
  • Method:
    DELETE
  • API:
    /provider/{provider_code}/price/ratecard/ratecards/{rc_id}
  • Parameters:
Name
Description
Example usage
Default
Allowed values
Maximum length
Required
provider_code
The path parameter that identifies the provider associated with the rate card. The provider code needs to be given for the rate card that needs to be deleted.
/provider/
aws
/price/ratecard/ratecards//49b00145-8608-4d31-986c-538431345e0a
/provider/
hashicorpvsphere1cMPg81Q
/price/ratecard/ratecards//49b00145-8608-4d31-986c-538431345e0a
N/A
azure, gcp, aws
Default and custom providers from
Terraform provider management
are also supported such as
hashicorpvsphere1cMPg81Q
N/A
Yes
rc_id
The ID of the rate card you want to delete
49b00145-8608-4d31-986c-538431345e0a
N/A
Valid rate card IDs
36
Yes
Do you have two minutes for a quick survey?
Take Survey