ip_tasks
Creates, updates, deletes, gets or lists an ip_tasks resource.
Overview​
| Name | ip_tasks |
| Type | Resource |
| Id | ovh.dedicated_cloud.ip_tasks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Task name |
datacenter_id | integer | datacenterId of the associated dedicatedCloud.Datacenter object (wire: datacenterId) |
filer_id | integer | filerId of the associated dedicatedCloud.Filer object (wire: filerId) |
host_id | integer | hostId of the associated dedicatedCloud.Host object (wire: hostId) |
network_access_id | integer | networkAccessId of the associated dedicatedCloud.AllowedNetwork object (wire: networkAccessId) |
order_id | integer | orderId of the associated billing.Order object (wire: orderId) |
parent_task_id | integer | taskId of the parent dedicatedCloud.Task object (wire: parentTaskId) |
task_id | integer | Task id (wire: taskId) |
user_id | integer | userId of the associated dedicatedCloud.User object (wire: userId) |
vlan_id | integer | vlanId of the parent dedicatedCloud.Vlan object (wire: vlanId) |
created_by | string | Creator of the task (wire: createdBy) |
created_from | string | Origin of the task (wire: createdFrom) |
description | string | Current progress description |
end_date | string (date-time) | Task end date (wire: endDate) |
execution_date | string (date-time) | Task execution date (wire: executionDate) |
last_modification_date | string (date-time) | Task last modification date (wire: lastModificationDate) |
maintenance_date_from | string (date-time) | Maintenance task min allowed execution date (wire: maintenanceDateFrom) |
maintenance_date_to | string (date-time) | Maintenance task max allowed execution date (wire: maintenanceDateTo) |
network | string | network of the associated dedicatedCloud.Ip object |
progress | integer | Current progress |
state | string | Current Task state (canceled, doing, done, error, fixing, toCancel, toCreate, todo, unknown, waitingForChilds, waitingTodo) |
type | string | Task type |
Operation
| Name | Datatype | Description |
|---|---|---|
name | string | Task name |
datacenter_id | integer | datacenterId of the associated dedicatedCloud.Datacenter object (wire: datacenterId) |
filer_id | integer | filerId of the associated dedicatedCloud.Filer object (wire: filerId) |
host_id | integer | hostId of the associated dedicatedCloud.Host object (wire: hostId) |
network_access_id | integer | networkAccessId of the associated dedicatedCloud.AllowedNetwork object (wire: networkAccessId) |
order_id | integer | orderId of the associated billing.Order object (wire: orderId) |
parent_task_id | integer | taskId of the parent dedicatedCloud.Task object (wire: parentTaskId) |
task_id | integer | Task id (wire: taskId) |
user_id | integer | userId of the associated dedicatedCloud.User object (wire: userId) |
vlan_id | integer | vlanId of the parent dedicatedCloud.Vlan object (wire: vlanId) |
created_by | string | Creator of the task (wire: createdBy) |
created_from | string | Origin of the task (wire: createdFrom) |
description | string | Current progress description |
end_date | string (date-time) | Task end date (wire: endDate) |
execution_date | string (date-time) | Task execution date (wire: executionDate) |
last_modification_date | string (date-time) | Task last modification date (wire: lastModificationDate) |
maintenance_date_from | string (date-time) | Maintenance task min allowed execution date (wire: maintenanceDateFrom) |
maintenance_date_to | string (date-time) | Maintenance task max allowed execution date (wire: maintenanceDateTo) |
network | string | network of the associated dedicatedCloud.Ip object |
progress | integer | Current progress |
state | string | Current Task state (canceled, doing, done, error, fixing, toCancel, toCreate, todo, unknown, waitingForChilds, waitingTodo) |
type | string | Task type |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | network, service_name, task_id | Get a task | |
list | select | network, service_name | name, state, x_pagination_mode | List IP block tasks |
change_maintenance_execution_date | exec | network, serviceName, taskId, executionDate | Reschedule a maintenance task. Changes the execution date of a maintenance task. Choose a date between the maintenanceDateFrom and maintenanceDateTo of the task. | |
reset_task_state | exec | network, serviceName, taskId, reason | Retry a failed task |
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"}}) |
network | string (ipv4-block) | IP ex: 213.186.33.34/24 |
serviceName | string | Domain of the service |
service_name | string | Domain of the service (wire: serviceName) |
taskId | integer | Task id |
task_id | integer | Task id (wire: taskId) |
name | string | Filter the value of name property (like) |
state | string | Filter the value of state property (=) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a task
SELECT
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type
FROM ovh.dedicated_cloud.ip_tasks
WHERE network = '{{ network }}' -- required
AND service_name = '{{ service_name }}' -- required
AND task_id = '{{ task_id }}' -- required
;
List IP block tasks
SELECT
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type
FROM ovh.dedicated_cloud.ip_tasks
WHERE network = '{{ network }}' -- required
AND service_name = '{{ service_name }}' -- required
AND name = '{{ name }}'
AND state = '{{ state }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_maintenance_execution_date
- reset_task_state
Reschedule a maintenance task. Changes the execution date of a maintenance task. Choose a date between the maintenanceDateFrom and maintenanceDateTo of the task.
EXEC ovh.dedicated_cloud.ip_tasks.change_maintenance_execution_date
@network='{{ network }}' --required,
@serviceName='{{ serviceName }}' --required,
@taskId='{{ taskId }}' --required
@@json=
'{
"executionDate": "{{ executionDate }}"
}'
;
Retry a failed task
EXEC ovh.dedicated_cloud.ip_tasks.reset_task_state
@network='{{ network }}' --required,
@serviceName='{{ serviceName }}' --required,
@taskId='{{ taskId }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;