cart_dedicated_options
Creates, updates, deletes, gets or lists a cart_dedicated_options resource.
Overview​
| Name | cart_dedicated_options |
| Type | Resource |
| Id | ovh.order.cart_dedicated_options |
Fields​
The following fields are returned by SELECT queries:
- list
Representation of a generic product option
| Name | Datatype | Description |
|---|---|---|
product_name | string | Name of the product (wire: productName) |
exclusive | boolean | Define if options of this family are exclusive with each other |
family | string | Option family |
mandatory | boolean | Define if an option of this family is mandatory |
plan_code | string | Product offer identifier (wire: planCode) |
prices | array | Prices of the product offer |
product_type | string | Product type (cloud_service, delivery, deposit, domain, implementation_services, saas_license, shipping, storage) (wire: productType) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | cart_id, plan_code | family | Get information about dedicated server options (Beta version) |
create | insert | cart_id, duration, item_id, plan_code, pricing_mode, quantity | Post a new dedicated server option in your cart (Beta version) |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
cart_id | string | Cart ID (wire: cartId) |
plan_code | string | Identifier of a dedicated server offer (wire: planCode) |
family | string | Filter the value of family property (=) |
SELECT examples​
- list
Get information about dedicated server options (Beta version)
SELECT
product_name,
exclusive,
family,
mandatory,
plan_code,
prices,
product_type
FROM ovh.order.cart_dedicated_options
WHERE cart_id = '{{ cart_id }}' -- required
AND plan_code = '{{ plan_code }}' -- required
AND family = '{{ family }}'
;
INSERT examples​
- create
- Manifest
Post a new dedicated server option in your cart (Beta version)
INSERT INTO ovh.order.cart_dedicated_options (
duration,
item_id,
plan_code,
pricing_mode,
quantity,
cart_id
)
SELECT
'{{ duration }}' /* required */,
{{ item_id }} /* required */,
'{{ plan_code }}' /* required */,
'{{ pricing_mode }}' /* required */,
{{ quantity }} /* required */,
'{{ cart_id }}'
RETURNING
cart_id,
item_id,
offer_id,
parent_item_id,
product_id,
configurations,
duration,
options,
prices,
settings
;
# Description fields are for documentation purposes
- name: cart_dedicated_options
props:
- name: cart_id
value: "{{ cart_id }}"
description: Required parameter for the cart_dedicated_options resource.
- name: duration
value: "{{ duration }}"
description: |
Duration selected for the purchase of the product
- name: item_id
value: {{ item_id }}
description: |
Cart item to be linked
- name: plan_code
value: "{{ plan_code }}"
description: |
Identifier of the option offer
- name: pricing_mode
value: "{{ pricing_mode }}"
description: |
Pricing mode selected for the purchase of the product
- name: quantity
value: {{ quantity }}
description: |
Quantity of product desired