service_keys
Creates, updates, deletes, gets or lists a service_keys resource.
Overview​
| Name | service_keys |
| Type | Resource |
| Id | ovh.ovh_cloud_connect.service_keys |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Service Key id |
key | string | Reference of the service |
provider | string | Service Key provider (OVHcloud, RISQ, consoleconnect, dcexp, digitalrealty, edge, equinix, fibrenoire, google, intercloud, internal, interxion, megaport, orange) |
status | string | Service Key status (active, cancelled, doing, terminated, toCheck) |
OVHcloud Connect Service Key
| Name | Datatype | Description |
|---|---|---|
id | integer | Service Key id |
key | string | Reference of the service |
provider | string | Service Key provider (OVHcloud, RISQ, consoleconnect, dcexp, digitalrealty, edge, equinix, fibrenoire, google, intercloud, internal, interxion, megaport, orange) |
status | string | Service Key status (active, cancelled, doing, terminated, toCheck) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_key_id, service_name | Returns the key value, its provider and its status. | |
list | select | service_name | x_pagination_mode | Returns the IDs of all service keys generated for the provider, current and past. |
regenerate | exec | serviceKeyId, serviceName | Generates a new key that the provider uses to set up the connection; previous service key is no longer active. | |
send | exec | serviceKeyId, serviceName, email | Emails the key value to the given address. |
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"}}) |
serviceKeyId | integer | Service key ID |
serviceName | string (uuid) | Service name |
service_key_id | integer | Service key ID (wire: serviceKeyId) |
service_name | string (uuid) | Service name (wire: serviceName) |
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
Returns the key value, its provider and its status.
SELECT
id,
key,
provider,
status
FROM ovh.ovh_cloud_connect.service_keys
WHERE service_key_id = '{{ service_key_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IDs of all service keys generated for the provider, current and past.
SELECT
id,
key,
provider,
status
FROM ovh.ovh_cloud_connect.service_keys
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- regenerate
- send
Generates a new key that the provider uses to set up the connection; previous service key is no longer active.
EXEC ovh.ovh_cloud_connect.service_keys.regenerate
@serviceKeyId='{{ serviceKeyId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Emails the key value to the given address.
EXEC ovh.ovh_cloud_connect.service_keys.send
@serviceKeyId='{{ serviceKeyId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"email": "{{ email }}"
}'
;