Creating a cloud network

In addition to the cloud network in the default folder, you can create cloud networks in other folders.

To create a cloud network:

  1. Open the Virtual Private Cloud section in the folder where you want to create the cloud network.

  2. Click Create network.

  3. Enter the network name.

    The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum length of the name is 63 characters.

  4. Click Create network.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To create a cloud network:

  1. See the description of the CLI command for creating a cloud network:

    $ yc vpc network create --help
    
  2. Create a cloud network in the default folder:

    $ yc vpc network create --name test-network-1 \
        --description "My test network"
    

    The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum length of the name is 63 characters.

    The --name and --description flags are optional: you can create a network without any name or description and access it by ID.

  3. Get a list of all cloud networks in the default folder:

    $ yc vpc network list
    +----------------------+----------------+
    |          ID          |      NAME      |
    +----------------------+----------------+
    | enpiuvhhd4t80k4n80i8 | test-network-1 |
    | enplom7a98s1t0lhass8 | default        |
    +----------------------+----------------+
    

    Get the same list with more details in YAML format:

    $ yc vpc network list --format yaml
    - id: enpiuvhhd4t80k4n80i8
      folder_id: b1g6ci08ma55klukmdjs
      created_at: "2018-10-23T11:12:51Z"
      name: test-network-1
      description: My first network
    - id: enplom7a98s1t0lhass8
      folder_id: b1g6ci08ma55klukmdjs
      created_at: "2018-09-24T08:23:00Z"
      name: default
      description: Auto-created default network
    

Examples

Create a cloud network with a name and description in the selected folder:

$ yc vpc network create --name test-network-1 \ 
  --description "My test network" \
  --folder-id b1gnbfd11bq5g5vnjgr4