blob: 4aabb9b82202c2b34406a64d2117ffa42cb52211 [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070079<p class="firstline">Retrieves an aggregated list of routers.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070085<p class="firstline">Deletes the specified Router resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
89<p class="toc_element">
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>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095<p class="toc_element">
96 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
97<p class="firstline">Retrieves runtime information of the specified router.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700100<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
101<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700102 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700103<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700112<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#update">update(project, region, router, body=None, requestId=None)</a></code></p>
115<p class="firstline">Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700119 <pre>Retrieves an aggregated list of routers.
120
121Args:
122 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700123 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
124
Dan O'Mearadd494642020-05-01 07:42:23 -0700125You 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700126
Dan O'Mearadd494642020-05-01 07:42:23 -0700127Currently, only sorting by `name` or `creationTimestamp desc` is supported.
128 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`)
129 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.
130 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700131
Dan O'Mearadd494642020-05-01 07:42:23 -0700132For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700133
Dan O'Mearadd494642020-05-01 07:42:23 -0700134You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700135
Dan O'Mearadd494642020-05-01 07:42:23 -0700136To 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) ```
137 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700138
139Returns:
140 An object of the form:
141
142 { # Contains a list of routers.
143 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 "kind": "compute#routerAggregatedList", # Type of resource.
145 "items": { # A list of Router resources.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700146 "a_key": { # Name of the scope containing this set of routers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 "routers": [ # A list of routers contained in this scope.
148 { # Represents a Cloud Router resource.
149 #
150 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700151 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
152 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 "nats": [ # A list of NAT services created in this router.
154 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
156 "A String",
157 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
159 "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.
160 "A String",
161 ],
162 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
163 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
164 "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.
165 { # Defines the IP ranges that want to use NAT for a subnetwork.
166 "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]
167 "A String",
168 ],
169 "name": "A String", # URL for the subnetwork resource that will use NAT.
170 "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.
171 "A String",
172 ],
173 },
174 ],
175 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
176 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
177 # - 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.
178 # - 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.
179 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
180 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
181 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
182 # - 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.
183 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
184 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
186 # - ERRORS_ONLY: Export logs only for connection failures.
187 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
188 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
190 },
191 "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.
192 },
193 ],
194 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700195 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
197 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
201 # - MANAGED_BY_USER is the default value and can be managed directly by users.
202 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700203 },
204 ],
205 "bgp": { # BGP information specific to this router.
206 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 "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.
208 { # Description-tagged IP ranges for the router to advertise.
209 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
210 "description": "A String", # User-specified description for the IP range.
211 },
212 ],
213 "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.
214 "A String",
215 ],
216 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700217 },
218 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700220 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700222 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
225 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
226 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
227 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
228 # - 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.
229 "A String",
230 ],
231 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
232 # - MANAGED_BY_USER is the default value and can be managed by you or other users
233 # - 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.
234 "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.
235 { # Description-tagged IP ranges for the router to advertise.
236 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
237 "description": "A String", # User-specified description for the IP range.
238 },
239 ],
240 "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.
241 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
242 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700243 },
244 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700246 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
247 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
248 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700250 },
251 ],
252 "warning": { # Informational warning which replaces the list of routers when the list is empty.
253 "message": "A String", # [Output Only] A human-readable description of the warning code.
254 "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.
255 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
256 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
257 {
258 "value": "A String", # [Output Only] A warning data value corresponding to the key.
259 "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).
260 },
261 ],
262 },
263 },
264 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 "warning": { # [Output Only] Informational warning message.
266 "message": "A String", # [Output Only] A human-readable description of the warning code.
267 "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.
268 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
269 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
270 {
271 "value": "A String", # [Output Only] A warning data value corresponding to the key.
272 "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).
273 },
274 ],
275 },
276 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700277 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
278 }</pre>
279</div>
280
281<div class="method">
282 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
283 <pre>Retrieves the next page of results.
284
285Args:
286 previous_request: The request for the previous page. (required)
287 previous_response: The response from the request for the previous page. (required)
288
289Returns:
290 A request object that you can call 'execute()' on to request the next
291 page. Returns None if there are no more items in the collection.
292 </pre>
293</div>
294
295<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700297 <pre>Deletes the specified Router resource.
298
299Args:
300 project: string, Project ID for this request. (required)
301 region: string, Name of the region for this request. (required)
302 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 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.
304
305For 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.
306
307The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700308
309Returns:
310 An object of the form:
311
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 { # Represents an Operation resource.
313 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # Google Compute Engine has three Operation resources:
315 #
316 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
317 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
319 #
320 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 # - For global operations, use the `globalOperations` resource.
322 # - For regional operations, use the `regionOperations` resource.
323 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700326 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400328 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700331 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
333 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700334 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700336 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700338 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
339 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
340 {
341 "message": "A String", # [Output Only] A human-readable description of the warning code.
342 "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.
343 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
344 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
345 {
346 "value": "A String", # [Output Only] A warning data value corresponding to the key.
347 "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).
348 },
349 ],
350 },
351 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700353 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
355 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700357 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
358 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
359 {
360 "message": "A String", # [Output Only] An optional, human-readable error message.
361 "code": "A String", # [Output Only] The error type identifier for this error.
362 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
363 },
364 ],
365 },
366 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
367 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800368 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700369 }</pre>
370</div>
371
372<div class="method">
373 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700375
376Args:
377 project: string, Project ID for this request. (required)
378 region: string, Name of the region for this request. (required)
379 router: string, Name of the Router resource to return. (required)
380
381Returns:
382 An object of the form:
383
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 { # Represents a Cloud Router resource.
385 #
386 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700387 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
388 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 "nats": [ # A list of NAT services created in this router.
390 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
392 "A String",
393 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
395 "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.
396 "A String",
397 ],
398 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
399 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
400 "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.
401 { # Defines the IP ranges that want to use NAT for a subnetwork.
402 "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]
403 "A String",
404 ],
405 "name": "A String", # URL for the subnetwork resource that will use NAT.
406 "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.
407 "A String",
408 ],
409 },
410 ],
411 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
412 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
413 # - 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.
414 # - 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.
415 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
416 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
417 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
418 # - 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.
419 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
420 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700421 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
422 # - ERRORS_ONLY: Export logs only for connection failures.
423 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
424 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
426 },
427 "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.
428 },
429 ],
430 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700431 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
433 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
437 # - MANAGED_BY_USER is the default value and can be managed directly by users.
438 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700439 },
440 ],
441 "bgp": { # BGP information specific to this router.
442 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 "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.
444 { # Description-tagged IP ranges for the router to advertise.
445 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
446 "description": "A String", # User-specified description for the IP range.
447 },
448 ],
449 "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.
450 "A String",
451 ],
452 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700453 },
454 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700456 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700458 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
461 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
462 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
463 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
464 # - 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.
465 "A String",
466 ],
467 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
468 # - MANAGED_BY_USER is the default value and can be managed by you or other users
469 # - 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.
470 "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.
471 { # Description-tagged IP ranges for the router to advertise.
472 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
473 "description": "A String", # User-specified description for the IP range.
474 },
475 ],
476 "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.
477 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
478 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700479 },
480 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700482 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
483 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
484 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700486 }</pre>
487</div>
488
489<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
491 <pre>Retrieves runtime Nat mapping information of VM endpoints.
492
493Args:
494 project: string, Project ID for this request. (required)
495 region: string, Name of the region for this request. (required)
496 router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
497 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
498
Dan O'Mearadd494642020-05-01 07:42:23 -0700499You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500
Dan O'Mearadd494642020-05-01 07:42:23 -0700501Currently, only sorting by `name` or `creationTimestamp desc` is supported.
502 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`)
503 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.
504 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505
Dan O'Mearadd494642020-05-01 07:42:23 -0700506For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507
Dan O'Mearadd494642020-05-01 07:42:23 -0700508You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509
Dan O'Mearadd494642020-05-01 07:42:23 -0700510To 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) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511
512Returns:
513 An object of the form:
514
515 { # Contains a list of VmEndpointNatMappings.
516 "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.
517 "kind": "compute#vmEndpointNatMappingsList", # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
518 "warning": { # [Output Only] Informational warning message.
519 "message": "A String", # [Output Only] A human-readable description of the warning code.
520 "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.
521 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
522 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
523 {
524 "value": "A String", # [Output Only] A warning data value corresponding to the key.
525 "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).
526 },
527 ],
528 },
529 "result": [ # [Output Only] A list of Nat mapping information of VM endpoints.
530 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
531 "interfaceNatMappings": [
532 { # Contain information of Nat mapping for an interface of this endpoint.
533 "sourceVirtualIp": "A String", # Primary IP of the VM for this NIC.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 "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"].
535 "A String",
536 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700537 "drainNatIpPortRanges": [ # List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"].
538 "A String",
539 ],
540 "numTotalDrainNatPorts": 42, # Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.
541 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "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".
543 },
544 ],
545 "instanceName": "A String", # Name of the VM instance which the endpoint belongs to
546 },
547 ],
548 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
549 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
550 }</pre>
551</div>
552
553<div class="method">
554 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
555 <pre>Retrieves the next page of results.
556
557Args:
558 previous_request: The request for the previous page. (required)
559 previous_response: The response from the request for the previous page. (required)
560
561Returns:
562 A request object that you can call 'execute()' on to request the next
563 page. Returns None if there are no more items in the collection.
564 </pre>
565</div>
566
567<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700568 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
569 <pre>Retrieves runtime information of the specified router.
570
571Args:
572 project: string, Project ID for this request. (required)
573 region: string, Name of the region for this request. (required)
574 router: string, Name of the Router resource to query. (required)
575
576Returns:
577 An object of the form:
578
579 {
580 "kind": "compute#routerStatusResponse", # Type of resource.
581 "result": {
582 "bgpPeerStatus": [
583 {
584 "status": "A String", # Status of the BGP peer: {UP, DOWN}
585 "uptime": "A String", # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
586 "name": "A String", # Name of this BGP peer. Unique within the Routers resource.
587 "uptimeSeconds": "A String", # Time this session has been up, in seconds. Format: 145
588 "linkedVpnTunnel": "A String", # URL of the VPN tunnel that this BGP peer controls.
589 "peerIpAddress": "A String", # IP address of the remote BGP interface.
590 "advertisedRoutes": [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700592 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700593 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 "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
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700595 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
596 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700598 "tags": [ # A list of instance tags to which this route applies.
599 "A String",
600 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 "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:
602 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
603 # - regions/region/forwardingRules/forwardingRule
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700604 "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:
605 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 "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.
607 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700608 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
609 "network": "A String", # Fully-qualified URL of the network that this route applies to.
610 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
611 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
612 {
613 "message": "A String", # [Output Only] A human-readable description of the warning code.
614 "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.
615 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
616 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
617 {
618 "value": "A String", # [Output Only] A warning data value corresponding to the key.
619 "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).
620 },
621 ],
622 },
623 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400624 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700625 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
626 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400627 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700629 },
630 ],
631 "state": "A String", # BGP state as specified in RFC1771.
632 "ipAddress": "A String", # IP address of the local BGP interface.
633 "numLearnedRoutes": 42, # Number of routes learned from the remote BGP Peer.
634 },
635 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400636 "bestRoutesForRouter": [ # Best routes learned by this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700637 { # Represents a Route resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400638 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 "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
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400641 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
642 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400644 "tags": [ # A list of instance tags to which this route applies.
645 "A String",
646 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 "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:
648 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
649 # - regions/region/forwardingRules/forwardingRule
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400650 "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:
651 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 "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.
653 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400654 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
655 "network": "A String", # Fully-qualified URL of the network that this route applies to.
656 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
657 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
658 {
659 "message": "A String", # [Output Only] A human-readable description of the warning code.
660 "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.
661 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
662 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
663 {
664 "value": "A String", # [Output Only] A warning data value corresponding to the key.
665 "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).
666 },
667 ],
668 },
669 ],
670 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
671 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
672 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
673 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
675 },
676 ],
677 "natStatus": [
678 { # Status of a NAT contained in this router. Next tag: 9
679 "userAllocatedNatIps": [ # A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
680 "A String",
681 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700682 "drainUserAllocatedNatIps": [ # A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
683 "A String",
684 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 "name": "A String", # Unique name of this NAT.
686 "autoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
687 "A String",
688 ],
689 "numVmEndpointsWithNatMappings": 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
690 "userAllocatedNatIpResources": [ # A list of fully qualified URLs of reserved IP address resources.
691 "A String",
692 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700693 "drainAutoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
694 "A String",
695 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400697 },
698 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700699 "network": "A String", # URI of the network to which this router belongs.
700 "bestRoutes": [ # Best routes for this router's network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700702 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 "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
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700705 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
706 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700708 "tags": [ # A list of instance tags to which this route applies.
709 "A String",
710 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 "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:
712 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
713 # - regions/region/forwardingRules/forwardingRule
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700714 "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:
715 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 "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.
717 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700718 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
719 "network": "A String", # Fully-qualified URL of the network that this route applies to.
720 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
721 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
722 {
723 "message": "A String", # [Output Only] A human-readable description of the warning code.
724 "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.
725 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
726 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
727 {
728 "value": "A String", # [Output Only] A warning data value corresponding to the key.
729 "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).
730 },
731 ],
732 },
733 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400734 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700735 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
736 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400737 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700738 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700739 },
740 ],
741 },
742 }</pre>
743</div>
744
745<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700747 <pre>Creates a Router resource in the specified project and region using the data included in the request.
748
749Args:
750 project: string, Project ID for this request. (required)
751 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700753 The object takes the form of:
754
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755{ # Represents a Cloud Router resource.
756 #
757 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700758 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
759 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 "nats": [ # A list of NAT services created in this router.
761 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700762 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
763 "A String",
764 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
766 "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.
767 "A String",
768 ],
769 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
770 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
771 "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.
772 { # Defines the IP ranges that want to use NAT for a subnetwork.
773 "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]
774 "A String",
775 ],
776 "name": "A String", # URL for the subnetwork resource that will use NAT.
777 "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.
778 "A String",
779 ],
780 },
781 ],
782 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
783 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
784 # - 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.
785 # - 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.
786 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
787 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
788 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
789 # - 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.
790 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
791 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
793 # - ERRORS_ONLY: Export logs only for connection failures.
794 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
795 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
797 },
798 "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.
799 },
800 ],
801 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700802 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
804 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
808 # - MANAGED_BY_USER is the default value and can be managed directly by users.
809 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700810 },
811 ],
812 "bgp": { # BGP information specific to this router.
813 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 "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.
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 "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.
821 "A String",
822 ],
823 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700824 },
825 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700827 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700829 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -0700830 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
832 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
833 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
834 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
835 # - 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.
836 "A String",
837 ],
838 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
839 # - MANAGED_BY_USER is the default value and can be managed by you or other users
840 # - 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.
841 "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.
842 { # Description-tagged IP ranges for the router to advertise.
843 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
844 "description": "A String", # User-specified description for the IP range.
845 },
846 ],
847 "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.
848 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
849 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700850 },
851 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700852 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700853 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
854 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
855 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700857 }
858
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700859 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.
860
861For 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.
862
863The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700864
865Returns:
866 An object of the form:
867
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 { # Represents an Operation resource.
869 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 # Google Compute Engine has three Operation resources:
871 #
872 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
873 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
875 #
876 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 # - For global operations, use the `globalOperations` resource.
878 # - For regional operations, use the `regionOperations` resource.
879 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700881 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700882 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400884 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700887 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
889 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700890 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700892 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700894 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
895 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
896 {
897 "message": "A String", # [Output Only] A human-readable description of the warning code.
898 "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.
899 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
900 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
901 {
902 "value": "A String", # [Output Only] A warning data value corresponding to the key.
903 "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).
904 },
905 ],
906 },
907 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700908 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700909 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
911 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700913 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
914 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
915 {
916 "message": "A String", # [Output Only] An optional, human-readable error message.
917 "code": "A String", # [Output Only] The error type identifier for this error.
918 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
919 },
920 ],
921 },
922 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
923 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800924 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700925 }</pre>
926</div>
927
928<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700929 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700930 <pre>Retrieves a list of Router resources available to the specified project.
931
932Args:
933 project: string, Project ID for this request. (required)
934 region: string, Name of the region for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700935 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
936
Dan O'Mearadd494642020-05-01 07:42:23 -0700937You 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700938
Dan O'Mearadd494642020-05-01 07:42:23 -0700939Currently, only sorting by `name` or `creationTimestamp desc` is supported.
940 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`)
941 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.
942 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700943
Dan O'Mearadd494642020-05-01 07:42:23 -0700944For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700945
Dan O'Mearadd494642020-05-01 07:42:23 -0700946You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700947
Dan O'Mearadd494642020-05-01 07:42:23 -0700948To 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) ```
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700949
950Returns:
951 An object of the form:
952
953 { # Contains a list of Router resources.
954 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700956 "items": [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 { # Represents a Cloud Router resource.
958 #
959 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700960 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
961 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 "nats": [ # A list of NAT services created in this router.
963 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
965 "A String",
966 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
968 "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.
969 "A String",
970 ],
971 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
972 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
973 "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.
974 { # Defines the IP ranges that want to use NAT for a subnetwork.
975 "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]
976 "A String",
977 ],
978 "name": "A String", # URL for the subnetwork resource that will use NAT.
979 "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.
980 "A String",
981 ],
982 },
983 ],
984 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
985 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
986 # - 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.
987 # - 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.
988 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
989 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
990 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
991 # - 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.
992 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
993 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700994 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
995 # - ERRORS_ONLY: Export logs only for connection failures.
996 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
997 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
999 },
1000 "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.
1001 },
1002 ],
1003 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001004 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001005 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1006 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001008 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001009 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1010 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1011 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001012 },
1013 ],
1014 "bgp": { # BGP information specific to this router.
1015 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 "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.
1017 { # Description-tagged IP ranges for the router to advertise.
1018 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1019 "description": "A String", # User-specified description for the IP range.
1020 },
1021 ],
1022 "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.
1023 "A String",
1024 ],
1025 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001026 },
1027 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001029 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001031 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001032 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1034 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1035 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1036 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1037 # - 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.
1038 "A String",
1039 ],
1040 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1041 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1042 # - 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.
1043 "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.
1044 { # Description-tagged IP ranges for the router to advertise.
1045 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1046 "description": "A String", # User-specified description for the IP range.
1047 },
1048 ],
1049 "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.
1050 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1051 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001052 },
1053 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001055 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1056 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1057 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001059 },
1060 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 "warning": { # [Output Only] Informational warning message.
1062 "message": "A String", # [Output Only] A human-readable description of the warning code.
1063 "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.
1064 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1065 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1066 {
1067 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1068 "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).
1069 },
1070 ],
1071 },
1072 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001073 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001074 }</pre>
1075</div>
1076
1077<div class="method">
1078 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1079 <pre>Retrieves the next page of results.
1080
1081Args:
1082 previous_request: The request for the previous page. (required)
1083 previous_response: The response from the request for the previous page. (required)
1084
1085Returns:
1086 A request object that you can call 'execute()' on to request the next
1087 page. Returns None if there are no more items in the collection.
1088 </pre>
1089</div>
1090
1091<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093 <pre>Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001094
1095Args:
1096 project: string, Project ID for this request. (required)
1097 region: string, Name of the region for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001098 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001099 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001100 The object takes the form of:
1101
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001102{ # Represents a Cloud Router resource.
1103 #
1104 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001105 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1106 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 "nats": [ # A list of NAT services created in this router.
1108 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1110 "A String",
1111 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1113 "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.
1114 "A String",
1115 ],
1116 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1117 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1118 "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.
1119 { # Defines the IP ranges that want to use NAT for a subnetwork.
1120 "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]
1121 "A String",
1122 ],
1123 "name": "A String", # URL for the subnetwork resource that will use NAT.
1124 "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.
1125 "A String",
1126 ],
1127 },
1128 ],
1129 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1130 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1131 # - 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.
1132 # - 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.
1133 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1134 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1135 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1136 # - 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.
1137 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1138 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001139 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1140 # - ERRORS_ONLY: Export logs only for connection failures.
1141 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1142 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1144 },
1145 "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.
1146 },
1147 ],
1148 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001149 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001150 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1151 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001152 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001153 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1155 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1156 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001157 },
1158 ],
1159 "bgp": { # BGP information specific to this router.
1160 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 "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.
1162 { # Description-tagged IP ranges for the router to advertise.
1163 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1164 "description": "A String", # User-specified description for the IP range.
1165 },
1166 ],
1167 "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.
1168 "A String",
1169 ],
1170 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001171 },
1172 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001173 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001174 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001175 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001176 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001177 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001178 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1179 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1180 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1181 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1182 # - 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.
1183 "A String",
1184 ],
1185 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1186 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1187 # - 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.
1188 "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.
1189 { # Description-tagged IP ranges for the router to advertise.
1190 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1191 "description": "A String", # User-specified description for the IP range.
1192 },
1193 ],
1194 "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.
1195 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1196 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001197 },
1198 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001200 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1201 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1202 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001204 }
1205
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206 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.
1207
1208For 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.
1209
1210The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001211
1212Returns:
1213 An object of the form:
1214
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001215 { # Represents an Operation resource.
1216 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001217 # Google Compute Engine has three Operation resources:
1218 #
1219 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1220 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1222 #
1223 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001224 # - For global operations, use the `globalOperations` resource.
1225 # - For regional operations, use the `regionOperations` resource.
1226 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001227 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001228 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001229 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001231 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001234 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001235 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1236 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001237 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001238 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001239 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001240 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001241 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1242 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1243 {
1244 "message": "A String", # [Output Only] A human-readable description of the warning code.
1245 "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.
1246 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1247 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1248 {
1249 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1250 "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).
1251 },
1252 ],
1253 },
1254 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001255 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001256 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001257 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1258 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001260 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1261 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1262 {
1263 "message": "A String", # [Output Only] An optional, human-readable error message.
1264 "code": "A String", # [Output Only] The error type identifier for this error.
1265 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1266 },
1267 ],
1268 },
1269 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1270 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001271 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001272 }</pre>
1273</div>
1274
1275<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001276 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001277 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1278
1279Args:
1280 project: string, Project ID for this request. (required)
1281 region: string, Name of the region for this request. (required)
1282 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001283 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001284 The object takes the form of:
1285
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001286{ # Represents a Cloud Router resource.
1287 #
1288 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001289 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1290 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001291 "nats": [ # A list of NAT services created in this router.
1292 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001293 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1294 "A String",
1295 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001296 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1297 "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.
1298 "A String",
1299 ],
1300 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1301 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1302 "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.
1303 { # Defines the IP ranges that want to use NAT for a subnetwork.
1304 "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]
1305 "A String",
1306 ],
1307 "name": "A String", # URL for the subnetwork resource that will use NAT.
1308 "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.
1309 "A String",
1310 ],
1311 },
1312 ],
1313 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1314 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1315 # - 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.
1316 # - 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.
1317 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1318 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1319 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1320 # - 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.
1321 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1322 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1324 # - ERRORS_ONLY: Export logs only for connection failures.
1325 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1326 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001327 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1328 },
1329 "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.
1330 },
1331 ],
1332 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001333 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001334 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1335 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001337 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1339 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1340 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001341 },
1342 ],
1343 "bgp": { # BGP information specific to this router.
1344 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345 "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.
1346 { # Description-tagged IP ranges for the router to advertise.
1347 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1348 "description": "A String", # User-specified description for the IP range.
1349 },
1350 ],
1351 "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.
1352 "A String",
1353 ],
1354 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001355 },
1356 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001358 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001359 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001360 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1363 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1364 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1365 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1366 # - 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.
1367 "A String",
1368 ],
1369 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1370 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1371 # - 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.
1372 "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.
1373 { # Description-tagged IP ranges for the router to advertise.
1374 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1375 "description": "A String", # User-specified description for the IP range.
1376 },
1377 ],
1378 "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.
1379 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1380 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001381 },
1382 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001383 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001384 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1385 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1386 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001388 }
1389
1390
1391Returns:
1392 An object of the form:
1393
1394 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 "resource": { # Represents a Cloud Router resource. # Preview of given router.
1396 #
1397 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001398 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1399 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400 "nats": [ # A list of NAT services created in this router.
1401 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001402 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1403 "A String",
1404 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001405 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1406 "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.
1407 "A String",
1408 ],
1409 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1410 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1411 "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.
1412 { # Defines the IP ranges that want to use NAT for a subnetwork.
1413 "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]
1414 "A String",
1415 ],
1416 "name": "A String", # URL for the subnetwork resource that will use NAT.
1417 "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.
1418 "A String",
1419 ],
1420 },
1421 ],
1422 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1423 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1424 # - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
1425 # - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
1426 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1427 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1428 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1429 # - 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.
1430 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1431 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001432 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1433 # - ERRORS_ONLY: Export logs only for connection failures.
1434 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1435 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001436 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1437 },
1438 "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.
1439 },
1440 ],
1441 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001442 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001443 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1444 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001445 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001446 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1448 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1449 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001450 },
1451 ],
1452 "bgp": { # BGP information specific to this router.
1453 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001454 "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.
1455 { # Description-tagged IP ranges for the router to advertise.
1456 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1457 "description": "A String", # User-specified description for the IP range.
1458 },
1459 ],
1460 "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.
1461 "A String",
1462 ],
1463 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001464 },
1465 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001467 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001468 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001469 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001470 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001471 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1472 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1473 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1474 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1475 # - 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.
1476 "A String",
1477 ],
1478 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1479 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1480 # - 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.
1481 "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.
1482 { # Description-tagged IP ranges for the router to advertise.
1483 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1484 "description": "A String", # User-specified description for the IP range.
1485 },
1486 ],
1487 "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.
1488 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1489 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001490 },
1491 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001493 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1494 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1495 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001496 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001497 },
1498 }</pre>
1499</div>
1500
1501<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001502 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1503 <pre>Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001504
1505Args:
1506 project: string, Project ID for this request. (required)
1507 region: string, Name of the region for this request. (required)
1508 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001509 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001510 The object takes the form of:
1511
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001512{ # Represents a Cloud Router resource.
1513 #
1514 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001515 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1516 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001517 "nats": [ # A list of NAT services created in this router.
1518 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001519 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1520 "A String",
1521 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1523 "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.
1524 "A String",
1525 ],
1526 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1527 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1528 "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.
1529 { # Defines the IP ranges that want to use NAT for a subnetwork.
1530 "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]
1531 "A String",
1532 ],
1533 "name": "A String", # URL for the subnetwork resource that will use NAT.
1534 "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.
1535 "A String",
1536 ],
1537 },
1538 ],
1539 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1540 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1541 # - 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.
1542 # - 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.
1543 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1544 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1545 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1546 # - 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.
1547 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1548 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001549 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1550 # - ERRORS_ONLY: Export logs only for connection failures.
1551 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1552 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1554 },
1555 "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.
1556 },
1557 ],
1558 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001559 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001560 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1561 "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 a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1565 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1566 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001567 },
1568 ],
1569 "bgp": { # BGP information specific to this router.
1570 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001571 "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.
1572 { # Description-tagged IP ranges for the router to advertise.
1573 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1574 "description": "A String", # User-specified description for the IP range.
1575 },
1576 ],
1577 "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.
1578 "A String",
1579 ],
1580 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001581 },
1582 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001584 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001586 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001587 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1589 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1590 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1591 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1592 # - 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.
1593 "A String",
1594 ],
1595 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1596 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1597 # - 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.
1598 "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.
1599 { # Description-tagged IP ranges for the router to advertise.
1600 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1601 "description": "A String", # User-specified description for the IP range.
1602 },
1603 ],
1604 "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.
1605 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1606 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001607 },
1608 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001610 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1611 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1612 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001613 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001614 }
1615
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001616 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.
1617
1618For 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.
1619
1620The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001621
1622Returns:
1623 An object of the form:
1624
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001625 { # Represents an Operation resource.
1626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001627 # Google Compute Engine has three Operation resources:
1628 #
1629 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1630 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1632 #
1633 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001634 # - For global operations, use the `globalOperations` resource.
1635 # - For regional operations, use the `regionOperations` resource.
1636 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001637 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001639 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001640 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001641 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001642 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001643 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001644 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001645 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1646 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001647 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001648 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001649 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001650 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001651 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1652 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1653 {
1654 "message": "A String", # [Output Only] A human-readable description of the warning code.
1655 "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.
1656 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1657 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1658 {
1659 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1660 "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).
1661 },
1662 ],
1663 },
1664 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001665 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001666 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001667 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1668 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001670 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1671 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1672 {
1673 "message": "A String", # [Output Only] An optional, human-readable error message.
1674 "code": "A String", # [Output Only] The error type identifier for this error.
1675 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1676 },
1677 ],
1678 },
1679 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1680 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001681 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001682 }</pre>
1683</div>
1684
1685</body></html>