Secrets Configuration
The config secret service enables you to add, delete, or update named secrets in the Control-M vault, which is a secure collection of name and value pairs of secrets.
For more information, see Secrets in Code.
The following API commands enable you to configure and manage secrets in the Control-M vault:
config secret::add
The config secret::add command enables you to create a pair, which consists of named secret and value in the Control-M vault.
-
CLI
-
REST
ctm config secret::add <name> <value>
The following example shows the REST API syntax for the config secret::add command in cURL.
curl -H "x-api-key: $token" -X POST -d "{\"name\":\"$name\",\"value\":\"$value\"}" "$endpoint/config/secret"
The following table describes the config secret::add command parameters.
If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.
config secret::delete
The config secret::delete command enables you to delete a pair of named secret and value from the Control-M vault.
-
CLI
-
REST
ctm config secret::delete <name>
The following example shows the REST API syntax for the config secret::delete command in cURL.
curl -H "x-api-key: $token" -X DELETE "$endpoint/config/secret/$name"
Where name is the name of the secret.
If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.
config secret::update
The config secret::update command enables you to update the value of the named secret in the Control-M vault.
-
CLI
-
REST
ctm config secret::update <name> <value>
The following example shows the REST API syntax for the config secret::update command in cURL.
curl -H "x-api-key: $token" -X POST -d "{\"value\":\"$value\"}" "$endpoint/config/secret/$name"
The following table describes the config secret::update command parameters.
If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.
config secrets::get
The config secrets::get command enables you to get a list of names of defined secrets in the Control-M vault.
-
CLI
-
REST
ctm config secrets::get
The following example shows the REST API syntax for the config secrets::get command in cURL.
curl -H "x-api-key: $token" "$endpoint/config/secrets"
