blob: 8ab3c72e59d3c42cc9d910c0eca6457c3060e9a0 [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800144 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145
146Returns:
147 An object of the form:
148
149 { # Contains a list of routers.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800150 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
151 &quot;items&quot;: { # A list of Router resources.
152 &quot;a_key&quot;: { # Name of the scope containing this set of routers.
153 &quot;routers&quot;: [ # A list of routers contained in this scope.
154 { # Represents a Cloud Router resource.
155 #
156 # For more information about Cloud Router, read the Cloud Router overview.
157 &quot;bgp&quot;: { # BGP information specific to this router.
158 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
159 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
160 &quot;A String&quot;,
161 ],
162 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
163 { # Description-tagged IP ranges for the router to advertise.
164 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
165 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
166 },
167 ],
168 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
169 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
170 # Not currently available publicly.
171 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
172 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
173 # If set, this value must be between 1 and 120. The default is 20.
174 },
175 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
176 {
177 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
178 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
179 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;A String&quot;,
183 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800184 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 { # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188 },
189 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800190 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800193 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700194 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800195 # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700198 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800199 # If set, this value must be between 100 and 30000.
200 # The default is 300.
201 &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.
202 &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.
206 &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.
207 &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.
210 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800212 &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.
215 &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 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700224 },
225 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800226 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
227 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
228 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
229 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
230 &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.
231 {
232 &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.
233 &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.
234 &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.
235 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
236 # - MANAGED_BY_USER is the default value and can be managed directly by users.
237 # - 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.
238 &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.
239 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
240 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
241 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
242 },
243 ],
244 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
245 &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.
246 &quot;nats&quot;: [ # A list of NAT services created in this router.
247 { # 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.
248 &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.
249 &quot;A String&quot;,
250 ],
251 &quot;enableEndpointIndependentMapping&quot;: True or False,
252 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
253 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
254 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
255 &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:
256 # - ERRORS_ONLY: Export logs only for connection failures.
257 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
258 # - ALL: Export logs for all connections, successful and unsuccessful.
259 },
260 &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.
261 &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.
262 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
263 # - 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.
264 # - 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.
265 &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.
266 &quot;A String&quot;,
267 ],
268 &quot;rules&quot;: [ # A list of rules associated with this NAT.
269 {
270 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
271 &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.
272 &quot;A String&quot;,
273 ],
274 &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.
275 &quot;A String&quot;,
276 ],
277 },
278 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
279 &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.
280 #
281 # The following examples are valid match expressions:
282 #
283 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
284 #
285 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
286 &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.
287 },
288 ],
289 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
290 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
291 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
292 # - 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.
293 &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.
294 { # Defines the IP ranges that want to use NAT for a subnetwork.
295 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
296 &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.
297 &quot;A String&quot;,
298 ],
299 &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]
300 &quot;A String&quot;,
301 ],
302 },
303 ],
304 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
305 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
306 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
307 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
308 },
309 ],
310 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
311 &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.
312 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
313 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 },
315 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800316 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
317 &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.
318 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
319 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
320 {
321 &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).
322 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
323 },
324 ],
325 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
326 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800328 },
329 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
330 &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.
331 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
332 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
333 &quot;A String&quot;,
334 ],
335 &quot;warning&quot;: { # [Output Only] Informational warning message.
336 &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.
337 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
338 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
339 {
340 &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).
341 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
342 },
343 ],
344 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
345 },
346}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347</div>
348
349<div class="method">
350 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
351 <pre>Retrieves the next page of results.
352
353Args:
354 previous_request: The request for the previous page. (required)
355 previous_response: The response from the request for the previous page. (required)
356
357Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 page. Returns None if there are no more items in the collection.
360 </pre>
361</div>
362
363<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700364 <code class="details" id="close">close()</code>
365 <pre>Close httplib2 connections.</pre>
366</div>
367
368<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400369 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700370 <pre>Deletes the specified Router resource.
371
372Args:
373 project: string, Project ID for this request. (required)
374 region: string, Name of the region for this request. (required)
375 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 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.
377
378For 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.
379
380The 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 -0700381
382Returns:
383 An object of the form:
384
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800386 #
387 # Google Compute Engine has three Operation resources:
388 #
389 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
390 #
391 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
392 #
393 # Operations can be global, regional or zonal.
394 # - For global operations, use the `globalOperations` resource.
395 # - For regional operations, use the `regionOperations` resource.
396 # - For zonal operations, use the `zonalOperations` resource.
397 #
398 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
399 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
400 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
401 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
402 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
403 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
404 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700405 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800406 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
407 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
408 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 },
410 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 },
412 &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`.
413 &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.
414 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
415 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
416 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800417 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
418 #
419 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
420 #
421 # Example 1: Pack and unpack a message in C++.
422 #
423 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
424 #
425 # Example 2: Pack and unpack a message in Java.
426 #
427 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
428 #
429 # Example 3: Pack and unpack a message in Python.
430 #
431 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
432 #
433 # Example 4: Pack and unpack a message in Go
434 #
435 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
436 #
437 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
438 #
439 #
440 #
441 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
442 #
443 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
444 #
445 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
446 #
447 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
448 #
449 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
450 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
451 #
452 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
453 #
454 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
455 #
456 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
457 #
458 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
459 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
460 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800461 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800462 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800463 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
464 &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.
465 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
466 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
467 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
468 &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.
469 &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`.
470 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
471 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
472 &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.
473 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
474 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
475 {
476 &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.
477 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
478 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
479 {
480 &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).
481 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
482 },
483 ],
484 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
485 },
486 ],
487 &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.
488}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700489</div>
490
491<div class="method">
492 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494
495Args:
496 project: string, Project ID for this request. (required)
497 region: string, Name of the region for this request. (required)
498 router: string, Name of the Router resource to return. (required)
499
500Returns:
501 An object of the form:
502
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 { # Represents a Cloud Router resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800504 #
505 # For more information about Cloud Router, read the Cloud Router overview.
506 &quot;bgp&quot;: { # BGP information specific to this router.
507 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
508 &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.
509 &quot;A String&quot;,
510 ],
511 &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.
512 { # Description-tagged IP ranges for the router to advertise.
513 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
514 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
515 },
516 ],
517 &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.
518 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
519 # Not currently available publicly.
520 # 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.
521 # 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.
522 # If set, this value must be between 1 and 120. The default is 20.
523 },
524 &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.
525 {
526 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
527 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
528 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
529 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
530 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 &quot;A String&quot;,
532 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800533 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 { # Description-tagged IP ranges for the router to advertise.
535 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
536 &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 -0700537 },
538 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800539 &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.
540 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700541 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800542 &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.
543 # Not currently available publicly.
544 # If set, this value must be between 100 and 30000.
545 # The default is 300.
546 &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.
547 # Not currently available publicly.
548 # If set, this value must be between 100 and 30000.
549 # The default is 300.
550 &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.
551 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
552 # Not currently available publicly.
553 # If set, the value must be a value between 2 and 16.
554 # The default is 3.
555 &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.
556 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
557 # Not currently available publicly.
558 # 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.
559 &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.
560 },
561 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
562 # Not currently available publicly.
563 # 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.
564 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
565 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
566 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
567 # - MANAGED_BY_USER is the default value and can be managed by you or other users
568 # - 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.
569 &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.
570 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
571 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
572 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -0700573 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800574 ],
575 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
576 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
577 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
578 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
579 &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.
580 {
581 &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.
582 &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.
583 &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.
584 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
585 # - MANAGED_BY_USER is the default value and can be managed directly by users.
586 # - 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.
587 &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.
588 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
589 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
590 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
591 },
592 ],
593 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
594 &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.
595 &quot;nats&quot;: [ # A list of NAT services created in this router.
596 { # 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.
597 &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.
598 &quot;A String&quot;,
599 ],
600 &quot;enableEndpointIndependentMapping&quot;: True or False,
601 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
602 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
603 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
604 &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:
605 # - ERRORS_ONLY: Export logs only for connection failures.
606 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
607 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800609 &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.
610 &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.
611 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
612 # - 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.
613 # - 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.
614 &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.
615 &quot;A String&quot;,
616 ],
617 &quot;rules&quot;: [ # A list of rules associated with this NAT.
618 {
619 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
620 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;A String&quot;,
622 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800623 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;A String&quot;,
625 ],
626 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800627 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
628 &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.
629 #
630 # The following examples are valid match expressions:
631 #
632 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
633 #
634 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
635 &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.
636 },
637 ],
638 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
639 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
640 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
641 # - 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.
642 &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.
643 { # Defines the IP ranges that want to use NAT for a subnetwork.
644 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
645 &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.
646 &quot;A String&quot;,
647 ],
648 &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]
649 &quot;A String&quot;,
650 ],
651 },
652 ],
653 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
654 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
655 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
656 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
657 },
658 ],
659 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
660 &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.
661 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
662 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
663}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700664</div>
665
666<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 <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 -0700668 <pre>Retrieves runtime Nat mapping information of VM endpoints.
669
670Args:
671 project: string, Project ID for this request. (required)
672 region: string, Name of the region for this request. (required)
673 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 -0700674 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 -0700675
Dan O'Mearadd494642020-05-01 07:42:23 -0700676For 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 -0700677
Dan O'Mearadd494642020-05-01 07:42:23 -0700678You 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 -0700679
Bu Sun Kim65020912020-05-20 12:08:20 -0700680To 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) ```
681 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`)
682 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.
683 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
684
685You 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.
686
687Currently, only sorting by `name` or `creationTimestamp desc` is supported.
688 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800689 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690
691Returns:
692 An object of the form:
693
694 { # Contains a list of VmEndpointNatMappings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800695 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
696 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
697 &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.
698 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
699 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
700 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
701 &quot;interfaceNatMappings&quot;: [
702 { # Contain information of Nat mapping for an interface of this endpoint.
703 &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;].
704 &quot;A String&quot;,
705 ],
706 &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;].
707 &quot;A String&quot;,
708 ],
709 &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.
710 &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.
711 &quot;ruleMappings&quot;: [ # Information about mappings provided by rules in this NAT.
712 { # Contains information of NAT Mappings provided by a NAT Rule.
713 &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;].
714 &quot;A String&quot;,
715 ],
716 &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;].
717 &quot;A String&quot;,
718 ],
719 &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.
720 &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.
721 &quot;ruleNumber&quot;: 42, # Rule number of the NAT Rule.
722 },
723 ],
724 &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;.
725 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 },
727 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800729 ],
730 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
731 &quot;warning&quot;: { # [Output Only] Informational warning message.
732 &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.
733 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
734 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
735 {
736 &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).
737 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
738 },
739 ],
740 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
741 },
742}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743</div>
744
745<div class="method">
746 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
747 <pre>Retrieves the next page of results.
748
749Args:
750 previous_request: The request for the previous page. (required)
751 previous_response: The response from the request for the previous page. (required)
752
753Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 page. Returns None if there are no more items in the collection.
756 </pre>
757</div>
758
759<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700760 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
761 <pre>Retrieves runtime information of the specified router.
762
763Args:
764 project: string, Project ID for this request. (required)
765 region: string, Name of the region for this request. (required)
766 router: string, Name of the Router resource to query. (required)
767
768Returns:
769 An object of the form:
770
771 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800772 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
773 &quot;result&quot;: {
774 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
775 { # Represents a Route resource.
776 #
777 # 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 ==)
778 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
779 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800780 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800781 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
782 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
783 &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.
784 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
785 &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
786 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
787 # - 10.128.0.56
788 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
789 # - regions/region/forwardingRules/forwardingRule
790 &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:
791 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
792 &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.
793 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
794 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
795 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
796 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
797 &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.
798 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
799 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
800 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
801 &quot;A String&quot;,
802 ],
803 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
804 {
805 &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.
806 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
807 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
808 {
809 &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).
810 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 },
812 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800813 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800815 ],
816 },
817 ],
818 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
819 { # Represents a Route resource.
820 #
821 # 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 ==)
822 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
823 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800824 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800825 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
826 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
827 &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.
828 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
829 &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
830 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
831 # - 10.128.0.56
832 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
833 # - regions/region/forwardingRules/forwardingRule
834 &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:
835 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
836 &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.
837 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
838 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
839 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
840 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
841 &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.
842 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
843 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
844 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
845 &quot;A String&quot;,
846 ],
847 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
848 {
849 &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.
850 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
851 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
852 {
853 &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).
854 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
855 },
856 ],
857 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
858 },
859 ],
860 },
861 ],
862 &quot;bgpPeerStatus&quot;: [
863 {
864 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
865 { # Represents a Route resource.
866 #
867 # 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 ==)
868 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
869 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800870 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800871 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
872 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
873 &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.
874 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
875 &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
876 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
877 # - 10.128.0.56
878 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
879 # - regions/region/forwardingRules/forwardingRule
880 &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:
881 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
882 &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.
883 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
884 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
885 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
886 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
887 &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.
888 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
889 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
890 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
891 &quot;A String&quot;,
892 ],
893 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
894 {
895 &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.
896 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
897 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
898 {
899 &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).
900 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
901 },
902 ],
903 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
904 },
905 ],
906 },
907 ],
908 &quot;bfdStatus&quot;: { # Next free: 15
909 &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.
910 &quot;configUpdateTimestampMicros&quot;: &quot;A String&quot;, # Unix timestamp of the most recent config update.
911 &quot;controlPacketCounts&quot;: { # Control packet counts for the current BFD session.
912 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
913 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
914 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
915 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
916 },
917 &quot;controlPacketIntervals&quot;: [ # Inter-packet time interval statistics for control packets.
918 { # Next free: 7
919 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
920 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
921 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
922 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
923 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
924 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700925 },
926 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800927 &quot;echoPacketCounts&quot;: { # Echo packet counts for the current BFD session.
928 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
929 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
930 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
931 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
932 },
933 &quot;echoPacketIntervals&quot;: [ # Inter-packet time interval statistics for echo packets.
934 { # Next free: 7
935 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
936 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
937 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
938 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
939 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
940 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
941 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800943 &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
944 &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
945 &quot;negotiatedLocalControlTxIntervalMs&quot;: 42, # Negotiated transmit interval for control packets.
946 &quot;negotiatedLocalEchoTxIntervalMs&quot;: 42, # Negotiated transmit interval for echo packets.
947 &quot;rxPacket&quot;: { # The most recent Rx control packet for this BFD session.
948 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
949 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
950 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
951 &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
952 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
953 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
954 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
955 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
956 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
957 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
958 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
959 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
960 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
961 &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
962 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
963 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
964 },
965 &quot;txPacket&quot;: { # The most recent Tx control packet for this BFD session.
966 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
967 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
968 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
969 &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
970 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
971 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
972 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
973 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
974 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
975 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
976 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
977 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
978 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
979 &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
980 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
981 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
982 },
983 &quot;uptimeMs&quot;: &quot;A String&quot;, # Session uptime in milliseconds. Value will be 0 if session is not up.
984 &quot;usingEchoMode&quot;: True or False, # Indicates if echo mode is currently being used.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400985 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800986 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
987 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
988 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
989 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
990 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
991 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
992 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
993 &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
994 &quot;uptimeSeconds&quot;: &quot;A String&quot;, # Time this session has been up, in seconds. Format: 145
995 },
996 ],
997 &quot;natStatus&quot;: [
998 { # Status of a NAT contained in this router.
999 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
1000 &quot;A String&quot;,
1001 ],
1002 &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;].
1003 &quot;A String&quot;,
1004 ],
1005 &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;].
1006 &quot;A String&quot;,
1007 ],
1008 &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.
1009 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
1010 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
1011 &quot;ruleStatus&quot;: [ # Status of rules in this NAT.
1012 { # Status of a NAT Rule contained in this NAT.
1013 &quot;activeNatIps&quot;: [ # A list of active IPs for NAT. Example: [&quot;1.1.1.1&quot;, &quot;179.12.26.133&quot;].
1014 &quot;A String&quot;,
1015 ],
1016 &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;].
1017 &quot;A String&quot;,
1018 ],
1019 &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.
1020 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
1021 &quot;ruleNumber&quot;: 42, # Rule number of the rule.
1022 },
1023 ],
1024 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
1025 &quot;A String&quot;,
1026 ],
1027 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
1028 &quot;A String&quot;,
1029 ],
1030 },
1031 ],
1032 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1033 },
1034}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001035</div>
1036
1037<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001038 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001039 <pre>Creates a Router resource in the specified project and region using the data included in the request.
1040
1041Args:
1042 project: string, Project ID for this request. (required)
1043 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001045 The object takes the form of:
1046
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001047{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001049 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;bgp&quot;: { # BGP information specific to this router.
1051 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1052 &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.
1053 &quot;A String&quot;,
1054 ],
1055 &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.
1056 { # Description-tagged IP ranges for the router to advertise.
1057 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1058 &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 -07001059 },
1060 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &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 -07001062 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1063 # Not currently available publicly.
1064 # 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.
1065 # 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.
1066 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 },
1068 &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.
1069 {
1070 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1071 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1072 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1073 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1074 # - 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.
1075 &quot;A String&quot;,
1076 ],
1077 &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 -07001078 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1080 &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 -04001081 },
1082 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 &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.
1084 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001085 # Not currently available publicly.
1086 &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.
1087 # Not currently available publicly.
1088 # If set, this value must be between 100 and 30000.
1089 # The default is 300.
1090 &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.
1091 # Not currently available publicly.
1092 # If set, this value must be between 100 and 30000.
1093 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &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 -07001095 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1096 # Not currently available publicly.
1097 # If set, the value must be a value between 2 and 16.
1098 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &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 -07001100 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1101 # Not currently available publicly.
1102 # 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 -07001103 &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 -07001104 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001105 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1106 # Not currently available publicly.
1107 # 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 -07001108 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1109 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1110 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1111 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1112 # - 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.
1113 &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.
1114 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1115 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001116 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 },
1118 ],
1119 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1120 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001121 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1123 &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.
1124 {
1125 &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.
1126 &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.
1127 &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.
1128 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1129 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1130 # - 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.
1131 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001132 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1133 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1134 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001135 },
1136 ],
1137 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1138 &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.
1139 &quot;nats&quot;: [ # A list of NAT services created in this router.
1140 { # 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.
1141 &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.
1142 &quot;A String&quot;,
1143 ],
1144 &quot;enableEndpointIndependentMapping&quot;: True or False,
1145 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1146 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1147 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1148 &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:
1149 # - ERRORS_ONLY: Export logs only for connection failures.
1150 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1151 # - ALL: Export logs for all connections, successful and unsuccessful.
1152 },
1153 &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.
1154 &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.
1155 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1156 # - 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.
1157 # - 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.
1158 &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.
1159 &quot;A String&quot;,
1160 ],
1161 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1162 {
1163 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1164 &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.
1165 &quot;A String&quot;,
1166 ],
1167 &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.
1168 &quot;A String&quot;,
1169 ],
1170 },
1171 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1172 &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.
1173 #
1174 # The following examples are valid match expressions:
1175 #
1176 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1177 #
1178 # &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 -07001179 &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 -07001180 },
1181 ],
1182 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1183 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1184 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1185 # - 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.
1186 &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.
1187 { # Defines the IP ranges that want to use NAT for a subnetwork.
1188 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1189 &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.
1190 &quot;A String&quot;,
1191 ],
1192 &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]
1193 &quot;A String&quot;,
1194 ],
1195 },
1196 ],
1197 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1198 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1199 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1200 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1201 },
1202 ],
1203 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1204 &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.
1205 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1206 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1207}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001208
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 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.
1210
1211For 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.
1212
1213The 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 -07001214
1215Returns:
1216 An object of the form:
1217
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001218 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001219 #
1220 # Google Compute Engine has three Operation resources:
1221 #
1222 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1223 #
1224 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1225 #
1226 # Operations can be global, regional or zonal.
1227 # - For global operations, use the `globalOperations` resource.
1228 # - For regional operations, use the `regionOperations` resource.
1229 # - For zonal operations, use the `zonalOperations` resource.
1230 #
1231 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1232 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1233 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1234 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1235 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1236 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1237 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001239 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1240 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1241 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001242 },
1243 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001244 },
1245 &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`.
1246 &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.
1247 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1248 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1249 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001250 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1251 #
1252 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1253 #
1254 # Example 1: Pack and unpack a message in C++.
1255 #
1256 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1257 #
1258 # Example 2: Pack and unpack a message in Java.
1259 #
1260 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1261 #
1262 # Example 3: Pack and unpack a message in Python.
1263 #
1264 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1265 #
1266 # Example 4: Pack and unpack a message in Go
1267 #
1268 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1269 #
1270 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1271 #
1272 #
1273 #
1274 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1275 #
1276 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1277 #
1278 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1279 #
1280 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1281 #
1282 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1283 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1284 #
1285 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1286 #
1287 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1288 #
1289 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1290 #
1291 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1292 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1293 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001294 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001295 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001296 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1297 &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.
1298 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1299 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1300 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1301 &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.
1302 &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`.
1303 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1304 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1305 &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.
1306 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1307 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1308 {
1309 &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.
1310 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1311 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1312 {
1313 &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).
1314 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1315 },
1316 ],
1317 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1318 },
1319 ],
1320 &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.
1321}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001322</div>
1323
1324<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 <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 -07001326 <pre>Retrieves a list of Router resources available to the specified project.
1327
1328Args:
1329 project: string, Project ID for this request. (required)
1330 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 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 -07001332
Dan O'Mearadd494642020-05-01 07:42:23 -07001333For 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 -07001334
Dan O'Mearadd494642020-05-01 07:42:23 -07001335You 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 -07001336
Bu Sun Kim65020912020-05-20 12:08:20 -07001337To 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) ```
1338 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`)
1339 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1340
1341You 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.
1342
1343Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1344 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001345 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001346
1347Returns:
1348 An object of the form:
1349
1350 { # Contains a list of Router resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001351 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1352 &quot;items&quot;: [ # A list of Router resources.
1353 { # Represents a Cloud Router resource.
1354 #
1355 # For more information about Cloud Router, read the Cloud Router overview.
1356 &quot;bgp&quot;: { # BGP information specific to this router.
1357 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1358 &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.
1359 &quot;A String&quot;,
1360 ],
1361 &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.
1362 { # Description-tagged IP ranges for the router to advertise.
1363 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1364 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1365 },
1366 ],
1367 &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.
1368 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1369 # Not currently available publicly.
1370 # 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.
1371 # 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.
1372 # If set, this value must be between 1 and 120. The default is 20.
1373 },
1374 &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.
1375 {
1376 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1377 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1378 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1379 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1380 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 &quot;A String&quot;,
1382 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001383 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 { # Description-tagged IP ranges for the router to advertise.
1385 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1386 &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 -07001387 },
1388 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001389 &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.
1390 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001391 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001392 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001393 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001394 # If set, this value must be between 100 and 30000.
1395 # The default is 300.
1396 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001397 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001398 # If set, this value must be between 100 and 30000.
1399 # The default is 300.
1400 &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.
1401 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1402 # Not currently available publicly.
1403 # If set, the value must be a value between 2 and 16.
1404 # The default is 3.
1405 &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.
1406 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1407 # Not currently available publicly.
1408 # 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.
1409 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001411 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1412 # Not currently available publicly.
1413 # 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.
1414 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1415 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1416 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1417 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1418 # - 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.
1419 &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.
1420 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1421 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1422 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001423 },
1424 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001425 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1426 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1427 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
1428 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1429 &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.
1430 {
1431 &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.
1432 &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.
1433 &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.
1434 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1435 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1436 # - 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.
1437 &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.
1438 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1439 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1440 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
1441 },
1442 ],
1443 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1444 &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.
1445 &quot;nats&quot;: [ # A list of NAT services created in this router.
1446 { # 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.
1447 &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.
1448 &quot;A String&quot;,
1449 ],
1450 &quot;enableEndpointIndependentMapping&quot;: True or False,
1451 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1452 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1453 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1454 &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:
1455 # - ERRORS_ONLY: Export logs only for connection failures.
1456 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1457 # - ALL: Export logs for all connections, successful and unsuccessful.
1458 },
1459 &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.
1460 &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.
1461 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1462 # - 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.
1463 # - 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.
1464 &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.
1465 &quot;A String&quot;,
1466 ],
1467 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1468 {
1469 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1470 &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.
1471 &quot;A String&quot;,
1472 ],
1473 &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.
1474 &quot;A String&quot;,
1475 ],
1476 },
1477 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1478 &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.
1479 #
1480 # The following examples are valid match expressions:
1481 #
1482 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1483 #
1484 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1485 &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.
1486 },
1487 ],
1488 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1489 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1490 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1491 # - 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.
1492 &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.
1493 { # Defines the IP ranges that want to use NAT for a subnetwork.
1494 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1495 &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.
1496 &quot;A String&quot;,
1497 ],
1498 &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]
1499 &quot;A String&quot;,
1500 ],
1501 },
1502 ],
1503 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1504 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1505 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1506 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1507 },
1508 ],
1509 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1510 &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.
1511 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1512 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001513 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001514 ],
1515 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1516 &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.
1517 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1518 &quot;warning&quot;: { # [Output Only] Informational warning message.
1519 &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.
1520 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1521 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1522 {
1523 &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).
1524 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1525 },
1526 ],
1527 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1528 },
1529}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001530</div>
1531
1532<div class="method">
1533 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1534 <pre>Retrieves the next page of results.
1535
1536Args:
1537 previous_request: The request for the previous page. (required)
1538 previous_response: The response from the request for the previous page. (required)
1539
1540Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001542 page. Returns None if there are no more items in the collection.
1543 </pre>
1544</div>
1545
1546<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001547 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001548 <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 -07001549
1550Args:
1551 project: string, Project ID for this request. (required)
1552 region: string, Name of the region for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001553 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001554 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001555 The object takes the form of:
1556
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001557{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001559 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001560 &quot;bgp&quot;: { # BGP information specific to this router.
1561 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1562 &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.
1563 &quot;A String&quot;,
1564 ],
1565 &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.
1566 { # Description-tagged IP ranges for the router to advertise.
1567 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1568 &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 -07001569 },
1570 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001571 &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 -07001572 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1573 # Not currently available publicly.
1574 # 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.
1575 # 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.
1576 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 },
1578 &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.
1579 {
1580 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1581 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1582 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1583 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1584 # - 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.
1585 &quot;A String&quot;,
1586 ],
1587 &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 -07001588 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1590 &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 -04001591 },
1592 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001593 &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.
1594 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001595 # Not currently available publicly.
1596 &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.
1597 # Not currently available publicly.
1598 # If set, this value must be between 100 and 30000.
1599 # The default is 300.
1600 &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.
1601 # Not currently available publicly.
1602 # If set, this value must be between 100 and 30000.
1603 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001604 &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 -07001605 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1606 # Not currently available publicly.
1607 # If set, the value must be a value between 2 and 16.
1608 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001609 &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 -07001610 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1611 # Not currently available publicly.
1612 # 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 -07001613 &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 -07001614 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001615 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1616 # Not currently available publicly.
1617 # 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 -07001618 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1619 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1620 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1621 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1622 # - 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.
1623 &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.
1624 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1625 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001626 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001627 },
1628 ],
1629 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1630 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001631 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1633 &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.
1634 {
1635 &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.
1636 &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.
1637 &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.
1638 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1639 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1640 # - 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.
1641 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001642 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1643 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1644 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 },
1646 ],
1647 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1648 &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.
1649 &quot;nats&quot;: [ # A list of NAT services created in this router.
1650 { # 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.
1651 &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.
1652 &quot;A String&quot;,
1653 ],
1654 &quot;enableEndpointIndependentMapping&quot;: True or False,
1655 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1656 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1657 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1658 &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:
1659 # - ERRORS_ONLY: Export logs only for connection failures.
1660 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1661 # - ALL: Export logs for all connections, successful and unsuccessful.
1662 },
1663 &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.
1664 &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.
1665 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1666 # - 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.
1667 # - 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.
1668 &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.
1669 &quot;A String&quot;,
1670 ],
1671 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1672 {
1673 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1674 &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.
1675 &quot;A String&quot;,
1676 ],
1677 &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.
1678 &quot;A String&quot;,
1679 ],
1680 },
1681 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1682 &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.
1683 #
1684 # The following examples are valid match expressions:
1685 #
1686 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1687 #
1688 # &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 -07001689 &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 -07001690 },
1691 ],
1692 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1693 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1694 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1695 # - 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.
1696 &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.
1697 { # Defines the IP ranges that want to use NAT for a subnetwork.
1698 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1699 &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.
1700 &quot;A String&quot;,
1701 ],
1702 &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]
1703 &quot;A String&quot;,
1704 ],
1705 },
1706 ],
1707 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1708 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1709 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1710 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1711 },
1712 ],
1713 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1714 &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.
1715 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1716 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1717}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001718
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001719 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.
1720
1721For 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.
1722
1723The 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 -07001724
1725Returns:
1726 An object of the form:
1727
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001728 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001729 #
1730 # Google Compute Engine has three Operation resources:
1731 #
1732 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1733 #
1734 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1735 #
1736 # Operations can be global, regional or zonal.
1737 # - For global operations, use the `globalOperations` resource.
1738 # - For regional operations, use the `regionOperations` resource.
1739 # - For zonal operations, use the `zonalOperations` resource.
1740 #
1741 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1742 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1743 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1744 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1745 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1746 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1747 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001748 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001749 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1750 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1751 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001752 },
1753 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001754 },
1755 &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`.
1756 &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.
1757 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1758 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1759 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001760 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1761 #
1762 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1763 #
1764 # Example 1: Pack and unpack a message in C++.
1765 #
1766 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1767 #
1768 # Example 2: Pack and unpack a message in Java.
1769 #
1770 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1771 #
1772 # Example 3: Pack and unpack a message in Python.
1773 #
1774 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1775 #
1776 # Example 4: Pack and unpack a message in Go
1777 #
1778 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1779 #
1780 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1781 #
1782 #
1783 #
1784 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1785 #
1786 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1787 #
1788 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1789 #
1790 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1791 #
1792 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1793 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1794 #
1795 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1796 #
1797 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1798 #
1799 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1800 #
1801 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1802 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1803 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001804 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001805 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001806 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1807 &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.
1808 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1809 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1810 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1811 &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.
1812 &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`.
1813 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1814 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1815 &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.
1816 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1817 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1818 {
1819 &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.
1820 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1821 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1822 {
1823 &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).
1824 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1825 },
1826 ],
1827 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1828 },
1829 ],
1830 &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.
1831}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001832</div>
1833
1834<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001836 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1837
1838Args:
1839 project: string, Project ID for this request. (required)
1840 region: string, Name of the region for this request. (required)
1841 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001842 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001843 The object takes the form of:
1844
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001847 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001848 &quot;bgp&quot;: { # BGP information specific to this router.
1849 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1850 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1851 &quot;A String&quot;,
1852 ],
1853 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1854 { # Description-tagged IP ranges for the router to advertise.
1855 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1856 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001857 },
1858 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001859 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001860 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
1861 # Not currently available publicly.
1862 # Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.
1863 # BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers.
1864 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 },
1866 &quot;bgpPeers&quot;: [ # BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
1867 {
1868 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1869 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1870 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1871 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1872 # - 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.
1873 &quot;A String&quot;,
1874 ],
1875 &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 -07001876 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001877 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1878 &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 -04001879 },
1880 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 &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.
1882 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001883 # Not currently available publicly.
1884 &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.
1885 # Not currently available publicly.
1886 # If set, this value must be between 100 and 30000.
1887 # The default is 300.
1888 &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.
1889 # Not currently available publicly.
1890 # If set, this value must be between 100 and 30000.
1891 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07001892 &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 -07001893 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
1894 # Not currently available publicly.
1895 # If set, the value must be a value between 2 and 16.
1896 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07001897 &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 -07001898 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
1899 # Not currently available publicly.
1900 # 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 -07001901 &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 -07001902 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001903 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
1904 # Not currently available publicly.
1905 # 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 -07001906 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1907 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1908 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1909 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1910 # - 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.
1911 &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.
1912 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1913 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001914 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07001915 },
1916 ],
1917 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1918 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001919 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07001920 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1921 &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.
1922 {
1923 &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.
1924 &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.
1925 &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.
1926 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1927 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1928 # - 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.
1929 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001930 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
1931 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1932 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07001933 },
1934 ],
1935 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1936 &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.
1937 &quot;nats&quot;: [ # A list of NAT services created in this router.
1938 { # 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.
1939 &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.
1940 &quot;A String&quot;,
1941 ],
1942 &quot;enableEndpointIndependentMapping&quot;: True or False,
1943 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1944 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1945 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1946 &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:
1947 # - ERRORS_ONLY: Export logs only for connection failures.
1948 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1949 # - ALL: Export logs for all connections, successful and unsuccessful.
1950 },
1951 &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.
1952 &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.
1953 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1954 # - 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.
1955 # - 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.
1956 &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.
1957 &quot;A String&quot;,
1958 ],
1959 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1960 {
1961 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1962 &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.
1963 &quot;A String&quot;,
1964 ],
1965 &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.
1966 &quot;A String&quot;,
1967 ],
1968 },
1969 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1970 &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.
1971 #
1972 # The following examples are valid match expressions:
1973 #
1974 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1975 #
1976 # &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 -07001977 &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 -07001978 },
1979 ],
1980 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1981 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1982 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1983 # - 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.
1984 &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.
1985 { # Defines the IP ranges that want to use NAT for a subnetwork.
1986 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1987 &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.
1988 &quot;A String&quot;,
1989 ],
1990 &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]
1991 &quot;A String&quot;,
1992 ],
1993 },
1994 ],
1995 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1996 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1997 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1998 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1999 },
2000 ],
2001 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
2002 &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.
2003 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2004 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2005}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002006
2007
2008Returns:
2009 An object of the form:
2010
2011 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002012 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
2013 #
2014 # For more information about Cloud Router, read the Cloud Router overview.
2015 &quot;bgp&quot;: { # BGP information specific to this router.
2016 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
2017 &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.
2018 &quot;A String&quot;,
2019 ],
2020 &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.
2021 { # Description-tagged IP ranges for the router to advertise.
2022 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2023 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
2024 },
2025 ],
2026 &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.
2027 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
2028 # Not currently available publicly.
2029 # 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.
2030 # 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.
2031 # If set, this value must be between 1 and 120. The default is 20.
2032 },
2033 &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.
2034 {
2035 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
2036 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
2037 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
2038 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
2039 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002040 &quot;A String&quot;,
2041 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002042 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the &quot;bgp&quot; message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07002043 { # Description-tagged IP ranges for the router to advertise.
2044 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2045 &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 -07002046 },
2047 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002048 &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.
2049 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002050 # Not currently available publicly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002051 &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.
2052 # Not currently available publicly.
2053 # If set, this value must be between 100 and 30000.
2054 # The default is 300.
2055 &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.
2056 # Not currently available publicly.
2057 # If set, this value must be between 100 and 30000.
2058 # The default is 300.
2059 &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.
2060 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
2061 # Not currently available publicly.
2062 # If set, the value must be a value between 2 and 16.
2063 # The default is 3.
2064 &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.
2065 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
2066 # Not currently available publicly.
2067 # 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.
2068 &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.
2069 },
2070 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
2071 # Not currently available publicly.
2072 # 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.
2073 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
2074 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
2075 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
2076 # - MANAGED_BY_USER is the default value and can be managed by you or other users
2077 # - 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.
2078 &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.
2079 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
2080 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
2081 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002082 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002083 ],
2084 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2085 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2086 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
2087 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2088 &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.
2089 {
2090 &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.
2091 &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.
2092 &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.
2093 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
2094 # - MANAGED_BY_USER is the default value and can be managed directly by users.
2095 # - 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.
2096 &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.
2097 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
2098 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2099 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
2100 },
2101 ],
2102 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
2103 &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.
2104 &quot;nats&quot;: [ # A list of NAT services created in this router.
2105 { # 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.
2106 &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.
2107 &quot;A String&quot;,
2108 ],
2109 &quot;enableEndpointIndependentMapping&quot;: True or False,
2110 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
2111 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
2112 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
2113 &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:
2114 # - ERRORS_ONLY: Export logs only for connection failures.
2115 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
2116 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim65020912020-05-20 12:08:20 -07002117 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002118 &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.
2119 &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.
2120 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
2121 # - 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.
2122 # - 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.
2123 &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.
2124 &quot;A String&quot;,
2125 ],
2126 &quot;rules&quot;: [ # A list of rules associated with this NAT.
2127 {
2128 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
2129 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002130 &quot;A String&quot;,
2131 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002132 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002133 &quot;A String&quot;,
2134 ],
2135 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002136 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
2137 &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.
2138 #
2139 # The following examples are valid match expressions:
2140 #
2141 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
2142 #
2143 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
2144 &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.
2145 },
2146 ],
2147 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
2148 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
2149 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
2150 # - 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.
2151 &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.
2152 { # Defines the IP ranges that want to use NAT for a subnetwork.
2153 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
2154 &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.
2155 &quot;A String&quot;,
2156 ],
2157 &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]
2158 &quot;A String&quot;,
2159 ],
2160 },
2161 ],
2162 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
2163 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
2164 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
2165 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
2166 },
2167 ],
2168 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
2169 &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.
2170 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2171 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2172 },
2173}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002174</div>
2175
2176<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002177 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002178 <pre>Returns permissions that a caller has on the specified resource.
2179
2180Args:
2181 project: string, Project ID for this request. (required)
2182 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002183 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002184 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002185 The object takes the form of:
2186
2187{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002188 &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.
2189 &quot;A String&quot;,
2190 ],
2191}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002192
2193
2194Returns:
2195 An object of the form:
2196
2197 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002198 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2199 &quot;A String&quot;,
2200 ],
2201}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002202</div>
2203
2204<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002205 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
2206 <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 -07002207
2208Args:
2209 project: string, Project ID for this request. (required)
2210 region: string, Name of the region for this request. (required)
2211 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002212 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002213 The object takes the form of:
2214
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002215{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002216 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002217 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07002218 &quot;bgp&quot;: { # BGP information specific to this router.
2219 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
2220 &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.
2221 &quot;A String&quot;,
2222 ],
2223 &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.
2224 { # Description-tagged IP ranges for the router to advertise.
2225 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2226 &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 -07002227 },
2228 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002229 &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 -07002230 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer.
2231 # Not currently available publicly.
2232 # 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.
2233 # 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.
2234 # If set, this value must be between 1 and 120. The default is 20.
Bu Sun Kim65020912020-05-20 12:08:20 -07002235 },
2236 &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.
2237 {
2238 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
2239 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
2240 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
2241 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
2242 # - 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.
2243 &quot;A String&quot;,
2244 ],
2245 &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 -07002246 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
2248 &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 -04002249 },
2250 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002251 &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.
2252 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002253 # Not currently available publicly.
2254 &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.
2255 # Not currently available publicly.
2256 # If set, this value must be between 100 and 30000.
2257 # The default is 300.
2258 &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.
2259 # Not currently available publicly.
2260 # If set, this value must be between 100 and 30000.
2261 # The default is 300.
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 &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 -07002263 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable.
2264 # Not currently available publicly.
2265 # If set, the value must be a value between 2 and 16.
2266 # The default is 3.
Bu Sun Kim65020912020-05-20 12:08:20 -07002267 &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 -07002268 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer.
2269 # Not currently available publicly.
2270 # 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 -07002271 &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 -07002272 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002273 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection.
2274 # Not currently available publicly.
2275 # 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 -07002276 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
2277 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
2278 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
2279 # - MANAGED_BY_USER is the default value and can be managed by you or other users
2280 # - 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.
2281 &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.
2282 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
2283 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002284 &quot;routerApplianceInstance&quot;: &quot;A String&quot;, # URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
Bu Sun Kim65020912020-05-20 12:08:20 -07002285 },
2286 ],
2287 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2288 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002289 &quot;encryptedInterconnectRouter&quot;: True or False, # Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (Encrypted Interconnect feature).
Bu Sun Kim65020912020-05-20 12:08:20 -07002290 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2291 &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.
2292 {
2293 &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.
2294 &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.
2295 &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.
2296 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
2297 # - MANAGED_BY_USER is the default value and can be managed directly by users.
2298 # - 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.
2299 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002300 &quot;privateIpAddress&quot;: &quot;A String&quot;, # The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
2301 &quot;redundantInterface&quot;: &quot;A String&quot;, # Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2302 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Bu Sun Kim65020912020-05-20 12:08:20 -07002303 },
2304 ],
2305 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
2306 &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.
2307 &quot;nats&quot;: [ # A list of NAT services created in this router.
2308 { # 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.
2309 &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.
2310 &quot;A String&quot;,
2311 ],
2312 &quot;enableEndpointIndependentMapping&quot;: True or False,
2313 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
2314 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
2315 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
2316 &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:
2317 # - ERRORS_ONLY: Export logs only for connection failures.
2318 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
2319 # - ALL: Export logs for all connections, successful and unsuccessful.
2320 },
2321 &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.
2322 &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.
2323 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
2324 # - 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.
2325 # - 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.
2326 &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.
2327 &quot;A String&quot;,
2328 ],
2329 &quot;rules&quot;: [ # A list of rules associated with this NAT.
2330 {
2331 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
2332 &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.
2333 &quot;A String&quot;,
2334 ],
2335 &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.
2336 &quot;A String&quot;,
2337 ],
2338 },
2339 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
2340 &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.
2341 #
2342 # The following examples are valid match expressions:
2343 #
2344 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
2345 #
2346 # &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 -07002347 &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 -07002348 },
2349 ],
2350 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
2351 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
2352 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
2353 # - 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.
2354 &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.
2355 { # Defines the IP ranges that want to use NAT for a subnetwork.
2356 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
2357 &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.
2358 &quot;A String&quot;,
2359 ],
2360 &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]
2361 &quot;A String&quot;,
2362 ],
2363 },
2364 ],
2365 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
2366 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
2367 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
2368 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
2369 },
2370 ],
2371 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
2372 &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.
2373 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2374 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2375}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002376
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002377 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.
2378
2379For 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.
2380
2381The 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 -07002382
2383Returns:
2384 An object of the form:
2385
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002386 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002387 #
2388 # Google Compute Engine has three Operation resources:
2389 #
2390 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2391 #
2392 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2393 #
2394 # Operations can be global, regional or zonal.
2395 # - For global operations, use the `globalOperations` resource.
2396 # - For regional operations, use the `regionOperations` resource.
2397 # - For zonal operations, use the `zonalOperations` resource.
2398 #
2399 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2400 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2401 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2402 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2403 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2404 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2405 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002406 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002407 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2408 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2409 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002410 },
2411 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002412 },
2413 &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`.
2414 &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.
2415 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2416 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2417 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002418 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
2419 #
2420 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
2421 #
2422 # Example 1: Pack and unpack a message in C++.
2423 #
2424 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
2425 #
2426 # Example 2: Pack and unpack a message in Java.
2427 #
2428 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
2429 #
2430 # Example 3: Pack and unpack a message in Python.
2431 #
2432 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
2433 #
2434 # Example 4: Pack and unpack a message in Go
2435 #
2436 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
2437 #
2438 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
2439 #
2440 #
2441 #
2442 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
2443 #
2444 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
2445 #
2446 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
2447 #
2448 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
2449 #
2450 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
2451 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
2452 #
2453 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
2454 #
2455 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
2456 #
2457 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
2458 #
2459 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
2460 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
2461 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002462 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002463 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002464 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2465 &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.
2466 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2467 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2468 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2469 &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.
2470 &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`.
2471 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2472 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2473 &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.
2474 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2475 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2476 {
2477 &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.
2478 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2479 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2480 {
2481 &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).
2482 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2483 },
2484 ],
2485 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2486 },
2487 ],
2488 &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.
2489}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002490</div>
2491
2492</body></html>