blob: 2ffc2b3849ff5eac6af44d293a657658446051ec [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of routers.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Deletes the specified Router resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, natName=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Retrieves runtime Nat mapping information of VM endpoints.</p>
95<p class="toc_element">
96 <code><a href="#getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
99 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
100<p class="firstline">Retrieves runtime information of the specified router.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#update">update(project, region, router, body=None, requestId=None)</a></code></p>
121<p class="firstline">Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<h3>Method Details</h3>
123<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700125 <pre>Retrieves an aggregated list of routers.
126
127Args:
128 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130
Dan O'Mearadd494642020-05-01 07:42:23 -0700131For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132
Dan O'Mearadd494642020-05-01 07:42:23 -0700133You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700134
Bu Sun Kim65020912020-05-20 12:08:20 -0700135To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
138 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
139
140You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
141
142Currently, only sorting by `name` or `creationTimestamp desc` is supported.
143 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800144 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145
146Returns:
147 An object of the form:
148
149 { # Contains a list of routers.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800150 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
151 &quot;items&quot;: { # A list of Router resources.
152 &quot;a_key&quot;: { # Name of the scope containing this set of routers.
153 &quot;routers&quot;: [ # A list of routers contained in this scope.
154 { # Represents a Cloud Router resource.
155 #
156 # For more information about Cloud Router, read the Cloud Router overview.
157 &quot;bgp&quot;: { # BGP information specific to this router.
158 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
159 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
160 &quot;A String&quot;,
161 ],
162 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
163 { # Description-tagged IP ranges for the router to advertise.
164 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
165 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
166 },
167 ],
168 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
169 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
170 # Not currently available publicly.
171 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
172 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700173 # If set, this value must be between 20 and 60. The default is 20.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800174 },
175 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
176 {
177 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
178 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
179 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700180 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -0700181 &quot;A String&quot;,
182 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 { # Description-tagged IP ranges for the router to advertise.
185 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
186 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 },
188 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800189 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
190 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800192 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800194 # If set, this value must be between 100 and 30000.
195 # The default is 300.
196 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700197 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800198 # If set, this value must be between 100 and 30000.
199 # The default is 300.
200 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
201 # Not currently available publicly.
202 # If set, the value must be a value between 2 and 16.
203 # The default is 3.
204 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
205 # Not currently available publicly.
206 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800208 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
209 # Not currently available publicly.
210 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
211 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
212 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
213 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
214 # - MANAGED_BY_USER is the default value and can be managed by you or other users
215 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
216 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
217 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
218 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700219 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700220 },
221 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800222 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
223 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700224 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800225 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
226 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
227 {
228 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
229 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
230 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
231 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
232 # - MANAGED_BY_USER is the default value and can be managed directly by users.
233 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
234 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700235 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
236 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
237 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800238 },
239 ],
240 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
241 &quot;name&quot;: &quot;A String&quot;, # 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.
242 &quot;nats&quot;: [ # A list of NAT services created in this router.
243 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
244 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
245 &quot;A String&quot;,
246 ],
247 &quot;enableEndpointIndependentMapping&quot;: True or False,
248 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
249 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
250 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
251 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
252 # - ERRORS_ONLY: Export logs only for connection failures.
253 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
254 # - ALL: Export logs for all connections, successful and unsuccessful.
255 },
256 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
257 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
258 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
259 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
260 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
261 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
262 &quot;A String&quot;,
263 ],
264 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
265 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
266 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
267 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
268 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
269 { # Defines the IP ranges that want to use NAT for a subnetwork.
270 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
271 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
272 &quot;A String&quot;,
273 ],
274 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
275 &quot;A String&quot;,
276 ],
277 },
278 ],
279 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
280 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
281 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
282 },
283 ],
284 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
285 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
286 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 },
288 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
290 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
291 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
292 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
293 {
294 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
295 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
296 },
297 ],
298 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
299 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 },
302 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
303 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
304 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
305 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
306 &quot;A String&quot;,
307 ],
308 &quot;warning&quot;: { # [Output Only] Informational warning message.
309 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
310 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
311 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
312 {
313 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
314 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
315 },
316 ],
317 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
318 },
319}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700320</div>
321
322<div class="method">
323 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
324 <pre>Retrieves the next page of results.
325
326Args:
327 previous_request: The request for the previous page. (required)
328 previous_response: The response from the request for the previous page. (required)
329
330Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700332 page. Returns None if there are no more items in the collection.
333 </pre>
334</div>
335
336<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 <code class="details" id="close">close()</code>
338 <pre>Close httplib2 connections.</pre>
339</div>
340
341<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700343 <pre>Deletes the specified Router resource.
344
345Args:
346 project: string, Project ID for this request. (required)
347 region: string, Name of the region for this request. (required)
348 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
350
351For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
352
353The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700354
355Returns:
356 An object of the form:
357
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800359 #
360 # Google Compute Engine has three Operation resources:
361 #
362 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
363 #
364 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
365 #
366 # Operations can be global, regional or zonal.
367 # - For global operations, use the `globalOperations` resource.
368 # - For regional operations, use the `regionOperations` resource.
369 # - For zonal operations, use the `zonalOperations` resource.
370 #
371 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
372 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
373 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
374 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
375 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
376 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
377 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800379 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
380 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
381 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 },
383 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800384 },
385 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
386 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
387 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
388 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
389 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
390 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800391 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
393 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
394 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
395 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
396 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
397 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
398 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
399 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
400 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
401 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
402 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
403 {
404 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
405 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
406 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
407 {
408 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
409 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
410 },
411 ],
412 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
413 },
414 ],
415 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
416}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700417</div>
418
419<div class="method">
420 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700422
423Args:
424 project: string, Project ID for this request. (required)
425 region: string, Name of the region for this request. (required)
426 router: string, Name of the Router resource to return. (required)
427
428Returns:
429 An object of the form:
430
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 { # Represents a Cloud Router resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800432 #
433 # For more information about Cloud Router, read the Cloud Router overview.
434 &quot;bgp&quot;: { # BGP information specific to this router.
435 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
436 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
437 &quot;A String&quot;,
438 ],
439 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
440 { # Description-tagged IP ranges for the router to advertise.
441 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
442 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
443 },
444 ],
445 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
446 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
447 # Not currently available publicly.
448 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
449 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700450 # If set, this value must be between 20 and 60. The default is 20.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800451 },
452 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
453 {
454 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
455 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
456 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700457 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;A String&quot;,
459 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800460 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 { # Description-tagged IP ranges for the router to advertise.
462 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
463 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 },
465 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800466 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
467 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700468 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800469 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
470 # Not currently available publicly.
471 # If set, this value must be between 100 and 30000.
472 # The default is 300.
473 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
474 # Not currently available publicly.
475 # If set, this value must be between 100 and 30000.
476 # The default is 300.
477 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
478 # Not currently available publicly.
479 # If set, the value must be a value between 2 and 16.
480 # The default is 3.
481 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
482 # Not currently available publicly.
483 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
484 },
485 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
486 # Not currently available publicly.
487 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
488 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
489 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
490 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
491 # - MANAGED_BY_USER is the default value and can be managed by you or other users
492 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
493 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
494 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
495 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700496 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800498 ],
499 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
500 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700501 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800502 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
503 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
504 {
505 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
506 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
507 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
508 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
509 # - MANAGED_BY_USER is the default value and can be managed directly by users.
510 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
511 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700512 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
513 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
514 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800515 },
516 ],
517 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
518 &quot;name&quot;: &quot;A String&quot;, # 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.
519 &quot;nats&quot;: [ # A list of NAT services created in this router.
520 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
521 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
522 &quot;A String&quot;,
523 ],
524 &quot;enableEndpointIndependentMapping&quot;: True or False,
525 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
526 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
527 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
528 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
529 # - ERRORS_ONLY: Export logs only for connection failures.
530 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
531 # - ALL: Export logs for all connections, successful and unsuccessful.
532 },
533 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
534 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
535 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
536 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
537 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
538 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
539 &quot;A String&quot;,
540 ],
541 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
542 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
543 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
544 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
545 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
546 { # Defines the IP ranges that want to use NAT for a subnetwork.
547 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
548 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
549 &quot;A String&quot;,
550 ],
551 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
552 &quot;A String&quot;,
553 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700554 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800555 ],
556 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
557 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
558 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
559 },
560 ],
561 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
562 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
563 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
564}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700565</div>
566
567<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700568 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, natName=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 <pre>Retrieves runtime Nat mapping information of VM endpoints.
570
571Args:
572 project: string, Project ID for this request. (required)
573 region: string, Name of the region for this request. (required)
574 router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576
Dan O'Mearadd494642020-05-01 07:42:23 -0700577For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578
Dan O'Mearadd494642020-05-01 07:42:23 -0700579You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580
Bu Sun Kim65020912020-05-20 12:08:20 -0700581To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
582 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
583 natName: string, Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
584 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
585
586You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
587
588Currently, only sorting by `name` or `creationTimestamp desc` is supported.
589 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800590 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591
592Returns:
593 An object of the form:
594
595 { # Contains a list of VmEndpointNatMappings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800596 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
597 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
598 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
599 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
600 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
601 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
602 &quot;interfaceNatMappings&quot;: [
603 { # Contain information of Nat mapping for an interface of this endpoint.
604 &quot;drainNatIpPortRanges&quot;: [ # List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [&quot;2.2.2.2:12345-12355&quot;, &quot;1.1.1.1:2234-2234&quot;].
605 &quot;A String&quot;,
606 ],
607 &quot;natIpPortRanges&quot;: [ # A list of all IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [&quot;2.2.2.2:12345-12355&quot;, &quot;1.1.1.1:2234-2234&quot;].
608 &quot;A String&quot;,
609 ],
610 &quot;numTotalDrainNatPorts&quot;: 42, # Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.
611 &quot;numTotalNatPorts&quot;: 42, # Total number of ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field nat_ip_port_ranges.
612 &quot;sourceAliasIpRange&quot;: &quot;A String&quot;, # Alias IP range for this interface endpoint. It will be a private (RFC 1918) IP range. Examples: &quot;10.33.4.55/32&quot;, or &quot;192.168.5.0/24&quot;.
613 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 },
615 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700616 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800617 ],
618 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
619 &quot;warning&quot;: { # [Output Only] Informational warning message.
620 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
621 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
622 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
623 {
624 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
625 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
626 },
627 ],
628 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
629 },
630}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631</div>
632
633<div class="method">
634 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
635 <pre>Retrieves the next page of results.
636
637Args:
638 previous_request: The request for the previous page. (required)
639 previous_response: The response from the request for the previous page. (required)
640
641Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 page. Returns None if there are no more items in the collection.
644 </pre>
645</div>
646
647<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700648 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
649 <pre>Retrieves runtime information of the specified router.
650
651Args:
652 project: string, Project ID for this request. (required)
653 region: string, Name of the region for this request. (required)
654 router: string, Name of the Router resource to query. (required)
655
656Returns:
657 An object of the form:
658
659 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800660 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
661 &quot;result&quot;: {
662 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
663 { # Represents a Route resource.
664 #
665 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
666 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
667 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800668 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800669 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
670 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
671 &quot;name&quot;: &quot;A String&quot;, # 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])?`. 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.
672 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
673 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
674 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
675 # - 10.128.0.56
676 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
677 # - regions/region/forwardingRules/forwardingRule
678 &quot;nextHopInstance&quot;: &quot;A String&quot;, # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
679 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
680 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
681 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
682 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
683 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
684 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
685 &quot;priority&quot;: 42, # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
686 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
687 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
688 &quot;A String&quot;,
689 ],
690 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
691 {
692 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
693 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
694 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
695 {
696 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
697 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 },
699 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800700 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800702 ],
703 },
704 ],
705 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
706 { # Represents a Route resource.
707 #
708 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
709 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
710 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800711 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800712 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
713 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
714 &quot;name&quot;: &quot;A String&quot;, # 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])?`. 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.
715 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
716 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
717 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
718 # - 10.128.0.56
719 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
720 # - regions/region/forwardingRules/forwardingRule
721 &quot;nextHopInstance&quot;: &quot;A String&quot;, # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
722 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
723 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
724 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
725 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
726 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
727 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
728 &quot;priority&quot;: 42, # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
729 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
730 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
731 &quot;A String&quot;,
732 ],
733 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
734 {
735 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
736 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
737 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
738 {
739 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
740 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
741 },
742 ],
743 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
744 },
745 ],
746 },
747 ],
748 &quot;bgpPeerStatus&quot;: [
749 {
750 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
751 { # Represents a Route resource.
752 #
753 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
755 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800756 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800757 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
758 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
759 &quot;name&quot;: &quot;A String&quot;, # 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])?`. 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.
760 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
761 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
762 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
763 # - 10.128.0.56
764 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
765 # - regions/region/forwardingRules/forwardingRule
766 &quot;nextHopInstance&quot;: &quot;A String&quot;, # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
767 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
768 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
769 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
770 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
771 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
772 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
773 &quot;priority&quot;: 42, # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
774 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
775 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
776 &quot;A String&quot;,
777 ],
778 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
779 {
780 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
781 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
782 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
783 {
784 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
785 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
786 },
787 ],
788 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
789 },
790 ],
791 },
792 ],
793 &quot;bfdStatus&quot;: { # Next free: 15
794 &quot;bfdSessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.
795 &quot;configUpdateTimestampMicros&quot;: &quot;A String&quot;, # Unix timestamp of the most recent config update.
796 &quot;controlPacketCounts&quot;: { # Control packet counts for the current BFD session.
797 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
798 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
799 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
800 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
801 },
802 &quot;controlPacketIntervals&quot;: [ # Inter-packet time interval statistics for control packets.
803 { # Next free: 7
804 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
805 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
806 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
807 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
808 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
809 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
810 },
811 ],
812 &quot;localDiagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
813 &quot;localState&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
814 &quot;negotiatedLocalControlTxIntervalMs&quot;: 42, # Negotiated transmit interval for control packets.
815 &quot;rxPacket&quot;: { # The most recent Rx control packet for this BFD session.
816 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
817 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
818 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
819 &quot;diagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
820 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
821 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
822 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
823 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
824 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
825 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
826 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
827 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
828 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
829 &quot;state&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
830 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
831 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
832 },
833 &quot;txPacket&quot;: { # The most recent Tx control packet for this BFD session.
834 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
835 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
836 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
837 &quot;diagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
838 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
839 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
840 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
841 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
842 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
843 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
844 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
845 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
846 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
847 &quot;state&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
848 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
849 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
850 },
851 &quot;uptimeMs&quot;: &quot;A String&quot;, # Session uptime in milliseconds. Value will be 0 if session is not up.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700852 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800853 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
854 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
855 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
856 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
857 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700858 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # [Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800859 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
860 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
861 &quot;uptime&quot;: &quot;A String&quot;, # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
862 &quot;uptimeSeconds&quot;: &quot;A String&quot;, # Time this session has been up, in seconds. Format: 145
863 },
864 ],
865 &quot;natStatus&quot;: [
866 { # Status of a NAT contained in this router.
867 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
868 &quot;A String&quot;,
869 ],
870 &quot;drainAutoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT that are in drain mode. Example: [&quot;1.1.1.1&quot;, &quot;179.12.26.133&quot;].
871 &quot;A String&quot;,
872 ],
873 &quot;drainUserAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT that are in drain mode. Example: [&quot;1.1.1.1&quot;, &quot;179.12.26.133&quot;].
874 &quot;A String&quot;,
875 ],
876 &quot;minExtraNatIpsNeeded&quot;: 42, # The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
877 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
878 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
879 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
880 &quot;A String&quot;,
881 ],
882 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
883 &quot;A String&quot;,
884 ],
885 },
886 ],
887 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
888 },
889}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700890</div>
891
892<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700894 <pre>Creates a Router resource in the specified project and region using the data included in the request.
895
896Args:
897 project: string, Project ID for this request. (required)
898 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700900 The object takes the form of:
901
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700904 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;bgp&quot;: { # BGP information specific to this router.
906 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
907 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
908 &quot;A String&quot;,
909 ],
910 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
911 { # Description-tagged IP ranges for the router to advertise.
912 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
913 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 },
915 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700917 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
918 # Not currently available publicly.
919 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
920 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700921 # If set, this value must be between 20 and 60. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 },
923 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
924 {
925 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
926 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
927 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700928 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 &quot;A String&quot;,
930 ],
931 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700932 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
934 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 },
936 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
938 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700939 # Not currently available publicly.
940 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
941 # Not currently available publicly.
942 # If set, this value must be between 100 and 30000.
943 # The default is 300.
944 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
945 # Not currently available publicly.
946 # If set, this value must be between 100 and 30000.
947 # The default is 300.
948 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
949 # Not currently available publicly.
950 # If set, the value must be a value between 2 and 16.
951 # The default is 3.
952 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
953 # Not currently available publicly.
954 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700955 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700956 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
957 # Not currently available publicly.
958 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
960 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
961 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
962 # - MANAGED_BY_USER is the default value and can be managed by you or other users
963 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
964 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
965 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
966 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700967 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 },
969 ],
970 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
971 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700972 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
974 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
975 {
976 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
977 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
978 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
979 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
980 # - MANAGED_BY_USER is the default value and can be managed directly by users.
981 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
982 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700983 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
984 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
985 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 },
987 ],
988 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
989 &quot;name&quot;: &quot;A String&quot;, # 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.
990 &quot;nats&quot;: [ # A list of NAT services created in this router.
991 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
992 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
993 &quot;A String&quot;,
994 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700995 &quot;enableEndpointIndependentMapping&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
997 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
998 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
999 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1000 # - ERRORS_ONLY: Export logs only for connection failures.
1001 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1002 # - ALL: Export logs for all connections, successful and unsuccessful.
1003 },
1004 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1005 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1006 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1007 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1008 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1009 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1010 &quot;A String&quot;,
1011 ],
1012 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1013 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1014 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1015 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1016 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1017 { # Defines the IP ranges that want to use NAT for a subnetwork.
1018 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1019 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1020 &quot;A String&quot;,
1021 ],
1022 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1023 &quot;A String&quot;,
1024 ],
1025 },
1026 ],
1027 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1028 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1029 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1030 },
1031 ],
1032 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1033 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1034 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1035}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001036
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1038
1039For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1040
1041The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001042
1043Returns:
1044 An object of the form:
1045
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001047 #
1048 # Google Compute Engine has three Operation resources:
1049 #
1050 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1051 #
1052 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1053 #
1054 # Operations can be global, regional or zonal.
1055 # - For global operations, use the `globalOperations` resource.
1056 # - For regional operations, use the `regionOperations` resource.
1057 # - For zonal operations, use the `zonalOperations` resource.
1058 #
1059 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1060 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1061 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1062 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1063 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1064 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1065 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001066 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001067 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1068 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001070 },
1071 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001072 },
1073 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1074 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1075 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1076 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1077 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1078 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001079 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001080 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1081 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1082 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1083 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1084 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1085 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1086 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1087 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1088 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1089 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1090 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1091 {
1092 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1093 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1094 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1095 {
1096 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1097 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1098 },
1099 ],
1100 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1101 },
1102 ],
1103 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1104}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001105</div>
1106
1107<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001108 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001109 <pre>Retrieves a list of Router resources available to the specified project.
1110
1111Args:
1112 project: string, Project ID for this request. (required)
1113 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001114 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001115
Dan O'Mearadd494642020-05-01 07:42:23 -07001116For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001117
Dan O'Mearadd494642020-05-01 07:42:23 -07001118You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001119
Bu Sun Kim65020912020-05-20 12:08:20 -07001120To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1121 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1122 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1123
1124You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1125
1126Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1127 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001128 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001129
1130Returns:
1131 An object of the form:
1132
1133 { # Contains a list of Router resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001134 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1135 &quot;items&quot;: [ # A list of Router resources.
1136 { # Represents a Cloud Router resource.
1137 #
1138 # For more information about Cloud Router, read the Cloud Router overview.
1139 &quot;bgp&quot;: { # BGP information specific to this router.
1140 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1141 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1142 &quot;A String&quot;,
1143 ],
1144 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1145 { # Description-tagged IP ranges for the router to advertise.
1146 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1147 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1148 },
1149 ],
1150 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
1151 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1152 # Not currently available publicly.
1153 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1154 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001155 # If set, this value must be between 20 and 60. The default is 20.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001156 },
1157 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1158 {
1159 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1160 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1161 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001162 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 &quot;A String&quot;,
1164 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001165 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 { # Description-tagged IP ranges for the router to advertise.
1167 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1168 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001169 },
1170 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001171 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
1172 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001173 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001174 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001175 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001176 # If set, this value must be between 100 and 30000.
1177 # The default is 300.
1178 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001179 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001180 # If set, this value must be between 100 and 30000.
1181 # The default is 300.
1182 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1183 # Not currently available publicly.
1184 # If set, the value must be a value between 2 and 16.
1185 # The default is 3.
1186 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1187 # Not currently available publicly.
1188 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001189 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001190 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1191 # Not currently available publicly.
1192 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1193 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1194 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1195 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1196 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1197 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1198 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
1199 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1200 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001201 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 },
1203 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001204 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1205 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001206 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001207 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1208 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1209 {
1210 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
1211 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1212 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1213 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1214 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1215 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
1216 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001217 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1218 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
1219 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001220 },
1221 ],
1222 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1223 &quot;name&quot;: &quot;A String&quot;, # 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.
1224 &quot;nats&quot;: [ # A list of NAT services created in this router.
1225 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
1226 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1227 &quot;A String&quot;,
1228 ],
1229 &quot;enableEndpointIndependentMapping&quot;: True or False,
1230 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1231 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1232 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1233 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1234 # - ERRORS_ONLY: Export logs only for connection failures.
1235 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1236 # - ALL: Export logs for all connections, successful and unsuccessful.
1237 },
1238 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1239 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1240 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1241 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1242 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1243 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1244 &quot;A String&quot;,
1245 ],
1246 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1247 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1248 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1249 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1250 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1251 { # Defines the IP ranges that want to use NAT for a subnetwork.
1252 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1253 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1254 &quot;A String&quot;,
1255 ],
1256 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1257 &quot;A String&quot;,
1258 ],
1259 },
1260 ],
1261 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1262 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1263 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1264 },
1265 ],
1266 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1267 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1268 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001269 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001270 ],
1271 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1272 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1273 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1274 &quot;warning&quot;: { # [Output Only] Informational warning message.
1275 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1276 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1277 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1278 {
1279 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1280 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1281 },
1282 ],
1283 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1284 },
1285}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001286</div>
1287
1288<div class="method">
1289 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1290 <pre>Retrieves the next page of results.
1291
1292Args:
1293 previous_request: The request for the previous page. (required)
1294 previous_response: The response from the request for the previous page. (required)
1295
1296Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001298 page. Returns None if there are no more items in the collection.
1299 </pre>
1300</div>
1301
1302<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 <pre>Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001305
1306Args:
1307 project: string, Project ID for this request. (required)
1308 region: string, Name of the region for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001309 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 The object takes the form of:
1312
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001315 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001316 &quot;bgp&quot;: { # BGP information specific to this router.
1317 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1318 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1319 &quot;A String&quot;,
1320 ],
1321 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1322 { # Description-tagged IP ranges for the router to advertise.
1323 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1324 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 },
1326 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001328 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1329 # Not currently available publicly.
1330 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1331 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001332 # If set, this value must be between 20 and 60. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 },
1334 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1335 {
1336 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1337 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1338 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001339 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001340 &quot;A String&quot;,
1341 ],
1342 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001343 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1345 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 },
1347 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
1349 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001350 # Not currently available publicly.
1351 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
1352 # Not currently available publicly.
1353 # If set, this value must be between 100 and 30000.
1354 # The default is 300.
1355 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
1356 # Not currently available publicly.
1357 # If set, this value must be between 100 and 30000.
1358 # The default is 300.
1359 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1360 # Not currently available publicly.
1361 # If set, the value must be a value between 2 and 16.
1362 # The default is 3.
1363 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1364 # Not currently available publicly.
1365 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001366 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001367 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1368 # Not currently available publicly.
1369 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1371 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1372 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1373 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1374 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1375 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
1376 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1377 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001378 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001379 },
1380 ],
1381 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1382 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001383 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1385 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1386 {
1387 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
1388 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1389 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1390 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1391 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1392 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
1393 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001394 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1395 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
1396 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001397 },
1398 ],
1399 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1400 &quot;name&quot;: &quot;A String&quot;, # 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.
1401 &quot;nats&quot;: [ # A list of NAT services created in this router.
1402 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
1403 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1404 &quot;A String&quot;,
1405 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001406 &quot;enableEndpointIndependentMapping&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1408 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1409 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1410 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1411 # - ERRORS_ONLY: Export logs only for connection failures.
1412 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1413 # - ALL: Export logs for all connections, successful and unsuccessful.
1414 },
1415 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1416 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1417 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1418 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1419 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1420 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1421 &quot;A String&quot;,
1422 ],
1423 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1424 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1425 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1426 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1427 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1428 { # Defines the IP ranges that want to use NAT for a subnetwork.
1429 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1430 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1431 &quot;A String&quot;,
1432 ],
1433 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1434 &quot;A String&quot;,
1435 ],
1436 },
1437 ],
1438 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1439 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1440 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1441 },
1442 ],
1443 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1444 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1445 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1446}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001447
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001448 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1449
1450For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1451
1452The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001453
1454Returns:
1455 An object of the form:
1456
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001457 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001458 #
1459 # Google Compute Engine has three Operation resources:
1460 #
1461 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1462 #
1463 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1464 #
1465 # Operations can be global, regional or zonal.
1466 # - For global operations, use the `globalOperations` resource.
1467 # - For regional operations, use the `regionOperations` resource.
1468 # - For zonal operations, use the `zonalOperations` resource.
1469 #
1470 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1471 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1472 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1473 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1474 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1475 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1476 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001477 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001478 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1479 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1480 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001481 },
1482 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001483 },
1484 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1485 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1486 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1487 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1488 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1489 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001490 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001491 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1492 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1493 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1494 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1495 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1496 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1497 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1498 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1499 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1500 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1501 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1502 {
1503 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1504 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1505 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1506 {
1507 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1508 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1509 },
1510 ],
1511 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1512 },
1513 ],
1514 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1515}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001516</div>
1517
1518<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001519 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001520 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1521
1522Args:
1523 project: string, Project ID for this request. (required)
1524 region: string, Name of the region for this request. (required)
1525 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001526 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001527 The object takes the form of:
1528
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001530 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001531 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 &quot;bgp&quot;: { # BGP information specific to this router.
1533 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1534 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1535 &quot;A String&quot;,
1536 ],
1537 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1538 { # Description-tagged IP ranges for the router to advertise.
1539 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1540 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001541 },
1542 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001543 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001544 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1545 # Not currently available publicly.
1546 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1547 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001548 # If set, this value must be between 20 and 60. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001549 },
1550 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1551 {
1552 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1553 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1554 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001555 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 &quot;A String&quot;,
1557 ],
1558 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001560 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1561 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 },
1563 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001564 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
1565 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001566 # Not currently available publicly.
1567 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
1568 # Not currently available publicly.
1569 # If set, this value must be between 100 and 30000.
1570 # The default is 300.
1571 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
1572 # Not currently available publicly.
1573 # If set, this value must be between 100 and 30000.
1574 # The default is 300.
1575 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1576 # Not currently available publicly.
1577 # If set, the value must be a value between 2 and 16.
1578 # The default is 3.
1579 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1580 # Not currently available publicly.
1581 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001582 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001583 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1584 # Not currently available publicly.
1585 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001586 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1587 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1588 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1589 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1590 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1591 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
1592 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1593 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001594 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001595 },
1596 ],
1597 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1598 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001599 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1601 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1602 {
1603 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
1604 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1605 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1606 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1607 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1608 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
1609 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001610 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1611 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
1612 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 },
1614 ],
1615 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1616 &quot;name&quot;: &quot;A String&quot;, # 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.
1617 &quot;nats&quot;: [ # A list of NAT services created in this router.
1618 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
1619 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1620 &quot;A String&quot;,
1621 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001622 &quot;enableEndpointIndependentMapping&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001623 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1624 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1625 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1626 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1627 # - ERRORS_ONLY: Export logs only for connection failures.
1628 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1629 # - ALL: Export logs for all connections, successful and unsuccessful.
1630 },
1631 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1632 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1633 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1634 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1635 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1636 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1637 &quot;A String&quot;,
1638 ],
1639 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1640 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1641 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1642 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1643 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1644 { # Defines the IP ranges that want to use NAT for a subnetwork.
1645 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1646 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1647 &quot;A String&quot;,
1648 ],
1649 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1650 &quot;A String&quot;,
1651 ],
1652 },
1653 ],
1654 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1655 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1656 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1657 },
1658 ],
1659 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1660 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1661 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1662}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001663
1664
1665Returns:
1666 An object of the form:
1667
1668 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001669 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
1670 #
1671 # For more information about Cloud Router, read the Cloud Router overview.
1672 &quot;bgp&quot;: { # BGP information specific to this router.
1673 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1674 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1675 &quot;A String&quot;,
1676 ],
1677 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1678 { # Description-tagged IP ranges for the router to advertise.
1679 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1680 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1681 },
1682 ],
1683 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
1684 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1685 # Not currently available publicly.
1686 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1687 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001688 # If set, this value must be between 20 and 60. The default is 20.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001689 },
1690 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1691 {
1692 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1693 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1694 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001695 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001696 &quot;A String&quot;,
1697 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001698 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001699 { # Description-tagged IP ranges for the router to advertise.
1700 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1701 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001702 },
1703 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001704 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
1705 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001706 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001707 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
1708 # Not currently available publicly.
1709 # If set, this value must be between 100 and 30000.
1710 # The default is 300.
1711 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
1712 # Not currently available publicly.
1713 # If set, this value must be between 100 and 30000.
1714 # The default is 300.
1715 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1716 # Not currently available publicly.
1717 # If set, the value must be a value between 2 and 16.
1718 # The default is 3.
1719 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1720 # Not currently available publicly.
1721 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
1722 },
1723 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1724 # Not currently available publicly.
1725 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1726 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1727 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1728 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1729 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1730 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1731 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
1732 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1733 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001734 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001735 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001736 ],
1737 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1738 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001739 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001740 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1741 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1742 {
1743 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
1744 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1745 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1746 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1747 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1748 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
1749 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001750 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1751 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
1752 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001753 },
1754 ],
1755 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1756 &quot;name&quot;: &quot;A String&quot;, # 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.
1757 &quot;nats&quot;: [ # A list of NAT services created in this router.
1758 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
1759 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1760 &quot;A String&quot;,
1761 ],
1762 &quot;enableEndpointIndependentMapping&quot;: True or False,
1763 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1764 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1765 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1766 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1767 # - ERRORS_ONLY: Export logs only for connection failures.
1768 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1769 # - ALL: Export logs for all connections, successful and unsuccessful.
1770 },
1771 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1772 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1773 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1774 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1775 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1776 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1777 &quot;A String&quot;,
1778 ],
1779 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1780 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1781 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1782 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1783 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1784 { # Defines the IP ranges that want to use NAT for a subnetwork.
1785 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1786 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1787 &quot;A String&quot;,
1788 ],
1789 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1790 &quot;A String&quot;,
1791 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001793 ],
1794 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1795 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1796 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1797 },
1798 ],
1799 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1800 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1801 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1802 },
1803}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001804</div>
1805
1806<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001807 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001808 <pre>Returns permissions that a caller has on the specified resource.
1809
1810Args:
1811 project: string, Project ID for this request. (required)
1812 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001814 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001815 The object takes the form of:
1816
1817{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001818 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1819 &quot;A String&quot;,
1820 ],
1821}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001822
1823
1824Returns:
1825 An object of the form:
1826
1827 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001828 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1829 &quot;A String&quot;,
1830 ],
1831}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001832</div>
1833
1834<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1836 <pre>Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001837
1838Args:
1839 project: string, Project ID for this request. (required)
1840 region: string, Name of the region for this request. (required)
1841 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001842 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001843 The object takes the form of:
1844
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001847 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001848 &quot;bgp&quot;: { # BGP information specific to this router.
1849 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1850 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1851 &quot;A String&quot;,
1852 ],
1853 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1854 { # Description-tagged IP ranges for the router to advertise.
1855 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1856 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 },
1858 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001859 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001860 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1861 # Not currently available publicly.
1862 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1863 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001864 # If set, this value must be between 20 and 60. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 },
1866 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1867 {
1868 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1869 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1870 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001871 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001872 &quot;A String&quot;,
1873 ],
1874 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001875 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001876 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1877 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001878 },
1879 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001880 &quot;advertisedRoutePriority&quot;: 42, # The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
1881 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001882 # Not currently available publicly.
1883 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
1884 # Not currently available publicly.
1885 # If set, this value must be between 100 and 30000.
1886 # The default is 300.
1887 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
1888 # Not currently available publicly.
1889 # If set, this value must be between 100 and 30000.
1890 # The default is 300.
1891 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1892 # Not currently available publicly.
1893 # If set, the value must be a value between 2 and 16.
1894 # The default is 3.
1895 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1896 # Not currently available publicly.
1897 # If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001898 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001899 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1900 # Not currently available publicly.
1901 # If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1903 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1904 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1905 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1906 # - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1907 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. 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.
1908 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1909 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001910 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001911 },
1912 ],
1913 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1914 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001915 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001916 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1917 &quot;interfaces&quot;: [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1918 {
1919 &quot;ipRange&quot;: &quot;A String&quot;, # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
1920 &quot;linkedInterconnectAttachment&quot;: &quot;A String&quot;, # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1921 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1922 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1923 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1924 # - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
1925 &quot;name&quot;: &quot;A String&quot;, # Name of this interface entry. 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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001926 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1927 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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.
1928 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001929 },
1930 ],
1931 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1932 &quot;name&quot;: &quot;A String&quot;, # 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.
1933 &quot;nats&quot;: [ # A list of NAT services created in this router.
1934 { # Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
1935 &quot;drainNatIps&quot;: [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1936 &quot;A String&quot;,
1937 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001938 &quot;enableEndpointIndependentMapping&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001939 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1940 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1941 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1942 &quot;filter&quot;: &quot;A String&quot;, # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1943 # - ERRORS_ONLY: Export logs only for connection failures.
1944 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1945 # - ALL: Export logs for all connections, successful and unsuccessful.
1946 },
1947 &quot;minPortsPerVm&quot;: 42, # Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
1948 &quot;name&quot;: &quot;A String&quot;, # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1949 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1950 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1951 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can&#x27;t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1952 &quot;natIps&quot;: [ # A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
1953 &quot;A String&quot;,
1954 ],
1955 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1956 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1957 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1958 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1959 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1960 { # Defines the IP ranges that want to use NAT for a subnetwork.
1961 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1962 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1963 &quot;A String&quot;,
1964 ],
1965 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1966 &quot;A String&quot;,
1967 ],
1968 },
1969 ],
1970 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1971 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1972 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1973 },
1974 ],
1975 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1976 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1977 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1978}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001979
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1981
1982For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1983
1984The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001985
1986Returns:
1987 An object of the form:
1988
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001989 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001990 #
1991 # Google Compute Engine has three Operation resources:
1992 #
1993 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1994 #
1995 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1996 #
1997 # Operations can be global, regional or zonal.
1998 # - For global operations, use the `globalOperations` resource.
1999 # - For regional operations, use the `regionOperations` resource.
2000 # - For zonal operations, use the `zonalOperations` resource.
2001 #
2002 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2003 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2004 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2005 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2006 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2007 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2008 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002009 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002010 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2011 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2012 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002013 },
2014 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002015 },
2016 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2017 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2018 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2019 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2020 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2021 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002022 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002023 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2024 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2025 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2026 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2027 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2028 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2029 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2030 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2031 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2032 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2033 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2034 {
2035 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2036 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2037 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2038 {
2039 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2040 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2041 },
2042 ],
2043 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2044 },
2045 ],
2046 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2047}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002048</div>
2049
2050</body></html>