Skip to main content

resources

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

Overview​

Nameresources
TypeResource
Idovh.vrack_services.resources

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUnique identifier
checksumstringComputed hash used to control concurrent modification requests. Here, it represents the current target specification value.
created_atstring (date-time)Date of the vRack Services delivery (wire: createdAt)
current_stateobjectCurrent configuration applied to the vRack Services (wire: currentState)
current_tasksarrayAsynchronous operations ongoing on the vRack Services (wire: currentTasks)
iamobjectIAM resource metadata
resource_statusstringReflects 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_specobjectLast target specification of the vRack Services (wire: targetSpec)
updated_atstring (date-time)Date of the Last vRack Services update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectvrack_services_idReturns the requested and current configuration of the vRack Services: region, associated vRack, subnets with their Service Endpoints, status and running tasks.
listselectx_pagination_cursor, x_pagination_size, dedicated_server_interface, iam_tagsReturns the vRack Services of the account, each with its requested and current configuration.
updateupdatevrack_services_id, checksum, target_spec> Beta: BGP (bgp) and DHCP/netboot (services.serviceRange&#91;&#93;.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/&#123;vrackServicesId&#125;<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/&#123;vrackServicesId&#125;/task/&#123;taskId&#125;<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&#91;&#93;<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.

NameDatatypeDescription
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"}})
vrack_services_idstringVrack services ID (wire: vrackServicesId)
dedicated_server_interfacestringFilter on a dedicatedServerInterface (wire: dedicatedServerInterface)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

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
;

UPDATE examples​

> Beta: BGP (bgp) and DHCP/netboot (services.serviceRange&#91;&#93;.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/&#123;vrackServicesId&#125;<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/&#123;vrackServicesId&#125;/task/&#123;taskId&#125;<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&#91;&#93;<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;