Environment service
The Environment service enables you to manage environments, including defining and selecting the Control-M environment to use. An environment is a combination of an endPoint and API token, or a combination of an endpoint, username, and password.
An endPoint has the following format:
https://<controlmEndPointHost>:8443/automation-api
Environments are saved in the env.json file, which is located under the .ctm folder, on the home user that has read/write permissions only for the logged in user. Sensitive information, such as passwords and tokens, is encrypted in the env.json file.
For example, the following command adds an environment named devEnvironment. In this command, you include a valid token, as described in Authentication service.
ctm environment add devEnvironment "https://<controlmEndPointHost>:8443/automation-api" "<token>"
In the following alternative example for creation of the same environment, username and password are specified (instead of an API token).
> ctm environment add devEnvironment "https://<controlmEndPointHost>:8443/automation-api" "<ControlmUser>" "<ControlmPassword>"
info: Environment 'devEnvironment' was created
info: devEnvironment:
{"endPoint":"https://<controlmEndPointHost>:8443/automation-api","user":"<ControlmUser>"}
environment show
Returns a list of all defined environments.
CLI Syntax
ctm environment show
environment add
Adds a new environment for a Control-M instance.
CLI Syntax
ctm environment add <env> <endPoint> <user> [<password>]
or
ctm environment add <env> <endPoint> <token>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
<endPoint> | Control-M REST API endPoint |
<user> | Control-M username Note: If you specify an LDAP user, prefix the username with the domain: <domain>\<user> |
[<password>] | Control-M password To be prompted for the password after entering the API command, use the -p or --prompt switch instead of specifying the password as a parameter. |
<token> | An API authentication token that allows the logged-in user to submit API requests For more information about API tokens, see Authentication service. |
environment workbench::add
Adds an environment for the installed Control-M Workbench.
CLI Syntax
ctm environment workbench::add [<endPoint>]
Where:
Parameter | Description |
---|---|
[<endPoint>] | REST API endPoint for the Control-M Workbench. By default, the Workbench endpoint is https://localhost:8443/automation-api, with "workbench" as the user name and password. You can use this parameter if you installed the Workbench on a different host. |
environment set
Sets the default environment for interactive work. All commands are sent to this environment unless a different environment is defined using the -e option.
Note
When no environments are defined and you add the very first environment (using the environment add or the environment workbench::add command), that first environment is automatically set as the default. Later, after additional environments have been defined, use this command to set a new default.
CLI Syntax
ctm environment set <env>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
environment delete
Deletes an environment.
CLI Syntax
ctm environment delete <env>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
environment update
Updates an environment property.
CLI Syntax
>ctm environment update <env> <name> <value>
Where:
Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<env> | Environment name | ||||||||||||
<name> | The name of the property, one of the following:
| ||||||||||||
<value> | Property value for the specified property name:
|
environment copy
Duplicates an environment.
CLI Syntax
ctm environment <env> <newEnv>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
<newEnv> | Name of the new environment |
environment load
Enables you to load one or more predefined environments using the env.json file.
CLI Syntax
ctm environment load <enviromentsFile>
Where:
Parameter | Description |
---|---|
<enviromentsFile> | The env.json file, which is located under the .ctm folder on the home user that has read/write permissions only for the logged in user. Note: Do not encrypt sensitive information, such as passwords and tokens, in the env.json file. This sensitive information is encrypted automatically when the file is loaded. |
environment configure
Enables you to set parameters for all environments.
CLI Syntax
ctm environment configure <setting name> [setting value]
Where:
Parameter | Description |
---|---|
<setting name> | Parameter name |
[setting value] | Parameter value |
Possible parameters:
Parameter | Value | Default | Description |
---|---|---|---|
rootCertificateRequired | false | true | false | Disable API calls that use a self-signed HTTPS certificate, and allow only certificates that are signed by a trusted Certificate Authority. By default, self-signed certificates are allowed. |
EXT_APPLICATION_ARTIFACTS_JSON_URL | path to local repository of images | N/A | Set a path to a local repository of provisioning images, overriding the location used by default for provisioning actions performed by the Provision service. |
EXT_AUTO_DEPLOY | path to local repository of installation artifacts | N/A | Set a path to a local repository of installation artifacts for provisioning actions performed by the Provision service. |
Comments
Log in or register to comment.