key_manager_container_consumers
Creates, updates, deletes, gets or lists a key_manager_container_consumers resource.
Overview​
| Name | key_manager_container_consumers |
| Type | Resource |
| Id | ovh.public_cloud.key_manager_container_consumers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Computed consumer identifier |
resource_id | string (uuid) | UUID of the resource consuming the container (wire: resourceId) |
resource_type | string | Type of the resource consuming the container (IMAGE, INSTANCE, LOADBALANCER) (wire: resourceType) |
service | string | OpenStack service type of the consumer (COMPUTE, IMAGE, LOADBALANCER, NETWORK) |
A consumer registered for a Key Manager container
| Name | Datatype | Description |
|---|---|---|
id | string | Computed consumer identifier |
resource_id | string (uuid) | UUID of the resource consuming the container (wire: resourceId) |
resource_type | string | Type of the resource consuming the container (IMAGE, INSTANCE, LOADBALANCER) (wire: resourceType) |
service | string | OpenStack service type of the consumer (COMPUTE, IMAGE, LOADBALANCER, NETWORK) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | consumer_id, container_id, project_id | Returns one resource registered as using the container, with its type and service. Relies on the OpenStack Barbican component. | |
list | select | container_id, project_id | x_pagination_cursor, x_pagination_size | Returns the resources registered as using the container: instances, images or load balancers. Relies on the OpenStack Barbican component. |
create | insert | container_id, project_id, resource_id, resource_type, service | Records that an instance, an image or a load balancer uses the container. Relies on the OpenStack Barbican component. | |
delete | delete | consumer_id, container_id, project_id | Removes 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.
| 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"}}) |
consumer_id | string | Consumer ID (wire: consumerId) |
container_id | string (uuid) | Container ID (wire: containerId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
Returns the resources registered as using the container: instances, images or load balancers. Relies on the OpenStack Barbican component.
SELECT
id,
resource_id,
resource_type,
service
FROM ovh.public_cloud.key_manager_container_consumers
WHERE container_id = '{{ container_id }}' -- required
AND 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
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
;
# Description fields are for documentation purposes
- name: key_manager_container_consumers
props:
- name: container_id
value: "{{ container_id }}"
description: Required parameter for the key_manager_container_consumers resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the key_manager_container_consumers resource.
- name: resource_id
value: "{{ resource_id }}"
description: |
UUID of the resource consuming the container
- name: resource_type
value: "{{ resource_type }}"
description: |
Type of the resource consuming the container
valid_values: ['IMAGE', 'INSTANCE', 'LOADBALANCER']
- name: service
value: "{{ service }}"
description: |
OpenStack service type of the consumer
valid_values: ['COMPUTE', 'IMAGE', 'LOADBALANCER', 'NETWORK']
DELETE examples​
- delete
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
;