blob: 21116f9b27ecf2861c42006e98f9c652f57954a4 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of routers.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified Router resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, natName=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Retrieves runtime Nat mapping information of VM endpoints.</p>
92<p class="toc_element">
93 <code><a href="#getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
96 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
97<p class="firstline">Retrieves runtime information of the specified router.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#update">update(project, region, router, body=None, requestId=None)</a></code></p>
118<p class="firstline">Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119<h3>Method Details</h3>
120<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122 <pre>Retrieves an aggregated list of routers.
123
124Args:
125 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700127
Dan O'Mearadd494642020-05-01 07:42:23 -0700128For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129
Dan O'Mearadd494642020-05-01 07:42:23 -0700130You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700131
Bu Sun Kim65020912020-05-20 12:08:20 -0700132To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
135 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
136
137You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
138
139Currently, only sorting by `name` or `creationTimestamp desc` is supported.
140 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141
142Returns:
143 An object of the form:
144
145 { # Contains a list of routers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
147 &quot;items&quot;: { # A list of Router resources.
148 &quot;a_key&quot;: { # Name of the scope containing this set of routers.
149 &quot;routers&quot;: [ # A list of routers contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 #
152 # For more information about Cloud Router, read the the Cloud Router overview.
153 &quot;bgp&quot;: { # BGP information specific to this router.
154 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
155 &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.
156 &quot;A String&quot;,
157 ],
158 &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.
159 { # Description-tagged IP ranges for the router to advertise.
160 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
161 &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 -0700162 },
163 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &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.
165 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -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;bfd&quot;: { # BFD configuration for the BGP peering.
184 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
185 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
186 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
187 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
188 },
189 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
190 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
191 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
192 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
193 # - MANAGED_BY_USER is the default value and can be managed by you or other users
194 # - 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.
195 &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.
196 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
197 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
198 },
199 ],
200 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
201 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
202 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
203 &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.
204 {
205 &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.
206 &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.
207 &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.
208 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
209 # - MANAGED_BY_USER is the default value and can be managed directly by users.
210 # - 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.
211 &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.
212 },
213 ],
214 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
215 &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.
216 &quot;nats&quot;: [ # A list of NAT services created in this router.
217 { # 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.
218 &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.
219 &quot;A String&quot;,
220 ],
221 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
222 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
223 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
224 &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:
225 # - ERRORS_ONLY: Export logs only for connection failures.
226 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
227 # - ALL: Export logs for all connections, successful and unsuccessful.
228 },
229 &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.
230 &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.
231 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
232 # - 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.
233 # - 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.
234 &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.
235 &quot;A String&quot;,
236 ],
237 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
238 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
239 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
240 # - 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.
241 &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.
242 { # Defines the IP ranges that want to use NAT for a subnetwork.
243 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
244 &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.
245 &quot;A String&quot;,
246 ],
247 &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]
248 &quot;A String&quot;,
249 ],
250 },
251 ],
252 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
253 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
254 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
255 },
256 ],
257 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
258 &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.
259 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
260 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700261 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;warning&quot;: { # Informational warning which replaces the list of routers when the list is empty.
263 &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.
264 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
265 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700266 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &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).
268 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 },
270 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700272 },
273 },
274 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 &quot;kind&quot;: &quot;compute#routerAggregatedList&quot;, # Type of resource.
276 &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.
277 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
278 &quot;warning&quot;: { # [Output Only] Informational warning message.
279 &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.
280 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
281 # &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 -0700282 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &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).
284 &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 -0700285 },
286 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &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 -0700288 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
294 <pre>Retrieves the next page of results.
295
296Args:
297 previous_request: The request for the previous page. (required)
298 previous_response: The response from the request for the previous page. (required)
299
300Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700302 page. Returns None if there are no more items in the collection.
303 </pre>
304</div>
305
306<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 <pre>Deletes the specified Router resource.
309
310Args:
311 project: string, Project ID for this request. (required)
312 region: string, Name of the region for this request. (required)
313 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 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.
315
316For 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.
317
318The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319
320Returns:
321 An object of the form:
322
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700323 { # Represents an Operation resource.
324 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 # Google Compute Engine has three Operation resources:
326 #
327 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
328 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
330 #
331 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 # - For global operations, use the `globalOperations` resource.
333 # - For regional operations, use the `regionOperations` resource.
334 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 # 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 -0700337 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
338 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
339 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
340 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
341 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
342 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700343 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
345 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
346 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347 },
348 ],
349 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 &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`.
351 &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.
352 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
353 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
354 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
355 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
356 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
357 &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.
358 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
359 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
360 &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.
361 &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`.
362 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
363 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
364 &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.
365 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
366 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
367 {
368 &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.
369 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
370 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
371 {
372 &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).
373 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
374 },
375 ],
376 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
377 },
378 ],
379 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700380 }</pre>
381</div>
382
383<div class="method">
384 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700386
387Args:
388 project: string, Project ID for this request. (required)
389 region: string, Name of the region for this request. (required)
390 router: string, Name of the Router resource to return. (required)
391
392Returns:
393 An object of the form:
394
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 #
397 # For more information about Cloud Router, read the the Cloud Router overview.
398 &quot;bgp&quot;: { # BGP information specific to this router.
399 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
400 &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.
401 &quot;A String&quot;,
402 ],
403 &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.
404 { # Description-tagged IP ranges for the router to advertise.
405 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
406 &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 -0700407 },
408 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &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.
410 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
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;bfd&quot;: { # BFD configuration for the BGP peering.
429 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
430 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
431 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
432 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700433 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
435 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
436 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
437 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
438 # - MANAGED_BY_USER is the default value and can be managed by you or other users
439 # - 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.
440 &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.
441 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
442 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
443 },
444 ],
445 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
446 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
447 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
448 &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.
449 {
450 &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.
451 &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.
452 &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.
453 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
454 # - MANAGED_BY_USER is the default value and can be managed directly by users.
455 # - 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.
456 &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.
457 },
458 ],
459 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
460 &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.
461 &quot;nats&quot;: [ # A list of NAT services created in this router.
462 { # 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.
463 &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.
464 &quot;A String&quot;,
465 ],
466 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
467 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
468 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
469 &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:
470 # - ERRORS_ONLY: Export logs only for connection failures.
471 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
472 # - ALL: Export logs for all connections, successful and unsuccessful.
473 },
474 &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.
475 &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.
476 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
477 # - 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.
478 # - 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.
479 &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.
480 &quot;A String&quot;,
481 ],
482 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
483 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
484 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
485 # - 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.
486 &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.
487 { # Defines the IP ranges that want to use NAT for a subnetwork.
488 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
489 &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.
490 &quot;A String&quot;,
491 ],
492 &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]
493 &quot;A String&quot;,
494 ],
495 },
496 ],
497 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
498 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
499 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
500 },
501 ],
502 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
503 &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.
504 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
505 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700506</div>
507
508<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, filter=None, maxResults=None, natName=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 <pre>Retrieves runtime Nat mapping information of VM endpoints.
511
512Args:
513 project: string, Project ID for this request. (required)
514 region: string, Name of the region for this request. (required)
515 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 -0700516 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 -0700517
Dan O'Mearadd494642020-05-01 07:42:23 -0700518For 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 -0700519
Dan O'Mearadd494642020-05-01 07:42:23 -0700520You 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 -0700521
Bu Sun Kim65020912020-05-20 12:08:20 -0700522To 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) ```
523 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`)
524 natName: string, Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
525 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
526
527You 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.
528
529Currently, only sorting by `name` or `creationTimestamp desc` is supported.
530 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531
532Returns:
533 An object of the form:
534
535 { # Contains a list of VmEndpointNatMappings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
537 &quot;kind&quot;: &quot;compute#vmEndpointNatMappingsList&quot;, # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
538 &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.
539 &quot;result&quot;: [ # [Output Only] A list of Nat mapping information of VM endpoints.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;instanceName&quot;: &quot;A String&quot;, # Name of the VM instance which the endpoint belongs to
542 &quot;interfaceNatMappings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 { # Contain information of Nat mapping for an interface of this endpoint.
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &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;].
545 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &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;].
548 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700549 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &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.
551 &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.
552 &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;.
553 &quot;sourceVirtualIp&quot;: &quot;A String&quot;, # Primary IP of the VM for this NIC.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 },
555 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 },
557 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
559 &quot;warning&quot;: { # [Output Only] Informational warning message.
560 &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.
561 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
562 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
563 {
564 &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).
565 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
566 },
567 ],
568 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
569 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 }</pre>
571</div>
572
573<div class="method">
574 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
575 <pre>Retrieves the next page of results.
576
577Args:
578 previous_request: The request for the previous page. (required)
579 previous_response: The response from the request for the previous page. (required)
580
581Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 page. Returns None if there are no more items in the collection.
584 </pre>
585</div>
586
587<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700588 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
589 <pre>Retrieves runtime information of the specified router.
590
591Args:
592 project: string, Project ID for this request. (required)
593 region: string, Name of the region for this request. (required)
594 router: string, Name of the Router resource to query. (required)
595
596Returns:
597 An object of the form:
598
599 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700600 &quot;kind&quot;: &quot;compute#routerStatusResponse&quot;, # Type of resource.
601 &quot;result&quot;: {
602 &quot;bestRoutes&quot;: [ # Best routes for this router&#x27;s network.
603 { # Represents a Route resource.
604 #
605 # 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 ==)
606 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
607 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
608 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
609 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
610 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
611 &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.
612 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
613 &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
614 &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:
615 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
616 # - regions/region/forwardingRules/forwardingRule
617 &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:
618 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
619 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
620 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
621 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
622 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
623 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
624 &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.
625 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
626 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
627 &quot;A String&quot;,
628 ],
629 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
630 {
631 &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.
632 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
633 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
634 {
635 &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).
636 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
637 },
638 ],
639 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
640 },
641 ],
642 },
643 ],
644 &quot;bestRoutesForRouter&quot;: [ # Best routes learned by this router.
645 { # Represents a Route resource.
646 #
647 # 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 ==)
648 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
649 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
650 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
651 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
652 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
653 &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.
654 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
655 &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
656 &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:
657 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
658 # - regions/region/forwardingRules/forwardingRule
659 &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:
660 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
661 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
662 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
663 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
664 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
665 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
666 &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.
667 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
668 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
669 &quot;A String&quot;,
670 ],
671 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
672 {
673 &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.
674 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
675 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
676 {
677 &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).
678 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
679 },
680 ],
681 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
682 },
683 ],
684 },
685 ],
686 &quot;bgpPeerStatus&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700687 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;advertisedRoutes&quot;: [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 { # Represents a Route resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700690 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 # 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 -0700692 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
693 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
694 &quot;destRange&quot;: &quot;A String&quot;, # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
695 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
696 &quot;kind&quot;: &quot;compute#route&quot;, # [Output Only] Type of this resource. Always compute#routes for Route resources.
697 &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.
698 &quot;network&quot;: &quot;A String&quot;, # Fully-qualified URL of the network that this route applies to.
699 &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
700 &quot;nextHopIlb&quot;: &quot;A String&quot;, # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700702 # - regions/region/forwardingRules/forwardingRule
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &quot;nextHopInstance&quot;: &quot;A String&quot;, # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700704 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 &quot;nextHopInterconnectAttachment&quot;: &quot;A String&quot;, # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
706 &quot;nextHopIp&quot;: &quot;A String&quot;, # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
707 &quot;nextHopNetwork&quot;: &quot;A String&quot;, # The URL of the local network if it should handle matching packets.
708 &quot;nextHopPeering&quot;: &quot;A String&quot;, # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
709 &quot;nextHopVpnTunnel&quot;: &quot;A String&quot;, # The URL to a VpnTunnel that should handle matching packets.
710 &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.
711 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
712 &quot;tags&quot;: [ # A list of instance tags to which this route applies.
713 &quot;A String&quot;,
714 ],
715 &quot;warnings&quot;: [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700716 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &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.
718 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
719 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700720 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &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).
722 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700723 },
724 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400726 },
727 ],
728 },
729 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;bfdStatus&quot;: { # Next free: 15
731 &quot;bfdSessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.
732 &quot;configUpdateTimestampMicros&quot;: &quot;A String&quot;, # Unix timestamp of the most recent config update.
733 &quot;controlPacketCounts&quot;: { # Control packet counts for the current BFD session.
734 &quot;numRx&quot;: 42, # Number of packets received since the beginning of the current BFD session.
735 &quot;numRxRejected&quot;: 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
736 &quot;numRxSuccessful&quot;: 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
737 &quot;numTx&quot;: 42, # Number of packets transmitted since the beginning of the current BFD session.
738 },
739 &quot;controlPacketIntervals&quot;: [ # Inter-packet time interval statistics for control packets.
740 { # Next free: 7
741 &quot;avgMs&quot;: &quot;A String&quot;, # Average observed inter-packet interval in milliseconds.
742 &quot;duration&quot;: &quot;A String&quot;, # From how long ago in the past these intervals were observed.
743 &quot;maxMs&quot;: &quot;A String&quot;, # Maximum observed inter-packet interval in milliseconds.
744 &quot;minMs&quot;: &quot;A String&quot;, # Minimum observed inter-packet interval in milliseconds.
745 &quot;numIntervals&quot;: &quot;A String&quot;, # Number of inter-packet intervals from which these statistics were derived.
746 &quot;type&quot;: &quot;A String&quot;, # The type of packets for which inter-packet intervals were computed.
747 },
748 ],
749 &quot;localDiagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
750 &quot;localState&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
751 &quot;negotiatedLocalControlTxIntervalMs&quot;: 42, # Negotiated transmit interval for control packets.
752 &quot;rxPacket&quot;: { # The most recent Rx control packet for this BFD session.
753 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
754 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
755 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
756 &quot;diagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
757 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
758 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
759 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
760 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
761 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
762 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
763 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
764 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
765 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
766 &quot;state&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
767 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
768 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
769 },
770 &quot;txPacket&quot;: { # The most recent Tx control packet for this BFD session.
771 &quot;authenticationPresent&quot;: True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
772 &quot;controlPlaneIndependent&quot;: True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
773 &quot;demand&quot;: True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
774 &quot;diagnostic&quot;: &quot;A String&quot;, # The diagnostic code specifies the local system&#x27;s reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
775 &quot;final&quot;: True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
776 &quot;length&quot;: 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
777 &quot;minEchoRxIntervalMs&quot;: 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
778 &quot;minRxIntervalMs&quot;: 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
779 &quot;minTxIntervalMs&quot;: 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
780 &quot;multiplier&quot;: 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
781 &quot;multipoint&quot;: True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
782 &quot;myDiscriminator&quot;: 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
783 &quot;poll&quot;: True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
784 &quot;state&quot;: &quot;A String&quot;, # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
785 &quot;version&quot;: 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
786 &quot;yourDiscriminator&quot;: 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
787 },
788 &quot;uptimeMs&quot;: &quot;A String&quot;, # Session uptime in milliseconds. Value will be 0 if session is not up.
789 },
790 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the local BGP interface.
791 &quot;linkedVpnTunnel&quot;: &quot;A String&quot;, # URL of the VPN tunnel that this BGP peer controls.
792 &quot;name&quot;: &quot;A String&quot;, # Name of this BGP peer. Unique within the Routers resource.
793 &quot;numLearnedRoutes&quot;: 42, # Number of routes learned from the remote BGP Peer.
794 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the remote BGP interface.
795 &quot;state&quot;: &quot;A String&quot;, # BGP state as specified in RFC1771.
796 &quot;status&quot;: &quot;A String&quot;, # Status of the BGP peer: {UP, DOWN}
797 &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
798 &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 -0700799 },
800 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 &quot;natStatus&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 { # Status of a NAT contained in this router. Next tag: 9
Bu Sun Kim65020912020-05-20 12:08:20 -0700803 &quot;autoAllocatedNatIps&quot;: [ # A list of IPs auto-allocated for NAT. Example: [&quot;1.1.1.1&quot;, &quot;129.2.16.89&quot;]
804 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &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;].
807 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 &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;].
810 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700811 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700812 &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.
813 &quot;name&quot;: &quot;A String&quot;, # Unique name of this NAT.
814 &quot;numVmEndpointsWithNatMappings&quot;: 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
815 &quot;userAllocatedNatIpResources&quot;: [ # A list of fully qualified URLs of reserved IP address resources.
816 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;userAllocatedNatIps&quot;: [ # A list of IPs user-allocated for NAT. They will be raw IP strings like &quot;179.12.26.133&quot;.
819 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400821 },
822 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700823 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700824 },
825 }</pre>
826</div>
827
828<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700829 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700830 <pre>Creates a Router resource in the specified project and region using the data included in the request.
831
832Args:
833 project: string, Project ID for this request. (required)
834 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700836 The object takes the form of:
837
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 #
840 # For more information about Cloud Router, read the the Cloud Router overview.
841 &quot;bgp&quot;: { # BGP information specific to this router.
842 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
843 &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.
844 &quot;A String&quot;,
845 ],
846 &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.
847 { # Description-tagged IP ranges for the router to advertise.
848 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
849 &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 -0700850 },
851 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &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.
853 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
854 },
855 &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.
856 {
857 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
858 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
859 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
860 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
861 # - 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.
862 &quot;A String&quot;,
863 ],
864 &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 -0700865 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
867 &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 -0700868 },
869 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &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.
871 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
872 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
873 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
874 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
875 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700876 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
878 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
879 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
880 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
881 # - MANAGED_BY_USER is the default value and can be managed by you or other users
882 # - 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.
883 &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.
884 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
885 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
886 },
887 ],
888 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
889 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
890 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
891 &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.
892 {
893 &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.
894 &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.
895 &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.
896 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
897 # - MANAGED_BY_USER is the default value and can be managed directly by users.
898 # - 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.
899 &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.
900 },
901 ],
902 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
903 &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.
904 &quot;nats&quot;: [ # A list of NAT services created in this router.
905 { # 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.
906 &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.
907 &quot;A String&quot;,
908 ],
909 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
910 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
911 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
912 &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:
913 # - ERRORS_ONLY: Export logs only for connection failures.
914 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
915 # - ALL: Export logs for all connections, successful and unsuccessful.
916 },
917 &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.
918 &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.
919 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
920 # - 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.
921 # - 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.
922 &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.
923 &quot;A String&quot;,
924 ],
925 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
926 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
927 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
928 # - 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.
929 &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.
930 { # Defines the IP ranges that want to use NAT for a subnetwork.
931 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
932 &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.
933 &quot;A String&quot;,
934 ],
935 &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]
936 &quot;A String&quot;,
937 ],
938 },
939 ],
940 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
941 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
942 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
943 },
944 ],
945 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
946 &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.
947 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
948}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700949
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700950 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.
951
952For 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.
953
954The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700955
956Returns:
957 An object of the form:
958
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 { # Represents an Operation resource.
960 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700961 # Google Compute Engine has three Operation resources:
962 #
963 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
964 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
966 #
967 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 # - For global operations, use the `globalOperations` resource.
969 # - For regional operations, use the `regionOperations` resource.
970 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 # 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 -0700973 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
974 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
975 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
976 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
977 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
978 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700979 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
981 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
982 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700983 },
984 ],
985 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &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`.
987 &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.
988 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
989 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
990 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
991 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
992 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
993 &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.
994 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
995 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
996 &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.
997 &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`.
998 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
999 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1000 &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.
1001 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1002 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1003 {
1004 &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.
1005 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1006 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1007 {
1008 &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).
1009 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1010 },
1011 ],
1012 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1013 },
1014 ],
1015 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001016 }</pre>
1017</div>
1018
1019<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001021 <pre>Retrieves a list of Router resources available to the specified project.
1022
1023Args:
1024 project: string, Project ID for this request. (required)
1025 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001027
Dan O'Mearadd494642020-05-01 07:42:23 -07001028For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001029
Dan O'Mearadd494642020-05-01 07:42:23 -07001030You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001031
Bu Sun Kim65020912020-05-20 12:08:20 -07001032To 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) ```
1033 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`)
1034 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1035
1036You 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.
1037
1038Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1039 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001040
1041Returns:
1042 An object of the form:
1043
1044 { # Contains a list of Router resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001045 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1046 &quot;items&quot;: [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001047 { # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 #
1049 # For more information about Cloud Router, read the the Cloud Router overview.
1050 &quot;bgp&quot;: { # BGP information specific to this router.
1051 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1052 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1053 &quot;A String&quot;,
1054 ],
1055 &quot;advertisedIpRanges&quot;: [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1056 { # Description-tagged IP ranges for the router to advertise.
1057 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1058 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 },
1060 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &quot;asn&quot;: 42, # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
1062 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001063 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &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.
1065 {
1066 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1067 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1068 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1069 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1070 # - 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.
1071 &quot;A String&quot;,
1072 ],
1073 &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.
1074 { # Description-tagged IP ranges for the router to advertise.
1075 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1076 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1077 },
1078 ],
1079 &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.
1080 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1081 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1082 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1083 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1084 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
1085 },
1086 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1087 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1088 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1089 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1090 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1091 # - 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.
1092 &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.
1093 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1094 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1095 },
1096 ],
1097 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1098 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1099 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1100 &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.
1101 {
1102 &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.
1103 &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.
1104 &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.
1105 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1106 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1107 # - 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.
1108 &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.
1109 },
1110 ],
1111 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1112 &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.
1113 &quot;nats&quot;: [ # A list of NAT services created in this router.
1114 { # 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.
1115 &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.
1116 &quot;A String&quot;,
1117 ],
1118 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1119 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1120 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1121 &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:
1122 # - ERRORS_ONLY: Export logs only for connection failures.
1123 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1124 # - ALL: Export logs for all connections, successful and unsuccessful.
1125 },
1126 &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.
1127 &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.
1128 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1129 # - 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.
1130 # - 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.
1131 &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.
1132 &quot;A String&quot;,
1133 ],
1134 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1135 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1136 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1137 # - 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.
1138 &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.
1139 { # Defines the IP ranges that want to use NAT for a subnetwork.
1140 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1141 &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.
1142 &quot;A String&quot;,
1143 ],
1144 &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]
1145 &quot;A String&quot;,
1146 ],
1147 },
1148 ],
1149 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1150 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1151 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1152 },
1153 ],
1154 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1155 &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.
1156 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1157 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001158 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 &quot;kind&quot;: &quot;compute#routerList&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1160 &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.
1161 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1162 &quot;warning&quot;: { # [Output Only] Informational warning message.
1163 &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.
1164 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1165 # &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 -07001166 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001167 &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).
1168 &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 -07001169 },
1170 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 &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 -07001172 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001173 }</pre>
1174</div>
1175
1176<div class="method">
1177 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1178 <pre>Retrieves the next page of results.
1179
1180Args:
1181 previous_request: The request for the previous page. (required)
1182 previous_response: The response from the request for the previous page. (required)
1183
1184Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001186 page. Returns None if there are no more items in the collection.
1187 </pre>
1188</div>
1189
1190<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001191 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 <pre>Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001193
1194Args:
1195 project: string, Project ID for this request. (required)
1196 region: string, Name of the region for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001197 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001199 The object takes the form of:
1200
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001201{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 #
1203 # For more information about Cloud Router, read the the Cloud Router overview.
1204 &quot;bgp&quot;: { # BGP information specific to this router.
1205 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1206 &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.
1207 &quot;A String&quot;,
1208 ],
1209 &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.
1210 { # Description-tagged IP ranges for the router to advertise.
1211 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1212 &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 -07001213 },
1214 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 &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.
1216 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
1217 },
1218 &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.
1219 {
1220 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1221 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1222 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1223 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1224 # - 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.
1225 &quot;A String&quot;,
1226 ],
1227 &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 -07001228 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001229 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1230 &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 -07001231 },
1232 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 &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.
1234 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1235 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1236 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1237 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1238 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001239 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001240 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1241 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1242 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1243 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1244 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1245 # - 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.
1246 &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.
1247 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1248 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1249 },
1250 ],
1251 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1252 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1253 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1254 &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.
1255 {
1256 &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.
1257 &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.
1258 &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.
1259 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1260 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1261 # - 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.
1262 &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.
1263 },
1264 ],
1265 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1266 &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.
1267 &quot;nats&quot;: [ # A list of NAT services created in this router.
1268 { # 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.
1269 &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.
1270 &quot;A String&quot;,
1271 ],
1272 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1273 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1274 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1275 &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:
1276 # - ERRORS_ONLY: Export logs only for connection failures.
1277 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1278 # - ALL: Export logs for all connections, successful and unsuccessful.
1279 },
1280 &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.
1281 &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.
1282 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1283 # - 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.
1284 # - 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.
1285 &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.
1286 &quot;A String&quot;,
1287 ],
1288 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1289 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1290 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1291 # - 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.
1292 &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.
1293 { # Defines the IP ranges that want to use NAT for a subnetwork.
1294 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1295 &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.
1296 &quot;A String&quot;,
1297 ],
1298 &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]
1299 &quot;A String&quot;,
1300 ],
1301 },
1302 ],
1303 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1304 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1305 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1306 },
1307 ],
1308 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1309 &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.
1310 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1311}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001312
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 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.
1314
1315For 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.
1316
1317The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001318
1319Returns:
1320 An object of the form:
1321
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 { # Represents an Operation resource.
1323 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001324 # Google Compute Engine has three Operation resources:
1325 #
1326 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1327 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001328 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1329 #
1330 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 # - For global operations, use the `globalOperations` resource.
1332 # - For regional operations, use the `regionOperations` resource.
1333 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001334 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001335 # 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 -07001336 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1337 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1338 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1339 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1340 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1341 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001342 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001343 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1344 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1345 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001346 },
1347 ],
1348 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001349 &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`.
1350 &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.
1351 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1352 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1353 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1354 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1355 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1356 &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.
1357 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1358 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1359 &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.
1360 &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`.
1361 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1362 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1363 &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.
1364 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1365 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1366 {
1367 &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.
1368 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1369 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1370 {
1371 &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).
1372 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1373 },
1374 ],
1375 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1376 },
1377 ],
1378 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001379 }</pre>
1380</div>
1381
1382<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001383 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001384 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1385
1386Args:
1387 project: string, Project ID for this request. (required)
1388 region: string, Name of the region for this request. (required)
1389 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001390 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001391 The object takes the form of:
1392
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001393{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 #
1395 # For more information about Cloud Router, read the the Cloud Router overview.
1396 &quot;bgp&quot;: { # BGP information specific to this router.
1397 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1398 &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.
1399 &quot;A String&quot;,
1400 ],
1401 &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.
1402 { # Description-tagged IP ranges for the router to advertise.
1403 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1404 &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 -07001405 },
1406 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &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.
1408 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
1409 },
1410 &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.
1411 {
1412 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1413 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1414 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1415 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1416 # - 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.
1417 &quot;A String&quot;,
1418 ],
1419 &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 -07001420 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1422 &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 -07001423 },
1424 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &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.
1426 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1427 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1428 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1429 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1430 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001431 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001432 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1433 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1434 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1435 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1436 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1437 # - 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.
1438 &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.
1439 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1440 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1441 },
1442 ],
1443 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1444 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1445 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1446 &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.
1447 {
1448 &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.
1449 &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.
1450 &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.
1451 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1452 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1453 # - 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.
1454 &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.
1455 },
1456 ],
1457 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1458 &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.
1459 &quot;nats&quot;: [ # A list of NAT services created in this router.
1460 { # 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.
1461 &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.
1462 &quot;A String&quot;,
1463 ],
1464 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1465 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1466 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1467 &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:
1468 # - ERRORS_ONLY: Export logs only for connection failures.
1469 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1470 # - ALL: Export logs for all connections, successful and unsuccessful.
1471 },
1472 &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.
1473 &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.
1474 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1475 # - 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.
1476 # - 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.
1477 &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.
1478 &quot;A String&quot;,
1479 ],
1480 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1481 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1482 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1483 # - 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.
1484 &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.
1485 { # Defines the IP ranges that want to use NAT for a subnetwork.
1486 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1487 &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.
1488 &quot;A String&quot;,
1489 ],
1490 &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]
1491 &quot;A String&quot;,
1492 ],
1493 },
1494 ],
1495 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1496 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1497 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1498 },
1499 ],
1500 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1501 &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.
1502 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1503}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001504
1505
1506Returns:
1507 An object of the form:
1508
1509 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 &quot;resource&quot;: { # Represents a Cloud Router resource. # Preview of given router.
1511 #
1512 # For more information about Cloud Router, read the the Cloud Router overview.
1513 &quot;bgp&quot;: { # BGP information specific to this router.
1514 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1515 &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.
1516 &quot;A String&quot;,
1517 ],
1518 &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.
1519 { # Description-tagged IP ranges for the router to advertise.
1520 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1521 &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 -07001522 },
1523 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001524 &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.
1525 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001526 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 &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.
1528 {
1529 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1530 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1531 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1532 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1533 # - 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.
1534 &quot;A String&quot;,
1535 ],
1536 &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.
1537 { # Description-tagged IP ranges for the router to advertise.
1538 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1539 &quot;range&quot;: &quot;A String&quot;, # The IP range to advertise. The value must be a CIDR-formatted string.
1540 },
1541 ],
1542 &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.
1543 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1544 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1545 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1546 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1547 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
1548 },
1549 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1550 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1551 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1552 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1553 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1554 # - 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.
1555 &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.
1556 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1557 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1558 },
1559 ],
1560 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1561 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1562 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1563 &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.
1564 {
1565 &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.
1566 &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.
1567 &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.
1568 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1569 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1570 # - 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.
1571 &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.
1572 },
1573 ],
1574 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1575 &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.
1576 &quot;nats&quot;: [ # A list of NAT services created in this router.
1577 { # 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.
1578 &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.
1579 &quot;A String&quot;,
1580 ],
1581 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1582 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1583 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1584 &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:
1585 # - ERRORS_ONLY: Export logs only for connection failures.
1586 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1587 # - ALL: Export logs for all connections, successful and unsuccessful.
1588 },
1589 &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.
1590 &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.
1591 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1592 # - 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.
1593 # - 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.
1594 &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.
1595 &quot;A String&quot;,
1596 ],
1597 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1598 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1599 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1600 # - 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.
1601 &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.
1602 { # Defines the IP ranges that want to use NAT for a subnetwork.
1603 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1604 &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.
1605 &quot;A String&quot;,
1606 ],
1607 &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]
1608 &quot;A String&quot;,
1609 ],
1610 },
1611 ],
1612 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1613 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1614 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1615 },
1616 ],
1617 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1618 &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.
1619 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1620 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001621 }</pre>
1622</div>
1623
1624<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001626 <pre>Returns permissions that a caller has on the specified resource.
1627
1628Args:
1629 project: string, Project ID for this request. (required)
1630 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001632 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001633 The object takes the form of:
1634
1635{
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1637 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001638 ],
1639 }
1640
1641
1642Returns:
1643 An object of the form:
1644
1645 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001646 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1647 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001648 ],
1649 }</pre>
1650</div>
1651
1652<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001653 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1654 <pre>Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001655
1656Args:
1657 project: string, Project ID for this request. (required)
1658 region: string, Name of the region for this request. (required)
1659 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001660 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001661 The object takes the form of:
1662
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001663{ # Represents a Cloud Router resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001664 #
1665 # For more information about Cloud Router, read the the Cloud Router overview.
1666 &quot;bgp&quot;: { # BGP information specific to this router.
1667 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1668 &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.
1669 &quot;A String&quot;,
1670 ],
1671 &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.
1672 { # Description-tagged IP ranges for the router to advertise.
1673 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1674 &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 -07001675 },
1676 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001677 &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.
1678 &quot;keepaliveInterval&quot;: 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer&#x27;s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
1679 },
1680 &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.
1681 {
1682 &quot;advertiseMode&quot;: &quot;A String&quot;, # User-specified flag to indicate which mode to use for advertisement.
1683 &quot;advertisedGroups&quot;: [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1684 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1685 # - ALL_VPC_SUBNETS: Advertises the router&#x27;s own VPC subnets.
1686 # - 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.
1687 &quot;A String&quot;,
1688 ],
1689 &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 -07001690 { # Description-tagged IP ranges for the router to advertise.
Bu Sun Kim65020912020-05-20 12:08:20 -07001691 &quot;description&quot;: &quot;A String&quot;, # User-specified description for the IP range.
1692 &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 -07001693 },
1694 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001695 &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.
1696 &quot;bfd&quot;: { # BFD configuration for the BGP peering.
1697 &quot;minReceiveInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1698 &quot;minTransmitInterval&quot;: 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
1699 &quot;multiplier&quot;: 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1700 &quot;sessionInitializationMode&quot;: &quot;A String&quot;, # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001701 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 &quot;enable&quot;: &quot;A String&quot;, # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1703 &quot;interfaceName&quot;: &quot;A String&quot;, # Name of the interface the BGP peer is associated with.
1704 &quot;ipAddress&quot;: &quot;A String&quot;, # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1705 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this BGP peer.
1706 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1707 # - 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.
1708 &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.
1709 &quot;peerAsn&quot;: 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1710 &quot;peerIpAddress&quot;: &quot;A String&quot;, # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1711 },
1712 ],
1713 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1714 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1715 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1716 &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.
1717 {
1718 &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.
1719 &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.
1720 &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.
1721 &quot;managementType&quot;: &quot;A String&quot;, # [Output Only] The resource that configures and manages this interface.
1722 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1723 # - 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.
1724 &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.
1725 },
1726 ],
1727 &quot;kind&quot;: &quot;compute#router&quot;, # [Output Only] Type of resource. Always compute#router for routers.
1728 &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.
1729 &quot;nats&quot;: [ # A list of NAT services created in this router.
1730 { # 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.
1731 &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.
1732 &quot;A String&quot;,
1733 ],
1734 &quot;icmpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1735 &quot;logConfig&quot;: { # Configuration of logging on a NAT. # Configure logging on this NAT.
1736 &quot;enable&quot;: True or False, # Indicates whether or not to export logs. This is false by default.
1737 &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:
1738 # - ERRORS_ONLY: Export logs only for connection failures.
1739 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1740 # - ALL: Export logs for all connections, successful and unsuccessful.
1741 },
1742 &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.
1743 &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.
1744 &quot;natIpAllocateOption&quot;: &quot;A String&quot;, # Specify the NatIpAllocateOption, which can take one of the following values:
1745 # - 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.
1746 # - 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.
1747 &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.
1748 &quot;A String&quot;,
1749 ],
1750 &quot;sourceSubnetworkIpRangesToNat&quot;: &quot;A String&quot;, # Specify the Nat option, which can take one of the following values:
1751 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1752 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1753 # - 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.
1754 &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.
1755 { # Defines the IP ranges that want to use NAT for a subnetwork.
1756 &quot;name&quot;: &quot;A String&quot;, # URL for the subnetwork resource that will use NAT.
1757 &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.
1758 &quot;A String&quot;,
1759 ],
1760 &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]
1761 &quot;A String&quot;,
1762 ],
1763 },
1764 ],
1765 &quot;tcpEstablishedIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1766 &quot;tcpTransitoryIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1767 &quot;udpIdleTimeoutSec&quot;: 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1768 },
1769 ],
1770 &quot;network&quot;: &quot;A String&quot;, # URI of the network to which this router belongs.
1771 &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.
1772 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1773}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001774
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001775 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.
1776
1777For 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.
1778
1779The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001780
1781Returns:
1782 An object of the form:
1783
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 { # Represents an Operation resource.
1785 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001786 # Google Compute Engine has three Operation resources:
1787 #
1788 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1789 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001790 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1791 #
1792 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001793 # - For global operations, use the `globalOperations` resource.
1794 # - For regional operations, use the `regionOperations` resource.
1795 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001796 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001797 # 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 -07001798 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1799 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1800 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1801 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1802 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1803 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001804 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001805 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1806 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1807 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001808 },
1809 ],
1810 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001811 &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`.
1812 &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.
1813 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1814 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1815 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1816 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1817 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1818 &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.
1819 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1820 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1821 &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.
1822 &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`.
1823 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1824 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1825 &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.
1826 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1827 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1828 {
1829 &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.
1830 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1831 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1832 {
1833 &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).
1834 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1835 },
1836 ],
1837 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1838 },
1839 ],
1840 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001841 }</pre>
1842</div>
1843
1844</body></html>