Skip to main content
Version: 5.7.1

clc cpmap

CPMap commands are a group of CPMap operations.

Usage:

bash
clc cpmap [command] [flags]

Commands​

clc cpmap compare-and-set​

Sets the value for the given key if it has the expected value.

Usage:

bash
clc cpmap compare-and-set [key] [expected-value] [new-value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
keyRequiredKey of the map entry.N/A
expected-value,RequiredValue to set for the key.N/A
new-value,RequiredValue to set for the key.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

clc cpmap get​

Gets a value from the given CPMap.

Usage:

bash
clc cpmap get [key] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the CPMap.default
keyRequiredKey of the CPMap entry.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64.string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example:

bash
clc cpmap get -n yearbook -k i16 2012

clc cpmap set​

Sets a value in the given CPMap.

Usage:

bash
clc cpmap set [key] [value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the CPMap.default
keyRequiredKey of the CPMap entry.N/A
value,RequiredValue to set for the key.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example:

bash
clc cpmap -n my-cpmap set -k string hello -v f32 19.94

clc cpmap put​

Puts the given value in the given CPMap and returns the old value.

Usage:

bash
clc cpmap put [key] [value] [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the CPMap.default
keyRequiredKey of the CPMap entry.N/A
value,RequiredValue to set for the key.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
--value-type, -vOptionalData type of the value. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example:

bash
clc cpmap -n my-cpmap put -k string hello -v f32 19.94

clc cpmap remove​

Removes the value of a given key in a CPMap and returns the old value.

Usage:

bash
clc cpmap remove [flags] [key]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
keyRequiredKey of the map entry.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example:

bash
clc cpmap remove --name my-cpmap --key-type string k1
k1

clc cpmap delete​

Deletes the value of a given key in a CPMap.

Usage:

bash
clc cpmap delete [flags] [key]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
keyRequiredKey of the map entry.N/A
--key-type, -kOptionalData type of the key. One of: string, bool, json, i8, i16, i32, i64, f32, f64string
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example:

bash
clc cpmap delete --name my-cpmap --key-type string k1
k1

clc cpmap destroy​

Deletes the CPMap and all the data in it.

Usage:

bash
clc cpmap destroy [flags]

Parameters:

ParameterRequiredDescriptionDefault
--name, -nOptionalName of the map.default
--yesOptionalSkip confirming the destroy operation.false
Global parameters
ParameterDescriptionDefault
--config, -cName of the configuration or path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory
  2. The parent directory of the clc executable
  3. $CLC_HOME/default directory
--format, -f

Set the output format

  • csv
  • delimited: By tab characters
  • json
  • table
  • Interactive mode: table
  • Non-interactive mode: delimited
--log.level

Set the log level, one of:

  • debug
  • info
  • warning
  • error
info
--log.pathSet the log path. Use stderr to log to the screen (stderr).$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.
--quiet, -qPrevent displaying unnecessary output.false
--verboseEnable output with more information.false
--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds
  • 5s: 5 seconds
  • 10000ms: 10000 milliseconds
  • 10_000_000ms: 10000000 milliseconds
warning

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.