CloudHub Command-Line Interface
Anypoint Platform provides a scripting and command-line tool for CloudHub. The command-line interface (CLI) supports both the interactive shell and standard CLI modes and works with:
CloudHub Applications
Command | Description |
---|---|
Lists all alerts in the environment |
|
Describes the history of the alarm |
|
Lists all applications in the environment |
|
Shows application details |
|
Stops a running application |
|
Starts an application |
|
Restarts a running application |
|
Deletes an application |
|
Deploys a new application |
|
Modifies an existing application, optionally updating the ZIP file |
|
Download application logs to specified directory |
|
Tail application logs |
|
Copies a CloudHub application |
|
Lists all supported regions |
|
Lists all available runtimes |
runtime-mgr:cloudhub-alert:list
> runtime-mgr:cloudhub-alert:list [flags]
This command lists all alerts associated with your current environment.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
This command also accepts the default flag --help
.
runtime-mgr:cloudhub-alert-history:describe
> runtime-mgr:cloudhub-alert-history:describe [flags] <name>
This command describes the history of the alarm passed in <name>
.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:list
> runtime-mgr:cloudhub-application:list [flags]
This command lists all applications available in your Anypoint Platform CLI. It returns your application name, its status, the number of vCores assigned and the last time it was updated.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
runtime-mgr:cloudhub-application:describe
> runtime-mgr:cloudhub-application:describe [flags] <name>
This command displays information on the application you pass in <name>
.
Use the flag -o json
to get the raw JSON response of the application you specify in <name>
.
The command returns data such as the application’s domain, its status, the last time it was updated, the Mule version, the ZIP file name, the region, monitoring, and workers; as well as TRUE
or FALSE
information for persistent queues and static IPs enablement.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
runtime-mgr:cloudhub-application:stop
> runtime-mgr:cloudhub-application:stop [flags] <name>
This command stops the running application you specify in <name>
.
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:start
> runtime-mgr:cloudhub-application:start [flags] <name>
This command starts the running application you specify in <name>
.
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:restart
> runtime-mgr:cloudhub-application:restart [flags] <name>
This command restarts the running application you specify in <name>
.
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:delete
> runtime-mgr:cloudhub-application:delete [flags] <name>
This command deletes the running application you specify in <name>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:deploy
> runtime-mgr:cloudhub-application:deploy <name> <zipfile> [flags]
This command deploys the Mule deployable archive ZIP file that you specify in <zipfile>
using the name you set in <name>
.
You will have to provide the absolute or relative path to the deployable ZIP file in your local hard drive and the name you give to your application has to be unique.
If successful, this command’s output includes the deployment status of UNDEPLOYED ,
which indicates that CloudHub uploaded the application successfully.
|
The flags this command can take are:
Flag | Description |
---|---|
--runtime |
Name and version of the runtime environment. |
--workers |
Number of workers. (This value is '1' by default) |
--workerSize |
Size of the workers in vCores. (This value is '1' by default) |
--region |
Name of the region to deploy to. |
--property |
Set a property ( Character |
--propertiesFile |
Overwrite all properties with values from this file. The file format is 1 or more lines in |
--[no-]persistentQueues |
Enable or disable persistent queues (This value is |
--[no-]persistentQueuesEncrypted |
Enable or disable persistent queue encryption (This value is |
--[no-]staticIPsEnabled |
Enable or disable static IPs. This value is |
--[no-]objectStoreV1 |
Enable or disable Object Store V1. |
--[no-]objectStoreV2 |
Enable or disable Object Store V2. |
--[no-]autoRestart |
Automatically restart app when not responding. This value is |
--output |
Specify the response format. Supported values are |
--help |
Output usage information |
--timeout |
Set the timeout value in miliseconds. Can take values between |
--releaseChannel |
Set the name of the release channel to be used for the selected Mule version. Supported values are |
--javaVersion |
Set the name of the Java version to be used for the selected Mule version. Supported values are |
Note that from Anypoint Platform CLI you won’t be able to allocate static IPs. You can simply enable and disable them.
If you deploy without using any flags, your application deploys using all your default values. |
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter. |
runtime-mgr:cloudhub-application:modify
> runtime-mgr:cloudhub-application:modify <name> [zipfile] [flags]
This command updates the settings of an existing application. Optionally, you can update it by uploading a new ZIP file.
This command can take all the same flags as the deploy
command.
This command’s output includes Status , which is the application’s previous deployment status state.
|
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter. |
runtime-mgr:cloudhub-application:download-logs
> runtime-mgr:cloudhub-application:download-logs [flags] <name> <directory>
This command downloads logs the for application specified in <name>
to the specified directory.
Keep in mind that contrarily to what you see in the UI, the logs you download from the CLI won’t separate system logs from worker logs.
runtime-mgr:cloudhub-application:tail-logs
> runtime-mgr:cloudhub-application:tail-logs [flags] <name>
This command tails application logs.
This command accepts only the default flag --help
.
runtime-mgr:cloudhub-application:copy
> runtime-mgr:cloudhub-application:copy <source> <target> [flags]
This command copies the CloudHub application passed in source
to the target passed in target
.
Arguments source
and target
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
For example:
> runtime-mgr:cloudhub-application:copy Services:QA/application-1 Development:QA/application-2
Copies the application named application-1
from the QA environment of the Services organization to the QA environment of the Development organization.
If the Anypoint Platform CLI is using the QA environment in the Services organization, the command can simply take the application name as a source
:
> runtime-mgr:cloudhub-application:copy application-1 Development/QA/application-2
Running this command requires your user to have read/write access to the /tmp directory of the OS where CLI is installed.
|
In addition to the default --help
, and -f
/--fields
flags, this command also accepts:
Flag | Description |
---|---|
--property |
Set a property ( Enclose the property in quotes and escape the
|
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter. |
When copying an application containing safely hidden application properties, pass the properties in the copy command using the --property flag.
For information about safely hidden application properties, see Safely Hide Application Properties.
|
CloudHub Dedicated Load Balancers
Command | Description |
---|---|
Lists all load balancers in an organization |
|
Shows load balancer details |
|
Creates a load balancer |
|
Starts a load balancer |
|
Stops a load balancer |
|
Deletes a load balancer |
|
Adds an additional certificate to an existing load balancer |
|
Removes a certificate from a load balancer |
|
Sets the default certificate that the load balancer will serve |
|
Shows the load balancer configuration for a particular certificate |
|
Adds an IP or range of IPs to the load balancer allowlist |
|
Removes an IP or range of IPs from the load balancer allowlist |
|
Lists the proxy mapping rules for a load balancer. If no |
|
Adds a proxy mapping rule at the specified index. If no |
|
Removes a proxy mapping rule. If no |
|
Enables dynamic IPs |
|
Disables dynamic IPs |
cloudhub:load-balancer:list
> cloudhub:load-balancer:list [flags]
This command lists all load balancers in your Anypoint Platform. It displays load balancer’s name, domain, its state, and the Anypoint VPC ID to which the load balancer is bound.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
cloudhub:load-balancer:describe
> cloudhub:load-balancer:describe [flags] <name>
This command displays information about the load balancer that is specified in <name>
.
Use the flag -o json
to get the raw JSON response of the application you specify in <name>
.
It displays load balancer’s name, domain, its state and the Anypoint VPC Id to which the load balancer is bound.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
cloudhub:load-balancer:create
> cloudhub:load-balancer:create [flags] <vpc> <name> <certificate> <privateKey>
This command creates a load balancer using the specified values in the variables.
Value | Description | Example |
---|---|---|
|
Name of the Anypoint VPC to which this load balancer is bound. |
|
|
Name for the load balancer. |
|
|
Absolute path to the |
|
|
Absolute path to the |
|
The name for the load balancer that you pass in |
Besides the default --help
flag, this command also accepts:
Flag | Description |
---|---|
|
Specifies the Load balancer HTTP behavior. It can be set to |
|
Client certificate file |
|
Specifies the client verification mode. It can be set to |
|
Certificate revocation list file |
|
Supports TLSv1 in addition to TLSv1.1 and TLSv1.2 |
|
Uses dynamic IPs, which are not persistent through restarts |
CloudHub does not implement the Online Certificate Status Protocol (OCSP). To keep your certification revocation list up to date, it’s recommended to use the CloudHub API to update your certificates programmatically. |
For more configuration information, see Configure SSL Endpoints and Certificates.
cloudhub:load-balancer:start
> cloudhub:load-balancer:start [flags] <name>
This command starts the load balancer specified in <name>
.
This command accepts only the default flag --help
.
cloudhub:load-balancer:stop
> cloudhub:load-balancer:stop [flags] <name>
This command stops the load balancer specified in <name>
.
This command accepts only the default flag --help
.
cloudhub:load-balancer:delete
> cloudhub:load-balancer:delete [flags] <name>
This command deletes the load balancer specified in <name>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
cloudhub:load-balancer:ssl-endpoint:add
> cloudhub:load-balancer:ssl-endpoint:add [flags] <name> <certificate> <privateKey>
This command adds an SSL endpoint to the load balancer specified in <name>
, using the certificate and private key passed.
Value | Description | Example |
---|---|---|
|
Name for the load balancer. |
|
|
Absolute path to the |
|
|
Absolute path to the |
|
CloudHub does not implement the Online Certificate Status Protocol (OCSP). To keep your certification revocation list up to date, it’s recommended to use the CloudHub API to update your certificates programmatically. |
Besides the default --help
flag, this command also accepts:
Flag | Description |
---|---|
|
Client certificate file |
|
Specifies the client verification mode. It can be set to |
|
Certificate Revocation List file |
|
Supports TLSv1 in addition to TLSv1.1 and TLSv1.2 |
For more configuration information, see Configure SSL Endpoints and Certificates.
cloudhub:load-balancer:ssl-endpoint:remove
> cloudhub:load-balancer:ssl-endpoint:remove [flags] <name> <certificateName>
This command removes the ssl certificate specified in <certificateName>
from the load balancer specified in <name>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
cloudhub:load-balancer:ssl-endpoint:set-default
> cloudhub:load-balancer:ssl-endpoint:set-default [flags] <name> <certificateName>
This command sets the certificate specified in <certificateName>
as the default certificate for the load balancer passed in <name>
.
Besides the default --help
flag, this command also accepts:
Flag | Description |
---|---|
|
Specifies the Load balancer HTTP behavior |
cloudhub:load-balancer:ssl-endpoint:describe
> cloudhub:load-balancer:ssl-endpoint:set-describe [flags] <name> <certificateName>
This command shows information about the configuration of the load balancer passed in <name>
for the the certificate specified in <certificateName>
.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
This command also accepts the default flag --help
.
cloudhub:load-balancer:allowlist:add
> cloudhub:load-balancer:allowlist:add [flags] <name> <cidrBlock>
This command adds a range of IP addresses specified in <cidrBlock>
to the allowlist of the load balancer specified in <name>
.
The allowlist works at the load balancer level, not at the CN certificate level. Make sure you only pass IP addresses formatted in CIDR notation. |
This command accepts only the default flag --help
.
cloudhub:load-balancer:allowlist:remove
> cloudhub:load-balancer:allowlist:remove <name> <cidrBlock>
This command removes an IP or range of IPs addresses specified in <cidrBlock>
to the allowlist of the load balancer specified in <name>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
cloudhub:load-balancer:mappings:describe
> cloudhub:load-balancer:mappings:describe <name> [certificateName]
This command lists the mapping rules for the load balancer specified in <name>
.
If no certificateName
is passed, Anypoint Platform CLI returns the mappings for the default SSL endpoint.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
cloudhub:load-balancer:mappings:add
> cloudhub:load-balancer:mappings:add [flags] <name> <index> <inputUri> <appName> <appUri> [certificateName]
This command adds a proxy mapping rule to the load balancer specified in <name>
in the CN passed under the certificateName
flag.
If no certificateName
is passed, Anypoint Platform CLI adds the mappings to the default SSL endpoint.
Value | Description | Example |
---|---|---|
|
Name of the load balancer to which this rule is applied. |
|
|
Name of the URI of your input URL |
example.com |
|
Name of the app of your output URL to which the request is forwarded |
|
|
URI of the app of your output URL to which the request is forwarded |
/ |
For the values in the example above, for an input call to my-superapp.api.example.com/status?limit=10
, the endpoint my-superapp-example: /status?limit=10
will be called for the application.
This command also has the --upstreamProtocol
flag.
The --upstreamProtocol
flag sets the protocol used by your application to communicate internally with your load balancer. If no upstream protocol is set, HTTP is used as default.
Flag | Description |
---|---|
|
Look for upstream applications in HTTP port 8091 or HTTPS port 8092.
Supported Values: |
|
Optional flag |
cloudhub:load-balancer:mappings:remove
> cloudhub:load-balancer:mappings:remove [flags] <name> <index> [certificateName]
This command removes the proxy mapping rules from the load balancer specified in <name>
at the priority index specified in <index>
and the CN specified as the certificateName
flag.
This command accepts only the default flag --help
.
If no certificateName
is passed, Anypoint Platform CLI removes the mappings for the default SSL endpoint.
CloudHub Anypoint VPCs
Command | Description |
---|---|
Lists all Anypoint VPCs |
|
Show Anypoint VPC details |
|
Creates a new Anypoint VPC |
|
Deletes an existing Anypoint VPC |
|
Modifies the Anypoint VPC association to Runtime Manager environments. |
|
Modifies the Anypoint VPC association to Runtime Manager environments. |
|
Shares an Anypoint VPC with a list of Business Groups. |
|
Shares an Anypoint VPC with a list of Business Groups. |
|
Sets the domain names that are resolved using your internal DNS servers. If used with no flag, internal DNS will be disabled |
|
Clears the list domain names that are resolved using your internal DNS servers |
|
Shows firewall rule for Mule applications in this Anypoint VPC |
|
Adds a firewall rule for Mule applications in this Anypoint VPC |
|
Removes a firewall rule for Mule applications in this Anypoint VPC |
cloudhub:vpc:list
> cloudhub:vpc:list [flags]
This command lists all available Anypoint VPCs. It returns ID, region, and environment of the network and whether it is the default Anypoint VPC or not.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
cloudhub:vpc:describe
> cloudhub:vpc:describe [flags] <name>
This command displays information about the Anypoint VPC that is specified in <name>
.
Use the flag -o json
to get the raw JSON response of the application you specify in <name>
.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command accepts only the default flag --help
.
cloudhub:vpc:create
> cloudhub:vpc:create [flags] <name> <region> <cidrBlock> [environments...]
This command creates an Anypoint VPC using the name in <name>
, in the region specified in <region>
, with the size passed in <cidrBlock>
in the form of a Classless Inter-Domain Routing (CIDR) block, using CIDR notation and associates it to the environments passed as argument(s) thereafter.
An Anypoint VPC needs to be bound to a business group within your organization. When creating an Anypoint VPC, make sure to assign it a business group using the business-groups add command. |
Besides the default --help
flag, this command also has the --default
flag. When passed, the Anypoint VPC is created as the default Anypoint VPC for the selected environment.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
cloudhub:vpc:delete
> cloudhub:vpc:delete <name>
This command deletes the Anypoint VPC specified in <name>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
cloudhub:vpc:environments:add
> cloudhub:vpc:environments:add [flags] <vpc> [environments...]
This command assigns the Anypoint VPC defined in <vpc>
to the environment(s) passed as argument(s) thereafter.
The --default
flag allows setting an Anypoint VPC as the default for the organization, which applies to all environments which don’t have an Anypoint VPC explicitly associated.
This command also has the default --help
flag.
cloudhub:vpc:environments:remove
> cloudhub:vpc:environments:remove [flag] <vpc> [environments...]
This command removes the Anypoint VPC defined in <vpc>
from the environment(s) passed as argument(s) thereafter.
Besides the default --help
flag, this command also has the --default
flag, that removes this Anypoint VPC as the default Anypoint VPC for the environment.
cloudhub:vpc:business-groups:add
> cloudhub:vpc:business-groups:add [flags] <vpc> <businessGroups...>
This command assigns the Anypoint VPC defined in <vpc>
to the business group(s) passed as argument(s) thereafter.
This command accepts only the default flag --help
.
cloudhub:vpc:business-groups:remove
> cloudhub:vpc:business-groups:remove [flags] <vpc> <businessGroups...>
This command removes the Anypoint VPC defined in <vpc>
from the business group(s) passed as argument(s) thereafter
This command does not prompt twice before removing the Anypoint VPC from the specified resource. If you send a remove instruction, it does not ask for confirmation. |
This command accepts only the default flag --help
.
cloudhub:vpc:dns-servers:set
> cloudhub:vpc:dns-servers:set [flags] <vpc>
This command sets a list of local host names (internal domain names) to be resolved using your DNS servers for which you need to provide their IP addresses (whether private or public addresses).
Whenever those private domains are provided, your worker resolves them using your private DNS, so you can still use the internal host names of your private network.
This feature is supported by workers running Mule versions 3.5.x, 3.6.x, 3.7.4, 3.8.0-HF1, 3.8.1 and 3.8.2. |
Besides the default --help
flag, this command also accepts:
Flag | Description |
---|---|
|
IP address for a DNS server to resolve special domains on. Can be specified up to 3 times |
|
A domain to resolve on the special DNS server list. Can be specified multiple times |
You can pass as many domains as you need, and up to 3 IP addresses.
For example, $ cloudhub:vpc:dns-servers:set --domain example.com --server 192.168.1.10 <VPC Name>
.
Every time you run this command, you overwrite your previous DNS set command.
To remove a DNS set, you need to use the vpc dns-servers unset command.
cloudhub:vpc:dns-servers:unset
> cloudhub:vpc:dns-servers:unset [flags] <vpc>
This command clears the list of local host names (internal domain names) to be resolved using your DNS servers from the Anypoint VPC passed in <vpc>
.
This command accepts only the default flag --help
.
cloudhub:vpc:firewall-rules:describe
> cloudhub:vpc:firewall-rules:describe <vpc>
This command describes all the firewall rules for the Anypoint VPC defined in <vpc>
.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
cloudhub:vpc:firewall-rules:add
> cloudhub:vpc:firewall-rules:add [flags] <vpc> <cidrBlock> <protocol> <fromPort> [toPort]
This command adds a firewall rule to the Anypoint VPC defined in <vpc>
using the values set in the variables:
Value | Description | Example |
---|---|---|
|
Name of the Anypoint VPC to which this load balancer is bound. |
|
|
IP address in CIDR notation for the firewall to allow |
|
|
The protocol to use in the rules. It can be |
|
|
The port from which the firewall will allow requests. It can go from 0 to 65535 |
|
|
optional In case a port range is needed, the |
|
When creating an Anypoint VPC, make sure to allow your outbound address. |
This command accepts only the default flag --help
.