Skip to main content

service_accounts

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

Overview

Nameservice_accounts
TypeResource
Idconfluent.iam.service_accounts

Fields

The following fields are returned by SELECT queries:

Service Account.

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)
display_namestringA human-readable name for the Service Account (example: DeLorean_auto_repair)
api_versionstringAPIVersion defines the schema version of this representation of a resource. (iam/v2)
descriptionstringA free-form description of the Service Account (example: Doc's repair bot for the DeLorean)
kindstringKind defines the object this REST resource represents. (ServiceAccount)
metadataobjectObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_iam_v2_service_accountselectidMake a request to read a service account.
list_iam_v2_service_accountsselectdisplay_name, page_size, page_tokenRetrieve a sorted, filtered, paginated list of all service accounts.
create_iam_v2_service_accountinsertdisplay_nameassigned_resource_ownerMake a request to create a service account.
update_iam_v2_service_accountupdateidMake a request to update a service account.

delete_iam_v2_service_accountdeleteidMake a request to delete a service account.

If successful, this request will also recursively delete all of the service account's associated resources,
including its cloud and cluster API keys.

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 service account.
assigned_resource_ownerstringThe resource_id of the principal who will be assigned resource owner on the created service account. Principal can be group-mapping (group-xxx), user (u-xxx), service-account (sa-xxx) or identity-pool (pool-xxx). (example: u-a83k9b)
display_namearrayFilter the results by exact match for display_name. Pass multiple times to see results matching any of the values. (example: [tf_runner_sa, mySA])
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.

SELECT examples

Make a request to read a service account.

SELECT
id,
display_name,
api_version,
description,
kind,
metadata
FROM confluent.iam.service_accounts
WHERE id = '{{ id }}' -- required
;

INSERT examples

Make a request to create a service account.

INSERT INTO confluent.iam.service_accounts (
display_name,
description,
assigned_resource_owner
)
SELECT
'{{ display_name }}' /* required */,
'{{ description }}',
'{{ assigned_resource_owner }}'
RETURNING
id,
display_name,
api_version,
description,
kind,
metadata
;

UPDATE examples

Make a request to update a service account.

UPDATE confluent.iam.service_accounts
SET
display_name = '{{ display_name }}',
description = '{{ description }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
display_name,
api_version,
description,
kind,
metadata;

DELETE examples

Make a request to delete a service account.

If successful, this request will also recursively delete all of the service account's associated resources,
including its cloud and cluster API keys.

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