blob: 0c23aecc390784769d65185d1ecea302584ed431 [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <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">
Bu Sun Kim65020912020-05-20 12:08:20 -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">
Bu Sun Kim65020912020-05-20 12:08:20 -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">
Bu Sun Kim65020912020-05-20 12:08:20 -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.
144 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145
146Returns:
147 An object of the form:
148
149 { # Contains a list of routers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700156 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700166 },
167 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &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 -0700169 &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.
173 # If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700174 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 &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.
180 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
181 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
182 &quot;A String&quot;,
183 ],
184 &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.
185 { # Description-tagged IP ranges for the router to advertise.
186 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
187 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
188 },
189 ],
190 &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.
191 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700192 # Not currently available publicly.
193 &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.
194 # Not currently available publicly.
195 # If set, this value must be between 100 and 30000.
196 # The default is 300.
197 &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.
198 # Not currently available publicly.
199 # If set, this value must be between 100 and 30000.
200 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700202 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
203 # Not currently available publicly.
204 # If set, the value must be a value between 2 and 16.
205 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700207 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
208 # Not currently available publicly.
209 # 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 -0700210 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
211 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700212 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
213 # Not currently available publicly.
214 # 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 -0700215 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
216 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
217 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
218 # - MANAGED_BY_USER is the default value and can be managed by you or other users
219 # - 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.
220 &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.
221 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
222 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
223 },
224 ],
225 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
226 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
227 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
228 &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.
229 {
230 &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.
231 &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.
232 &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.
233 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
234 # - MANAGED_BY_USER is the default value and can be managed directly by users.
235 # - 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.
236 &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.
237 },
238 ],
239 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
240 &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.
241 &quot;nats&quot;: [ # A list of NAT services created in this router.
242 { # 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.
243 &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.
244 &quot;A String&quot;,
245 ],
246 &quot;enableEndpointIndependentMapping&quot;: True or False,
247 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
248 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
249 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
250 &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:
251 # - ERRORS_ONLY: Export logs only for connection failures.
252 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
253 # - ALL: Export logs for all connections, successful and unsuccessful.
254 },
255 &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.
256 &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.
257 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
258 # - 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.
259 # - 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.
260 &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.
261 &quot;A String&quot;,
262 ],
263 &quot;rules&quot;: [ # A list of rules associated with this NAT.
264 {
265 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
266 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
267 &quot;A String&quot;,
268 ],
269 &quot;sourceNatDrainIps&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 rule only.
270 &quot;A String&quot;,
271 ],
272 },
273 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
274 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
275 #
276 # The following examples are valid match expressions:
277 #
278 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
279 #
280 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700281 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 },
283 ],
284 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
285 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
286 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
287 # - 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.
288 &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.
289 { # Defines the IP ranges that want to use NAT for a subnetwork.
290 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
291 &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.
292 &quot;A String&quot;,
293 ],
294 &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]
295 &quot;A String&quot;,
296 ],
297 },
298 ],
299 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
300 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
301 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
302 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
303 },
304 ],
305 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
306 &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.
307 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
308 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
309 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700310 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
312 &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.
313 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
314 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700315 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &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).
317 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700318 },
319 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700321 },
322 },
323 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
325 &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.
326 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
327 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
328 &quot;A String&quot;,
329 ],
330 &quot;warning&quot;: { # [Output Only] Informational warning message.
331 &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.
332 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
333 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700335 &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).
336 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 },
338 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700341 }</pre>
342</div>
343
344<div class="method">
345 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
346 <pre>Retrieves the next page of results.
347
348Args:
349 previous_request: The request for the previous page. (required)
350 previous_response: The response from the request for the previous page. (required)
351
352Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700354 page. Returns None if there are no more items in the collection.
355 </pre>
356</div>
357
358<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700359 <code class="details" id="close">close()</code>
360 <pre>Close httplib2 connections.</pre>
361</div>
362
363<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400364 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700365 <pre>Deletes the specified Router resource.
366
367Args:
368 project: string, Project ID for this request. (required)
369 region: string, Name of the region for this request. (required)
370 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 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.
372
373For 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.
374
375The 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 -0700376
377Returns:
378 An object of the form:
379
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 { # Represents an Operation resource.
381 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 # Google Compute Engine has three Operation resources:
383 #
384 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
385 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
387 #
388 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 # - For global operations, use the `globalOperations` resource.
390 # - For regional operations, use the `regionOperations` resource.
391 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
395 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
396 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
397 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
398 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
399 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700400 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
402 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
403 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700404 },
405 ],
406 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 &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`.
408 &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.
409 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
410 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
411 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
412 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
413 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
414 &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.
415 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
416 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
417 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
418 &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.
419 &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`.
420 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
421 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
422 &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.
423 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
424 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
425 {
426 &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.
427 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
428 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
429 {
430 &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).
431 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
432 },
433 ],
434 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
435 },
436 ],
437 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700438 }</pre>
439</div>
440
441<div class="method">
442 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700444
445Args:
446 project: string, Project ID for this request. (required)
447 region: string, Name of the region for this request. (required)
448 router: string, Name of the Router resource to return. (required)
449
450Returns:
451 An object of the form:
452
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700455 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;bgp&quot;: { # BGP information specific to this router.
457 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
458 &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.
459 &quot;A String&quot;,
460 ],
461 &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.
462 { # Description-tagged IP ranges for the router to advertise.
463 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
464 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700465 },
466 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &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 -0700468 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
469 # Not currently available publicly.
470 # 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.
471 # 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.
472 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 },
474 &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.
475 {
476 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
477 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
478 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
479 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
480 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
481 &quot;A String&quot;,
482 ],
483 &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 -0700484 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
486 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400487 },
488 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &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.
490 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700491 # Not currently available publicly.
492 &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.
493 # Not currently available publicly.
494 # If set, this value must be between 100 and 30000.
495 # The default is 300.
496 &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.
497 # Not currently available publicly.
498 # If set, this value must be between 100 and 30000.
499 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -0700500 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700501 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
502 # Not currently available publicly.
503 # If set, the value must be a value between 2 and 16.
504 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700506 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
507 # Not currently available publicly.
508 # 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 -0700509 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700510 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700511 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
512 # Not currently available publicly.
513 # 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 -0700514 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
515 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
516 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
517 # - MANAGED_BY_USER is the default value and can be managed by you or other users
518 # - 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.
519 &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.
520 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
521 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
522 },
523 ],
524 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
525 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
526 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
527 &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.
528 {
529 &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.
530 &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.
531 &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.
532 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
533 # - MANAGED_BY_USER is the default value and can be managed directly by users.
534 # - 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.
535 &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.
536 },
537 ],
538 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
539 &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.
540 &quot;nats&quot;: [ # A list of NAT services created in this router.
541 { # 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.
542 &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.
543 &quot;A String&quot;,
544 ],
545 &quot;enableEndpointIndependentMapping&quot;: True or False,
546 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
547 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
548 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
549 &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:
550 # - ERRORS_ONLY: Export logs only for connection failures.
551 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
552 # - ALL: Export logs for all connections, successful and unsuccessful.
553 },
554 &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.
555 &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.
556 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
557 # - 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.
558 # - 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.
559 &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.
560 &quot;A String&quot;,
561 ],
562 &quot;rules&quot;: [ # A list of rules associated with this NAT.
563 {
564 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
565 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
566 &quot;A String&quot;,
567 ],
568 &quot;sourceNatDrainIps&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 rule only.
569 &quot;A String&quot;,
570 ],
571 },
572 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
573 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
574 #
575 # The following examples are valid match expressions:
576 #
577 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
578 #
579 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700580 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 },
582 ],
583 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
584 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
585 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
586 # - 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.
587 &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.
588 { # Defines the IP ranges that want to use NAT for a subnetwork.
589 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
590 &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.
591 &quot;A String&quot;,
592 ],
593 &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]
594 &quot;A String&quot;,
595 ],
596 },
597 ],
598 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
599 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
600 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
601 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
602 },
603 ],
604 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
605 &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.
606 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
607 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
608 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700609</div>
610
611<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 <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 -0700613 <pre>Retrieves runtime Nat mapping information of VM endpoints.
614
615Args:
616 project: string, Project ID for this request. (required)
617 region: string, Name of the region for this request. (required)
618 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 -0700619 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 -0700620
Dan O'Mearadd494642020-05-01 07:42:23 -0700621For 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 -0700622
Dan O'Mearadd494642020-05-01 07:42:23 -0700623You 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 -0700624
Bu Sun Kim65020912020-05-20 12:08:20 -0700625To 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) ```
626 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`)
627 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.
628 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
629
630You 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.
631
632Currently, only sorting by `name` or `creationTimestamp desc` is supported.
633 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.
634 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635
636Returns:
637 An object of the form:
638
639 { # Contains a list of VmEndpointNatMappings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
641 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
642 &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.
643 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
646 &quot;interfaceNatMappings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 { # Contain information of Nat mapping for an interface of this endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 &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;].
649 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &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;].
652 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 &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.
655 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700656 &quot;ruleMappings&quot;: [ # Information about mappings provided by rules in this NAT.
657 { # Contains information of NAT Mappings provided by a NAT Rule.
658 &quot;drainNatIpPortRanges&quot;: [ # List of all drain IP:port-range mappings assigned to this interface by this rule. 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;].
659 &quot;A String&quot;,
660 ],
661 &quot;natIpPortRanges&quot;: [ # A list of all IP:port-range mappings assigned to this interface by this rule. 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;].
662 &quot;A String&quot;,
663 ],
664 &quot;numTotalDrainNatPorts&quot;: 42, # Total number of drain ports across all NAT IPs allocated to this interface by this rule. It equals the aggregated port number in the field drain_nat_ip_port_ranges.
665 &quot;numTotalNatPorts&quot;: 42, # Total number of ports across all NAT IPs allocated to this interface by this rule. It equals the aggregated port number in the field nat_ip_port_ranges.
666 &quot;ruleNumber&quot;: 42, # Rule number of the NAT Rule.
667 },
668 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &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;.
670 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700671 },
672 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 },
674 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
676 &quot;warning&quot;: { # [Output Only] Informational warning message.
677 &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.
678 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
679 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
680 {
681 &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).
682 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
683 },
684 ],
685 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
686 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 }</pre>
688</div>
689
690<div class="method">
691 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
692 <pre>Retrieves the next page of results.
693
694Args:
695 previous_request: The request for the previous page. (required)
696 previous_response: The response from the request for the previous page. (required)
697
698Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 page. Returns None if there are no more items in the collection.
701 </pre>
702</div>
703
704<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700705 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
706 <pre>Retrieves runtime information of the specified router.
707
708Args:
709 project: string, Project ID for this request. (required)
710 region: string, Name of the region for this request. (required)
711 router: string, Name of the Router resource to query. (required)
712
713Returns:
714 An object of the form:
715
716 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
718 &quot;result&quot;: {
719 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
720 { # Represents a Route resource.
721 #
722 # 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 ==)
723 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
724 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
725 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
726 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
727 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
728 &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.
729 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
730 &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
731 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
732 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
733 # - regions/region/forwardingRules/forwardingRule
734 &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:
735 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
736 &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.
737 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
738 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
739 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
740 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
741 &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.
742 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
743 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
744 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
745 &quot;A String&quot;,
746 ],
747 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
748 {
749 &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.
750 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
751 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
752 {
753 &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).
754 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
755 },
756 ],
757 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
758 },
759 ],
760 },
761 ],
762 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
763 { # Represents a Route resource.
764 #
765 # 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 ==)
766 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
767 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
768 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
769 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
770 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
771 &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.
772 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
773 &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
774 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
775 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
776 # - regions/region/forwardingRules/forwardingRule
777 &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:
778 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
779 &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.
780 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
781 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
782 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
783 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
784 &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.
785 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
786 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
787 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
788 &quot;A String&quot;,
789 ],
790 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
791 {
792 &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.
793 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
794 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
795 {
796 &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).
797 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
798 },
799 ],
800 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
801 },
802 ],
803 },
804 ],
805 &quot;bgpPeerStatus&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700806 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700807 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700808 { # Represents a Route resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700809 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # 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 ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
812 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
813 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
814 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
815 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
816 &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.
817 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
818 &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
819 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 # - regions/region/forwardingRules/forwardingRule
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 &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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700823 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 &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.
825 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
826 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
827 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
828 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
829 &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.
830 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
831 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
832 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
833 &quot;A String&quot;,
834 ],
835 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700836 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700837 &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.
838 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
839 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700840 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 &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).
842 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843 },
844 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700846 },
847 ],
848 },
849 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &quot;bfdStatus&quot;: { # Next free: 15
851 &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.
852 &quot;configUpdateTimestampMicros&quot;: &quot;A String&quot;, # Unix timestamp of the most recent config update.
853 &quot;controlPacketCounts&quot;: { # Control packet counts for the current BFD session.
854 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
855 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
856 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
857 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
858 },
859 &quot;controlPacketIntervals&quot;: [ # Inter-packet time interval statistics for control packets.
860 { # Next free: 7
861 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
862 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
863 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
864 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
865 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
866 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
867 },
868 ],
869 &quot;echoPacketCounts&quot;: { # Echo packet counts for the current BFD session.
870 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
871 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
872 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
873 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
874 },
875 &quot;echoPacketIntervals&quot;: [ # Inter-packet time interval statistics for echo packets.
876 { # Next free: 7
877 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
878 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
879 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
880 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
881 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
882 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
883 },
884 ],
885 &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
886 &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
887 &quot;negotiatedLocalControlTxIntervalMs&quot;: 42, # Negotiated transmit interval for control packets.
888 &quot;negotiatedLocalEchoTxIntervalMs&quot;: 42, # Negotiated transmit interval for echo packets.
889 &quot;rxPacket&quot;: { # The most recent Rx control packet for this BFD session.
890 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
891 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
892 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
893 &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
894 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
895 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
896 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
897 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
898 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
899 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
900 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
901 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
902 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
903 &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
904 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
905 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
906 },
907 &quot;txPacket&quot;: { # The most recent Tx control packet for this BFD session.
908 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
909 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
910 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
911 &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
912 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
913 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
914 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
915 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
916 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
917 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
918 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
919 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
920 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
921 &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
922 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
923 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
924 },
925 &quot;uptimeMs&quot;: &quot;A String&quot;, # Session uptime in milliseconds. Value will be 0 if session is not up.
926 &quot;usingEchoMode&quot;: True or False, # Indicates if echo mode is currently being used.
927 },
928 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
929 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
930 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
931 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
932 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
933 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
934 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
935 &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
936 &quot;uptimeSeconds&quot;: &quot;A String&quot;, # Time this session has been up, in seconds. Format: 145
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 },
938 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &quot;natStatus&quot;: [
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700940 { # Status of a NAT contained in this router.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
942 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 &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;].
945 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700946 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 &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;].
948 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &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.
951 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
952 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700953 &quot;ruleStatus&quot;: [ # Status of rules in this NAT.
954 { # Status of a NAT Rule contained in this NAT.
955 &quot;activeNatIps&quot;: [ # A list of active IPs for NAT. Example: [&quot;1.1.1.1&quot;, &quot;179.12.26.133&quot;].
956 &quot;A String&quot;,
957 ],
958 &quot;drainNatIps&quot;: [ # A list of IPs for NAT that are in drain mode. Example: [&quot;1.1.1.1&quot;, &quot;179.12.26.133&quot;].
959 &quot;A String&quot;,
960 ],
961 &quot;minExtraIpsNeeded&quot;: 42, # The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
962 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
963 &quot;ruleNumber&quot;: 42, # Rule number of the rule.
964 },
965 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
967 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700968 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
970 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400972 },
973 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700975 },
976 }</pre>
977</div>
978
979<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700981 <pre>Creates a Router resource in the specified project and region using the data included in the request.
982
983Args:
984 project: string, Project ID for this request. (required)
985 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700986 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700987 The object takes the form of:
988
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700991 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;bgp&quot;: { # BGP information specific to this router.
993 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
994 &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.
995 &quot;A String&quot;,
996 ],
997 &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.
998 { # Description-tagged IP ranges for the router to advertise.
999 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1000 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001001 },
1002 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 &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 -07001004 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1005 # Not currently available publicly.
1006 # 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.
1007 # 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.
1008 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001009 },
1010 &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.
1011 {
1012 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1013 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1014 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1015 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1016 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
1017 &quot;A String&quot;,
1018 ],
1019 &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 -07001020 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1022 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001023 },
1024 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001025 &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.
1026 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001027 # Not currently available publicly.
1028 &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.
1029 # Not currently available publicly.
1030 # If set, this value must be between 100 and 30000.
1031 # The default is 300.
1032 &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.
1033 # Not currently available publicly.
1034 # If set, this value must be between 100 and 30000.
1035 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001036 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001037 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1038 # Not currently available publicly.
1039 # If set, the value must be a value between 2 and 16.
1040 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001042 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1043 # Not currently available publicly.
1044 # 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 -07001045 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001046 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001047 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1048 # Not currently available publicly.
1049 # 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 -07001050 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1051 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1052 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1053 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1054 # - 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.
1055 &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.
1056 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1057 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1058 },
1059 ],
1060 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1061 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1062 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1063 &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.
1064 {
1065 &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.
1066 &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.
1067 &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.
1068 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1069 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1070 # - 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.
1071 &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.
1072 },
1073 ],
1074 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1075 &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.
1076 &quot;nats&quot;: [ # A list of NAT services created in this router.
1077 { # 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.
1078 &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.
1079 &quot;A String&quot;,
1080 ],
1081 &quot;enableEndpointIndependentMapping&quot;: True or False,
1082 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1083 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1084 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1085 &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:
1086 # - ERRORS_ONLY: Export logs only for connection failures.
1087 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1088 # - ALL: Export logs for all connections, successful and unsuccessful.
1089 },
1090 &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.
1091 &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.
1092 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1093 # - 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.
1094 # - 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.
1095 &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.
1096 &quot;A String&quot;,
1097 ],
1098 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1099 {
1100 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1101 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1102 &quot;A String&quot;,
1103 ],
1104 &quot;sourceNatDrainIps&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 rule only.
1105 &quot;A String&quot;,
1106 ],
1107 },
1108 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1109 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1110 #
1111 # The following examples are valid match expressions:
1112 #
1113 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1114 #
1115 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001116 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 },
1118 ],
1119 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1120 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1121 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1122 # - 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.
1123 &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.
1124 { # Defines the IP ranges that want to use NAT for a subnetwork.
1125 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1126 &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.
1127 &quot;A String&quot;,
1128 ],
1129 &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]
1130 &quot;A String&quot;,
1131 ],
1132 },
1133 ],
1134 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1135 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1136 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1137 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1138 },
1139 ],
1140 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1141 &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.
1142 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1143 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1144}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001145
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001146 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.
1147
1148For 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.
1149
1150The 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 -07001151
1152Returns:
1153 An object of the form:
1154
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 { # Represents an Operation resource.
1156 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # Google Compute Engine has three Operation resources:
1158 #
1159 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1160 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1162 #
1163 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001164 # - For global operations, use the `globalOperations` resource.
1165 # - For regional operations, use the `regionOperations` resource.
1166 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001168 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1170 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1171 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1172 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1173 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1174 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001175 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1177 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1178 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001179 },
1180 ],
1181 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001182 &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`.
1183 &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.
1184 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1185 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1186 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1187 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1188 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1189 &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.
1190 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1191 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1192 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1193 &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.
1194 &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`.
1195 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1196 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1197 &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.
1198 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1199 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1200 {
1201 &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.
1202 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1203 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1204 {
1205 &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).
1206 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1207 },
1208 ],
1209 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1210 },
1211 ],
1212 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001213 }</pre>
1214</div>
1215
1216<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001217 <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 -07001218 <pre>Retrieves a list of Router resources available to the specified project.
1219
1220Args:
1221 project: string, Project ID for this request. (required)
1222 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001223 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 -07001224
Dan O'Mearadd494642020-05-01 07:42:23 -07001225For 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 -07001226
Dan O'Mearadd494642020-05-01 07:42:23 -07001227You 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 -07001228
Bu Sun Kim65020912020-05-20 12:08:20 -07001229To 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) ```
1230 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`)
1231 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1232
1233You 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.
1234
1235Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1236 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.
1237 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001238
1239Returns:
1240 An object of the form:
1241
1242 { # Contains a list of Router resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1244 &quot;items&quot;: [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001247 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001248 &quot;bgp&quot;: { # BGP information specific to this router.
1249 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1250 &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.
1251 &quot;A String&quot;,
1252 ],
1253 &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.
1254 { # Description-tagged IP ranges for the router to advertise.
1255 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1256 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001257 },
1258 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 &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 -07001260 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1261 # Not currently available publicly.
1262 # 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.
1263 # 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.
1264 # If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001265 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 &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.
1267 {
1268 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1269 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1270 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1271 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1272 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
1273 &quot;A String&quot;,
1274 ],
1275 &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.
1276 { # Description-tagged IP ranges for the router to advertise.
1277 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1278 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1279 },
1280 ],
1281 &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.
1282 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001283 # Not currently available publicly.
1284 &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.
1285 # Not currently available publicly.
1286 # If set, this value must be between 100 and 30000.
1287 # The default is 300.
1288 &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.
1289 # Not currently available publicly.
1290 # If set, this value must be between 100 and 30000.
1291 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001292 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001293 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1294 # Not currently available publicly.
1295 # If set, the value must be a value between 2 and 16.
1296 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001298 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1299 # Not currently available publicly.
1300 # 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 -07001301 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1302 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001303 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1304 # Not currently available publicly.
1305 # 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 -07001306 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1307 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1308 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1309 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1310 # - 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.
1311 &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.
1312 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1313 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1314 },
1315 ],
1316 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1317 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1318 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1319 &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.
1320 {
1321 &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.
1322 &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.
1323 &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.
1324 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1325 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1326 # - 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.
1327 &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.
1328 },
1329 ],
1330 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1331 &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.
1332 &quot;nats&quot;: [ # A list of NAT services created in this router.
1333 { # 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.
1334 &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.
1335 &quot;A String&quot;,
1336 ],
1337 &quot;enableEndpointIndependentMapping&quot;: True or False,
1338 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1339 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1340 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1341 &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:
1342 # - ERRORS_ONLY: Export logs only for connection failures.
1343 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1344 # - ALL: Export logs for all connections, successful and unsuccessful.
1345 },
1346 &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.
1347 &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.
1348 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1349 # - 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.
1350 # - 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.
1351 &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.
1352 &quot;A String&quot;,
1353 ],
1354 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1355 {
1356 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1357 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1358 &quot;A String&quot;,
1359 ],
1360 &quot;sourceNatDrainIps&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 rule only.
1361 &quot;A String&quot;,
1362 ],
1363 },
1364 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1365 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1366 #
1367 # The following examples are valid match expressions:
1368 #
1369 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1370 #
1371 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001372 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001373 },
1374 ],
1375 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1376 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1377 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1378 # - 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.
1379 &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.
1380 { # Defines the IP ranges that want to use NAT for a subnetwork.
1381 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1382 &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.
1383 &quot;A String&quot;,
1384 ],
1385 &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]
1386 &quot;A String&quot;,
1387 ],
1388 },
1389 ],
1390 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1391 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1392 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1393 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1394 },
1395 ],
1396 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1397 &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.
1398 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1399 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1400 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001401 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1403 &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.
1404 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1405 &quot;warning&quot;: { # [Output Only] Informational warning message.
1406 &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.
1407 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1408 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &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).
1411 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001412 },
1413 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001416 }</pre>
1417</div>
1418
1419<div class="method">
1420 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1421 <pre>Retrieves the next page of results.
1422
1423Args:
1424 previous_request: The request for the previous page. (required)
1425 previous_response: The response from the request for the previous page. (required)
1426
1427Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001428 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001429 page. Returns None if there are no more items in the collection.
1430 </pre>
1431</div>
1432
1433<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001434 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 <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 -07001436
1437Args:
1438 project: string, Project ID for this request. (required)
1439 region: string, Name of the region for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001440 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001442 The object takes the form of:
1443
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001446 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001447 &quot;bgp&quot;: { # BGP information specific to this router.
1448 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1449 &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.
1450 &quot;A String&quot;,
1451 ],
1452 &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.
1453 { # Description-tagged IP ranges for the router to advertise.
1454 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1455 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001456 },
1457 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001458 &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 -07001459 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1460 # Not currently available publicly.
1461 # 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.
1462 # 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.
1463 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001464 },
1465 &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.
1466 {
1467 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1468 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1469 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1470 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1471 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
1472 &quot;A String&quot;,
1473 ],
1474 &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 -07001475 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1477 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001478 },
1479 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001480 &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.
1481 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001482 # Not currently available publicly.
1483 &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.
1484 # Not currently available publicly.
1485 # If set, this value must be between 100 and 30000.
1486 # The default is 300.
1487 &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.
1488 # Not currently available publicly.
1489 # If set, this value must be between 100 and 30000.
1490 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001492 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1493 # Not currently available publicly.
1494 # If set, the value must be a value between 2 and 16.
1495 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001496 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001497 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1498 # Not currently available publicly.
1499 # 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 -07001500 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001501 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001502 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1503 # Not currently available publicly.
1504 # 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 -07001505 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1506 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1507 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1508 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1509 # - 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.
1510 &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.
1511 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1512 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1513 },
1514 ],
1515 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1516 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1517 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1518 &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.
1519 {
1520 &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.
1521 &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.
1522 &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.
1523 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1524 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1525 # - 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.
1526 &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.
1527 },
1528 ],
1529 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1530 &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.
1531 &quot;nats&quot;: [ # A list of NAT services created in this router.
1532 { # 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.
1533 &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.
1534 &quot;A String&quot;,
1535 ],
1536 &quot;enableEndpointIndependentMapping&quot;: True or False,
1537 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1538 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1539 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1540 &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:
1541 # - ERRORS_ONLY: Export logs only for connection failures.
1542 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1543 # - ALL: Export logs for all connections, successful and unsuccessful.
1544 },
1545 &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.
1546 &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.
1547 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1548 # - 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.
1549 # - 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.
1550 &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.
1551 &quot;A String&quot;,
1552 ],
1553 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1554 {
1555 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1556 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1557 &quot;A String&quot;,
1558 ],
1559 &quot;sourceNatDrainIps&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 rule only.
1560 &quot;A String&quot;,
1561 ],
1562 },
1563 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1564 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1565 #
1566 # The following examples are valid match expressions:
1567 #
1568 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1569 #
1570 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001571 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 },
1573 ],
1574 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1575 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1576 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1577 # - 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.
1578 &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.
1579 { # Defines the IP ranges that want to use NAT for a subnetwork.
1580 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1581 &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.
1582 &quot;A String&quot;,
1583 ],
1584 &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]
1585 &quot;A String&quot;,
1586 ],
1587 },
1588 ],
1589 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1590 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1591 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1592 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1593 },
1594 ],
1595 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1596 &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.
1597 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1598 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1599}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001600
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 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.
1602
1603For 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.
1604
1605The 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 -07001606
1607Returns:
1608 An object of the form:
1609
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001610 { # Represents an Operation resource.
1611 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 # Google Compute Engine has three Operation resources:
1613 #
1614 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1615 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001616 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1617 #
1618 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001619 # - For global operations, use the `globalOperations` resource.
1620 # - For regional operations, use the `regionOperations` resource.
1621 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001622 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001623 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1625 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1626 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1627 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1628 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1629 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001630 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1632 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1633 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001634 },
1635 ],
1636 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &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`.
1638 &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.
1639 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1640 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1641 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1642 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1643 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1644 &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.
1645 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1646 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1647 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1648 &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.
1649 &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`.
1650 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1651 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1652 &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.
1653 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1654 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1655 {
1656 &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.
1657 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1658 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1659 {
1660 &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).
1661 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1662 },
1663 ],
1664 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1665 },
1666 ],
1667 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001668 }</pre>
1669</div>
1670
1671<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001672 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001673 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1674
1675Args:
1676 project: string, Project ID for this request. (required)
1677 region: string, Name of the region for this request. (required)
1678 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001679 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001680 The object takes the form of:
1681
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001682{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001683 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001684 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 &quot;bgp&quot;: { # BGP information specific to this router.
1686 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1687 &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.
1688 &quot;A String&quot;,
1689 ],
1690 &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.
1691 { # Description-tagged IP ranges for the router to advertise.
1692 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1693 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001694 },
1695 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001696 &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 -07001697 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1698 # Not currently available publicly.
1699 # 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.
1700 # 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.
1701 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 },
1703 &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.
1704 {
1705 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1706 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1707 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1708 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1709 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
1710 &quot;A String&quot;,
1711 ],
1712 &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 -07001713 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1715 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001716 },
1717 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001718 &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.
1719 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001720 # Not currently available publicly.
1721 &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.
1722 # Not currently available publicly.
1723 # If set, this value must be between 100 and 30000.
1724 # The default is 300.
1725 &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.
1726 # Not currently available publicly.
1727 # If set, this value must be between 100 and 30000.
1728 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001729 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001730 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1731 # Not currently available publicly.
1732 # If set, the value must be a value between 2 and 16.
1733 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001735 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1736 # Not currently available publicly.
1737 # 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 -07001738 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001739 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001740 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1741 # Not currently available publicly.
1742 # 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 -07001743 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1744 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1745 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1746 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1747 # - 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.
1748 &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.
1749 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1750 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1751 },
1752 ],
1753 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1754 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1755 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1756 &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.
1757 {
1758 &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.
1759 &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.
1760 &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.
1761 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1762 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1763 # - 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.
1764 &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.
1765 },
1766 ],
1767 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1768 &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.
1769 &quot;nats&quot;: [ # A list of NAT services created in this router.
1770 { # 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.
1771 &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.
1772 &quot;A String&quot;,
1773 ],
1774 &quot;enableEndpointIndependentMapping&quot;: True or False,
1775 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1776 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1777 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1778 &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:
1779 # - ERRORS_ONLY: Export logs only for connection failures.
1780 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1781 # - ALL: Export logs for all connections, successful and unsuccessful.
1782 },
1783 &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.
1784 &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.
1785 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1786 # - 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.
1787 # - 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.
1788 &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.
1789 &quot;A String&quot;,
1790 ],
1791 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1792 {
1793 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1794 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1795 &quot;A String&quot;,
1796 ],
1797 &quot;sourceNatDrainIps&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 rule only.
1798 &quot;A String&quot;,
1799 ],
1800 },
1801 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1802 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1803 #
1804 # The following examples are valid match expressions:
1805 #
1806 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1807 #
1808 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001809 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001810 },
1811 ],
1812 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1813 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1814 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1815 # - 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.
1816 &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.
1817 { # Defines the IP ranges that want to use NAT for a subnetwork.
1818 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1819 &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.
1820 &quot;A String&quot;,
1821 ],
1822 &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]
1823 &quot;A String&quot;,
1824 ],
1825 },
1826 ],
1827 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1828 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1829 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1830 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1831 },
1832 ],
1833 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1834 &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.
1835 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1836 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1837}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001838
1839
1840Returns:
1841 An object of the form:
1842
1843 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001844 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
1845 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001846 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001847 &quot;bgp&quot;: { # BGP information specific to this router.
1848 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1849 &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.
1850 &quot;A String&quot;,
1851 ],
1852 &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.
1853 { # Description-tagged IP ranges for the router to advertise.
1854 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1855 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001856 },
1857 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001858 &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 -07001859 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1860 # Not currently available publicly.
1861 # 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.
1862 # 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.
1863 # If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001864 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 &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.
1866 {
1867 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1868 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1869 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1870 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1871 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
1872 &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.
1875 { # Description-tagged IP ranges for the router to advertise.
1876 &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.
1878 },
1879 ],
1880 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001891 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001892 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1893 # Not currently available publicly.
1894 # If set, the value must be a value between 2 and 16.
1895 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001896 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001897 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1898 # Not currently available publicly.
1899 # 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 -07001900 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1901 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001902 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1903 # Not currently available publicly.
1904 # 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 -07001905 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1906 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1907 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1908 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1909 # - 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.
1910 &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.
1911 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1912 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1913 },
1914 ],
1915 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1916 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1917 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1918 &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.
1919 {
1920 &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.
1921 &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.
1922 &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.
1923 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1924 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1925 # - 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.
1926 &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.
1927 },
1928 ],
1929 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1930 &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.
1931 &quot;nats&quot;: [ # A list of NAT services created in this router.
1932 { # 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.
1933 &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.
1934 &quot;A String&quot;,
1935 ],
1936 &quot;enableEndpointIndependentMapping&quot;: True or False,
1937 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1938 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1939 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1940 &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:
1941 # - ERRORS_ONLY: Export logs only for connection failures.
1942 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1943 # - ALL: Export logs for all connections, successful and unsuccessful.
1944 },
1945 &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.
1946 &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.
1947 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1948 # - 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.
1949 # - 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.
1950 &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.
1951 &quot;A String&quot;,
1952 ],
1953 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1954 {
1955 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1956 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1957 &quot;A String&quot;,
1958 ],
1959 &quot;sourceNatDrainIps&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 rule only.
1960 &quot;A String&quot;,
1961 ],
1962 },
1963 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1964 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1965 #
1966 # The following examples are valid match expressions:
1967 #
1968 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1969 #
1970 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001971 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001972 },
1973 ],
1974 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1975 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1976 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1977 # - 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.
1978 &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.
1979 { # Defines the IP ranges that want to use NAT for a subnetwork.
1980 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1981 &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.
1982 &quot;A String&quot;,
1983 ],
1984 &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]
1985 &quot;A String&quot;,
1986 ],
1987 },
1988 ],
1989 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1990 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1991 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1992 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1993 },
1994 ],
1995 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1996 &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.
1997 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1998 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1999 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002000 }</pre>
2001</div>
2002
2003<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002004 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002005 <pre>Returns permissions that a caller has on the specified resource.
2006
2007Args:
2008 project: string, Project ID for this request. (required)
2009 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002010 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002011 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002012 The object takes the form of:
2013
2014{
Bu Sun Kim65020912020-05-20 12:08:20 -07002015 &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.
2016 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002017 ],
2018 }
2019
2020
2021Returns:
2022 An object of the form:
2023
2024 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002025 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2026 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002027 ],
2028 }</pre>
2029</div>
2030
2031<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
2033 <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 -07002034
2035Args:
2036 project: string, Project ID for this request. (required)
2037 region: string, Name of the region for this request. (required)
2038 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002039 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002040 The object takes the form of:
2041
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002042{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002043 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002044 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07002045 &quot;bgp&quot;: { # BGP information specific to this router.
2046 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
2047 &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.
2048 &quot;A String&quot;,
2049 ],
2050 &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.
2051 { # Description-tagged IP ranges for the router to advertise.
2052 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2053 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002054 },
2055 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002056 &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 -07002057 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
2058 # Not currently available publicly.
2059 # 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.
2060 # 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.
2061 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07002062 },
2063 &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.
2064 {
2065 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
2066 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
2067 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
2068 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
2069 # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router&#x27;s VPC network. 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.
2070 &quot;A String&quot;,
2071 ],
2072 &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 -07002073 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07002074 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2075 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002076 },
2077 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002078 &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.
2079 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002080 # Not currently available publicly.
2081 &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.
2082 # Not currently available publicly.
2083 # If set, this value must be between 100 and 30000.
2084 # The default is 300.
2085 &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.
2086 # Not currently available publicly.
2087 # If set, this value must be between 100 and 30000.
2088 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07002089 &quot;mode&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. The default is PASSIVE.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002090 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
2091 # Not currently available publicly.
2092 # If set, the value must be a value between 2 and 16.
2093 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07002094 &quot;packetMode&quot;: &quot;A String&quot;, # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002095 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
2096 # Not currently available publicly.
2097 # 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 -07002098 &quot;slowTimerInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002099 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002100 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
2101 # Not currently available publicly.
2102 # 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 -07002103 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
2104 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
2105 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
2106 # - MANAGED_BY_USER is the default value and can be managed by you or other users
2107 # - 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.
2108 &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.
2109 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
2110 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
2111 },
2112 ],
2113 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2114 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2115 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2116 &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.
2117 {
2118 &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.
2119 &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.
2120 &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.
2121 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
2122 # - MANAGED_BY_USER is the default value and can be managed directly by users.
2123 # - 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.
2124 &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.
2125 },
2126 ],
2127 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
2128 &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.
2129 &quot;nats&quot;: [ # A list of NAT services created in this router.
2130 { # 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.
2131 &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.
2132 &quot;A String&quot;,
2133 ],
2134 &quot;enableEndpointIndependentMapping&quot;: True or False,
2135 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
2136 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
2137 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
2138 &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:
2139 # - ERRORS_ONLY: Export logs only for connection failures.
2140 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
2141 # - ALL: Export logs for all connections, successful and unsuccessful.
2142 },
2143 &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.
2144 &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.
2145 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
2146 # - 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.
2147 # - 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.
2148 &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.
2149 &quot;A String&quot;,
2150 ],
2151 &quot;rules&quot;: [ # A list of rules associated with this NAT.
2152 {
2153 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
2154 &quot;sourceNatActiveIps&quot;: [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
2155 &quot;A String&quot;,
2156 ],
2157 &quot;sourceNatDrainIps&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 rule only.
2158 &quot;A String&quot;,
2159 ],
2160 },
2161 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
2162 &quot;match&quot;: &quot;A String&quot;, # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
2163 #
2164 # The following examples are valid match expressions:
2165 #
2166 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
2167 #
2168 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002169 &quot;ruleNumber&quot;: 42, # An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Bu Sun Kim65020912020-05-20 12:08:20 -07002170 },
2171 ],
2172 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
2173 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
2174 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
2175 # - 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.
2176 &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.
2177 { # Defines the IP ranges that want to use NAT for a subnetwork.
2178 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
2179 &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.
2180 &quot;A String&quot;,
2181 ],
2182 &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]
2183 &quot;A String&quot;,
2184 ],
2185 },
2186 ],
2187 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
2188 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
2189 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
2190 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
2191 },
2192 ],
2193 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
2194 &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.
2195 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2196 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2197}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002198
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002199 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.
2200
2201For 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.
2202
2203The 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 -07002204
2205Returns:
2206 An object of the form:
2207
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002208 { # Represents an Operation resource.
2209 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002210 # Google Compute Engine has three Operation resources:
2211 #
2212 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2213 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2215 #
2216 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002217 # - For global operations, use the `globalOperations` resource.
2218 # - For regional operations, use the `regionOperations` resource.
2219 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002220 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002221 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002222 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2223 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2224 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2225 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2226 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2227 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002228 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002229 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2230 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2231 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002232 },
2233 ],
2234 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002235 &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`.
2236 &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.
2237 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2238 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2239 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2240 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2241 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2242 &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.
2243 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2244 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2245 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2246 &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.
2247 &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`.
2248 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2249 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2250 &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.
2251 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2252 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2253 {
2254 &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.
2255 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2256 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2257 {
2258 &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).
2259 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2260 },
2261 ],
2262 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2263 },
2264 ],
2265 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002266 }</pre>
2267</div>
2268
2269</body></html>