kx_databases
Creates, updates, deletes, gets or lists a kx_databases resource.
Overview
| Name | kx_databases |
| Type | Resource |
| Id | aws.finspace.kx_databases |
Fields
The following fields are returned by SELECT queries:
- get_kx_database
- list_kx_databases
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string (date-time) | The timestamp at which the database is created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. |
database_arn | string | The ARN identifier of the database. |
database_name | string | The name of the kdb database for which the information is retrieved. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*[a-zA-Z0-9]$</code>) |
description | string | A description of the database. (pattern: <code>^[a-zA-Z0-9. ]{1,1000}$</code>) |
environment_id | string | A unique identifier for the kdb environment. (pattern: <code>.\S.</code>) |
last_completed_changeset_id | string | A unique identifier for the changeset. (pattern: <code>^[a-zA-Z0-9]+$</code>) |
last_modified_timestamp | string (date-time) | The last time that the database was modified. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. |
num_bytes | integer (int64) | The total number of bytes in the database. |
num_changesets | integer | The total number of changesets in the database. |
num_files | integer | The total number of files in the database. |
| Name | Datatype | Description |
|---|---|---|
kx_databases | array | A list of databases in the kdb environment. |
next_token | string | A token that indicates where a results page should begin. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_kx_database | select | environment_id, database_name, region | Returns database information for the specified environment ID. | |
list_kx_databases | select | environment_id, region | nextToken, maxResults | Returns a list of all the databases in the kdb environment. |
create_kx_database | insert | environment_id, region, databaseName, clientToken | Creates a new kdb database in the environment. | |
update_kx_database | update | environment_id, database_name, region, clientToken | Updates information for the given kdb database. | |
delete_kx_database | delete | environment_id, database_name, clientToken, region | Deletes the specified database and all of its associated data. This action is irreversible. You must copy any data out of the database before deleting it if the data is to be retained. |
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 |
|---|---|---|
clientToken | string | A token that ensures idempotency. This token expires in 10 minutes. |
database_name | string | The name of the kdb database that you want to delete. |
environment_id | string | A unique identifier for the kdb environment. |
region | string | AWS region (default: us-east-1) |
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_database
- list_kx_databases
Returns database information for the specified environment ID.
SELECT
created_timestamp,
database_arn,
database_name,
description,
environment_id,
last_completed_changeset_id,
last_modified_timestamp,
num_bytes,
num_changesets,
num_files
FROM aws.finspace.kx_databases
WHERE environment_id = '{{ environment_id }}' -- required
AND database_name = '{{ database_name }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of all the databases in the kdb environment.
SELECT
kx_databases,
next_token
FROM aws.finspace.kx_databases
WHERE environment_id = '{{ environment_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_kx_database
- Manifest
Creates a new kdb database in the environment.
INSERT INTO aws.finspace.kx_databases (
databaseName,
description,
tags,
clientToken,
environment_id,
region
)
SELECT
'{{ databaseName }}' /* required */,
'{{ description }}',
'{{ tags }}',
'{{ clientToken }}' /* required */,
'{{ environment_id }}',
'{{ region }}'
RETURNING
created_timestamp,
database_arn,
database_name,
description,
environment_id,
last_modified_timestamp
;
# Description fields are for documentation purposes
- name: kx_databases
props:
- name: environment_id
value: "{{ environment_id }}"
description: Required parameter for the kx_databases resource.
- name: region
value: "{{ region }}"
description: Required parameter for the kx_databases resource.
- name: databaseName
value: "{{ databaseName }}"
- name: description
value: "{{ description }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_kx_database
Updates information for the given kdb database.
UPDATE aws.finspace.kx_databases
SET
description = '{{ description }}',
clientToken = '{{ clientToken }}'
WHERE
environment_id = '{{ environment_id }}' --required
AND database_name = '{{ database_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
database_name,
description,
environment_id,
last_modified_timestamp;
DELETE examples
- delete_kx_database
Deletes the specified database and all of its associated data. This action is irreversible. You must copy any data out of the database before deleting it if the data is to be retained.
DELETE FROM aws.finspace.kx_databases
WHERE environment_id = '{{ environment_id }}' --required
AND database_name = '{{ database_name }}' --required
AND clientToken = '{{ clientToken }}' --required
AND region = '{{ region }}' --required
;