updateKxClusterCodeConfiguration method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter clusterName :
The name of the cluster.
Parameter environmentId :
A unique identifier of the kdb environment.
Parameter clientToken :
A token that ensures idempotency. This token expires in 10 minutes.
Parameter commandLineArguments :
Specifies the key-value pairs to make them available inside the cluster.
You cannot update this parameter for a NO_RESTART deployment.
Parameter deploymentConfiguration :
The configuration that allows you to choose how you want to update the
code on a cluster.
Parameter initializationScript :
Specifies 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.
You cannot update this parameter for a NO_RESTART deployment.
Implementation
Future<void> updateKxClusterCodeConfiguration({
required String clusterName,
required CodeConfiguration code,
required String environmentId,
String? clientToken,
List<KxCommandLineArgument>? commandLineArguments,
KxClusterCodeDeploymentConfiguration? deploymentConfiguration,
String? initializationScript,
}) async {
final $payload = <String, dynamic>{
'code': code,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (commandLineArguments != null)
'commandLineArguments': commandLineArguments,
if (deploymentConfiguration != null)
'deploymentConfiguration': deploymentConfiguration,
if (initializationScript != null)
'initializationScript': initializationScript,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/kx/environments/${Uri.encodeComponent(environmentId)}/clusters/${Uri.encodeComponent(clusterName)}/configuration/code',
exceptionFnMap: _exceptionFns,
);
}