blob: 652ff77e4700d8634a1f1adbd6beb8e0a80bd28f [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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified Router resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <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 -070091<p class="firstline">Retrieves runtime Nat mapping information of VM endpoints.</p>
92<p class="toc_element">
93 <code><a href="#getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
96 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
97<p class="firstline">Retrieves runtime information of the specified router.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <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 -0700103<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<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 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#update">update(project, region, router, body=None, requestId=None)</a></code></p>
118<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 -0700119<h3>Method Details</h3>
120<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 <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 -0700122 <pre>Retrieves an aggregated list of routers.
123
124Args:
125 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 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 -0700127
Dan O'Mearadd494642020-05-01 07:42:23 -0700128For 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 -0700129
Dan O'Mearadd494642020-05-01 07:42:23 -0700130You 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 -0700131
Bu Sun Kim65020912020-05-20 12:08:20 -0700132To 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 -0700133 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 -0700134 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`)
135 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
136
137You 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.
138
139Currently, only sorting by `name` or `creationTimestamp desc` is supported.
140 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.
141 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142
143Returns:
144 An object of the form:
145
146 { # Contains a list of routers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
148 &quot;items&quot;: { # A list of Router resources.
149 &quot;a_key&quot;: { # Name of the scope containing this set of routers.
150 &quot;routers&quot;: [ # A list of routers contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 #
153 # For more information about Cloud Router, read the the Cloud Router overview.
154 &quot;bgp&quot;: { # BGP information specific to this router.
155 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
156 &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.
157 &quot;A String&quot;,
158 ],
159 &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.
160 { # Description-tagged IP ranges for the router to advertise.
161 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
162 &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 -0700163 },
164 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &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.
166 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &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.
169 {
170 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
171 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
172 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
173 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
174 # - 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.
175 &quot;A String&quot;,
176 ],
177 &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.
178 { # Description-tagged IP ranges for the router to advertise.
179 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
180 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
181 },
182 ],
183 &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.
184 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
185 &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. If set, this value must be between 100 and 30000. The default is 300.
186 &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. If set, this value must be between 100 and 30000. The default is 300.
187 &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.
188 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
189 &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.
190 &quot;sessionInitializationMode&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.
191 &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.
192 },
193 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
194 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
195 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
196 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
197 # - MANAGED_BY_USER is the default value and can be managed by you or other users
198 # - 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.
199 &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.
200 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
201 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
202 },
203 ],
204 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
205 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
206 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
207 &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.
208 {
209 &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.
210 &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.
211 &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.
212 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
213 # - MANAGED_BY_USER is the default value and can be managed directly by users.
214 # - 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.
215 &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.
216 },
217 ],
218 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
219 &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.
220 &quot;nats&quot;: [ # A list of NAT services created in this router.
221 { # 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.
222 &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.
223 &quot;A String&quot;,
224 ],
225 &quot;enableEndpointIndependentMapping&quot;: True or False,
226 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
227 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
228 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
229 &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:
230 # - ERRORS_ONLY: Export logs only for connection failures.
231 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
232 # - ALL: Export logs for all connections, successful and unsuccessful.
233 },
234 &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.
235 &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.
236 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
237 # - 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.
238 # - 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.
239 &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.
240 &quot;A String&quot;,
241 ],
242 &quot;rules&quot;: [ # A list of rules associated with this NAT.
243 {
244 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
245 &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.
246 &quot;A String&quot;,
247 ],
248 &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.
249 &quot;A String&quot;,
250 ],
251 },
252 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
253 &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.
254 #
255 # The following examples are valid match expressions:
256 #
257 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
258 #
259 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
260 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
261 },
262 ],
263 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
264 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
265 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
266 # - 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.
267 &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.
268 { # Defines the IP ranges that want to use NAT for a subnetwork.
269 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
270 &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.
271 &quot;A String&quot;,
272 ],
273 &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]
274 &quot;A String&quot;,
275 ],
276 },
277 ],
278 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
279 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
280 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
281 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
282 },
283 ],
284 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
285 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
286 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
287 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
288 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
291 &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.
292 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
293 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700294 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &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).
296 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700297 },
298 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700300 },
301 },
302 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
304 &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.
305 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
306 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
307 &quot;A String&quot;,
308 ],
309 &quot;warning&quot;: { # [Output Only] Informational warning message.
310 &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.
311 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
312 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 &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).
315 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 },
317 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700320 }</pre>
321</div>
322
323<div class="method">
324 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
325 <pre>Retrieves the next page of results.
326
327Args:
328 previous_request: The request for the previous page. (required)
329 previous_response: The response from the request for the previous page. (required)
330
331Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700332 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700333 page. Returns None if there are no more items in the collection.
334 </pre>
335</div>
336
337<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400338 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700339 <pre>Deletes the specified Router resource.
340
341Args:
342 project: string, Project ID for this request. (required)
343 region: string, Name of the region for this request. (required)
344 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 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.
346
347For 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.
348
349The 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 -0700350
351Returns:
352 An object of the form:
353
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 { # Represents an Operation resource.
355 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # Google Compute Engine has three Operation resources:
357 #
358 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
359 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
361 #
362 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # - For global operations, use the `globalOperations` resource.
364 # - For regional operations, use the `regionOperations` resource.
365 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
369 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
370 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
371 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
372 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
373 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700374 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
376 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
377 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700378 },
379 ],
380 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700381 &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`.
382 &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.
383 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
384 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
385 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
386 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
387 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
388 &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.
389 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
390 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
391 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
392 &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.
393 &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`.
394 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
395 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
396 &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.
397 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
398 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
399 {
400 &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.
401 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
402 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
403 {
404 &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).
405 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
406 },
407 ],
408 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
409 },
410 ],
411 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700412 }</pre>
413</div>
414
415<div class="method">
416 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700418
419Args:
420 project: string, Project ID for this request. (required)
421 region: string, Name of the region for this request. (required)
422 router: string, Name of the Router resource to return. (required)
423
424Returns:
425 An object of the form:
426
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 #
429 # For more information about Cloud Router, read the the Cloud Router overview.
430 &quot;bgp&quot;: { # BGP information specific to this router.
431 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
432 &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.
433 &quot;A String&quot;,
434 ],
435 &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.
436 { # Description-tagged IP ranges for the router to advertise.
437 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
438 &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 -0700439 },
440 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 &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.
442 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
443 },
444 &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.
445 {
446 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
447 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
448 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
449 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
450 # - 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.
451 &quot;A String&quot;,
452 ],
453 &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 -0700454 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
456 &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 -0400457 },
458 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &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.
460 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
461 &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. If set, this value must be between 100 and 30000. The default is 300.
462 &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. If set, this value must be between 100 and 30000. The default is 300.
463 &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.
464 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
465 &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.
466 &quot;sessionInitializationMode&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.
467 &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 -0700468 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
470 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
471 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
472 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
473 # - MANAGED_BY_USER is the default value and can be managed by you or other users
474 # - 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.
475 &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.
476 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
477 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
478 },
479 ],
480 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
481 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
482 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
483 &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.
484 {
485 &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.
486 &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.
487 &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.
488 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
489 # - MANAGED_BY_USER is the default value and can be managed directly by users.
490 # - 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.
491 &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.
492 },
493 ],
494 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
495 &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.
496 &quot;nats&quot;: [ # A list of NAT services created in this router.
497 { # 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.
498 &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.
499 &quot;A String&quot;,
500 ],
501 &quot;enableEndpointIndependentMapping&quot;: True or False,
502 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
503 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
504 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
505 &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:
506 # - ERRORS_ONLY: Export logs only for connection failures.
507 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
508 # - ALL: Export logs for all connections, successful and unsuccessful.
509 },
510 &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.
511 &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.
512 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
513 # - 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.
514 # - 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.
515 &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.
516 &quot;A String&quot;,
517 ],
518 &quot;rules&quot;: [ # A list of rules associated with this NAT.
519 {
520 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
521 &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.
522 &quot;A String&quot;,
523 ],
524 &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.
525 &quot;A String&quot;,
526 ],
527 },
528 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
529 &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.
530 #
531 # The following examples are valid match expressions:
532 #
533 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
534 #
535 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
536 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
537 },
538 ],
539 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
540 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
541 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
542 # - 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.
543 &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.
544 { # Defines the IP ranges that want to use NAT for a subnetwork.
545 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
546 &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.
547 &quot;A String&quot;,
548 ],
549 &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]
550 &quot;A String&quot;,
551 ],
552 },
553 ],
554 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
555 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
556 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
557 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
558 },
559 ],
560 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
561 &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.
562 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
563 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
564 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700565</div>
566
567<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, natName=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 <pre>Retrieves runtime Nat mapping information of VM endpoints.
570
571Args:
572 project: string, Project ID for this request. (required)
573 region: string, Name of the region for this request. (required)
574 router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576
Dan O'Mearadd494642020-05-01 07:42:23 -0700577For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578
Dan O'Mearadd494642020-05-01 07:42:23 -0700579You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580
Bu Sun Kim65020912020-05-20 12:08:20 -0700581To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
582 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
583 natName: string, Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
584 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
585
586You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
587
588Currently, only sorting by `name` or `creationTimestamp desc` is supported.
589 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
590 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591
592Returns:
593 An object of the form:
594
595 { # Contains a list of VmEndpointNatMappings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
597 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
598 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
599 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
602 &quot;interfaceNatMappings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 { # Contain information of Nat mapping for an interface of this endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;drainNatIpPortRanges&quot;: [ # List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [&quot;2.2.2.2:12345-12355&quot;, &quot;1.1.1.1:2234-2234&quot;].
605 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &quot;natIpPortRanges&quot;: [ # A list of all IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [&quot;2.2.2.2:12345-12355&quot;, &quot;1.1.1.1:2234-2234&quot;].
608 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;numTotalDrainNatPorts&quot;: 42, # Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.
611 &quot;numTotalNatPorts&quot;: 42, # Total number of ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field nat_ip_port_ranges.
612 &quot;sourceAliasIpRange&quot;: &quot;A String&quot;, # Alias IP range for this interface endpoint. It will be a private (RFC 1918) IP range. Examples: &quot;10.33.4.55/32&quot;, or &quot;192.168.5.0/24&quot;.
613 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 },
615 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 },
617 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
619 &quot;warning&quot;: { # [Output Only] Informational warning message.
620 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
621 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
622 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
623 {
624 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
625 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
626 },
627 ],
628 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
629 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 }</pre>
631</div>
632
633<div class="method">
634 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
635 <pre>Retrieves the next page of results.
636
637Args:
638 previous_request: The request for the previous page. (required)
639 previous_response: The response from the request for the previous page. (required)
640
641Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 page. Returns None if there are no more items in the collection.
644 </pre>
645</div>
646
647<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700648 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
649 <pre>Retrieves runtime information of the specified router.
650
651Args:
652 project: string, Project ID for this request. (required)
653 region: string, Name of the region for this request. (required)
654 router: string, Name of the Router resource to query. (required)
655
656Returns:
657 An object of the form:
658
659 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
661 &quot;result&quot;: {
662 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
663 { # Represents a Route resource.
664 #
665 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
666 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
667 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
668 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
669 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
670 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
671 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
672 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
673 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
674 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
675 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
676 # - regions/region/forwardingRules/forwardingRule
677 &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:
678 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
679 &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.
680 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
681 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
682 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
683 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
684 &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.
685 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
686 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
687 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
688 &quot;A String&quot;,
689 ],
690 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
691 {
692 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
693 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
694 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
695 {
696 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
697 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
698 },
699 ],
700 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
701 },
702 ],
703 },
704 ],
705 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
706 { # Represents a Route resource.
707 #
708 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
709 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
710 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
711 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
712 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
713 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
714 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
715 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
716 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
717 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
718 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
719 # - regions/region/forwardingRules/forwardingRule
720 &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:
721 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
722 &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.
723 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
724 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
725 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
726 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
727 &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.
728 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
729 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
730 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
731 &quot;A String&quot;,
732 ],
733 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
734 {
735 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
736 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
737 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
738 {
739 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
740 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
741 },
742 ],
743 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
744 },
745 ],
746 },
747 ],
748 &quot;bgpPeerStatus&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700749 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 { # Represents a Route resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700752 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700753 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
755 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
756 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
757 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
758 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
759 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
760 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
761 &quot;nextHopGateway&quot;: &quot;A String&quot;, # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
762 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 # - regions/region/forwardingRules/forwardingRule
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 &quot;nextHopInstance&quot;: &quot;A String&quot;, # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700766 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 &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.
768 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
769 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
770 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
771 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
772 &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.
773 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
774 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
775 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
776 &quot;A String&quot;,
777 ],
778 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700779 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
781 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
782 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700783 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
785 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700786 },
787 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 },
790 ],
791 },
792 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;bfdStatus&quot;: { # Next free: 15
794 &quot;bfdSessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.
795 &quot;configUpdateTimestampMicros&quot;: &quot;A String&quot;, # Unix timestamp of the most recent config update.
796 &quot;controlPacketCounts&quot;: { # Control packet counts for the current BFD session.
797 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
798 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
799 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
800 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
801 },
802 &quot;controlPacketIntervals&quot;: [ # Inter-packet time interval statistics for control packets.
803 { # Next free: 7
804 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
805 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
806 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
807 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
808 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
809 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
810 },
811 ],
812 &quot;echoPacketCounts&quot;: { # Echo packet counts for the current BFD session.
813 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
814 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
815 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
816 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
817 },
818 &quot;echoPacketIntervals&quot;: [ # Inter-packet time interval statistics for echo packets.
819 { # Next free: 7
820 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
821 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
822 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
823 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
824 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
825 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
826 },
827 ],
828 &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
829 &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
830 &quot;negotiatedLocalControlTxIntervalMs&quot;: 42, # Negotiated transmit interval for control packets.
831 &quot;negotiatedLocalEchoTxIntervalMs&quot;: 42, # Negotiated transmit interval for echo packets.
832 &quot;rxPacket&quot;: { # The most recent Rx control packet for this BFD session.
833 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
834 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
835 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
836 &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
837 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
838 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
839 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
840 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
841 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
842 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
843 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
844 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
845 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
846 &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
847 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
848 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
849 },
850 &quot;txPacket&quot;: { # The most recent Tx control packet for this BFD session.
851 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
852 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
853 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
854 &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
855 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
856 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
857 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
858 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
859 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
860 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
861 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
862 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
863 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
864 &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
865 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
866 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
867 },
868 &quot;uptimeMs&quot;: &quot;A String&quot;, # Session uptime in milliseconds. Value will be 0 if session is not up.
869 &quot;usingEchoMode&quot;: True or False, # Indicates if echo mode is currently being used.
870 },
871 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
872 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
873 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
874 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
875 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
876 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
877 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
878 &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
879 &quot;uptimeSeconds&quot;: &quot;A String&quot;, # Time this session has been up, in seconds. Format: 145
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 },
881 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 &quot;natStatus&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 { # Status of a NAT contained in this router. Next tag: 9
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
885 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 &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;].
888 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 &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;].
891 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 &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.
894 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
895 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
896 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
897 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
900 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700901 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400902 },
903 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700905 },
906 }</pre>
907</div>
908
909<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700911 <pre>Creates a Router resource in the specified project and region using the data included in the request.
912
913Args:
914 project: string, Project ID for this request. (required)
915 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700916 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700917 The object takes the form of:
918
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700919{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 #
921 # For more information about Cloud Router, read the the Cloud Router overview.
922 &quot;bgp&quot;: { # BGP information specific to this router.
923 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
924 &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.
925 &quot;A String&quot;,
926 ],
927 &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.
928 { # Description-tagged IP ranges for the router to advertise.
929 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
930 &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 -0700931 },
932 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &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.
934 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
935 },
936 &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.
937 {
938 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
939 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
940 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
941 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
942 # - 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.
943 &quot;A String&quot;,
944 ],
945 &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 -0700946 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
948 &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 -0400949 },
950 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &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.
952 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
953 &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. If set, this value must be between 100 and 30000. The default is 300.
954 &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. If set, this value must be between 100 and 30000. The default is 300.
955 &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.
956 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
957 &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.
958 &quot;sessionInitializationMode&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.
959 &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 -0700960 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
962 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
963 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
964 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
965 # - MANAGED_BY_USER is the default value and can be managed by you or other users
966 # - 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.
967 &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.
968 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
969 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
970 },
971 ],
972 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
973 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
974 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
975 &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.
976 {
977 &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.
978 &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.
979 &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.
980 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
981 # - MANAGED_BY_USER is the default value and can be managed directly by users.
982 # - 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.
983 &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.
984 },
985 ],
986 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
987 &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.
988 &quot;nats&quot;: [ # A list of NAT services created in this router.
989 { # 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.
990 &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.
991 &quot;A String&quot;,
992 ],
993 &quot;enableEndpointIndependentMapping&quot;: True or False,
994 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
995 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
996 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
997 &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:
998 # - ERRORS_ONLY: Export logs only for connection failures.
999 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1000 # - ALL: Export logs for all connections, successful and unsuccessful.
1001 },
1002 &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.
1003 &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.
1004 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1005 # - 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.
1006 # - 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.
1007 &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.
1008 &quot;A String&quot;,
1009 ],
1010 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1011 {
1012 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1013 &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.
1014 &quot;A String&quot;,
1015 ],
1016 &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.
1017 &quot;A String&quot;,
1018 ],
1019 },
1020 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1021 &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.
1022 #
1023 # The following examples are valid match expressions:
1024 #
1025 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1026 #
1027 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1028 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1029 },
1030 ],
1031 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1032 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1033 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1034 # - 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.
1035 &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.
1036 { # Defines the IP ranges that want to use NAT for a subnetwork.
1037 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1038 &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.
1039 &quot;A String&quot;,
1040 ],
1041 &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]
1042 &quot;A String&quot;,
1043 ],
1044 },
1045 ],
1046 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1047 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1048 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1049 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1050 },
1051 ],
1052 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1053 &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.
1054 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1055 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1056}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001057
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 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.
1059
1060For 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.
1061
1062The 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 -07001063
1064Returns:
1065 An object of the form:
1066
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 { # Represents an Operation resource.
1068 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001069 # Google Compute Engine has three Operation resources:
1070 #
1071 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1072 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1074 #
1075 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 # - For global operations, use the `globalOperations` resource.
1077 # - For regional operations, use the `regionOperations` resource.
1078 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001080 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001081 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1082 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1083 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1084 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1085 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1086 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001087 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1089 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1090 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001091 },
1092 ],
1093 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &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`.
1095 &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.
1096 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1097 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1098 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1099 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1100 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1101 &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.
1102 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1103 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1104 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1105 &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.
1106 &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`.
1107 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1108 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1109 &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.
1110 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1111 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1112 {
1113 &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.
1114 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1115 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1116 {
1117 &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).
1118 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1119 },
1120 ],
1121 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1122 },
1123 ],
1124 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001125 }</pre>
1126</div>
1127
1128<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 <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 -07001130 <pre>Retrieves a list of Router resources available to the specified project.
1131
1132Args:
1133 project: string, Project ID for this request. (required)
1134 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001135 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 -07001136
Dan O'Mearadd494642020-05-01 07:42:23 -07001137For 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 -07001138
Dan O'Mearadd494642020-05-01 07:42:23 -07001139You 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 -07001140
Bu Sun Kim65020912020-05-20 12:08:20 -07001141To 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) ```
1142 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`)
1143 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1144
1145You 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.
1146
1147Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1148 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.
1149 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001150
1151Returns:
1152 An object of the form:
1153
1154 { # Contains a list of Router resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1156 &quot;items&quot;: [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001158 #
1159 # For more information about Cloud Router, read the the Cloud Router overview.
1160 &quot;bgp&quot;: { # BGP information specific to this router.
1161 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1162 &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.
1163 &quot;A String&quot;,
1164 ],
1165 &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.
1166 { # Description-tagged IP ranges for the router to advertise.
1167 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1168 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001169 },
1170 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 &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.
1172 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001173 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 &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.
1175 {
1176 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1177 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1178 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1179 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1180 # - 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.
1181 &quot;A String&quot;,
1182 ],
1183 &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.
1184 { # Description-tagged IP ranges for the router to advertise.
1185 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1186 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1187 },
1188 ],
1189 &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.
1190 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1191 &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. If set, this value must be between 100 and 30000. The default is 300.
1192 &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. If set, this value must be between 100 and 30000. The default is 300.
1193 &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.
1194 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1195 &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.
1196 &quot;sessionInitializationMode&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.
1197 &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.
1198 },
1199 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
1200 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1201 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1202 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1203 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1204 # - 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.
1205 &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.
1206 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1207 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1208 },
1209 ],
1210 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1211 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1212 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1213 &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.
1214 {
1215 &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.
1216 &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.
1217 &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.
1218 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1219 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1220 # - 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.
1221 &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.
1222 },
1223 ],
1224 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1225 &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.
1226 &quot;nats&quot;: [ # A list of NAT services created in this router.
1227 { # 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.
1228 &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.
1229 &quot;A String&quot;,
1230 ],
1231 &quot;enableEndpointIndependentMapping&quot;: True or False,
1232 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1233 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1234 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1235 &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:
1236 # - ERRORS_ONLY: Export logs only for connection failures.
1237 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1238 # - ALL: Export logs for all connections, successful and unsuccessful.
1239 },
1240 &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.
1241 &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.
1242 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1243 # - 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.
1244 # - 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.
1245 &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.
1246 &quot;A String&quot;,
1247 ],
1248 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1249 {
1250 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1251 &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.
1252 &quot;A String&quot;,
1253 ],
1254 &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.
1255 &quot;A String&quot;,
1256 ],
1257 },
1258 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1259 &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.
1260 #
1261 # The following examples are valid match expressions:
1262 #
1263 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1264 #
1265 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1266 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1267 },
1268 ],
1269 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1270 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1271 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1272 # - 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.
1273 &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.
1274 { # Defines the IP ranges that want to use NAT for a subnetwork.
1275 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1276 &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.
1277 &quot;A String&quot;,
1278 ],
1279 &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]
1280 &quot;A String&quot;,
1281 ],
1282 },
1283 ],
1284 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1285 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1286 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1287 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1288 },
1289 ],
1290 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1291 &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.
1292 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1293 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1294 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001295 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1297 &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.
1298 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1299 &quot;warning&quot;: { # [Output Only] Informational warning message.
1300 &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.
1301 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1302 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001303 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001304 &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).
1305 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 },
1307 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001308 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001310 }</pre>
1311</div>
1312
1313<div class="method">
1314 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1315 <pre>Retrieves the next page of results.
1316
1317Args:
1318 previous_request: The request for the previous page. (required)
1319 previous_response: The response from the request for the previous page. (required)
1320
1321Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001322 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001323 page. Returns None if there are no more items in the collection.
1324 </pre>
1325</div>
1326
1327<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001328 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 <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 -07001330
1331Args:
1332 project: string, Project ID for this request. (required)
1333 region: string, Name of the region for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001334 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001335 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001336 The object takes the form of:
1337
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001339 #
1340 # For more information about Cloud Router, read the the Cloud Router overview.
1341 &quot;bgp&quot;: { # BGP information specific to this router.
1342 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1343 &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.
1344 &quot;A String&quot;,
1345 ],
1346 &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.
1347 { # Description-tagged IP ranges for the router to advertise.
1348 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1349 &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 -07001350 },
1351 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001352 &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.
1353 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
1354 },
1355 &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.
1356 {
1357 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1358 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1359 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1360 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1361 # - 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.
1362 &quot;A String&quot;,
1363 ],
1364 &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 -07001365 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1367 &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 -04001368 },
1369 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &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.
1371 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1372 &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. If set, this value must be between 100 and 30000. The default is 300.
1373 &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. If set, this value must be between 100 and 30000. The default is 300.
1374 &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.
1375 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1376 &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.
1377 &quot;sessionInitializationMode&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.
1378 &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 -07001379 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001380 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
1381 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1382 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1383 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1384 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1385 # - 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.
1386 &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.
1387 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1388 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1389 },
1390 ],
1391 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1392 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1393 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1394 &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.
1395 {
1396 &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.
1397 &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.
1398 &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.
1399 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1400 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1401 # - 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.
1402 &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.
1403 },
1404 ],
1405 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1406 &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.
1407 &quot;nats&quot;: [ # A list of NAT services created in this router.
1408 { # 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.
1409 &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.
1410 &quot;A String&quot;,
1411 ],
1412 &quot;enableEndpointIndependentMapping&quot;: True or False,
1413 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1414 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1415 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1416 &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:
1417 # - ERRORS_ONLY: Export logs only for connection failures.
1418 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1419 # - ALL: Export logs for all connections, successful and unsuccessful.
1420 },
1421 &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.
1422 &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.
1423 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1424 # - 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.
1425 # - 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.
1426 &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.
1427 &quot;A String&quot;,
1428 ],
1429 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1430 {
1431 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1432 &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.
1433 &quot;A String&quot;,
1434 ],
1435 &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.
1436 &quot;A String&quot;,
1437 ],
1438 },
1439 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1440 &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.
1441 #
1442 # The following examples are valid match expressions:
1443 #
1444 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1445 #
1446 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1447 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1448 },
1449 ],
1450 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1451 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1452 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1453 # - 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.
1454 &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.
1455 { # Defines the IP ranges that want to use NAT for a subnetwork.
1456 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1457 &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.
1458 &quot;A String&quot;,
1459 ],
1460 &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]
1461 &quot;A String&quot;,
1462 ],
1463 },
1464 ],
1465 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1466 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1467 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1468 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1469 },
1470 ],
1471 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1472 &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.
1473 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1474 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1475}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001476
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 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.
1478
1479For 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.
1480
1481The 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 -07001482
1483Returns:
1484 An object of the form:
1485
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 { # Represents an Operation resource.
1487 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001488 # Google Compute Engine has three Operation resources:
1489 #
1490 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1491 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1493 #
1494 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001495 # - For global operations, use the `globalOperations` resource.
1496 # - For regional operations, use the `regionOperations` resource.
1497 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001498 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001499 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001500 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1501 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1502 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1503 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1504 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1505 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001506 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001507 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1508 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1509 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001510 },
1511 ],
1512 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 &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`.
1514 &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.
1515 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1516 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1517 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1518 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1519 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1520 &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.
1521 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1522 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1523 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1524 &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.
1525 &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`.
1526 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1527 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1528 &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.
1529 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1530 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1531 {
1532 &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.
1533 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1534 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1535 {
1536 &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).
1537 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1538 },
1539 ],
1540 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1541 },
1542 ],
1543 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001544 }</pre>
1545</div>
1546
1547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001548 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001549 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1550
1551Args:
1552 project: string, Project ID for this request. (required)
1553 region: string, Name of the region for this request. (required)
1554 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001555 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001556 The object takes the form of:
1557
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001559 #
1560 # For more information about Cloud Router, read the the Cloud Router overview.
1561 &quot;bgp&quot;: { # BGP information specific to this router.
1562 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1563 &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.
1564 &quot;A String&quot;,
1565 ],
1566 &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.
1567 { # Description-tagged IP ranges for the router to advertise.
1568 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1569 &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 -07001570 },
1571 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 &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.
1573 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
1574 },
1575 &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.
1576 {
1577 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1578 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1579 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1580 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1581 # - 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.
1582 &quot;A String&quot;,
1583 ],
1584 &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 -07001585 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001586 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1587 &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 -04001588 },
1589 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001590 &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.
1591 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1592 &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. If set, this value must be between 100 and 30000. The default is 300.
1593 &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. If set, this value must be between 100 and 30000. The default is 300.
1594 &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.
1595 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1596 &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.
1597 &quot;sessionInitializationMode&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.
1598 &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 -07001599 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
1601 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1602 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1603 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1604 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1605 # - 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.
1606 &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.
1607 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1608 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1609 },
1610 ],
1611 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1612 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1613 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1614 &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.
1615 {
1616 &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.
1617 &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.
1618 &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.
1619 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1620 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1621 # - 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.
1622 &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.
1623 },
1624 ],
1625 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1626 &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.
1627 &quot;nats&quot;: [ # A list of NAT services created in this router.
1628 { # 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.
1629 &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.
1630 &quot;A String&quot;,
1631 ],
1632 &quot;enableEndpointIndependentMapping&quot;: True or False,
1633 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1634 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1635 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1636 &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:
1637 # - ERRORS_ONLY: Export logs only for connection failures.
1638 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1639 # - ALL: Export logs for all connections, successful and unsuccessful.
1640 },
1641 &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.
1642 &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.
1643 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1644 # - 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.
1645 # - 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.
1646 &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.
1647 &quot;A String&quot;,
1648 ],
1649 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1650 {
1651 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1652 &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.
1653 &quot;A String&quot;,
1654 ],
1655 &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.
1656 &quot;A String&quot;,
1657 ],
1658 },
1659 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1660 &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.
1661 #
1662 # The following examples are valid match expressions:
1663 #
1664 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1665 #
1666 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1667 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1668 },
1669 ],
1670 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1671 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1672 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1673 # - 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.
1674 &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.
1675 { # Defines the IP ranges that want to use NAT for a subnetwork.
1676 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1677 &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.
1678 &quot;A String&quot;,
1679 ],
1680 &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]
1681 &quot;A String&quot;,
1682 ],
1683 },
1684 ],
1685 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1686 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1687 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1688 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1689 },
1690 ],
1691 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1692 &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.
1693 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1694 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1695}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001696
1697
1698Returns:
1699 An object of the form:
1700
1701 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
1703 #
1704 # For more information about Cloud Router, read the the Cloud Router overview.
1705 &quot;bgp&quot;: { # BGP information specific to this router.
1706 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1707 &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.
1708 &quot;A String&quot;,
1709 ],
1710 &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.
1711 { # Description-tagged IP ranges for the router to advertise.
1712 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1713 &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 -07001714 },
1715 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 &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.
1717 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001718 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001719 &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.
1720 {
1721 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1722 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1723 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1724 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1725 # - 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.
1726 &quot;A String&quot;,
1727 ],
1728 &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.
1729 { # Description-tagged IP ranges for the router to advertise.
1730 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1731 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1732 },
1733 ],
1734 &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.
1735 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1736 &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. If set, this value must be between 100 and 30000. The default is 300.
1737 &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. If set, this value must be between 100 and 30000. The default is 300.
1738 &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.
1739 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1740 &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.
1741 &quot;sessionInitializationMode&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.
1742 &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.
1743 },
1744 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
1745 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1746 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1747 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1748 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1749 # - 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.
1750 &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.
1751 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1752 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1753 },
1754 ],
1755 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1756 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1757 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1758 &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.
1759 {
1760 &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.
1761 &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.
1762 &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.
1763 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1764 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1765 # - 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.
1766 &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.
1767 },
1768 ],
1769 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1770 &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.
1771 &quot;nats&quot;: [ # A list of NAT services created in this router.
1772 { # 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.
1773 &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.
1774 &quot;A String&quot;,
1775 ],
1776 &quot;enableEndpointIndependentMapping&quot;: True or False,
1777 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1778 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1779 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1780 &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:
1781 # - ERRORS_ONLY: Export logs only for connection failures.
1782 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1783 # - ALL: Export logs for all connections, successful and unsuccessful.
1784 },
1785 &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.
1786 &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.
1787 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1788 # - 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.
1789 # - 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.
1790 &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.
1791 &quot;A String&quot;,
1792 ],
1793 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1794 {
1795 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1796 &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.
1797 &quot;A String&quot;,
1798 ],
1799 &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.
1800 &quot;A String&quot;,
1801 ],
1802 },
1803 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1804 &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.
1805 #
1806 # The following examples are valid match expressions:
1807 #
1808 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1809 #
1810 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1811 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1812 },
1813 ],
1814 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1815 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1816 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1817 # - 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.
1818 &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.
1819 { # Defines the IP ranges that want to use NAT for a subnetwork.
1820 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1821 &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.
1822 &quot;A String&quot;,
1823 ],
1824 &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]
1825 &quot;A String&quot;,
1826 ],
1827 },
1828 ],
1829 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1830 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1831 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1832 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1833 },
1834 ],
1835 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1836 &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.
1837 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1838 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1839 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001840 }</pre>
1841</div>
1842
1843<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001844 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001845 <pre>Returns permissions that a caller has on the specified resource.
1846
1847Args:
1848 project: string, Project ID for this request. (required)
1849 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001850 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001851 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001852 The object takes the form of:
1853
1854{
Bu Sun Kim65020912020-05-20 12:08:20 -07001855 &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.
1856 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001857 ],
1858 }
1859
1860
1861Returns:
1862 An object of the form:
1863
1864 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1866 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001867 ],
1868 }</pre>
1869</div>
1870
1871<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001872 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1873 <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 -07001874
1875Args:
1876 project: string, Project ID for this request. (required)
1877 region: string, Name of the region for this request. (required)
1878 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001879 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001880 The object takes the form of:
1881
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001883 #
1884 # For more information about Cloud Router, read the the Cloud Router overview.
1885 &quot;bgp&quot;: { # BGP information specific to this router.
1886 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1887 &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.
1888 &quot;A String&quot;,
1889 ],
1890 &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.
1891 { # Description-tagged IP ranges for the router to advertise.
1892 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1893 &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 -07001894 },
1895 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001896 &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.
1897 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. 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. 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. If set, this value must be between 1 and 120. The default is 20.
1898 },
1899 &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.
1900 {
1901 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1902 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1903 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1904 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1905 # - 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.
1906 &quot;A String&quot;,
1907 ],
1908 &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 -07001909 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1911 &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 -04001912 },
1913 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001914 &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.
1915 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1916 &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. If set, this value must be between 100 and 30000. The default is 300.
1917 &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. If set, this value must be between 100 and 30000. The default is 300.
1918 &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.
1919 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1920 &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.
1921 &quot;sessionInitializationMode&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.
1922 &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 -07001923 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001924 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. 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.
1925 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1926 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1927 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1928 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1929 # - 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.
1930 &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.
1931 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1932 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1933 },
1934 ],
1935 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1936 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1937 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1938 &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.
1939 {
1940 &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.
1941 &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.
1942 &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.
1943 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1944 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1945 # - 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.
1946 &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.
1947 },
1948 ],
1949 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1950 &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.
1951 &quot;nats&quot;: [ # A list of NAT services created in this router.
1952 { # 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.
1953 &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.
1954 &quot;A String&quot;,
1955 ],
1956 &quot;enableEndpointIndependentMapping&quot;: True or False,
1957 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1958 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1959 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1960 &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:
1961 # - ERRORS_ONLY: Export logs only for connection failures.
1962 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1963 # - ALL: Export logs for all connections, successful and unsuccessful.
1964 },
1965 &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.
1966 &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.
1967 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1968 # - 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.
1969 # - 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.
1970 &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.
1971 &quot;A String&quot;,
1972 ],
1973 &quot;rules&quot;: [ # A list of rules associated with this NAT.
1974 {
1975 &quot;action&quot;: { # The action to be enforced for traffic that matches this rule.
1976 &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.
1977 &quot;A String&quot;,
1978 ],
1979 &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.
1980 &quot;A String&quot;,
1981 ],
1982 },
1983 &quot;description&quot;: &quot;A String&quot;, # An optional description of this rule.
1984 &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.
1985 #
1986 # The following examples are valid match expressions:
1987 #
1988 # &quot;inIpRange(destination.ip, &#x27;1.1.0.0/16&#x27;) || inIpRange(destination.ip, &#x27;2.2.0.0/16&#x27;)&quot;
1989 #
1990 # &quot;destination.ip == &#x27;1.1.0.1&#x27; || destination.ip == &#x27;8.8.8.8&#x27;&quot;
1991 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1992 },
1993 ],
1994 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1995 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1996 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1997 # - 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.
1998 &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.
1999 { # Defines the IP ranges that want to use NAT for a subnetwork.
2000 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
2001 &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.
2002 &quot;A String&quot;,
2003 ],
2004 &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]
2005 &quot;A String&quot;,
2006 ],
2007 },
2008 ],
2009 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
2010 &quot;tcpTimeWaitTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
2011 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
2012 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
2013 },
2014 ],
2015 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
2016 &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.
2017 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2018 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2019}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002020
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 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.
2022
2023For 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.
2024
2025The 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 -07002026
2027Returns:
2028 An object of the form:
2029
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002030 { # Represents an Operation resource.
2031 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 # Google Compute Engine has three Operation resources:
2033 #
2034 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2035 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2037 #
2038 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002039 # - For global operations, use the `globalOperations` resource.
2040 # - For regional operations, use the `regionOperations` resource.
2041 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002042 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002043 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2045 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2046 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2047 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2048 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2049 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002050 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002051 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2052 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2053 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002054 },
2055 ],
2056 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002057 &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`.
2058 &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.
2059 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2060 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2061 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2062 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2063 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2064 &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.
2065 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2066 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2067 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2068 &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.
2069 &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`.
2070 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2071 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2072 &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.
2073 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2074 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2075 {
2076 &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.
2077 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2078 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2079 {
2080 &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).
2081 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2082 },
2083 ],
2084 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2085 },
2086 ],
2087 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002088 }</pre>
2089</div>
2090
2091</body></html>