Skip to main content

kx_clusters

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

Overview

Namekx_clusters
TypeResource
Idaws.finspace.kx_clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auto_scaling_configurationobjectThe configuration based on which FinSpace will scale in or scale out nodes in your cluster.
availability_zone_idstringThe availability zone identifiers for the requested regions. (pattern: <code>^[a-zA-Z0-9-]+$</code>)
az_modestringThe number of availability zones you want to assign per cluster. This can be one of the following SINGLE – Assigns one availability zone per cluster. MULTI – Assigns all the availability zones per cluster. (SINGLE, MULTI)
cache_storage_configurationsarrayThe configurations for a read only cache storage associated with a cluster. This cache will be stored as an FSx Lustre that reads from the S3 store.
capacity_configurationobjectA structure for the metadata of a cluster. It includes information like the CPUs needed, memory of instances, and number of instances.
cluster_descriptionstringA description of the cluster. (pattern: <code>^[a-zA-Z0-9_-.\s]+$</code>)
cluster_namestringA unique name for the cluster. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*[a-zA-Z0-9]$</code>)
cluster_typestringSpecifies the type of KDB database that is being created. The following types are available: HDB – A Historical Database. The data is only accessible with read-only permissions from one of the FinSpace managed kdb databases mounted to the cluster. RDB – A Realtime Database. This type of database captures all the data from a ticker plant and stores it in memory until the end of day, after which it writes all of its data to a disk and reloads the HDB. This cluster type requires local storage for temporary storage of data during the savedown process. If you specify this field in your request, you must provide the savedownStorageConfiguration parameter. GATEWAY – A gateway cluster allows you to access data across processes in kdb systems. It allows you to create your own routing logic using the initialization scripts and custom code. This type of cluster does not require a writable local storage. GP – A general purpose cluster allows you to quickly iterate on code during development by granting greater access to system commands and enabling a fast reload of custom code. This cluster type can optionally mount databases including cache and savedown storage. For this cluster type, the node count is fixed at 1. It does not support autoscaling and supports only SINGLE AZ mode. Tickerplant – A tickerplant cluster allows you to subscribe to feed handlers based on IAM permissions. It can publish to RDBs, other Tickerplants, and real-time subscribers (RTS). Tickerplants can persist messages to log, which is readable by any RDB environment. It supports only single-node that is only one kdb process. (HDB, RDB, GATEWAY, GP, TICKERPLANT)
codeobjectThe structure of the customer code available within the running cluster.
command_line_argumentsarrayDefines key-value pairs to make them available inside the cluster.
created_timestampstring (date-time)The timestamp at which the cluster was 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.
databasesarrayA list of databases mounted on the cluster.
execution_rolestringAn IAM role that defines a set of permissions associated with a cluster. These permissions are assumed when a cluster attempts to access another cluster. (pattern: <code>^arn:aws[a-z0-9-]*:iam::\d{12}:role/[\w-/.@+=,]{1,1017}$</code>)
initialization_scriptstringSpecifies a Q program that will be run at launch of a cluster. It is a relative path within .zip file that contains the custom code, which will be loaded on the cluster. It must include the file name itself. For example, somedir/init.q. (pattern: <code>^[a-zA-Z0-9_-./\]+$</code>)
last_modified_timestampstring (date-time)The last time that the cluster 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.
release_labelstringThe version of FinSpace managed kdb to run. (pattern: <code>^[a-zA-Z0-9._-]+$</code>)
savedown_storage_configurationobjectThe size and type of temporary storage that is used to hold data during the savedown process. All the data written to this storage space is lost when the cluster node is restarted.
scaling_group_configurationobjectThe structure that stores the capacity configuration details of a scaling group.
statusstringThe status of cluster creation. PENDING – The cluster is pending creation. CREATING – The cluster creation process is in progress. CREATE_FAILED – The cluster creation process has failed. RUNNING – The cluster creation process is running. UPDATING – The cluster is in the process of being updated. DELETING – The cluster is in the process of being deleted. DELETED – The cluster has been deleted. DELETE_FAILED – The cluster failed to delete. (PENDING, CREATING, CREATE_FAILED, RUNNING, UPDATING, DELETING, DELETED, DELETE_FAILED)
status_reasonstringThe error message when a failed state occurs. (pattern: <code>^[a-zA-Z0-9_-.\s]+$</code>)
tickerplant_log_configurationobjectA configuration to store the Tickerplant logs. It consists of a list of volumes that will be mounted to your cluster. For the cluster type Tickerplant, the location of the TP volume on the cluster will be available by using the global variable .aws.tp_log_path.
volumesarrayA list of volumes attached to the cluster.
vpc_configurationobjectConfiguration details about the network where the Privatelink endpoint of the cluster resides.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_kx_clusterselectenvironment_id, cluster_name, regionRetrieves information about a kdb cluster.
list_kx_clustersselectenvironment_id, regionclusterType, maxResults, nextTokenReturns a list of clusters.
create_kx_clusterinsertenvironment_id, region, clusterName, clusterType, releaseLabel, vpcConfiguration, azModeCreates a new kdb cluster.
update_kx_cluster_code_configurationupdateenvironment_id, cluster_name, region, codeAllows you to update code configuration on a running cluster. By using this API you can update the code, the initialization script path, and the command line arguments for a specific cluster. The configuration that you want to update will override any existing configurations on the cluster.
update_kx_cluster_databasesupdateenvironment_id, cluster_name, region, databasesUpdates the databases mounted on a kdb cluster, which includes the changesetId and all the dbPaths to be cached. This API does not allow you to change a database name or add a database if you created a cluster without one. Using this API you can point a cluster to a different changeset and modify a list of partitions being cached.
delete_kx_clusterdeleteenvironment_id, cluster_name, regionclientTokenDeletes a kdb cluster.

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
cluster_namestringThe name of the cluster that you want to delete.
environment_idstringA unique identifier for the kdb environment.
regionstringAWS region (default: us-east-1)
clientTokenstringA token that ensures idempotency. This token expires in 10 minutes.
clusterTypestringSpecifies the type of KDB database that is being created. The following types are available: HDB – A Historical Database. The data is only accessible with read-only permissions from one of the FinSpace managed kdb databases mounted to the cluster. RDB – A Realtime Database. This type of database captures all the data from a ticker plant and stores it in memory until the end of day, after which it writes all of its data to a disk and reloads the HDB. This cluster type requires local storage for temporary storage of data during the savedown process. If you specify this field in your request, you must provide the savedownStorageConfiguration parameter. GATEWAY – A gateway cluster allows you to access data across processes in kdb systems. It allows you to create your own routing logic using the initialization scripts and custom code. This type of cluster does not require a writable local storage. GP – A general purpose cluster allows you to quickly iterate on code during development by granting greater access to system commands and enabling a fast reload of custom code. This cluster type can optionally mount databases including cache and savedown storage. For this cluster type, the node count is fixed at 1. It does not support autoscaling and supports only SINGLE AZ mode. Tickerplant – A tickerplant cluster allows you to subscribe to feed handlers based on IAM permissions. It can publish to RDBs, other Tickerplants, and real-time subscribers (RTS). Tickerplants can persist messages to log, which is readable by any RDB environment. It supports only single-node that is only one kdb process.
maxResultsintegerThe maximum number of results to return in this request.
nextTokenstringA token that indicates where a results page should begin.

