ranchers
Creates, updates, deletes, gets or lists a ranchers resource.
Overview​
| Name | ranchers |
| Type | Resource |
| Id | ovh.public_cloud_kubernetes.ranchers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier |
created_at | string (date-time) | Date of the managed Rancher service creation (wire: createdAt) |
current_state | object | Current configuration applied to the managed Rancher service (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the managed Rancher service (wire: currentTasks) |
resource_status | string | Reflects 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_spec | object | Last target specification of the managed Rancher service (wire: targetSpec) |
updated_at | string (date-time) | Date of the last managed Rancher service update (wire: updatedAt) |
A managed Rancher service object
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier |
created_at | string (date-time) | Date of the managed Rancher service creation (wire: createdAt) |
current_state | object | Current configuration applied to the managed Rancher service (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the managed Rancher service (wire: currentTasks) |
resource_status | string | Reflects 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_spec | object | Last target specification of the managed Rancher service (wire: targetSpec) |
updated_at | string (date-time) | Date of the last managed Rancher service update (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | rancher_id, project_id | Get a managed Rancher service | |
list | select | project_id | x_pagination_cursor, x_pagination_size | List managed Rancher services |
create | insert | project_id, target_spec | Create a new managed Rancher service | |
update | update | rancher_id, project_id, target_spec | Update an existing managed Rancher service | |
delete | delete | rancher_id, project_id | Delete a managed Rancher service | |
admin_credentials | exec | rancherId, project_id | Reset 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.
| 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"}}) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
rancherId | string (uuid) | Rancher ID |
rancher_id | string (uuid) | Rancher ID (wire: rancherId) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
List managed Rancher services
SELECT
id,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_kubernetes.ranchers
WHERE project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: ranchers
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the ranchers resource.
- name: target_spec
description: |
Target specification for the managed Rancher service
value:
iamAuthEnabled: {{ iamAuthEnabled }}
name: "{{ name }}"
plan: "{{ plan }}"
version: "{{ version }}"
UPDATE examples​
- update
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
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.
- admin_credentials
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
;