api_keys
Creates, updates, deletes, gets or lists an api_keys resource.
Overview
| Name | api_keys |
| Type | Resource |
| Id | confluent.iam.api_keys |
Fields
The following fields are returned by SELECT queries:
- get_iam_v2_api_key
- list_iam_v2_api_keys
API Key.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (iam/v2) |
kind | string | Kind defines the object this REST resource represents. (ApiKey) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The desired state of the Api Key |
API Key.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (iam/v2) |
kind | string | Kind defines the object this REST resource represents. (ApiKey) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The desired state of the Api Key |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_iam_v2_api_key | select | id | Make a request to read an API key. | |
list_iam_v2_api_keys | select | spec.owner, spec.resource, page_size, page_token | Retrieve a sorted, filtered, paginated list of all API keys. This can show all keys for a single owner (across resources - Kafka clusters), or all keys for a single resource (across owners). If no owner or resource filters are specified, returns all API Keys in theorganization. You will only see the keys that are accessible to the account making the API request. | |
create_iam_v2_api_key | insert | spec | Make a request to create an API key. | |
update_iam_v2_api_key | update | id | Make a request to update an API key. | |
delete_iam_v2_api_key | delete | id | Make a request to delete an API key. |
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 |
|---|---|---|
id | string | The unique identifier for the API key. |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
spec.owner | string | Filter the results by exact match for spec.owner. |
spec.resource | string | Filter the results by exact match for spec.resource. |
SELECT examples
- get_iam_v2_api_key
- list_iam_v2_api_keys
Make a request to read an API key.
SELECT
id,
api_version,
kind,
metadata,
spec
FROM confluent.iam.api_keys
WHERE id = '{{ id }}' -- required
;
Retrieve a sorted, filtered, paginated list of all API keys.
This can show all keys for a single owner (across resources - Kafka clusters), or all keys for a single
resource (across owners). If no owner or resource filters are specified, returns all API Keys in the
organization. You will only see the keys that are accessible to the account making the API request.
SELECT
id,
api_version,
kind,
metadata,
spec
FROM confluent.iam.api_keys
WHERE spec.owner = '{{ spec.owner }}'
AND spec.resource = '{{ spec.resource }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_iam_v2_api_key
- Manifest
Make a request to create an API key.
INSERT INTO confluent.iam.api_keys (
spec
)
SELECT
'{{ spec }}' /* required */
RETURNING
id,
api_version,
kind,
metadata,
spec
;
# Description fields are for documentation purposes
- name: api_keys
props:
- name: spec
description: |
The desired state of the Api Key
value:
secret: "{{ secret }}"
display_name: "{{ display_name }}"
description: "{{ description }}"
owner:
id: "{{ id }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
api_version: "{{ api_version }}"
kind: "{{ kind }}"
resource:
id: "{{ id }}"
environment: "{{ environment }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
api_version: "{{ api_version }}"
kind: "{{ kind }}"
UPDATE examples
- update_iam_v2_api_key
Make a request to update an API key.
UPDATE confluent.iam.api_keys
SET
spec = '{{ spec }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
api_version,
kind,
metadata,
spec;
DELETE examples
- delete_iam_v2_api_key
Make a request to delete an API key.
DELETE FROM confluent.iam.api_keys
WHERE id = '{{ id }}' --required
;