kx_users
Creates, updates, deletes, gets or lists a kx_users resource.
Overview
| Name | kx_users |
| Type | Resource |
| Id | aws.finspace.kx_users |
Fields
The following fields are returned by SELECT queries:
- get_kx_user
- list_kx_users
| Name | Datatype | Description |
|---|---|---|
environment_id | string | A unique identifier for the kdb environment. (pattern: <code>^[a-zA-Z0-9]{1,26}$</code>) |
iam_role | string | The IAM role ARN that is associated with the user. (pattern: <code>^arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+$</code>) |
user_arn | string | The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User Guide. (pattern: <code>^arn:aws:finspace:[A-Za-z0-9_/.-]{0,63}:\d+:kxEnvironment/[0-9A-Za-z_-]{1,128}/kxUser/[0-9A-Za-z_-]{1,128}$</code>) |
user_name | string | A unique identifier for the user. (pattern: <code>^[a-zA-Z0-9]{1,26}$</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | A token that indicates where a results page should begin. (pattern: <code>.*</code>) |
users | array | A list of users in a kdb environment. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_kx_user | select | user_name, environment_id, region | Retrieves information about the specified kdb user. | |
list_kx_users | select | environment_id, region | nextToken, maxResults | Lists all the users in a kdb environment. |
create_kx_user | insert | environment_id, region, userName, iamRole | Creates a user in FinSpace kdb environment with an associated IAM role. | |
update_kx_user | update | environment_id, user_name, region, iamRole | Updates the user details. You can only update the IAM role associated with a user. | |
delete_kx_user | delete | user_name, environment_id, region | clientToken | Deletes a user in the specified kdb environment. |
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 |
|---|---|---|
environment_id | string | A unique identifier for the kdb environment. |
region | string | AWS region (default: us-east-1) |
user_name | string | A unique identifier for the user that you want to delete. |
clientToken | string | A token that ensures idempotency. This token expires in 10 minutes. |
maxResults | integer | The maximum number of results to return in this request. |
nextToken | string | A token that indicates where a results page should begin. |
SELECT examples
- get_kx_user
- list_kx_users
Retrieves information about the specified kdb user.
SELECT
environment_id,
iam_role,
user_arn,
user_name
FROM aws.finspace.kx_users
WHERE user_name = '{{ user_name }}' -- required
AND environment_id = '{{ environment_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all the users in a kdb environment.
SELECT
next_token,
users
FROM aws.finspace.kx_users
WHERE environment_id = '{{ environment_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_kx_user
- Manifest
Creates a user in FinSpace kdb environment with an associated IAM role.
INSERT INTO aws.finspace.kx_users (
userName,
iamRole,
tags,
clientToken,
environment_id,
region
)
SELECT
'{{ userName }}' /* required */,
'{{ iamRole }}' /* required */,
'{{ tags }}',
'{{ clientToken }}',
'{{ environment_id }}',
'{{ region }}'
RETURNING
environment_id,
iam_role,
user_arn,
user_name
;
# Description fields are for documentation purposes
- name: kx_users
props:
- name: environment_id
value: "{{ environment_id }}"
description: Required parameter for the kx_users resource.
- name: region
value: "{{ region }}"
description: Required parameter for the kx_users resource.
- name: userName
value: "{{ userName }}"
- name: iamRole
value: "{{ iamRole }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_kx_user
Updates the user details. You can only update the IAM role associated with a user.
UPDATE aws.finspace.kx_users
SET
iamRole = '{{ iamRole }}',
clientToken = '{{ clientToken }}'
WHERE
environment_id = '{{ environment_id }}' --required
AND user_name = '{{ user_name }}' --required
AND region = '{{ region }}' --required
AND iamRole = '{{ iamRole }}' --required
RETURNING
environment_id,
iam_role,
user_arn,
user_name;
DELETE examples
- delete_kx_user
Deletes a user in the specified kdb environment.
DELETE FROM aws.finspace.kx_users
WHERE user_name = '{{ user_name }}' --required
AND environment_id = '{{ environment_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;