configuration_rules
Creates, updates, deletes, gets or lists a configuration_rules resource.
Overview​
| Name | configuration_rules |
| Type | Resource |
| Id | ovh.domain.configuration_rules |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
and | array | An "and" operator on multiple rules |
conditions | object | Whether this rule is applied or not |
constraints | array | The constraints of the rule |
contexts | array | The context on which the rule applies |
description | string | The description of the rule |
fields | object | The fields with specific rules |
label | string | The label of the rule |
or | array | An "or" operator on multiple rules |
placeholder | string | The default value used for the rule |
type | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | action, domain | Get configuration rule applied for a domain in a given action | |
check | exec | action, domain | Validate 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.
| Name | Datatype | Description |
|---|---|---|
action | string | Depending on the action, the applied rule will change (transfer vs create) |
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"}}) |
domain | string | The domain to check the rule data for |
SELECT examples​
- get
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.
- check
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 }}"
}'
;