Skip to main content

key_manager_container_consumers

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

Overview​

Namekey_manager_container_consumers
TypeResource
Idovh.public_cloud.key_manager_container_consumers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringComputed consumer identifier
resource_idstring (uuid)UUID of the resource consuming the container (wire: resourceId)
resource_typestringType of the resource consuming the container (IMAGE, INSTANCE, LOADBALANCER) (wire: resourceType)
servicestringOpenStack service type of the consumer (COMPUTE, IMAGE, LOADBALANCER, NETWORK)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectconsumer_id, container_id, project_idReturns one resource registered as using the container, with its type and service. Relies on the OpenStack Barbican component.
listselectcontainer_id, project_idx_pagination_cursor, x_pagination_sizeReturns the resources registered as using the container: instances, images or load balancers. Relies on the OpenStack Barbican component.
createinsertcontainer_id, project_id, resource_id, resource_type, serviceRecords that an instance, an image or a load balancer uses the container. Relies on the OpenStack Barbican component.
deletedeleteconsumer_id, container_id, project_idRemoves the consumer registration. The resource itself is not deleted. Relies on the OpenStack Barbican component.

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"}})
consumer_idstringConsumer ID (wire: consumerId)
container_idstring (uuid)Container ID (wire: containerId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns one resource registered as using the container, with its type and service. Relies on the OpenStack Barbican component.

SELECT
id,
resource_id,
resource_type,
service
FROM ovh.public_cloud.key_manager_container_consumers
WHERE consumer_id = '{{ consumer_id }}' -- required
AND container_id = '{{ container_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Records that an instance, an image or a load balancer uses the container. Relies on the OpenStack Barbican component.

INSERT INTO ovh.public_cloud.key_manager_container_consumers (
resource_id,
resource_type,
service,
container_id,
project_id
)
SELECT
'{{ resource_id }}' /* required */,
'{{ resource_type }}' /* required */,
'{{ service }}' /* required */,
'{{ container_id }}',
'{{ project_id }}'
RETURNING
id,
resource_id,
resource_type,
service
;

DELETE examples​

Removes the consumer registration. The resource itself is not deleted. Relies on the OpenStack Barbican component.

DELETE FROM ovh.public_cloud.key_manager_container_consumers
WHERE consumer_id = '{{ consumer_id }}' --required
AND container_id = '{{ container_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;