1<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">
78  <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<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">
84  <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
85<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>
88<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">
90  <code><a href="#getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
91<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>
95<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">
99  <code><a href="#insert">insert(project, region, body, requestId=None)</a></code></p>
100<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">
102  <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
103<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">
108  <code><a href="#patch">patch(project, region, router, body, requestId=None)</a></code></p>
109<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>
110<p class="toc_element">
111  <code><a href="#preview">preview(project, region, router, body)</a></code></p>
112<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">
114  <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<p class="toc_element">
117  <code><a href="#update">update(project, region, router, body, requestId=None)</a></code></p>
118<p class="firstline">Updates the specified Router resource with the data included in the request.</p>
119<h3>Method Details</h3>
120<div class="method">
121    <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
122  <pre>Retrieves an aggregated list of routers.
123
124Args:
125  project: string, Project ID for this request. (required)
126  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
127
128You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
129
130Currently, only sorting by name or creationTimestamp desc is supported.
131  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)
132  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.
133  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 =, !=, >, or <.
134
135For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
136
137You 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.
138
139To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
140
141Returns:
142  An object of the form:
143
144    { # Contains a list of routers.
145    "nextPageToken": "A String", # [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.
146    "kind": "compute#routerAggregatedList", # Type of resource.
147    "items": { # A list of Router resources.
148      "a_key": { # Name of the scope containing this set of routers.
149        "routers": [ # A list of routers contained in this scope.
150          { # Represents a Cloud Router resource.
151                #
152                # For more information about Cloud Router, read the the Cloud Router overview.
153              "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
154              "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
155              "nats": [ # A list of NAT services created in this router.
156                { # 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.
157                  "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
158                  "natIps": [ # 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.
159                    "A String",
160                  ],
161                  "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
162                  "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
163                  "subnetworks": [ # 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.
164                    { # Defines the IP ranges that want to use NAT for a subnetwork.
165                      "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
166                        "A String",
167                      ],
168                      "name": "A String", # URL for the subnetwork resource that will use NAT.
169                      "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
170                        "A String",
171                      ],
172                    },
173                  ],
174                  "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
175                  "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
176                      # - 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.
177                      # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
178                  "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
179                      # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
180                      # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
181                      # - 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.
182                  "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
183                  "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
184                    "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
185                    "enable": True or False, # Indicates whether or not to export logs. This is false by default.
186                  },
187                  "minPortsPerVm": 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.
188                },
189              ],
190              "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
191                {
192                  "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
193                  "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
194                  "ipRange": "A String", # 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.
195                  "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
196                  "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
197                      # - MANAGED_BY_USER is the default value and can be managed directly by users.
198                      # - 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.
199                },
200              ],
201              "bgp": { # BGP information specific to this router.
202                "asn": 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.
203                "advertisedIpRanges": [ # 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.
204                  { # Description-tagged IP ranges for the router to advertise.
205                    "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
206                    "description": "A String", # User-specified description for the IP range.
207                  },
208                ],
209                "advertisedGroups": [ # 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.
210                  "A String",
211                ],
212                "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
213              },
214              "network": "A String", # URI of the network to which this router belongs.
215              "bgpPeers": [ # 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.
216                {
217                  "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
218                  "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
219                  "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
220                  "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
221                  "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
222                      # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
223                      # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
224                      # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
225                    "A String",
226                  ],
227                  "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
228                      # - MANAGED_BY_USER is the default value and can be managed by you or other users
229                      # - 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.
230                  "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
231                    { # Description-tagged IP ranges for the router to advertise.
232                      "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
233                      "description": "A String", # User-specified description for the IP range.
234                    },
235                  ],
236                  "advertisedRoutePriority": 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.
237                  "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
238                  "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
239                },
240              ],
241              "region": "A String", # [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.
242              "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
243              "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
244              "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
245              "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
246            },
247        ],
248        "warning": { # Informational warning which replaces the list of routers when the list is empty.
249          "message": "A String", # [Output Only] A human-readable description of the warning code.
250          "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
251          "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
252              # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
253            {
254              "value": "A String", # [Output Only] A warning data value corresponding to the key.
255              "key": "A String", # [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).
256            },
257          ],
258        },
259      },
260    },
261    "warning": { # [Output Only] Informational warning message.
262      "message": "A String", # [Output Only] A human-readable description of the warning code.
263      "code": "A String", # [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      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
265          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
266        {
267          "value": "A String", # [Output Only] A warning data value corresponding to the key.
268          "key": "A String", # [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).
269        },
270      ],
271    },
272    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
273    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
274  }</pre>
275</div>
276
277<div class="method">
278    <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
279  <pre>Retrieves the next page of results.
280
281Args:
282  previous_request: The request for the previous page. (required)
283  previous_response: The response from the request for the previous page. (required)
284
285Returns:
286  A request object that you can call 'execute()' on to request the next
287  page. Returns None if there are no more items in the collection.
288    </pre>
289</div>
290
291<div class="method">
292    <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
293  <pre>Deletes the specified Router resource.
294
295Args:
296  project: string, Project ID for this request. (required)
297  region: string, Name of the region for this request. (required)
298  router: string, Name of the Router resource to delete. (required)
299  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.
300
301For 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.
302
303The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
304
305Returns:
306  An object of the form:
307
308    { # Represents an Operation resource.
309      #
310      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
311      #
312      # Operations can be global, regional or zonal.
313      # - For global operations, use the globalOperations resource.
314      # - For regional operations, use the regionOperations resource.
315      # - For zonal operations, use the zonalOperations resource.
316      #
317      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
318    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
319    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
320    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
321    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
322    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
323    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
324    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
325    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
326    "progress": 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.
327    "httpErrorStatusCode": 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.
328    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
329    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
330    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
331    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
332      {
333        "message": "A String", # [Output Only] A human-readable description of the warning code.
334        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
335        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
336            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
337          {
338            "value": "A String", # [Output Only] A warning data value corresponding to the key.
339            "key": "A String", # [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).
340          },
341        ],
342      },
343    ],
344    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
345    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
346    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
347    "name": "A String", # [Output Only] Name of the resource.
348    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
349    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
350      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
351        {
352          "message": "A String", # [Output Only] An optional, human-readable error message.
353          "code": "A String", # [Output Only] The error type identifier for this error.
354          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
355        },
356      ],
357    },
358    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
359    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
360    "targetLink": "A String", # [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.
361  }</pre>
362</div>
363
364<div class="method">
365    <code class="details" id="get">get(project, region, router)</code>
366  <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
367
368Args:
369  project: string, Project ID for this request. (required)
370  region: string, Name of the region for this request. (required)
371  router: string, Name of the Router resource to return. (required)
372
373Returns:
374  An object of the form:
375
376    { # Represents a Cloud Router resource.
377        #
378        # For more information about Cloud Router, read the the Cloud Router overview.
379      "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
380      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
381      "nats": [ # A list of NAT services created in this router.
382        { # 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.
383          "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
384          "natIps": [ # 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.
385            "A String",
386          ],
387          "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
388          "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
389          "subnetworks": [ # 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.
390            { # Defines the IP ranges that want to use NAT for a subnetwork.
391              "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
392                "A String",
393              ],
394              "name": "A String", # URL for the subnetwork resource that will use NAT.
395              "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
396                "A String",
397              ],
398            },
399          ],
400          "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
401          "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
402              # - 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.
403              # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
404          "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
405              # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
406              # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
407              # - 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.
408          "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
409          "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
410            "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
411            "enable": True or False, # Indicates whether or not to export logs. This is false by default.
412          },
413          "minPortsPerVm": 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.
414        },
415      ],
416      "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
417        {
418          "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
419          "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
420          "ipRange": "A String", # 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.
421          "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
422          "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
423              # - MANAGED_BY_USER is the default value and can be managed directly by users.
424              # - 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.
425        },
426      ],
427      "bgp": { # BGP information specific to this router.
428        "asn": 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.
429        "advertisedIpRanges": [ # 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.
430          { # Description-tagged IP ranges for the router to advertise.
431            "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
432            "description": "A String", # User-specified description for the IP range.
433          },
434        ],
435        "advertisedGroups": [ # 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.
436          "A String",
437        ],
438        "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
439      },
440      "network": "A String", # URI of the network to which this router belongs.
441      "bgpPeers": [ # 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.
442        {
443          "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
444          "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
445          "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
446          "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
447          "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
448              # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
449              # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
450              # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
451            "A String",
452          ],
453          "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
454              # - MANAGED_BY_USER is the default value and can be managed by you or other users
455              # - 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.
456          "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
457            { # Description-tagged IP ranges for the router to advertise.
458              "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
459              "description": "A String", # User-specified description for the IP range.
460            },
461          ],
462          "advertisedRoutePriority": 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.
463          "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
464          "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
465        },
466      ],
467      "region": "A String", # [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.
468      "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
469      "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
470      "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
471      "name": "A String", # 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.
472    }</pre>
473</div>
474
475<div class="method">
476    <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
477  <pre>Retrieves runtime Nat mapping information of VM endpoints.
478
479Args:
480  project: string, Project ID for this request. (required)
481  region: string, Name of the region for this request. (required)
482  router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
483  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
484
485You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
486
487Currently, only sorting by name or creationTimestamp desc is supported.
488  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)
489  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.
490  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 =, !=, >, or <.
491
492For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
493
494You 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.
495
496To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
497
498Returns:
499  An object of the form:
500
501    { # Contains a list of VmEndpointNatMappings.
502    "nextPageToken": "A String", # [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.
503    "kind": "compute#vmEndpointNatMappingsList", # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
504    "warning": { # [Output Only] Informational warning message.
505      "message": "A String", # [Output Only] A human-readable description of the warning code.
506      "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
507      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
508          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
509        {
510          "value": "A String", # [Output Only] A warning data value corresponding to the key.
511          "key": "A String", # [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).
512        },
513      ],
514    },
515    "result": [ # [Output Only] A list of Nat mapping information of VM endpoints.
516      { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
517        "interfaceNatMappings": [
518          { # Contain information of Nat mapping for an interface of this endpoint.
519            "sourceVirtualIp": "A String", # Primary IP of the VM for this NIC.
520            "numTotalNatPorts": 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.
521            "natIpPortRanges": [ # 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: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"].
522              "A String",
523            ],
524            "sourceAliasIpRange": "A String", # Alias IP range for this interface endpoint. It will be a private (RFC 1918) IP range. Examples: "10.33.4.55/32", or "192.168.5.0/24".
525          },
526        ],
527        "instanceName": "A String", # Name of the VM instance which the endpoint belongs to
528      },
529    ],
530    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
531    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
532  }</pre>
533</div>
534
535<div class="method">
536    <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
537  <pre>Retrieves the next page of results.
538
539Args:
540  previous_request: The request for the previous page. (required)
541  previous_response: The response from the request for the previous page. (required)
542
543Returns:
544  A request object that you can call 'execute()' on to request the next
545  page. Returns None if there are no more items in the collection.
546    </pre>
547</div>
548
549<div class="method">
550    <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
551  <pre>Retrieves runtime information of the specified router.
552
553Args:
554  project: string, Project ID for this request. (required)
555  region: string, Name of the region for this request. (required)
556  router: string, Name of the Router resource to query. (required)
557
558Returns:
559  An object of the form:
560
561    {
562    "kind": "compute#routerStatusResponse", # Type of resource.
563    "result": {
564      "bgpPeerStatus": [
565        {
566          "status": "A String", # Status of the BGP peer: {UP, DOWN}
567          "uptime": "A String", # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
568          "name": "A String", # Name of this BGP peer. Unique within the Routers resource.
569          "uptimeSeconds": "A String", # Time this session has been up, in seconds. Format: 145
570          "linkedVpnTunnel": "A String", # URL of the VPN tunnel that this BGP peer controls.
571          "peerIpAddress": "A String", # IP address of the remote BGP interface.
572          "advertisedRoutes": [ # Routes that were advertised to the remote BGP peer
573            { # Represents a Route resource.
574                #
575                # 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 beta.routes ==) (== resource_for v1.routes ==)
576              "nextHopGateway": "A String", # 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
577              "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
578              "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
579              "name": "A String", # 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.
580              "tags": [ # A list of instance tags to which this route applies.
581                "A String",
582              ],
583              "nextHopIlb": "A String", # 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:
584                  # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
585                  # - regions/region/forwardingRules/forwardingRule  Note that this can only be used when the destination_range is a public (non-RFC 1918) IP CIDR range.
586              "nextHopInstance": "A String", # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
587                  # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
588              "priority": 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.
589              "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
590              "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
591              "network": "A String", # Fully-qualified URL of the network that this route applies to.
592              "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
593              "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
594                {
595                  "message": "A String", # [Output Only] A human-readable description of the warning code.
596                  "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
597                  "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
598                      # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
599                    {
600                      "value": "A String", # [Output Only] A warning data value corresponding to the key.
601                      "key": "A String", # [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).
602                    },
603                  ],
604                },
605              ],
606              "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
607              "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
608              "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
609              "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
610              "nextHopInterconnectAttachment": "A String", # [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.
611              "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
612            },
613          ],
614          "state": "A String", # BGP state as specified in RFC1771.
615          "ipAddress": "A String", # IP address of the local BGP interface.
616          "numLearnedRoutes": 42, # Number of routes learned from the remote BGP Peer.
617        },
618      ],
619      "bestRoutesForRouter": [ # Best routes learned by this router.
620        { # Represents a Route resource.
621            #
622            # 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 beta.routes ==) (== resource_for v1.routes ==)
623          "nextHopGateway": "A String", # 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
624          "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
625          "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
626          "name": "A String", # 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.
627          "tags": [ # A list of instance tags to which this route applies.
628            "A String",
629          ],
630          "nextHopIlb": "A String", # 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:
631              # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
632              # - regions/region/forwardingRules/forwardingRule  Note that this can only be used when the destination_range is a public (non-RFC 1918) IP CIDR range.
633          "nextHopInstance": "A String", # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
634              # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
635          "priority": 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.
636          "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
637          "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
638          "network": "A String", # Fully-qualified URL of the network that this route applies to.
639          "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
640          "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
641            {
642              "message": "A String", # [Output Only] A human-readable description of the warning code.
643              "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
644              "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
645                  # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
646                {
647                  "value": "A String", # [Output Only] A warning data value corresponding to the key.
648                  "key": "A String", # [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).
649                },
650              ],
651            },
652          ],
653          "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
654          "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
655          "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
656          "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
657          "nextHopInterconnectAttachment": "A String", # [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.
658          "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
659        },
660      ],
661      "natStatus": [
662        { # Status of a NAT contained in this router. Next tag: 9
663          "userAllocatedNatIps": [ # A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
664            "A String",
665          ],
666          "name": "A String", # Unique name of this NAT.
667          "autoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
668            "A String",
669          ],
670          "numVmEndpointsWithNatMappings": 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
671          "userAllocatedNatIpResources": [ # A list of fully qualified URLs of reserved IP address resources.
672            "A String",
673          ],
674          "minExtraNatIpsNeeded": 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.
675        },
676      ],
677      "network": "A String", # URI of the network to which this router belongs.
678      "bestRoutes": [ # Best routes for this router's network.
679        { # Represents a Route resource.
680            #
681            # 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 beta.routes ==) (== resource_for v1.routes ==)
682          "nextHopGateway": "A String", # 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
683          "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
684          "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
685          "name": "A String", # 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.
686          "tags": [ # A list of instance tags to which this route applies.
687            "A String",
688          ],
689          "nextHopIlb": "A String", # 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:
690              # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
691              # - regions/region/forwardingRules/forwardingRule  Note that this can only be used when the destination_range is a public (non-RFC 1918) IP CIDR range.
692          "nextHopInstance": "A String", # The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
693              # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
694          "priority": 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.
695          "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
696          "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
697          "network": "A String", # Fully-qualified URL of the network that this route applies to.
698          "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
699          "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
700            {
701              "message": "A String", # [Output Only] A human-readable description of the warning code.
702              "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
703              "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
704                  # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
705                {
706                  "value": "A String", # [Output Only] A warning data value corresponding to the key.
707                  "key": "A String", # [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).
708                },
709              ],
710            },
711          ],
712          "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
713          "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
714          "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
715          "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
716          "nextHopInterconnectAttachment": "A String", # [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.
717          "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
718        },
719      ],
720    },
721  }</pre>
722</div>
723
724<div class="method">
725    <code class="details" id="insert">insert(project, region, body, requestId=None)</code>
726  <pre>Creates a Router resource in the specified project and region using the data included in the request.
727
728Args:
729  project: string, Project ID for this request. (required)
730  region: string, Name of the region for this request. (required)
731  body: object, The request body. (required)
732    The object takes the form of:
733
734{ # Represents a Cloud Router resource.
735      #
736      # For more information about Cloud Router, read the the Cloud Router overview.
737    "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
738    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
739    "nats": [ # A list of NAT services created in this router.
740      { # 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.
741        "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
742        "natIps": [ # 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.
743          "A String",
744        ],
745        "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
746        "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
747        "subnetworks": [ # 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.
748          { # Defines the IP ranges that want to use NAT for a subnetwork.
749            "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
750              "A String",
751            ],
752            "name": "A String", # URL for the subnetwork resource that will use NAT.
753            "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
754              "A String",
755            ],
756          },
757        ],
758        "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
759        "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
760            # - 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.
761            # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
762        "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
763            # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
764            # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
765            # - 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.
766        "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
767        "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
768          "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
769          "enable": True or False, # Indicates whether or not to export logs. This is false by default.
770        },
771        "minPortsPerVm": 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.
772      },
773    ],
774    "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
775      {
776        "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
777        "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
778        "ipRange": "A String", # 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.
779        "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
780        "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
781            # - MANAGED_BY_USER is the default value and can be managed directly by users.
782            # - 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.
783      },
784    ],
785    "bgp": { # BGP information specific to this router.
786      "asn": 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.
787      "advertisedIpRanges": [ # 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.
788        { # Description-tagged IP ranges for the router to advertise.
789          "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
790          "description": "A String", # User-specified description for the IP range.
791        },
792      ],
793      "advertisedGroups": [ # 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.
794        "A String",
795      ],
796      "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
797    },
798    "network": "A String", # URI of the network to which this router belongs.
799    "bgpPeers": [ # 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.
800      {
801        "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
802        "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
803        "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
804        "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
805        "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
806            # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
807            # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
808            # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
809          "A String",
810        ],
811        "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
812            # - MANAGED_BY_USER is the default value and can be managed by you or other users
813            # - 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.
814        "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
815          { # Description-tagged IP ranges for the router to advertise.
816            "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
817            "description": "A String", # User-specified description for the IP range.
818          },
819        ],
820        "advertisedRoutePriority": 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.
821        "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
822        "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
823      },
824    ],
825    "region": "A String", # [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.
826    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
827    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
828    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
829    "name": "A String", # 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.
830  }
831
832  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.
833
834For 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.
835
836The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
837
838Returns:
839  An object of the form:
840
841    { # Represents an Operation resource.
842      #
843      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
844      #
845      # Operations can be global, regional or zonal.
846      # - For global operations, use the globalOperations resource.
847      # - For regional operations, use the regionOperations resource.
848      # - For zonal operations, use the zonalOperations resource.
849      #
850      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
851    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
852    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
853    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
854    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
855    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
856    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
857    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
858    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
859    "progress": 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.
860    "httpErrorStatusCode": 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.
861    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
862    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
863    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
864    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
865      {
866        "message": "A String", # [Output Only] A human-readable description of the warning code.
867        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
868        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
869            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
870          {
871            "value": "A String", # [Output Only] A warning data value corresponding to the key.
872            "key": "A String", # [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).
873          },
874        ],
875      },
876    ],
877    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
878    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
879    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
880    "name": "A String", # [Output Only] Name of the resource.
881    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
882    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
883      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
884        {
885          "message": "A String", # [Output Only] An optional, human-readable error message.
886          "code": "A String", # [Output Only] The error type identifier for this error.
887          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
888        },
889      ],
890    },
891    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
892    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
893    "targetLink": "A String", # [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.
894  }</pre>
895</div>
896
897<div class="method">
898    <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
899  <pre>Retrieves a list of Router resources available to the specified project.
900
901Args:
902  project: string, Project ID for this request. (required)
903  region: string, Name of the region for this request. (required)
904  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
905
906You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
907
908Currently, only sorting by name or creationTimestamp desc is supported.
909  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)
910  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.
911  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 =, !=, >, or <.
912
913For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
914
915You 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.
916
917To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
918
919Returns:
920  An object of the form:
921
922    { # Contains a list of Router resources.
923    "nextPageToken": "A String", # [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.
924    "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers.
925    "items": [ # A list of Router resources.
926      { # Represents a Cloud Router resource.
927            #
928            # For more information about Cloud Router, read the the Cloud Router overview.
929          "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
930          "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
931          "nats": [ # A list of NAT services created in this router.
932            { # 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.
933              "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
934              "natIps": [ # 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.
935                "A String",
936              ],
937              "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
938              "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
939              "subnetworks": [ # 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.
940                { # Defines the IP ranges that want to use NAT for a subnetwork.
941                  "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
942                    "A String",
943                  ],
944                  "name": "A String", # URL for the subnetwork resource that will use NAT.
945                  "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
946                    "A String",
947                  ],
948                },
949              ],
950              "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
951              "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
952                  # - 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.
953                  # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
954              "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
955                  # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
956                  # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
957                  # - 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.
958              "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
959              "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
960                "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
961                "enable": True or False, # Indicates whether or not to export logs. This is false by default.
962              },
963              "minPortsPerVm": 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.
964            },
965          ],
966          "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
967            {
968              "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
969              "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
970              "ipRange": "A String", # 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.
971              "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
972              "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
973                  # - MANAGED_BY_USER is the default value and can be managed directly by users.
974                  # - 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.
975            },
976          ],
977          "bgp": { # BGP information specific to this router.
978            "asn": 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.
979            "advertisedIpRanges": [ # 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.
980              { # Description-tagged IP ranges for the router to advertise.
981                "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
982                "description": "A String", # User-specified description for the IP range.
983              },
984            ],
985            "advertisedGroups": [ # 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.
986              "A String",
987            ],
988            "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
989          },
990          "network": "A String", # URI of the network to which this router belongs.
991          "bgpPeers": [ # 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.
992            {
993              "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
994              "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
995              "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
996              "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
997              "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
998                  # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
999                  # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1000                  # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1001                "A String",
1002              ],
1003              "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1004                  # - MANAGED_BY_USER is the default value and can be managed by you or other users
1005                  # - 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.
1006              "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1007                { # Description-tagged IP ranges for the router to advertise.
1008                  "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1009                  "description": "A String", # User-specified description for the IP range.
1010                },
1011              ],
1012              "advertisedRoutePriority": 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.
1013              "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1014              "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
1015            },
1016          ],
1017          "region": "A String", # [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.
1018          "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1019          "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1020          "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1021          "name": "A String", # 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.
1022        },
1023    ],
1024    "warning": { # [Output Only] Informational warning message.
1025      "message": "A String", # [Output Only] A human-readable description of the warning code.
1026      "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1027      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1028          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1029        {
1030          "value": "A String", # [Output Only] A warning data value corresponding to the key.
1031          "key": "A String", # [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).
1032        },
1033      ],
1034    },
1035    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1036    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1037  }</pre>
1038</div>
1039
1040<div class="method">
1041    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1042  <pre>Retrieves the next page of results.
1043
1044Args:
1045  previous_request: The request for the previous page. (required)
1046  previous_response: The response from the request for the previous page. (required)
1047
1048Returns:
1049  A request object that you can call 'execute()' on to request the next
1050  page. Returns None if there are no more items in the collection.
1051    </pre>
1052</div>
1053
1054<div class="method">
1055    <code class="details" id="patch">patch(project, region, router, body, requestId=None)</code>
1056  <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.
1057
1058Args:
1059  project: string, Project ID for this request. (required)
1060  region: string, Name of the region for this request. (required)
1061  router: string, Name of the Router resource to patch. (required)
1062  body: object, The request body. (required)
1063    The object takes the form of:
1064
1065{ # Represents a Cloud Router resource.
1066      #
1067      # For more information about Cloud Router, read the the Cloud Router overview.
1068    "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1069    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1070    "nats": [ # A list of NAT services created in this router.
1071      { # 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.
1072        "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1073        "natIps": [ # 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.
1074          "A String",
1075        ],
1076        "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1077        "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1078        "subnetworks": [ # 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.
1079          { # Defines the IP ranges that want to use NAT for a subnetwork.
1080            "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
1081              "A String",
1082            ],
1083            "name": "A String", # URL for the subnetwork resource that will use NAT.
1084            "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
1085              "A String",
1086            ],
1087          },
1088        ],
1089        "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1090        "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1091            # - 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.
1092            # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1093        "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1094            # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1095            # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1096            # - 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.
1097        "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1098        "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1099          "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1100          "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1101        },
1102        "minPortsPerVm": 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.
1103      },
1104    ],
1105    "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1106      {
1107        "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
1108        "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
1109        "ipRange": "A String", # 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.
1110        "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
1111        "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1112            # - MANAGED_BY_USER is the default value and can be managed directly by users.
1113            # - 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.
1114      },
1115    ],
1116    "bgp": { # BGP information specific to this router.
1117      "asn": 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.
1118      "advertisedIpRanges": [ # 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.
1119        { # Description-tagged IP ranges for the router to advertise.
1120          "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1121          "description": "A String", # User-specified description for the IP range.
1122        },
1123      ],
1124      "advertisedGroups": [ # 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.
1125        "A String",
1126      ],
1127      "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1128    },
1129    "network": "A String", # URI of the network to which this router belongs.
1130    "bgpPeers": [ # 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.
1131      {
1132        "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1133        "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
1134        "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
1135        "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1136        "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1137            # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1138            # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1139            # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1140          "A String",
1141        ],
1142        "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1143            # - MANAGED_BY_USER is the default value and can be managed by you or other users
1144            # - 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.
1145        "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1146          { # Description-tagged IP ranges for the router to advertise.
1147            "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1148            "description": "A String", # User-specified description for the IP range.
1149          },
1150        ],
1151        "advertisedRoutePriority": 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.
1152        "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1153        "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
1154      },
1155    ],
1156    "region": "A String", # [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.
1157    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1158    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1159    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1160    "name": "A String", # 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.
1161  }
1162
1163  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.
1164
1165For 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.
1166
1167The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1168
1169Returns:
1170  An object of the form:
1171
1172    { # Represents an Operation resource.
1173      #
1174      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1175      #
1176      # Operations can be global, regional or zonal.
1177      # - For global operations, use the globalOperations resource.
1178      # - For regional operations, use the regionOperations resource.
1179      # - For zonal operations, use the zonalOperations resource.
1180      #
1181      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1182    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1183    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1184    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1185    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1186    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1187    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1188    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1189    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1190    "progress": 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.
1191    "httpErrorStatusCode": 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.
1192    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1193    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1194    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1195    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1196      {
1197        "message": "A String", # [Output Only] A human-readable description of the warning code.
1198        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1199        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1200            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1201          {
1202            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1203            "key": "A String", # [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).
1204          },
1205        ],
1206      },
1207    ],
1208    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1209    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1210    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1211    "name": "A String", # [Output Only] Name of the resource.
1212    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1213    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1214      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1215        {
1216          "message": "A String", # [Output Only] An optional, human-readable error message.
1217          "code": "A String", # [Output Only] The error type identifier for this error.
1218          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1219        },
1220      ],
1221    },
1222    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1223    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1224    "targetLink": "A String", # [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.
1225  }</pre>
1226</div>
1227
1228<div class="method">
1229    <code class="details" id="preview">preview(project, region, router, body)</code>
1230  <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1231
1232Args:
1233  project: string, Project ID for this request. (required)
1234  region: string, Name of the region for this request. (required)
1235  router: string, Name of the Router resource to query. (required)
1236  body: object, The request body. (required)
1237    The object takes the form of:
1238
1239{ # Represents a Cloud Router resource.
1240      #
1241      # For more information about Cloud Router, read the the Cloud Router overview.
1242    "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1243    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1244    "nats": [ # A list of NAT services created in this router.
1245      { # 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.
1246        "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1247        "natIps": [ # 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.
1248          "A String",
1249        ],
1250        "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1251        "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1252        "subnetworks": [ # 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.
1253          { # Defines the IP ranges that want to use NAT for a subnetwork.
1254            "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
1255              "A String",
1256            ],
1257            "name": "A String", # URL for the subnetwork resource that will use NAT.
1258            "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
1259              "A String",
1260            ],
1261          },
1262        ],
1263        "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1264        "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1265            # - 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.
1266            # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1267        "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1268            # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1269            # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1270            # - 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.
1271        "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1272        "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1273          "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1274          "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1275        },
1276        "minPortsPerVm": 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.
1277      },
1278    ],
1279    "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1280      {
1281        "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
1282        "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
1283        "ipRange": "A String", # 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.
1284        "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
1285        "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1286            # - MANAGED_BY_USER is the default value and can be managed directly by users.
1287            # - 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.
1288      },
1289    ],
1290    "bgp": { # BGP information specific to this router.
1291      "asn": 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.
1292      "advertisedIpRanges": [ # 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.
1293        { # Description-tagged IP ranges for the router to advertise.
1294          "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1295          "description": "A String", # User-specified description for the IP range.
1296        },
1297      ],
1298      "advertisedGroups": [ # 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.
1299        "A String",
1300      ],
1301      "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1302    },
1303    "network": "A String", # URI of the network to which this router belongs.
1304    "bgpPeers": [ # 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.
1305      {
1306        "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1307        "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
1308        "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
1309        "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1310        "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1311            # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1312            # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1313            # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1314          "A String",
1315        ],
1316        "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1317            # - MANAGED_BY_USER is the default value and can be managed by you or other users
1318            # - 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.
1319        "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1320          { # Description-tagged IP ranges for the router to advertise.
1321            "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1322            "description": "A String", # User-specified description for the IP range.
1323          },
1324        ],
1325        "advertisedRoutePriority": 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.
1326        "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1327        "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
1328      },
1329    ],
1330    "region": "A String", # [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.
1331    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1332    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1333    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1334    "name": "A String", # 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.
1335  }
1336
1337
1338Returns:
1339  An object of the form:
1340
1341    {
1342    "resource": { # Represents a Cloud Router resource. # Preview of given router.
1343          #
1344          # For more information about Cloud Router, read the the Cloud Router overview.
1345        "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1346        "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1347        "nats": [ # A list of NAT services created in this router.
1348          { # 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.
1349            "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1350            "natIps": [ # 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.
1351              "A String",
1352            ],
1353            "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1354            "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1355            "subnetworks": [ # 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.
1356              { # Defines the IP ranges that want to use NAT for a subnetwork.
1357                "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
1358                  "A String",
1359                ],
1360                "name": "A String", # URL for the subnetwork resource that will use NAT.
1361                "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
1362                  "A String",
1363                ],
1364              },
1365            ],
1366            "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1367            "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1368                # - 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.
1369                # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1370            "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1371                # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1372                # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1373                # - 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.
1374            "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1375            "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1376              "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1377              "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1378            },
1379            "minPortsPerVm": 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.
1380          },
1381        ],
1382        "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1383          {
1384            "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
1385            "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
1386            "ipRange": "A String", # 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.
1387            "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
1388            "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1389                # - MANAGED_BY_USER is the default value and can be managed directly by users.
1390                # - 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.
1391          },
1392        ],
1393        "bgp": { # BGP information specific to this router.
1394          "asn": 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.
1395          "advertisedIpRanges": [ # 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.
1396            { # Description-tagged IP ranges for the router to advertise.
1397              "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1398              "description": "A String", # User-specified description for the IP range.
1399            },
1400          ],
1401          "advertisedGroups": [ # 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.
1402            "A String",
1403          ],
1404          "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1405        },
1406        "network": "A String", # URI of the network to which this router belongs.
1407        "bgpPeers": [ # 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.
1408          {
1409            "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1410            "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
1411            "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
1412            "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1413            "advertisedGroups": [ # 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's own VPC subnets.
1416                # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1417              "A String",
1418            ],
1419            "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1420                # - MANAGED_BY_USER is the default value and can be managed by you or other users
1421                # - 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.
1422            "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1423              { # Description-tagged IP ranges for the router to advertise.
1424                "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1425                "description": "A String", # User-specified description for the IP range.
1426              },
1427            ],
1428            "advertisedRoutePriority": 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.
1429            "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1430            "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
1431          },
1432        ],
1433        "region": "A String", # [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.
1434        "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1435        "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1436        "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1437        "name": "A String", # 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.
1438      },
1439  }</pre>
1440</div>
1441
1442<div class="method">
1443    <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
1444  <pre>Returns permissions that a caller has on the specified resource.
1445
1446Args:
1447  project: string, Project ID for this request. (required)
1448  region: string, The name of the region for this request. (required)
1449  resource: string, Name or id of the resource for this request. (required)
1450  body: object, The request body. (required)
1451    The object takes the form of:
1452
1453{
1454    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1455      "A String",
1456    ],
1457  }
1458
1459
1460Returns:
1461  An object of the form:
1462
1463    {
1464    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1465      "A String",
1466    ],
1467  }</pre>
1468</div>
1469
1470<div class="method">
1471    <code class="details" id="update">update(project, region, router, body, requestId=None)</code>
1472  <pre>Updates the specified Router resource with the data included in the request.
1473
1474Args:
1475  project: string, Project ID for this request. (required)
1476  region: string, Name of the region for this request. (required)
1477  router: string, Name of the Router resource to update. (required)
1478  body: object, The request body. (required)
1479    The object takes the form of:
1480
1481{ # Represents a Cloud Router resource.
1482      #
1483      # For more information about Cloud Router, read the the Cloud Router overview.
1484    "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1485    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1486    "nats": [ # A list of NAT services created in this router.
1487      { # 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.
1488        "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1489        "natIps": [ # 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.
1490          "A String",
1491        ],
1492        "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1493        "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1494        "subnetworks": [ # 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.
1495          { # Defines the IP ranges that want to use NAT for a subnetwork.
1496            "sourceIpRangesToNat": [ # 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: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES]
1497              "A String",
1498            ],
1499            "name": "A String", # URL for the subnetwork resource that will use NAT.
1500            "secondaryIpRangeNames": [ # A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat.
1501              "A String",
1502            ],
1503          },
1504        ],
1505        "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1506        "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1507            # - 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.
1508            # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1509        "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1510            # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1511            # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1512            # - 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.
1513        "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1514        "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1515          "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1516          "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1517        },
1518        "minPortsPerVm": 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.
1519      },
1520    ],
1521    "interfaces": [ # Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.
1522      {
1523        "linkedInterconnectAttachment": "A String", # 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 either be a VPN tunnel or an Interconnect attachment.
1524        "linkedVpnTunnel": "A String", # 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 either a VPN tunnel or an Interconnect attachment.
1525        "ipRange": "A String", # 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.
1526        "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
1527        "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1528            # - MANAGED_BY_USER is the default value and can be managed directly by users.
1529            # - 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.
1530      },
1531    ],
1532    "bgp": { # BGP information specific to this router.
1533      "asn": 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.
1534      "advertisedIpRanges": [ # User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1535        { # Description-tagged IP ranges for the router to advertise.
1536          "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1537          "description": "A String", # User-specified description for the IP range.
1538        },
1539      ],
1540      "advertisedGroups": [ # 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.
1541        "A String",
1542      ],
1543      "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
1544    },
1545    "network": "A String", # URI of the network to which this router belongs.
1546    "bgpPeers": [ # 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.
1547      {
1548        "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1549        "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
1550        "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
1551        "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1552        "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1553            # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1554            # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1555            # - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router'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 "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
1556          "A String",
1557        ],
1558        "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1559            # - MANAGED_BY_USER is the default value and can be managed by you or other users
1560            # - 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.
1561        "advertisedIpRanges": [ # 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 "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
1562          { # Description-tagged IP ranges for the router to advertise.
1563            "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1564            "description": "A String", # User-specified description for the IP range.
1565          },
1566        ],
1567        "advertisedRoutePriority": 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.
1568        "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1569        "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
1570      },
1571    ],
1572    "region": "A String", # [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.
1573    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1574    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1575    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1576    "name": "A String", # 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.
1577  }
1578
1579  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.
1580
1581For 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.
1582
1583The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1584
1585Returns:
1586  An object of the form:
1587
1588    { # Represents an Operation resource.
1589      #
1590      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1591      #
1592      # Operations can be global, regional or zonal.
1593      # - For global operations, use the globalOperations resource.
1594      # - For regional operations, use the regionOperations resource.
1595      # - For zonal operations, use the zonalOperations resource.
1596      #
1597      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1598    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1599    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1600    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1601    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1602    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1603    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1604    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1605    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1606    "progress": 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.
1607    "httpErrorStatusCode": 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.
1608    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1609    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1610    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1611    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1612      {
1613        "message": "A String", # [Output Only] A human-readable description of the warning code.
1614        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1615        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1616            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1617          {
1618            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1619            "key": "A String", # [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).
1620          },
1621        ],
1622      },
1623    ],
1624    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1625    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1626    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1627    "name": "A String", # [Output Only] Name of the resource.
1628    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1629    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1630      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1631        {
1632          "message": "A String", # [Output Only] An optional, human-readable error message.
1633          "code": "A String", # [Output Only] The error type identifier for this error.
1634          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1635        },
1636      ],
1637    },
1638    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1639    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1640    "targetLink": "A String", # [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.
1641  }</pre>
1642</div>
1643
1644</body></html>