service_accounts
Creates, updates, deletes, gets or lists a service_accounts resource.
Overview
| Name | service_accounts |
| Type | Resource |
| Id | confluent.iam.service_accounts |
Fields
The following fields are returned by SELECT queries:
- get_iam_v2_service_account
- list_iam_v2_service_accounts
Service Account.
| 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) |
display_name | string | A human-readable name for the Service Account (example: DeLorean_auto_repair) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (iam/v2) |
description | string | A free-form description of the Service Account (example: Doc's repair bot for the DeLorean) |
kind | string | Kind defines the object this REST resource represents. (ServiceAccount) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
Service Account.
| 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) |
display_name | string | A human-readable name for the Service Account (example: DeLorean_auto_repair) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (iam/v2) |
description | string | A free-form description of the Service Account (example: Doc's repair bot for the DeLorean) |
kind | string | Kind defines the object this REST resource represents. (ServiceAccount) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_iam_v2_service_account | select | id | Make a request to read a service account. | |
list_iam_v2_service_accounts | select | display_name, page_size, page_token | Retrieve a sorted, filtered, paginated list of all service accounts. | |
create_iam_v2_service_account | insert | display_name | assigned_resource_owner | Make a request to create a service account. |
update_iam_v2_service_account | update | id | Make a request to update a service account. | |
delete_iam_v2_service_account | delete | id | 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. |
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 service account. |
assigned_resource_owner | string | The 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_name | array | Filter 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_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
SELECT examples
- get_iam_v2_service_account
- list_iam_v2_service_accounts
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
;
Retrieve a sorted, filtered, paginated list of all service accounts.
SELECT
id,
display_name,
api_version,
description,
kind,
metadata
FROM confluent.iam.service_accounts
WHERE display_name = '{{ display_name }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_iam_v2_service_account
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_accounts
props:
- name: display_name
value: "{{ display_name }}"
description: |
A human-readable name for the Service Account
- name: description
value: "{{ description }}"
description: |
A free-form description of the Service Account
- name: assigned_resource_owner
value: "{{ assigned_resource_owner }}"
description: The 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)
description: The 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)
UPDATE examples
- update_iam_v2_service_account
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
- delete_iam_v2_service_account
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
;