Skip to main content

catalog_public_plans

Creates, updates, deletes, gets or lists a catalog_public_plans resource.

Overview​

Namecatalog_public_plans
TypeResource
Idovh.order.catalog_public_plans

Fields​

The following fields are returned by SELECT queries:

A commercial plan from the catalog

NameDatatypeDescription
plan_idintegerInternal numeric plan identifier (wire: planId)
family_namestringName of the product family this plan belongs to (wire: familyName)
invoice_namestringName displayed on invoices for this plan (wire: invoiceName)
plan_codestringCommercial offer identifier (wire: planCode)
pricing_typestringPricing type of the plan (consumption, purchase, rental) (wire: pricingType)
pricingsarrayPricings of the plan
promotionsarrayPromotions applicable to the plan

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectovh_subsidiary, product_namex_pagination_cursor, x_pagination_size, plan_codeReturns the main plans paginated, or the plans matching the planCode query parameter when provided. When planCode is set, pagination is ignored.

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.

NameDatatypeDescription
api_hoststringThe 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"}})
ovh_subsidiarystringSubsidiary of the country you want to consult plans for (wire: ovhSubsidiary)
product_namestringProduct name whose plans you want to fetch (wire: productName)
plan_codearrayOptional list of plan codes to fetch (wire: planCode)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the main plans paginated, or the plans matching the planCode query parameter when provided. When planCode is set, pagination is ignored.

SELECT
plan_id,
family_name,
invoice_name,
plan_code,
pricing_type,
pricings,
promotions
FROM ovh.order.catalog_public_plans
WHERE ovh_subsidiary = '{{ ovh_subsidiary }}' -- required
AND product_name = '{{ product_name }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND plan_code = '{{ plan_code }}'
;