Skip to main content

ranchers

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

Overview​

Nameranchers
TypeResource
Idovh.public_cloud_kubernetes.ranchers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier
created_atstring (date-time)Date of the managed Rancher service creation (wire: createdAt)
current_stateobjectCurrent configuration applied to the managed Rancher service (wire: currentState)
current_tasksarrayAsynchronous operations ongoing on the managed Rancher service (wire: currentTasks)
resource_statusstringReflects the readiness of the managed Rancher service. A new target specification request will be accepted only in READY status. (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectLast target specification of the managed Rancher service (wire: targetSpec)
updated_atstring (date-time)Date of the last managed Rancher service update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrancher_id, project_idGet a managed Rancher service
listselectproject_idx_pagination_cursor, x_pagination_sizeList managed Rancher services
createinsertproject_id, target_specCreate a new managed Rancher service
updateupdaterancher_id, project_id, target_specUpdate an existing managed Rancher service
deletedeleterancher_id, project_idDelete a managed Rancher service
admin_credentialsexecrancherId, project_idReset the admin password

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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
rancherIdstring (uuid)Rancher ID
rancher_idstring (uuid)Rancher ID (wire: rancherId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Get a managed Rancher service

SELECT
id,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_kubernetes.ranchers
WHERE rancher_id = '{{ rancher_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new managed Rancher service

INSERT INTO ovh.public_cloud_kubernetes.ranchers (
target_spec,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ project_id }}'
RETURNING
id,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
;

UPDATE examples​

Update an existing managed Rancher service

UPDATE ovh.public_cloud_kubernetes.ranchers
SET
target_spec = '{{ target_spec }}'
WHERE
rancher_id = '{{ rancher_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;

DELETE examples​

Delete a managed Rancher service

DELETE FROM ovh.public_cloud_kubernetes.ranchers
WHERE rancher_id = '{{ rancher_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Reset the admin password

EXEC ovh.public_cloud_kubernetes.ranchers.admin_credentials
@rancherId='{{ rancherId }}' --required,
@project_id='{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;