Skip to main content

service_keys

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

Overview​

Nameservice_keys
TypeResource
Idovh.ovh_cloud_connect.service_keys

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerService Key id
keystringReference of the service
providerstringService Key provider (OVHcloud, RISQ, consoleconnect, dcexp, digitalrealty, edge, equinix, fibrenoire, google, intercloud, internal, interxion, megaport, orange)
statusstringService Key status (active, cancelled, doing, terminated, toCheck)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_key_id, service_nameReturns the key value, its provider and its status.
listselectservice_namex_pagination_modeReturns the IDs of all service keys generated for the provider, current and past.
regenerateexecserviceKeyId, serviceNameGenerates a new key that the provider uses to set up the connection; previous service key is no longer active.
sendexecserviceKeyId, serviceName, emailEmails 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.

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"}})
serviceKeyIdintegerService key ID
serviceNamestring (uuid)Service name
service_key_idintegerService key ID (wire: serviceKeyId)
service_namestring (uuid)Service name (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

Lifecycle Methods​

EXEC variables use wire (API) names.

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
;