REST Resource: networks

Resource: Network

Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information.

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "IPv4Range": string,
  "gatewayIPv4": string,
  "selfLink": string,
  "autoCreateSubnetworks": boolean,
  "subnetworks": [
    string
  ],
  "peerings": [
    {
      "name": string,
      "network": string,
      "state": enum,
      "stateDetails": string,
      "autoCreateRoutes": boolean
    }
  ],
  "routingConfig": {
    "routingMode": enum
  },
  "kind": string
}
Fields
id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

name

string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

description

string

An optional description of this resource. Provide this property when you create the resource.

IPv4Range

string

The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

gatewayIPv4

string

[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.

autoCreateSubnetworks

boolean

When set to true, the VPC network is created in "auto" mode. When set to false, the VPC network is created in "custom" mode.

An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.

subnetworks[]

string

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

peerings[]

object

[Output Only] A list of network peerings for the resource.

peerings[].name

string

Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

peerings[].network

string

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.

peerings[].state

enum

[Output Only] State for the peering.

peerings[].stateDetails

string

[Output Only] Details about the current state of the peering.

peerings[].autoCreateRoutes

boolean

Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.

routingConfig

object

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

routingConfig.routingMode

enum

The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.

kind

string

[Output Only] Type of the resource. Always compute#network for networks.

Methods

addPeering

Adds a peering to the specified network.

delete

Deletes the specified network.

get

Returns the specified network.

insert

Creates a network in the specified project using the data included in the request.

list

Retrieves the list of networks available to the specified project.

listPeeringRoutes

Lists the peering routes exchanged over peering connection.

patch

Patches the specified network with the data included in the request.

removePeering

Removes a peering from the specified network.

switchToCustomMode

Switches the network mode from auto subnet mode to custom subnet mode.

testIamPermissions

Returns permissions that a caller has on the specified resource.

updatePeering

Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes
Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine