datacenter_host_resiliences
Creates, updates, deletes, gets or lists a datacenter_host_resiliences resource.
Overview​
| Name | datacenter_host_resiliences |
| Type | Resource |
| Id | ovh.dedicated_cloud.datacenter_host_resiliences |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
state | string | State of the option (disabled, disabling, enabled, enabling, error, migrating, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | datacenter_id, host_id, service_name | Get the host resilience test | |
disable | exec | datacenterId, hostId, serviceName | Stop the resilience test | |
enable | exec | datacenterId, hostId, serviceName | Start a resilience test. Cuts the network access of the host for the given duration, then reconnects it: 10 minutes to 24 hours, 1 hour by default. Returns a task to track progress. |
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"}}) |
datacenterId | integer | Id of the Datacenter |
datacenter_id | integer | Id of the Datacenter (wire: datacenterId) |
hostId | integer | Id of the host |
host_id | integer | Id of the host (wire: hostId) |
serviceName | string | Domain of the service |
service_name | string | Domain of the service (wire: serviceName) |
SELECT examples​
- get
Get the host resilience test
SELECT
state
FROM ovh.dedicated_cloud.datacenter_host_resiliences
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND host_id = '{{ host_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- disable
- enable
Stop the resilience test
EXEC ovh.dedicated_cloud.datacenter_host_resiliences.disable
@datacenterId='{{ datacenterId }}' --required,
@hostId='{{ hostId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Start a resilience test. Cuts the network access of the host for the given duration, then reconnects it: 10 minutes to 24 hours, 1 hour by default. Returns a task to track progress.
EXEC ovh.dedicated_cloud.datacenter_host_resiliences.enable
@datacenterId='{{ datacenterId }}' --required,
@hostId='{{ hostId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"duration": {{ duration }}
}'
;