Contact Us 1-800-596-4880

CLI for Anypoint Virtual Private Cloud

Use the cloudhub-vpc commands to automate your Anypoint Virtual Private CLoud processes. For more information about how to use these commands, refer to the CloudHub documentation.

Command Description

Shares an Anypoint VPC with a list of Business Groups

Shares an Anypoint VPC with a list of Business Groups

Creates a new Anypoint VPC

Deletes an existing Anypoint VPC

Show Anypoint VPC details

Sets the domain names that are resolved using your internal DNS servers

Clears the list domain names that are resolved using your internal DNS servers

Modifies the Anypoint VPC association to Runtime Manager environments

Modifies the Anypoint VPC association to Runtime Manager environments

Adds a firewall rule for Mule applications in this Anypoint VPC

Shows firewall rule for Mule applications in this Anypoint VPC

Removes a firewall rule for Mule applications in this Anypoint VPC

Lists all Anypoint VPCs

cloudhub:vpc:business-groups:add

> cloudhub:vpc:business-groups:add [flags] <vpc> <businessGroups...>

Assigns the Anypoint VPC defined in <vpc> to the business group(s) passed as argument(s) thereafter

This command accepts the default flags.

cloudhub:vpc:business-groups:remove

> cloudhub:vpc:business-groups:remove [flags] <vpc> <businessGroups...>

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 the default flags.

cloudhub:vpc:create

> cloudhub:vpc:create [flags] <name> <region> <cidrBlock> [environments...]

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.

This command accepts the --default flag. When passed, the Anypoint VPC is created as the default Anypoint VPC for the selected environment.

Use the --output flag to specify the response format. Supported values are table (default) and json.

This command accepts the default flags.

cloudhub:vpc:delete

> cloudhub:vpc:delete <name>

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 the default flags.

cloudhub:vpc:describe

> cloudhub:vpc:describe [flags] <name>

Displays information about the Anypoint VPC that is specified in <name>

Use the --output flag to specify the response format. Supported values are table (default) and json.

This command accepts the default flags.

cloudhub:vpc:dns-servers:set

> cloudhub:vpc:dns-servers:set [flags] <vpc>

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.

In addition to the default flags, this command accepts the following flags:

Flag Description Example

--domain

A domain to resolve on the special DNS server list
Can be specified multiple times

--domain example.com

--server

IP address for a DNS server to resolve special domains on
Can be specified up to 3 times

--server 192.168.1.10

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>

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 the default flags.

cloudhub:vpc:environments:add

> cloudhub:vpc:environments:add [flags] <vpc> [environments...]

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 accepts the default flags.

cloudhub:vpc:environments:remove

> cloudhub:vpc:environments:remove [flag] <vpc> [environments...]

Removes the Anypoint VPC defined in <vpc> from the environment(s) passed as argument(s) thereafter

This command accepts the --default flag, that removes this Anypoint VPC as the default Anypoint VPC for the environment.

This command accepts the default flags.

cloudhub:vpc:firewall-rules:add

> cloudhub:vpc:firewall-rules:add [flags] <vpc> <cidrBlock> <protocol> <fromPort> [toPort]

Adds a firewall rule to the Anypoint VPC defined in <vpc> using the values set in the variables:

Value Description Example

vpc

Name of the Anypoint VPC to which this load balancer is bound
If your Anypoint VPC name contains spaces, you need to pass it between ´"´ characters

vpc-demo

cidrBlock

IP address in CIDR notation for the firewall to allow

192.0.1.0/27

protocol

The protocol to use in the rules. It can be tcp or udp

tcp

fromPort

The port from which the firewall will allow requests. It can go from 0 to 65535

8888

toPort

optional In case a port range is needed, the fromPort and toPort variables define such range

8090

When creating an Anypoint VPC, make sure to allow your outbound address.
By default, all IP addresses are blocked, and you need to authorize IP addresses or range of addresses to your Anypoint VPC firewall rule.

This command accepts the default flags.

cloudhub:vpc:firewall-rules:describe

> cloudhub:vpc:firewall-rules:describe <vpc>

Describes all the firewall rules for the Anypoint VPC defined in <vpc>

Use the --output flag to specify the response format. Supported values are table (default) and json.

This command accepts the default flags.

cloudhub:vpc:firewall-rules:remove

> cloudhub:vpc:firewall-rules:remove <vpc> <index>

Removes the firewall rule from the workers inside the Anypoint VPC specified in <vpc> at the index passed in the <index>

This command accepts the default flags.

cloudhub:vpc:list

> cloudhub:vpc:list [flags]

Lists all available Anypoint VPCs
It returns ID, region, and environment of the network and whether it is the default Anypoint VPC or not.

Use the --output flag to specify the response format. Supported values are table (default) and json.

This command accepts the default flags.