Skip to main content

api_keys

Creates, updates, deletes, gets or lists an api_keys resource.

Overview

Nameapi_keys
TypeResource
Idconfluent.iam.api_keys

Fields

The following fields are returned by SELECT queries:

API Key.

NameDatatypeDescription
idstringID 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_versionstringAPIVersion defines the schema version of this representation of a resource. (iam/v2)
kindstringKind defines the object this REST resource represents. (ApiKey)
metadataobjectObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
specobjectThe desired state of the Api Key

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_iam_v2_api_keyselectidMake a request to read an API key.
list_iam_v2_api_keysselectspec.owner, spec.resource, page_size, page_tokenRetrieve 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.
create_iam_v2_api_keyinsertspecMake a request to create an API key.
update_iam_v2_api_keyupdateidMake a request to update an API key.

delete_iam_v2_api_keydeleteidMake 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.

NameDatatypeDescription
idstringThe unique identifier for the API key.
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.
spec.ownerstringFilter the results by exact match for spec.owner.
spec.resourcestringFilter the results by exact match for spec.resource.

SELECT examples

Make a request to read an API key.

SELECT
id,
api_version,
kind,
metadata,
spec
FROM confluent.iam.api_keys
WHERE id = '{{ id }}' -- required
;

INSERT examples

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
;

UPDATE examples

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

Make a request to delete an API key.

DELETE FROM confluent.iam.api_keys
WHERE id = '{{ id }}' --required
;