Contact Us 1-800-596-4880

CLI for Anypoint Virtual Private Cloud

Command Description

Lists all Anypoint VPCs

Show Anypoint VPC details

Show raw Anypoint VPC JSON response

Create a new Anypoint VPC

Delete an existing Anypoint VPC

Modifies the Anypoint VPC association to Runtime Manager environments.

Modifies the Anypoint VPC association to Runtime Manager environments.

Share an Anypoint VPC with a list of Business Groups.

Share 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 option, internal DNS will be disabled

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

Show firewall rule for Mule applications in this Anypoint VPC

Add a firewall rule for Mule applications in this Anypoint VPC

Remove a firewall rule for Mule applications in this Anypoint VPC

cloudhub vpc list

> cloudhub VPC list [options]

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.

cloudhub vpc describe

> cloudhub vpc describe [options] <name>

This command displays information about the Anypoint VPC that is specified in <name>.

You can start typing your Anypoint VPC’s name and press tab for Anypoint Platform CLI to autocomplete it, or you can double tap tab for a full list of all the values you can pass.

This command accepts only the default options: --help, -f/--fields and -o/--output.

cloudhub vpc describe-json

> cloudhub vpc describe [options] <name>

This command displays a raw JSON response of the Anypoint VPC that is specified in <name>.

You can start typing your Anypoint VPC’s name and press tab for Anypoint Platform CLI to autocomplete it, or you can double tap tab for a full list of all the values you can pass.

This command accepts only the default options: --help, -f/--fields and -o/--output.

cloudhub vpc create

> cloudhub vpc create [options] <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 option, this command also takes the --default option. When passed, the Anypoint VPC is created as the default Anypoint VPC for the selected environment.

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 options: --help, -f/--fields and -o/--output.

cloudhub vpc environments add

> cloudhub vpc environments add [options] <vpc> [environments...]

This command assigns the Anypoint VPC defined in <vpc> to the environment(s) passed as argument(s) thereafter.
The --default option 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 takes the default --help option.

cloudhub vpc environments remove

> cloudhub vpc environments remove [options] <vpc> [environments...]

This command removes the Anypoint VPC defined in <vpc> from the environment(s) passed as argument(s) thereafter.
Besides the default --help option, this command also takes the option --default, that removes this Anypoint VPC as the default Anypoint VPC for the environment.

cloudhub vpc business-groups add

> cloudhub vpc business-groups add [options] <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 options: --help, -f/--fields and -o/--output.

cloudhub vpc business-groups remove

> cloudhub vpc business-groups remove [options] <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 options: --help, -f/--fields and -o/--output.

cloudhub vpc dns-servers set

> cloudhub vpc dns-servers set [options] <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, -f/--fields and -o/--output options, this command also takes:

Option Description

server

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

domain

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 [options] <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 options: --help, -f/--fields and -o/--output.

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 accepts only the default options: --help, -f/--fields and -o/--output.

cloudhub vpc firewall-rules add

> cloudhub vpc firewall-rules add [options] <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:

Option 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.

You can start typing your Anypoint VPC’s name and press tab for Anypoint Platform CLI to autocomplete it, or you can double tap tab for a full list of all the values you can pass.

This command accepts only the default options: --help, -f/--fields and -o/--output.

cloudhub vpc firewall-rules remove

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

This command removes the firewall rule from the workers inside the Anypoint VPC specified in <vpc> at the index passed in the <index>.

This command accepts only the default options: --help, -f/--fields and -o/--output.