---
title: "POST /projects/{project}/global/networks"
method: POST
path: "/projects/{project}/global/networks"
tags: ["networks"]
---

# POST /projects/{project}/global/networks

`POST /projects/{project}/global/networks`

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

## Path parameters

- `project` string, required

## Query parameters

- `requestId` string

## Request body

- Network — Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, readVirtual Private Cloud (VPC) Network.
  - `mtu` integer — Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.
  - `selfLink` string — [Output Only] Server-defined URL for the resource.
  - `autoCreateSubnetworks` boolean — Must be set to create a VPC network. If not set, a legacy network is created. 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 inAuto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworksinsert method.
  - `peerings` NetworkPeering[] — Output only. [Output Only] A list of network peerings for the resource.
    - `updateStrategy` 'CONSENSUS' | 'INDEPENDENT' | 'UNSPECIFIED' — The update strategy determines the semantics for updates and deletes to the peering connection configuration.
    - `stackType` 'IPV4_IPV6' | 'IPV4_ONLY' — Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY.
    - `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 isACTIVE.
    - `connectionStatus` NetworkPeeringConnectionStatus — [Output Only] Describes the state of a peering connection, not just the local peering. This field provides information about the effective settings for the connection as a whole, including pending delete/update requests for CONSENSUS peerings.
      - `updateStrategy` 'CONSENSUS' | 'INDEPENDENT' | 'UNSPECIFIED' — The update strategy determines the update/delete semantics for this peering connection.
      - `trafficConfiguration` NetworkPeeringConnectionStatusTrafficConfiguration
        - `importSubnetRoutesWithPublicIpFromPeer` boolean — Whether subnet routes with public IP ranges are being imported from the peer network.
        - `importCustomRoutesFromPeer` boolean — Whether custom routes are being imported from the peer network.
        - `stackType` 'IPV4_IPV6' | 'IPV4_ONLY' — Which IP version(s) of traffic and routes are being imported or exported between peer networks.
        - `exportCustomRoutesToPeer` boolean — Whether custom routes are being exported to the peer network.
        - `exportSubnetRoutesWithPublicIpToPeer` boolean — Whether subnet routes with public IP ranges are being exported to the peer network.
      - `consensusState` NetworkPeeringConnectionStatusConsensusState — The status of update/delete for a consensus peering connection. Only set when connection_status.update_strategy isCONSENSUS or a network peering is proposing to update the strategy to CONSENSUS.
        - `deleteStatus` 'DELETE_ACKNOWLEDGED' | 'DELETE_STATUS_UNSPECIFIED' | 'LOCAL_CANCEL_REQUESTED' | 'LOCAL_DELETE_REQUESTED' | 'PEER_CANCEL_REQUESTED' | 'PEER_DELETE_REQUESTED' — The status of the delete request.
        - `updateStatus` 'IN_SYNC' | 'PENDING_LOCAL_ACKNOWLEDMENT' | 'PENDING_PEER_ACKNOWLEDGEMENT' | 'UPDATE_STATUS_UNSPECIFIED' — The status of the update request.
    - `exportSubnetRoutesWithPublicIp` boolean — Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported.IPv4 special-use ranges are always exported to peers and are not controlled by this field.
    - `autoCreateRoutes` boolean — This field will be deprecated soon. Use theexchange_subnet_routes 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 isACTIVE.
    - `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.
    - `exportCustomRoutes` boolean — Whether to export the custom routes to peer network. The default value is false.
    - `importSubnetRoutesWithPublicIp` boolean — Whether subnet routes with public IP range are imported. The default value is false.IPv4 special-use ranges are always imported from peers and are not controlled by this field.
    - `peerMtu` integer — Output only. [Output Only] Maximum Transmission Unit in bytes of the peer network.
    - `name` string — Name of this peering. Provided by the client when the peering is created. The name must comply withRFC1035. 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.
    - `state` 'ACTIVE' | 'INACTIVE' — Output only. [Output Only] State for the peering.
    - `importCustomRoutes` boolean — Whether to import the custom routes from peer network. The default value is false.
    - `stateDetails` string — Output only. [Output Only] Details about the current state of the peering.
  - `routingConfig` NetworkRoutingConfig — A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.
    - `bgpAlwaysCompareMed` boolean — Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.
    - `bgpInterRegionCost` 'ADD_COST_TO_MED' | 'DEFAULT' — Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT orADD_COST_TO_MED.
    - `bgpBestPathSelectionMode` 'LEGACY' | 'STANDARD' — The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.
    - `effectiveBgpAlwaysCompareMed` boolean — Output only. [Output Only] Effective value of the bgp_always_compare_med field.
    - `routingMode` 'GLOBAL' | 'REGIONAL' — 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 toGLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
    - `effectiveBgpInterRegionCost` 'ADD_COST_TO_MED' | 'DEFAULT' — Output only. [Output Only] Effective value of the bgp_inter_region_cost field.
  - `internalIpv6Range` string — When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .
  - `enableUlaInternalIpv6` boolean — Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .
  - `params` NetworkParams — Additional network parameters.
    - `resourceManagerTags` object — Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: {"123/environment" : "tagValues/444"} is invalid.
  - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  - `firewallPolicy` string — Output only. [Output Only] URL of the firewall policy the network is associated with.
  - `selfLinkWithId` string — Output only. [Output Only] Server-defined URL for this resource with the resource id.
  - `kind` string — Output only. [Output Only] Type of the resource. Always compute#network for networks.
  - `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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. 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.
  - `gatewayIPv4` string — [Output Only] The gateway address for default routing out of the network, selected by Google Cloud.
  - `IPv4Range` string — Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is created.
  - `description` string — An optional description of this resource. Provide this field when you create the resource.
  - `networkFirewallPolicyEnforcementOrder` 'AFTER_CLASSIC_FIREWALL' | 'BEFORE_CLASSIC_FIREWALL' — The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `subnetworks` string[] — [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.
  - `networkProfile` string — A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name}

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
