Skip to main content

promotion_code_capabilities

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

Overview​

Namepromotion_code_capabilities
TypeResource
Idovh.pack_xdsl.promotion_code_capabilities

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
amountobjectAmount of the promotion code
can_generatebooleanTrue if the promotion code generation is available (wire: canGenerate)
engagementintegerNumber of months of engagement
reason_codesarrayEnum of the possible errors (wire: reasonCodes)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpack_nameGet the promotion code capabilities of an xDSL pack. Returns whether a promotion code can be generated, its amount, the engagement it requires and the reasons when it cannot.

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"}})
pack_namestringThe internal name of your pack (wire: packName)

SELECT examples​

Get the promotion code capabilities of an xDSL pack. Returns whether a promotion code can be generated, its amount, the engagement it requires and the reasons when it cannot.

SELECT
amount,
can_generate,
engagement,
reason_codes
FROM ovh.pack_xdsl.promotion_code_capabilities
WHERE pack_name = '{{ pack_name }}' -- required
;