Skip to main content

resources

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

Overview​

Nameresources
TypeResource
Idovh.okms.resources

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the OKMS
iamobjectIAM resource metadata
kmip_endpointstringKMS kmip API endpoint (wire: kmipEndpoint)
kmip_object_countintegerNumber of KMIP objects (non destroyed) (wire: kmipObjectCount)
kmip_rsa_endpointstringKMS kmip RSA API endpoint (wire: kmipRsaEndpoint)
pci_dss_enabledbooleanWhether PCI-DSS compliance is enabled on the service (wire: pciDssEnabled)
pci_dss_enabled_atstring (date-time)Tells when PCI-DSS compliance was enabled (wire: pciDssEnabledAt)
public_castringKMS public CA (Certificate Authority) (wire: publicCA)
public_rsa_castringKMS public RSA CA (Certificate Authority) (wire: publicRsaCA)
regionstringRegion the key management service runs in, which is where your keys and secrets are stored (ap-south-mum, ap-southeast-sgp, ap-southeast-syd, ca-east-bhs, ca-east-tor, eu-central-waw, eu-south-mil, eu-west-eri, eu-west-gra, eu-west-lim, eu-west-par, eu-west-rbx, eu-west-sbg)
rest_endpointstringKMS rest API endpoint (wire: restEndpoint)
secret_countintegerNumber of secrets (wire: secretCount)
secret_version_countintegerNumber of secret versions (wire: secretVersionCount)
service_key_countintegerNumber of service keys (wire: serviceKeyCount)
service_key_count_detailsobjectNumber of service keys per protection level (wire: serviceKeyCountDetails)
swagger_endpointstringKMS rest API swagger UI (wire: swaggerEndpoint)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectokms_idpublic_caReturns the OKMS service with its endpoints and resource counts. Set publicCA to true to include the KMS public CA certificate.
listselectx_pagination_cursor, x_pagination_size, iam_tagsReturns the OKMS services of the account, with their region, KMIP and REST endpoints, and counts of keys, secrets and KMIP objects.
updateupdateokms_idEnables or disables PCI-DSS enforcement on the service.
log_urlexecokmsId, kindReturns a temporary signed URL for read-only access to the logs of the given kind. The link expires. (Beta version)

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"}})
okmsIdstring (uuid)Okms ID
okms_idstring (uuid)Okms ID (wire: okmsId)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
public_cabooleanAdd KMS public CA (Certificate Authority) in the output (wire: publicCA)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the OKMS service with its endpoints and resource counts. Set publicCA to true to include the KMS public CA certificate.

SELECT
id,
iam,
kmip_endpoint,
kmip_object_count,
kmip_rsa_endpoint,
pci_dss_enabled,
pci_dss_enabled_at,
public_ca,
public_rsa_ca,
region,
rest_endpoint,
secret_count,
secret_version_count,
service_key_count,
service_key_count_details,
swagger_endpoint
FROM ovh.okms.resources
WHERE okms_id = '{{ okms_id }}' -- required
AND public_ca = '{{ public_ca }}'
;

UPDATE examples​

Enables or disables PCI-DSS enforcement on the service.

UPDATE ovh.okms.resources
SET
pci_dss_enabled = {{ pci_dss_enabled }}
WHERE
okms_id = '{{ okms_id }}' --required
RETURNING
id,
kmip_endpoint,
kmip_object_count,
kmip_rsa_endpoint,
pci_dss_enabled,
pci_dss_enabled_at,
public_ca,
public_rsa_ca,
region,
rest_endpoint,
secret_count,
secret_version_count,
service_key_count,
service_key_count_details,
swagger_endpoint;

Lifecycle Methods​

EXEC variables use wire (API) names.

Returns a temporary signed URL for read-only access to the logs of the given kind. The link expires. (Beta version)

EXEC ovh.okms.resources.log_url
@okmsId='{{ okmsId }}' --required
@@json=
'{
"kind": "{{ kind }}"
}'
;