resources
Creates, updates, deletes, gets or lists a resources resource.
Overview​
| Name | resources |
| Type | Resource |
| Id | ovh.vrack_services.resources |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier |
checksum | string | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
created_at | string (date-time) | Date of the vRack Services delivery (wire: createdAt) |
current_state | object | Current configuration applied to the vRack Services (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the vRack Services (wire: currentTasks) |
iam | object | IAM resource metadata |
resource_status | string | Reflects the readiness of the vRack Services. A new target specification request will be accepted only in READY status. (CREATING, DELETING, ERROR, READY, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the vRack Services (wire: targetSpec) |
updated_at | string (date-time) | Date of the Last vRack Services update (wire: updatedAt) |
A vRack Services
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier |
checksum | string | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
created_at | string (date-time) | Date of the vRack Services delivery (wire: createdAt) |
current_state | object | Current configuration applied to the vRack Services (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the vRack Services (wire: currentTasks) |
iam | object | IAM resource metadata |
resource_status | string | Reflects the readiness of the vRack Services. A new target specification request will be accepted only in READY status. (CREATING, DELETING, ERROR, READY, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the vRack Services (wire: targetSpec) |
updated_at | string (date-time) | Date of the Last vRack Services update (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | vrack_services_id | Returns the requested and current configuration of the vRack Services: region, associated vRack, subnets with their Service Endpoints, status and running tasks. | |
list | select | x_pagination_cursor, x_pagination_size, dedicated_server_interface, iam_tags | Returns the vRack Services of the account, each with its requested and current configuration. | |
update | update | vrack_services_id, checksum, target_spec | > Beta: BGP (bgp) and DHCP/netboot (services.serviceRange[].dhcp) are Beta features: their behaviour and payload may still change.<br /><br />Replaces the target specification of the vRack Services, subnets and Service Endpoints, and applies it asynchronously.<br /><br />It is the unique route handling any update on the vRack Services configuration. It works as following:<br />1. You define a new target specification in the request payload,<br />2. If this specification is validated, you get the resource with updated targetSpec and checksum values in return,<br />3. The request is processed by one or several asynchronous tasks that aims to reconciliate the currentState with the targetSpec<br /><br />### Asynchronous processing<br />* To follow this processing, the VrackServices resource can be polled with GET /vrackServices/resource/{vrackServicesId}<br />As soon as its resourceStatus is READY, the requested specification can be considered as applied to the vRack Services.<br />* The checksum helps on detecting concurrency cases on update requests. If the polled checksum value differs from the one returned in response of your initial request, it means that processing of your request is completed and another request is being processed.<br />* In case of processing error (that is resourceStatus in ERROR), the current vRack Services configuration is still active, but modification requests will be refused until the intervention of the support.<br />* An overview on the asynchronous task(s) is available via the currentTasks attribute.<br />More details on a task are provided by the route GET /vrackServices/resource/{vrackServicesId}/task/{taskId}<br /><br />### DHCP / netboot limits<br />* Untagged subnet only (vlan: null): a DHCP block on a tagged subnet is rejected<br />* Service range required: the DHCP block is declared on services.serviceRange[]<br />* vRack association required to bind a dedicatedServerInterface<br />* Maximum 200 dedicatedServerInterface associations per subnet<br />* netboot is read-only, derived from the subnet VLAN: always true today, since only untagged subnets accept a DHCP block<br /><br />### Seamless configuration actions<br />The request can combine any of the following seamless actions (meaning there won't be any cut of the service while updating):<br />* create a Subnet<br />* delete a Subnet without any Service Endpoint<br />* update a Subnet:<br /> * create one or several Service Endpoints<br /> * add or remove dedicatedServerInterface associations in its DHCP block<br /><br />Note that a Subnet with several Service Endpoints can be created in the same payload<br /><br />### Not seamless configuration actions<br />The modification of the Subnet characteristics listed below will result in a service cut while processing the update as they are interpreted as the deletion of the existing Subnet and creation of a new Subnet with provided characteristics. The IPs that were given to the Managed Services will be reelected and may as a result change:<br />* modifications on the Subnet ServiceRange<br />* modifications on the Subnet Vlan<br />* modifications on the Subnet CIDR <br /><br />The embedded Service Endpoints will be also deleted and re-created which implies a flapping accessibility in the vRack for every related managed services. <br />Note that deleting a Subnet will also delete embedded Service Endpoints<br /><br />Note that omitting dhcp on a Service Range that carries one WILL remove its DHCP/netboot configuration (netboot stops for every bound dedicatedServerInterface): always resend the dhcp block returned by GET.<br /><br />The vrackId is a read-only attribute as the association vRack/vRackServices is handled by the [vRack API](console-preview/?section=%2Fvrack&branch=v1) |
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"}}) |
vrack_services_id | string | Vrack services ID (wire: vrackServicesId) |
dedicated_server_interface | string | Filter on a dedicatedServerInterface (wire: dedicatedServerInterface) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Returns the requested and current configuration of the vRack Services: region, associated vRack, subnets with their Service Endpoints, status and running tasks.
SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
iam,
resource_status,
target_spec,
updated_at
FROM ovh.vrack_services.resources
WHERE vrack_services_id = '{{ vrack_services_id }}' -- required
;
Returns the vRack Services of the account, each with its requested and current configuration.
SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
iam,
resource_status,
target_spec,
updated_at
FROM ovh.vrack_services.resources
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND dedicated_server_interface = '{{ dedicated_server_interface }}'
AND iam_tags = '{{ iam_tags }}'
;
UPDATE examples​
- update
> Beta: BGP (bgp) and DHCP/netboot (services.serviceRange[].dhcp) are Beta features: their behaviour and payload may still change.<br /><br />Replaces the target specification of the vRack Services, subnets and Service Endpoints, and applies it asynchronously.<br /><br />It is the unique route handling any update on the vRack Services configuration. It works as following:<br />1. You define a new target specification in the request payload,<br />2. If this specification is validated, you get the resource with updated targetSpec and checksum values in return,<br />3. The request is processed by one or several asynchronous tasks that aims to reconciliate the currentState with the targetSpec<br /><br />### Asynchronous processing<br />* To follow this processing, the VrackServices resource can be polled with GET /vrackServices/resource/{vrackServicesId}<br />As soon as its resourceStatus is READY, the requested specification can be considered as applied to the vRack Services.<br />* The checksum helps on detecting concurrency cases on update requests. If the polled checksum value differs from the one returned in response of your initial request, it means that processing of your request is completed and another request is being processed.<br />* In case of processing error (that is resourceStatus in ERROR), the current vRack Services configuration is still active, but modification requests will be refused until the intervention of the support.<br />* An overview on the asynchronous task(s) is available via the currentTasks attribute.<br />More details on a task are provided by the route GET /vrackServices/resource/{vrackServicesId}/task/{taskId}<br /><br />### DHCP / netboot limits<br />* Untagged subnet only (vlan: null): a DHCP block on a tagged subnet is rejected<br />* Service range required: the DHCP block is declared on services.serviceRange[]<br />* vRack association required to bind a dedicatedServerInterface<br />* Maximum 200 dedicatedServerInterface associations per subnet<br />* netboot is read-only, derived from the subnet VLAN: always true today, since only untagged subnets accept a DHCP block<br /><br />### Seamless configuration actions<br />The request can combine any of the following seamless actions (meaning there won't be any cut of the service while updating):<br />* create a Subnet<br />* delete a Subnet without any Service Endpoint<br />* update a Subnet:<br /> * create one or several Service Endpoints<br /> * add or remove dedicatedServerInterface associations in its DHCP block<br /><br />Note that a Subnet with several Service Endpoints can be created in the same payload<br /><br />### Not seamless configuration actions<br />The modification of the Subnet characteristics listed below will result in a service cut while processing the update as they are interpreted as the deletion of the existing Subnet and creation of a new Subnet with provided characteristics. The IPs that were given to the Managed Services will be reelected and may as a result change:<br />* modifications on the Subnet ServiceRange<br />* modifications on the Subnet Vlan<br />* modifications on the Subnet CIDR <br /><br />The embedded Service Endpoints will be also deleted and re-created which implies a flapping accessibility in the vRack for every related managed services. <br />Note that deleting a Subnet will also delete embedded Service Endpoints<br /><br />Note that omitting dhcp on a Service Range that carries one WILL remove its DHCP/netboot configuration (netboot stops for every bound dedicatedServerInterface): always resend the dhcp block returned by GET.<br /><br />The vrackId is a read-only attribute as the association vRack/vRackServices is handled by the [vRack API](console-preview/?section=%2Fvrack&branch=v1)
UPDATE ovh.vrack_services.resources
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
vrack_services_id = '{{ vrack_services_id }}' --required
AND checksum = '{{ checksum }}' --required
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;