SELECT examples

Retrieves information about a kdb cluster.

SELECT
auto_scaling_configuration,
availability_zone_id,
az_mode,
cache_storage_configurations,
capacity_configuration,
cluster_description,
cluster_name,
cluster_type,
code,
command_line_arguments,
created_timestamp,
databases,
execution_role,
initialization_script,
last_modified_timestamp,
release_label,
savedown_storage_configuration,
scaling_group_configuration,
status,
status_reason,
tickerplant_log_configuration,
volumes,
vpc_configuration
FROM aws.finspace.kx_clusters
WHERE environment_id = '{{ environment_id }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new kdb cluster.

INSERT INTO aws.finspace.kx_clusters (
clientToken,
clusterName,
clusterType,
tickerplantLogConfiguration,
databases,
cacheStorageConfigurations,
autoScalingConfiguration,
clusterDescription,
capacityConfiguration,
releaseLabel,
vpcConfiguration,
initializationScript,
commandLineArguments,
code,
executionRole,
savedownStorageConfiguration,
azMode,
availabilityZoneId,
tags,
scalingGroupConfiguration,
environment_id,
region
)
SELECT
'{{ clientToken }}',
'{{ clusterName }}' /* required */,
'{{ clusterType }}' /* required */,
'{{ tickerplantLogConfiguration }}',
'{{ databases }}',
'{{ cacheStorageConfigurations }}',
'{{ autoScalingConfiguration }}',
'{{ clusterDescription }}',
'{{ capacityConfiguration }}',
'{{ releaseLabel }}' /* required */,
'{{ vpcConfiguration }}' /* required */,
'{{ initializationScript }}',
'{{ commandLineArguments }}',
'{{ code }}',
'{{ executionRole }}',
'{{ savedownStorageConfiguration }}',
'{{ azMode }}' /* required */,
'{{ availabilityZoneId }}',
'{{ tags }}',
'{{ scalingGroupConfiguration }}',
'{{ environment_id }}',
'{{ region }}'
RETURNING
auto_scaling_configuration,
availability_zone_id,
az_mode,
cache_storage_configurations,
capacity_configuration,
cluster_description,
cluster_name,
cluster_type,
code,
command_line_arguments,
created_timestamp,
databases,
environment_id,
execution_role,
initialization_script,
last_modified_timestamp,
release_label,
savedown_storage_configuration,
scaling_group_configuration,
status,
status_reason,
tickerplant_log_configuration,
volumes,
vpc_configuration
;

UPDATE examples

Allows you to update code configuration on a running cluster. By using this API you can update the code, the initialization script path, and the command line arguments for a specific cluster. The configuration that you want to update will override any existing configurations on the cluster.

UPDATE aws.finspace.kx_clusters
SET
clientToken = '{{ clientToken }}',
code = '{{ code }}',
initializationScript = '{{ initializationScript }}',
commandLineArguments = '{{ commandLineArguments }}',
deploymentConfiguration = '{{ deploymentConfiguration }}'
WHERE
environment_id = '{{ environment_id }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND region = '{{ region }}' --required
AND code = '{{ code }}' --required;

DELETE examples

Deletes a kdb cluster.

DELETE FROM aws.finspace.kx_clusters
WHERE environment_id = '{{ environment_id }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;