# REST Resource: projects.locations.zones.routers

- [Resource: Router](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Router)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Router.SCHEMA_REPRESENTATION)
- [Interface](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Interface)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Interface.SCHEMA_REPRESENTATION)
- [BgpPeer](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#BgpPeer)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#BgpPeer.SCHEMA_REPRESENTATION)
- [Bgp](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Bgp)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Bgp.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#METHODS_SUMMARY)

## Resource: Router

Message describing Router object

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "description": string, "network": string, "interface": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Interface`) } ], "bgpPeer": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#BgpPeer`) } ], "bgp": { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Bgp`) }, "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/ResourceState`), "routeAdvertisements": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The canonical resource name of the router. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The time when the router was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The time when the router was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `labels` | `map (key: string, value: string)` Labels associated with this resource. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `description` | `string` Optional. A free-text description of the resource. Max length 1024 characters. |
| `network` | `string` Required. The canonical name of the network to which this router belongs. The name is in the form of `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. |
| `interface[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Interface`)`` Router interfaces. |
| `bgpPeer[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#BgpPeer`)`` BGP peers. |
| `bgp` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers#Bgp`)`` BGP information specific to this router. |
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/ResourceState`)`` Output only. Current stage of the resource to the device by config push. |
| `routeAdvertisements[]` | `string` Optional. A list of CIDRs in IP/Length format to advertise northbound as static routes from this router. |

## Interface

Router Interface defines the GDCE zone side layer-3 information for building the BGP session.

| JSON representation |
|---|
| ``` { "name": string, "ipv4Cidr": string, "ipv6Cidr": string, "linkedInterconnectAttachment": string, "subnetwork": string, "loopbackIpAddresses": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Name of this interface entry. Unique within the Zones resource. |
| `ipv4Cidr` | `string` IP address and range of the interface. |
| `ipv6Cidr` | `string` IPv6 address and range of the interface. |
| `linkedInterconnectAttachment` | `string` The canonical name of the linked Interconnect attachment. |
| `subnetwork` | `string` The canonical name of the subnetwork resource that this interface belongs to. |
| `loopbackIpAddresses[]` | `string` Create loopback interface in the router when specified. The number of IP addresses must match the number of TOR devices. |

## BgpPeer

BGPPeer defines the peer side layer-3 information for building the BGP session.

| JSON representation |
|---|
| ``` { "name": string, "interface": string, "interfaceIpv4Cidr": string, "interfaceIpv6Cidr": string, "peerIpv4Cidr": string, "peerIpv6Cidr": string, "peerAsn": integer, "localAsn": integer } ``` |

| Fields ||
|---|---|
| `name` | `string` Name of this BGP peer. Unique within the Zones resource. |
| `interface` | `string` Name of the RouterInterface the BGP peer is associated with. |
| `interfaceIpv4Cidr` | `string` IP range of the interface within Google. |
| `interfaceIpv6Cidr` | `string` IPv6 range of the interface within Google. |
| `peerIpv4Cidr` | `string` IP range of the BGP interface outside Google. |
| `peerIpv6Cidr` | `string` IPv6 range of the BGP interface outside Google. |
| `peerAsn` | `integer (https://developers.google.com/discovery/v1/type-format format)` Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value. |
| `localAsn` | `integer (https://developers.google.com/discovery/v1/type-format format)` Output only. Local BGP Autonomous System Number (ASN). This field is ST_NOT_REQUIRED because it stores private ASNs, which are meaningless outside the zone in which they are being used. |

## Bgp

BGP information specific to this router.

| JSON representation |
|---|
| ``` { "asn": integer, "keepaliveIntervalInSeconds": integer } ``` |

| Fields ||
|---|---|
| `asn` | `integer (https://developers.google.com/discovery/v1/type-format format)` Locally assigned BGP ASN. |
| `keepaliveIntervalInSeconds` | `integer (https://developers.google.com/discovery/v1/type-format format)` The interval in seconds between BGP keepalive messages that are sent to the peer. Default is 20 with value between 20 and 60. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/create` | Creates a new Router in a given project and location. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/delete` | Deletes a single Router. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/diagnose` | Get the diagnostics of a single router resource. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/get` | Gets details of a single Router. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/list` | Lists Routers in a given project and location. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/network/rest/v1/projects.locations.zones.routers/patch` | Updates the parameters of a single Router. |