Skip to main content

configuration_rules

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

Overview​

Nameconfiguration_rules
TypeResource
Idovh.domain.configuration_rules

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
andarrayAn "and" operator on multiple rules
conditionsobjectWhether this rule is applied or not
constraintsarrayThe constraints of the rule
contextsarrayThe context on which the rule applies
descriptionstringThe description of the rule
fieldsobjectThe fields with specific rules
labelstringThe label of the rule
orarrayAn "or" operator on multiple rules
placeholderstringThe default value used for the rule
typestringThe type of the object the rule applies on (bool, contact, date_ISO8601, domain, json, number, string, string[], text)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaction, domainGet configuration rule applied for a domain in a given action
checkexecaction, domainValidate a rule data for a specified domain

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
actionstringDepending on the action, the applied rule will change (transfer vs create)
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"}})
domainstringThe domain to check the rule data for

SELECT examples​

Get configuration rule applied for a domain in a given action

SELECT
and,
conditions,
constraints,
contexts,
description,
fields,
label,
or,
placeholder,
type
FROM ovh.domain.configuration_rules
WHERE action = '{{ action }}' -- required
AND domain = '{{ domain }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Validate a rule data for a specified domain

EXEC ovh.domain.configuration_rules.check
@action='{{ action }}' --required,
@domain='{{ domain }}' --required
@@json=
'{
"adminAccount": "{{ adminAccount }}",
"domain": "{{ domain }}",
"extras": "{{ extras }}",
"owner": "{{ owner }}",
"techAccount": "{{ techAccount }}"
}'
;