blob: 75c527cb1c7a679f6eb1623b1e967590a005e685 [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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_v1.html">Compute Engine API</a> . <a href="compute_v1.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070079<p class="firstline">Retrieves an aggregated list of routers.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070088<p class="firstline">Deletes the specified Router resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Retrieves runtime Nat mapping information of VM endpoints.</p>
95<p class="toc_element">
96 <code><a href="#getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070098<p class="toc_element">
99 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
100<p class="firstline">Retrieves runtime information of the specified router.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700103<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700106<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700115<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#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>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700119<h3>Method Details</h3>
120<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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;`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700141 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -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 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700153 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700166 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 &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.
168 {
169 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
170 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
171 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
172 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
173 # - 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.
174 &quot;A String&quot;,
175 ],
176 &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.
177 { # Description-tagged IP ranges for the router to advertise.
178 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
179 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
180 },
181 ],
182 &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.
183 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
184 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
185 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
186 # - MANAGED_BY_USER is the default value and can be managed by you or other users
187 # - 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.
188 &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.
189 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
190 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
191 },
192 ],
193 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
194 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
195 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
196 &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.
197 {
198 &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.
199 &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.
200 &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.
201 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
202 # - MANAGED_BY_USER is the default value and can be managed directly by users.
203 # - 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.
204 &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.
205 },
206 ],
207 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
208 &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.
209 &quot;nats&quot;: [ # A list of NAT services created in this router.
210 { # 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.
211 &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.
212 &quot;A String&quot;,
213 ],
214 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
215 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
216 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
217 &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:
218 # - ERRORS_ONLY: Export logs only for connection failures.
219 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
220 # - ALL: Export logs for all connections, successful and unsuccessful.
221 },
222 &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.
223 &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.
224 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
225 # - 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.
226 # - 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.
227 &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.
228 &quot;A String&quot;,
229 ],
230 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
231 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
232 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
233 # - 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.
234 &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.
235 { # Defines the IP ranges that want to use NAT for a subnetwork.
236 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
237 &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.
238 &quot;A String&quot;,
239 ],
240 &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]
241 &quot;A String&quot;,
242 ],
243 },
244 ],
245 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
246 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
247 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
248 },
249 ],
250 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
251 &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.
252 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
253 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700254 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
256 &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.
257 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
258 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700259 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &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).
261 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700262 },
263 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700265 },
266 },
267 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
269 &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.
270 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700271 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
272 &quot;A String&quot;,
273 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &quot;warning&quot;: { # [Output Only] Informational warning message.
275 &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.
276 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
277 # &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 -0700278 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &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).
280 &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 -0700281 },
282 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &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 -0700284 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700285 }</pre>
286</div>
287
288<div class="method">
289 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
290 <pre>Retrieves the next page of results.
291
292Args:
293 previous_request: The request for the previous page. (required)
294 previous_response: The response from the request for the previous page. (required)
295
296Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700298 page. Returns None if there are no more items in the collection.
299 </pre>
300</div>
301
302<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700303 <code class="details" id="close">close()</code>
304 <pre>Close httplib2 connections.</pre>
305</div>
306
307<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700309 <pre>Deletes the specified Router resource.
310
311Args:
312 project: string, Project ID for this request. (required)
313 region: string, Name of the region for this request. (required)
314 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 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.
316
317For 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.
318
319The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700320
321Returns:
322 An object of the form:
323
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 { # Represents an Operation resource.
325 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700326 # Google Compute Engine has three Operation resources:
327 #
328 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
329 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
331 #
332 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 # - For global operations, use the `globalOperations` resource.
334 # - For regional operations, use the `regionOperations` resource.
335 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 # 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 -0700338 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
339 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
340 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
341 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
342 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
343 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700344 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
346 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
347 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700348 },
349 ],
350 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &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`.
352 &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.
353 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
354 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
355 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
356 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
357 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
358 &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.
359 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
360 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
361 &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.
362 &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`.
363 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
364 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
365 &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.
366 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
367 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
368 {
369 &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.
370 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
371 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
372 {
373 &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).
374 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
375 },
376 ],
377 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
378 },
379 ],
380 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700387
388Args:
389 project: string, Project ID for this request. (required)
390 region: string, Name of the region for this request. (required)
391 router: string, Name of the Router resource to return. (required)
392
393Returns:
394 An object of the form:
395
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700398 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &quot;bgp&quot;: { # BGP information specific to this router.
400 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
401 &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.
402 &quot;A String&quot;,
403 ],
404 &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.
405 { # Description-tagged IP ranges for the router to advertise.
406 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
407 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 },
409 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &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.
411 },
412 &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.
413 {
414 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
415 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
416 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
417 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
418 # - 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.
419 &quot;A String&quot;,
420 ],
421 &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 -0700422 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
424 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 },
426 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 &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.
428 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
429 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
430 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
431 # - MANAGED_BY_USER is the default value and can be managed by you or other users
432 # - 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.
433 &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.
434 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
435 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700436 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 ],
438 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
439 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
440 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
441 &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.
442 {
443 &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.
444 &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.
445 &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.
446 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
447 # - MANAGED_BY_USER is the default value and can be managed directly by users.
448 # - 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.
449 &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.
450 },
451 ],
452 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
453 &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.
454 &quot;nats&quot;: [ # A list of NAT services created in this router.
455 { # 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.
456 &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.
457 &quot;A String&quot;,
458 ],
459 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
460 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
461 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
462 &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:
463 # - ERRORS_ONLY: Export logs only for connection failures.
464 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
465 # - ALL: Export logs for all connections, successful and unsuccessful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700466 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &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.
468 &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.
469 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
470 # - 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.
471 # - 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.
472 &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.
473 &quot;A String&quot;,
474 ],
475 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
476 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
477 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
478 # - 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.
479 &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.
480 { # Defines the IP ranges that want to use NAT for a subnetwork.
481 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
482 &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.
483 &quot;A String&quot;,
484 ],
485 &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]
486 &quot;A String&quot;,
487 ],
488 },
489 ],
490 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
491 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
492 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
493 },
494 ],
495 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
496 &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.
497 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
498 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700499</div>
500
501<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700502 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 <pre>Retrieves runtime Nat mapping information of VM endpoints.
504
505Args:
506 project: string, Project ID for this request. (required)
507 region: string, Name of the region for this request. (required)
508 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 -0700509 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 -0700510
Dan O'Mearadd494642020-05-01 07:42:23 -0700511For 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 -0700512
Dan O'Mearadd494642020-05-01 07:42:23 -0700513You 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 -0700514
Bu Sun Kim65020912020-05-20 12:08:20 -0700515To 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) ```
516 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`)
517 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
518
519You 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.
520
521Currently, only sorting by `name` or `creationTimestamp desc` is supported.
522 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700523 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 -0700524
525Returns:
526 An object of the form:
527
528 { # Contains a list of VmEndpointNatMappings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
530 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
531 &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.
532 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
535 &quot;interfaceNatMappings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 { # Contain information of Nat mapping for an interface of this endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700537 &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;].
538 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 &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;].
541 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &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.
544 &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.
545 &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;.
546 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 },
548 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 },
550 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700551 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
552 &quot;warning&quot;: { # [Output Only] Informational warning message.
553 &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.
554 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
555 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
556 {
557 &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).
558 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
559 },
560 ],
561 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
562 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 }</pre>
564</div>
565
566<div class="method">
567 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
568 <pre>Retrieves the next page of results.
569
570Args:
571 previous_request: The request for the previous page. (required)
572 previous_response: The response from the request for the previous page. (required)
573
574Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 page. Returns None if there are no more items in the collection.
577 </pre>
578</div>
579
580<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700581 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
582 <pre>Retrieves runtime information of the specified router.
583
584Args:
585 project: string, Project ID for this request. (required)
586 region: string, Name of the region for this request. (required)
587 router: string, Name of the Router resource to query. (required)
588
589Returns:
590 An object of the form:
591
592 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
594 &quot;result&quot;: {
595 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
596 { # Represents a Route resource.
597 #
598 # 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 ==)
599 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
600 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
601 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
602 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
603 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
604 &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.
605 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
606 &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
607 &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:
608 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
609 # - regions/region/forwardingRules/forwardingRule
610 &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:
611 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
612 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
613 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
614 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
615 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
616 &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.
617 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
618 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
619 &quot;A String&quot;,
620 ],
621 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
622 {
623 &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.
624 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
625 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
626 {
627 &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).
628 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
629 },
630 ],
631 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
632 },
633 ],
634 },
635 ],
636 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
637 { # Represents a Route resource.
638 #
639 # 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 ==)
640 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
641 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
642 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
643 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
644 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
645 &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.
646 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
647 &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
648 &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:
649 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
650 # - regions/region/forwardingRules/forwardingRule
651 &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:
652 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
653 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
654 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
655 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
656 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
657 &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.
658 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
659 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
660 &quot;A String&quot;,
661 ],
662 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
663 {
664 &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.
665 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
666 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
667 {
668 &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).
669 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
670 },
671 ],
672 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
673 },
674 ],
675 },
676 ],
677 &quot;bgpPeerStatus&quot;: [
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700678 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700681 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700682 # 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 -0700683 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
684 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
685 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
686 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
687 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
688 &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.
689 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
690 &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
691 &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:
Dan O'Mearadd494642020-05-01 07:42:23 -0700692 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
693 # - regions/region/forwardingRules/forwardingRule
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &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:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700695 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
697 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
698 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
699 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
700 &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.
701 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
702 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
703 &quot;A String&quot;,
704 ],
705 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700706 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 &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.
708 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
709 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700710 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &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).
712 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700713 },
714 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400716 },
717 ],
718 },
719 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
721 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
722 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
723 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
724 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
725 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
726 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
727 &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
728 &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 -0700729 },
730 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 &quot;natStatus&quot;: [
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700732 { # Status of a NAT contained in this router.
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
734 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 &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;].
737 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700738 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 &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;].
740 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &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.
743 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
744 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
745 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
746 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
749 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700750 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400751 },
752 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700754 },
755 }</pre>
756</div>
757
758<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700759 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700760 <pre>Creates a Router resource in the specified project and region using the data included in the request.
761
762Args:
763 project: string, Project ID for this request. (required)
764 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700766 The object takes the form of:
767
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700770 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 &quot;bgp&quot;: { # BGP information specific to this router.
772 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
773 &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.
774 &quot;A String&quot;,
775 ],
776 &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.
777 { # Description-tagged IP ranges for the router to advertise.
778 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
779 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 },
781 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 &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.
783 },
784 &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.
785 {
786 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
787 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
788 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
789 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
790 # - 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.
791 &quot;A String&quot;,
792 ],
793 &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 -0700794 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
796 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 },
798 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 &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.
800 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
801 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
802 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
803 # - MANAGED_BY_USER is the default value and can be managed by you or other users
804 # - 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.
805 &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.
806 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
807 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700808 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 ],
810 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
811 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
812 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
813 &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.
814 {
815 &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.
816 &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.
817 &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.
818 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
819 # - MANAGED_BY_USER is the default value and can be managed directly by users.
820 # - 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.
821 &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.
822 },
823 ],
824 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
825 &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.
826 &quot;nats&quot;: [ # A list of NAT services created in this router.
827 { # 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.
828 &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.
829 &quot;A String&quot;,
830 ],
831 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
832 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
833 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
834 &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:
835 # - ERRORS_ONLY: Export logs only for connection failures.
836 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
837 # - ALL: Export logs for all connections, successful and unsuccessful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700838 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 &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.
840 &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.
841 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
842 # - 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.
843 # - 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.
844 &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.
845 &quot;A String&quot;,
846 ],
847 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
848 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
849 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
850 # - 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.
851 &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.
852 { # Defines the IP ranges that want to use NAT for a subnetwork.
853 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
854 &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.
855 &quot;A String&quot;,
856 ],
857 &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]
858 &quot;A String&quot;,
859 ],
860 },
861 ],
862 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
863 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
864 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
865 },
866 ],
867 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
868 &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.
869 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
870}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700871
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 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.
873
874For 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.
875
876The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700877
878Returns:
879 An object of the form:
880
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881 { # Represents an Operation resource.
882 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 # Google Compute Engine has three Operation resources:
884 #
885 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
886 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
888 #
889 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 # - For global operations, use the `globalOperations` resource.
891 # - For regional operations, use the `regionOperations` resource.
892 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 # 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 -0700895 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
896 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
897 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
898 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
899 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
900 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700901 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
903 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
904 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700905 },
906 ],
907 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &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`.
909 &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.
910 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
911 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
912 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
913 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
914 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
915 &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.
916 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
917 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
918 &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.
919 &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`.
920 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
921 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
922 &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.
923 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
924 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
925 {
926 &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.
927 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
928 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
929 {
930 &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).
931 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
932 },
933 ],
934 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
935 },
936 ],
937 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700938 }</pre>
939</div>
940
941<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700942 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700943 <pre>Retrieves a list of Router resources available to the specified project.
944
945Args:
946 project: string, Project ID for this request. (required)
947 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700948 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;`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700949
Dan O'Mearadd494642020-05-01 07:42:23 -0700950For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700951
Dan O'Mearadd494642020-05-01 07:42:23 -0700952You 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700953
Bu Sun Kim65020912020-05-20 12:08:20 -0700954To 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) ```
955 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`)
956 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
957
958You 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.
959
960Currently, only sorting by `name` or `creationTimestamp desc` is supported.
961 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700962 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700963
964Returns:
965 An object of the form:
966
967 { # Contains a list of Router resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
969 &quot;items&quot;: [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700972 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 &quot;bgp&quot;: { # BGP information specific to this router.
974 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
975 &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.
976 &quot;A String&quot;,
977 ],
978 &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.
979 { # Description-tagged IP ranges for the router to advertise.
980 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
981 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 },
983 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700985 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &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.
987 {
988 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
989 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
990 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
991 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
992 # - 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.
993 &quot;A String&quot;,
994 ],
995 &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.
996 { # Description-tagged IP ranges for the router to advertise.
997 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
998 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
999 },
1000 ],
1001 &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.
1002 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1003 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1004 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1005 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1006 # - 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.
1007 &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.
1008 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1009 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1010 },
1011 ],
1012 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1013 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1014 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1015 &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.
1016 {
1017 &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.
1018 &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.
1019 &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.
1020 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1021 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1022 # - 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.
1023 &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.
1024 },
1025 ],
1026 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1027 &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.
1028 &quot;nats&quot;: [ # A list of NAT services created in this router.
1029 { # 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.
1030 &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.
1031 &quot;A String&quot;,
1032 ],
1033 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1034 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1035 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1036 &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:
1037 # - ERRORS_ONLY: Export logs only for connection failures.
1038 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1039 # - ALL: Export logs for all connections, successful and unsuccessful.
1040 },
1041 &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.
1042 &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.
1043 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1044 # - 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.
1045 # - 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.
1046 &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.
1047 &quot;A String&quot;,
1048 ],
1049 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1050 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1051 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1052 # - 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.
1053 &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.
1054 { # Defines the IP ranges that want to use NAT for a subnetwork.
1055 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1056 &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.
1057 &quot;A String&quot;,
1058 ],
1059 &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]
1060 &quot;A String&quot;,
1061 ],
1062 },
1063 ],
1064 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1065 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1066 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1067 },
1068 ],
1069 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1070 &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.
1071 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1072 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001073 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1075 &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.
1076 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1077 &quot;warning&quot;: { # [Output Only] Informational warning message.
1078 &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.
1079 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1080 # &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 -07001081 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 &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).
1083 &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 -07001084 },
1085 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &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 -07001087 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001088 }</pre>
1089</div>
1090
1091<div class="method">
1092 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1093 <pre>Retrieves the next page of results.
1094
1095Args:
1096 previous_request: The request for the previous page. (required)
1097 previous_response: The response from the request for the previous page. (required)
1098
1099Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001100 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001101 page. Returns None if there are no more items in the collection.
1102 </pre>
1103</div>
1104
1105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001106 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 <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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001108
1109Args:
1110 project: string, Project ID for this request. (required)
1111 region: string, Name of the region for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001112 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001113 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001114 The object takes the form of:
1115
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001116{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001118 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 &quot;bgp&quot;: { # BGP information specific to this router.
1120 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1121 &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.
1122 &quot;A String&quot;,
1123 ],
1124 &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.
1125 { # Description-tagged IP ranges for the router to advertise.
1126 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1127 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001128 },
1129 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 &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.
1131 },
1132 &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.
1133 {
1134 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1135 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1136 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1137 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1138 # - 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.
1139 &quot;A String&quot;,
1140 ],
1141 &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 -07001142 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001143 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1144 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 },
1146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &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.
1148 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1149 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1150 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1151 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1152 # - 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.
1153 &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.
1154 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1155 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001156 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 ],
1158 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1159 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1160 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1161 &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.
1162 {
1163 &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.
1164 &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.
1165 &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.
1166 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1167 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1168 # - 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.
1169 &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.
1170 },
1171 ],
1172 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1173 &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.
1174 &quot;nats&quot;: [ # A list of NAT services created in this router.
1175 { # 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.
1176 &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.
1177 &quot;A String&quot;,
1178 ],
1179 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1180 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1181 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1182 &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:
1183 # - ERRORS_ONLY: Export logs only for connection failures.
1184 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1185 # - ALL: Export logs for all connections, successful and unsuccessful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001186 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001187 &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.
1188 &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.
1189 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1190 # - 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.
1191 # - 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.
1192 &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.
1193 &quot;A String&quot;,
1194 ],
1195 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1196 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1197 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1198 # - 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.
1199 &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.
1200 { # Defines the IP ranges that want to use NAT for a subnetwork.
1201 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1202 &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.
1203 &quot;A String&quot;,
1204 ],
1205 &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]
1206 &quot;A String&quot;,
1207 ],
1208 },
1209 ],
1210 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1211 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1212 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1213 },
1214 ],
1215 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1216 &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.
1217 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1218}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001219
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 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.
1221
1222For 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.
1223
1224The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001225
1226Returns:
1227 An object of the form:
1228
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001229 { # Represents an Operation resource.
1230 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001231 # Google Compute Engine has three Operation resources:
1232 #
1233 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1234 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001235 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1236 #
1237 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001238 # - For global operations, use the `globalOperations` resource.
1239 # - For regional operations, use the `regionOperations` resource.
1240 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001242 # 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 -07001243 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1244 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1245 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1246 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1247 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1248 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001249 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001250 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1251 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1252 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001253 },
1254 ],
1255 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001256 &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`.
1257 &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.
1258 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1259 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1260 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1261 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1262 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1263 &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.
1264 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1265 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1266 &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.
1267 &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`.
1268 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1269 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1270 &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.
1271 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1272 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1273 {
1274 &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.
1275 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1276 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1277 {
1278 &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).
1279 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1280 },
1281 ],
1282 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1283 },
1284 ],
1285 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001286 }</pre>
1287</div>
1288
1289<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001290 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001291 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1292
1293Args:
1294 project: string, Project ID for this request. (required)
1295 region: string, Name of the region for this request. (required)
1296 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001297 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001298 The object takes the form of:
1299
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001300{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001301 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001302 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 &quot;bgp&quot;: { # BGP information specific to this router.
1304 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1305 &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.
1306 &quot;A String&quot;,
1307 ],
1308 &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.
1309 { # Description-tagged IP ranges for the router to advertise.
1310 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1311 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001312 },
1313 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 &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.
1315 },
1316 &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.
1317 {
1318 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1319 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1320 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1321 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1322 # - 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.
1323 &quot;A String&quot;,
1324 ],
1325 &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 -07001326 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1328 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 },
1330 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001331 &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.
1332 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1333 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1334 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1335 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1336 # - 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.
1337 &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.
1338 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1339 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001340 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 ],
1342 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1343 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1344 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1345 &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.
1346 {
1347 &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.
1348 &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.
1349 &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.
1350 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1351 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1352 # - 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.
1353 &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.
1354 },
1355 ],
1356 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1357 &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.
1358 &quot;nats&quot;: [ # A list of NAT services created in this router.
1359 { # 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.
1360 &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.
1361 &quot;A String&quot;,
1362 ],
1363 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1364 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1365 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1366 &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:
1367 # - ERRORS_ONLY: Export logs only for connection failures.
1368 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1369 # - ALL: Export logs for all connections, successful and unsuccessful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001370 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001371 &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.
1372 &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.
1373 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1374 # - 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.
1375 # - 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.
1376 &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.
1377 &quot;A String&quot;,
1378 ],
1379 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1380 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1381 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1382 # - 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.
1383 &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.
1384 { # Defines the IP ranges that want to use NAT for a subnetwork.
1385 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1386 &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.
1387 &quot;A String&quot;,
1388 ],
1389 &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]
1390 &quot;A String&quot;,
1391 ],
1392 },
1393 ],
1394 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1395 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1396 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1397 },
1398 ],
1399 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1400 &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.
1401 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1402}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001403
1404
1405Returns:
1406 An object of the form:
1407
1408 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001409 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
1410 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001411 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001412 &quot;bgp&quot;: { # BGP information specific to this router.
1413 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1414 &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.
1415 &quot;A String&quot;,
1416 ],
1417 &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.
1418 { # Description-tagged IP ranges for the router to advertise.
1419 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1420 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001421 },
1422 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001424 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &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.
1426 {
1427 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1428 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1429 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1430 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1431 # - 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.
1432 &quot;A String&quot;,
1433 ],
1434 &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.
1435 { # Description-tagged IP ranges for the router to advertise.
1436 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1437 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1438 },
1439 ],
1440 &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.
1441 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1442 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1443 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1444 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1445 # - 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.
1446 &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.
1447 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1448 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1449 },
1450 ],
1451 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1452 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1453 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1454 &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.
1455 {
1456 &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.
1457 &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.
1458 &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.
1459 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1460 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1461 # - 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.
1462 &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.
1463 },
1464 ],
1465 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1466 &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.
1467 &quot;nats&quot;: [ # A list of NAT services created in this router.
1468 { # 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.
1469 &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.
1470 &quot;A String&quot;,
1471 ],
1472 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1473 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1474 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1475 &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:
1476 # - ERRORS_ONLY: Export logs only for connection failures.
1477 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1478 # - ALL: Export logs for all connections, successful and unsuccessful.
1479 },
1480 &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.
1481 &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.
1482 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1483 # - 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.
1484 # - 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.
1485 &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.
1486 &quot;A String&quot;,
1487 ],
1488 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1489 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1490 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1491 # - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.
1492 &quot;subnetworks&quot;: [ # A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
1493 { # Defines the IP ranges that want to use NAT for a subnetwork.
1494 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1495 &quot;secondaryIpRangeNames&quot;: [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if &quot;LIST_OF_SECONDARY_IP_RANGES&quot; is one of the values in source_ip_ranges_to_nat.
1496 &quot;A String&quot;,
1497 ],
1498 &quot;sourceIpRangesToNat&quot;: [ # Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [&quot;PRIMARY_IP_RANGE&quot;, &quot;LIST_OF_SECONDARY_IP_RANGES&quot;] Default: [ALL_IP_RANGES]
1499 &quot;A String&quot;,
1500 ],
1501 },
1502 ],
1503 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1504 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1505 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1506 },
1507 ],
1508 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1509 &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.
1510 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1511 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001512 }</pre>
1513</div>
1514
1515<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001516 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1517 <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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001518
1519Args:
1520 project: string, Project ID for this request. (required)
1521 region: string, Name of the region for this request. (required)
1522 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001524 The object takes the form of:
1525
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001528 # For more information about Cloud Router, read the Cloud Router overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001529 &quot;bgp&quot;: { # BGP information specific to this router.
1530 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1531 &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.
1532 &quot;A String&quot;,
1533 ],
1534 &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.
1535 { # Description-tagged IP ranges for the router to advertise.
1536 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1537 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001538 },
1539 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001540 &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.
1541 },
1542 &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.
1543 {
1544 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1545 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1546 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1547 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1548 # - 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.
1549 &quot;A String&quot;,
1550 ],
1551 &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 -07001552 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001553 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1554 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001555 },
1556 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &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.
1558 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1559 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1560 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1561 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1562 # - 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.
1563 &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.
1564 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1565 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001566 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001567 ],
1568 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1569 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1570 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1571 &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.
1572 {
1573 &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.
1574 &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.
1575 &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.
1576 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1577 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1578 # - 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.
1579 &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.
1580 },
1581 ],
1582 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1583 &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.
1584 &quot;nats&quot;: [ # A list of NAT services created in this router.
1585 { # 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.
1586 &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.
1587 &quot;A String&quot;,
1588 ],
1589 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1590 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1591 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1592 &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:
1593 # - ERRORS_ONLY: Export logs only for connection failures.
1594 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1595 # - ALL: Export logs for all connections, successful and unsuccessful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001596 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001597 &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.
1598 &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.
1599 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1600 # - 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.
1601 # - 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.
1602 &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.
1603 &quot;A String&quot;,
1604 ],
1605 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1606 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1607 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1608 # - 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.
1609 &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.
1610 { # Defines the IP ranges that want to use NAT for a subnetwork.
1611 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1612 &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.
1613 &quot;A String&quot;,
1614 ],
1615 &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]
1616 &quot;A String&quot;,
1617 ],
1618 },
1619 ],
1620 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1621 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1622 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1623 },
1624 ],
1625 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1626 &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.
1627 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1628}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001629
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001630 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.
1631
1632For 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.
1633
1634The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001635
1636Returns:
1637 An object of the form:
1638
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 { # Represents an Operation resource.
1640 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001641 # Google Compute Engine has three Operation resources:
1642 #
1643 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1644 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001645 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1646 #
1647 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001648 # - For global operations, use the `globalOperations` resource.
1649 # - For regional operations, use the `regionOperations` resource.
1650 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001651 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001652 # 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 -07001653 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1654 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1655 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1656 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1657 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1658 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001659 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1661 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1662 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001663 },
1664 ],
1665 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 &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`.
1667 &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.
1668 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1669 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1670 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1671 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1672 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1673 &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.
1674 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1675 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1676 &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.
1677 &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`.
1678 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1679 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1680 &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.
1681 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1682 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1683 {
1684 &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.
1685 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1686 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1687 {
1688 &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).
1689 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1690 },
1691 ],
1692 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1693 },
1694 ],
1695 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001696 }</pre>
1697</div>
1698
1699</body></html>