REST Resource: networks

Resource: Network

Represents a VPC Network resource.

Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network.

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,
      "exportCustomRoutes": boolean,
      "importCustomRoutes": boolean,
      "exchangeSubnetRoutes": 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?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

description

string

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

IPv4Range
(deprecated)

string

Deprecated in favor of subnet mode networks. 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, 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])?. 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, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network.

peerings[].stateDetails

string

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

peerings[].autoCreateRoutes

boolean

This field will be deprecated soon. Use the exchangeSubnetRoutes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

peerings[].exportCustomRoutes

boolean

Whether to export the custom routes to peer network.

peerings[].importCustomRoutes

boolean

Whether to import the custom routes from peer network.

peerings[].exchangeSubnetRoutes

boolean

Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

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
Var denne siden nyttig? Si fra hva du synes:

Send tilbakemelding om ...