updateKxClusterDatabases method

Future<void> updateKxClusterDatabases({
  1. required String clusterName,
  2. required List<KxDatabaseConfiguration> databases,
  3. required String environmentId,
  4. String? clientToken,
  5. KxDeploymentConfiguration? deploymentConfiguration,
})

Updates 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.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter clusterName : A unique name for the cluster that you want to modify.

Parameter databases : The structure of databases mounted on the cluster.

Parameter environmentId : The unique identifier of a kdb environment.

Parameter clientToken : A token that ensures idempotency. This token expires in 10 minutes.

Parameter deploymentConfiguration : The configuration that allows you to choose how you want to update the databases on a cluster.

Implementation

Future<void> updateKxClusterDatabases({
  required String clusterName,
  required List<KxDatabaseConfiguration> databases,
  required String environmentId,
  String? clientToken,
  KxDeploymentConfiguration? deploymentConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'databases': databases,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (deploymentConfiguration != null)
      'deploymentConfiguration': deploymentConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/kx/environments/${Uri.encodeComponent(environmentId)}/clusters/${Uri.encodeComponent(clusterName)}/configuration/databases',
    exceptionFnMap: _exceptionFns,
  );
}