blob: f4b3c5dce588e98a2220d22aebb43f723827e386 [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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#insert">insert(project, region, body, 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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#patch">patch(project, region, router, body, requestId=None)</a></code></p>
109<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700110<p class="toc_element">
111 <code><a href="#preview">preview(project, region, router, body)</a></code></p>
112<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#update">update(project, region, router, body, requestId=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700115<p class="firstline">Updates the specified Router resource with the data included in the request.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700116<h3>Method Details</h3>
117<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700118 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=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
125You 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.
126
127Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400128 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)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700129 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700131
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700137
138Returns:
139 An object of the form:
140
141 { # Contains a list of routers.
142 "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 -0700143 "kind": "compute#routerAggregatedList", # Type of resource.
144 "items": { # A list of Router resources.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700145 "a_key": { # Name of the scope containing this set of routers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 "routers": [ # A list of routers contained in this scope.
147 { # Represents a Cloud Router resource.
148 #
149 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700150 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
151 "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 -0700152 "nats": [ # A list of NAT services created in this router.
153 { # 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.
154 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
155 "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.
156 "A String",
157 ],
158 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
159 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
160 "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.
161 { # Defines the IP ranges that want to use NAT for a subnetwork.
162 "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]
163 "A String",
164 ],
165 "name": "A String", # URL for the subnetwork resource that will use NAT.
166 "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.
167 "A String",
168 ],
169 },
170 ],
171 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
172 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
173 # - 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.
174 # - 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.
175 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
176 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
177 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
178 # - 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.
179 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
180 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
181 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
182 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
183 },
184 "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.
185 },
186 ],
187 "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 -0700188 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
190 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
191 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700192 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
194 # - MANAGED_BY_USER is the default value and can be managed directly by users.
195 # - 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 -0700196 },
197 ],
198 "bgp": { # BGP information specific to this router.
199 "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 -0700200 "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.
201 { # Description-tagged IP ranges for the router to advertise.
202 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
203 "description": "A String", # User-specified description for the IP range.
204 },
205 ],
206 "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.
207 "A String",
208 ],
209 "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 -0700210 },
211 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 "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 -0700213 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700215 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700216 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
218 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
219 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
220 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
221 # - 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.
222 "A String",
223 ],
224 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
225 # - MANAGED_BY_USER is the default value and can be managed by you or other users
226 # - 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.
227 "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.
228 { # Description-tagged IP ranges for the router to advertise.
229 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
230 "description": "A String", # User-specified description for the IP range.
231 },
232 ],
233 "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.
234 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
235 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700236 },
237 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 "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 -0700239 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
240 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
241 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 "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 -0700243 },
244 ],
245 "warning": { # Informational warning which replaces the list of routers when the list is empty.
246 "message": "A String", # [Output Only] A human-readable description of the warning code.
247 "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.
248 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
249 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
250 {
251 "value": "A String", # [Output Only] A warning data value corresponding to the key.
252 "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).
253 },
254 ],
255 },
256 },
257 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 "warning": { # [Output Only] Informational warning message.
259 "message": "A String", # [Output Only] A human-readable description of the warning code.
260 "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.
261 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
262 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
263 {
264 "value": "A String", # [Output Only] A warning data value corresponding to the key.
265 "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).
266 },
267 ],
268 },
269 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700270 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
271 }</pre>
272</div>
273
274<div class="method">
275 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
276 <pre>Retrieves the next page of results.
277
278Args:
279 previous_request: The request for the previous page. (required)
280 previous_response: The response from the request for the previous page. (required)
281
282Returns:
283 A request object that you can call 'execute()' on to request the next
284 page. Returns None if there are no more items in the collection.
285 </pre>
286</div>
287
288<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700290 <pre>Deletes the specified Router resource.
291
292Args:
293 project: string, Project ID for this request. (required)
294 region: string, Name of the region for this request. (required)
295 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 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.
297
298For 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.
299
300The 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 -0700301
302Returns:
303 An object of the form:
304
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700305 { # Represents an Operation resource.
306 #
307 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
308 #
309 # Operations can be global, regional or zonal.
310 # - For global operations, use the globalOperations resource.
311 # - For regional operations, use the regionOperations resource.
312 # - For zonal operations, use the zonalOperations resource.
313 #
314 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700315 "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 -0700316 "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 -0400317 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700318 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 "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 -0700320 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
321 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
322 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
323 "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.
324 "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.
325 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
326 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
327 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
328 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
329 {
330 "message": "A String", # [Output Only] A human-readable description of the warning code.
331 "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.
332 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
333 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
334 {
335 "value": "A String", # [Output Only] A warning data value corresponding to the key.
336 "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).
337 },
338 ],
339 },
340 ],
341 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
342 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
343 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
344 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 "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 -0700346 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
347 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
348 {
349 "message": "A String", # [Output Only] An optional, human-readable error message.
350 "code": "A String", # [Output Only] The error type identifier for this error.
351 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
352 },
353 ],
354 },
355 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
356 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800357 "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 -0700358 }</pre>
359</div>
360
361<div class="method">
362 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 <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 -0700364
365Args:
366 project: string, Project ID for this request. (required)
367 region: string, Name of the region for this request. (required)
368 router: string, Name of the Router resource to return. (required)
369
370Returns:
371 An object of the form:
372
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 { # Represents a Cloud Router resource.
374 #
375 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700376 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
377 "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 -0700378 "nats": [ # A list of NAT services created in this router.
379 { # 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.
380 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
381 "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.
382 "A String",
383 ],
384 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
385 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
386 "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.
387 { # Defines the IP ranges that want to use NAT for a subnetwork.
388 "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]
389 "A String",
390 ],
391 "name": "A String", # URL for the subnetwork resource that will use NAT.
392 "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.
393 "A String",
394 ],
395 },
396 ],
397 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
398 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
399 # - 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.
400 # - 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.
401 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
402 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
403 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
404 # - 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.
405 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
406 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
407 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
408 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
409 },
410 "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.
411 },
412 ],
413 "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 -0700414 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
416 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
417 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700418 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700419 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
420 # - MANAGED_BY_USER is the default value and can be managed directly by users.
421 # - 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 -0700422 },
423 ],
424 "bgp": { # BGP information specific to this router.
425 "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 -0700426 "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.
427 { # Description-tagged IP ranges for the router to advertise.
428 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
429 "description": "A String", # User-specified description for the IP range.
430 },
431 ],
432 "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.
433 "A String",
434 ],
435 "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 -0700436 },
437 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 "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 -0700439 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700441 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700442 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
444 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
445 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
446 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
447 # - 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.
448 "A String",
449 ],
450 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
451 # - MANAGED_BY_USER is the default value and can be managed by you or other users
452 # - 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.
453 "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.
454 { # Description-tagged IP ranges for the router to advertise.
455 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
456 "description": "A String", # User-specified description for the IP range.
457 },
458 ],
459 "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.
460 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
461 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700462 },
463 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 "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 -0700465 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
466 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
467 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 "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 -0700469 }</pre>
470</div>
471
472<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700473 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
474 <pre>Retrieves runtime Nat mapping information of VM endpoints.
475
476Args:
477 project: string, Project ID for this request. (required)
478 region: string, Name of the region for this request. (required)
479 router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
480 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
481
482You 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.
483
484Currently, only sorting by name or creationTimestamp desc is supported.
485 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)
486 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.
487 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
488
489For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
490
491You 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.
492
493To 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).
494
495Returns:
496 An object of the form:
497
498 { # Contains a list of VmEndpointNatMappings.
499 "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.
500 "kind": "compute#vmEndpointNatMappingsList", # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
501 "warning": { # [Output Only] Informational warning message.
502 "message": "A String", # [Output Only] A human-readable description of the warning code.
503 "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.
504 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
505 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
506 {
507 "value": "A String", # [Output Only] A warning data value corresponding to the key.
508 "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).
509 },
510 ],
511 },
512 "result": [ # [Output Only] A list of Nat mapping information of VM endpoints.
513 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
514 "interfaceNatMappings": [
515 { # Contain information of Nat mapping for an interface of this endpoint.
516 "sourceVirtualIp": "A String", # Primary IP of the VM for this NIC.
517 "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.
518 "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"].
519 "A String",
520 ],
521 "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".
522 },
523 ],
524 "instanceName": "A String", # Name of the VM instance which the endpoint belongs to
525 },
526 ],
527 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
528 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
529 }</pre>
530</div>
531
532<div class="method">
533 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
534 <pre>Retrieves the next page of results.
535
536Args:
537 previous_request: The request for the previous page. (required)
538 previous_response: The response from the request for the previous page. (required)
539
540Returns:
541 A request object that you can call 'execute()' on to request the next
542 page. Returns None if there are no more items in the collection.
543 </pre>
544</div>
545
546<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700547 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
548 <pre>Retrieves runtime information of the specified router.
549
550Args:
551 project: string, Project ID for this request. (required)
552 region: string, Name of the region for this request. (required)
553 router: string, Name of the Router resource to query. (required)
554
555Returns:
556 An object of the form:
557
558 {
559 "kind": "compute#routerStatusResponse", # Type of resource.
560 "result": {
561 "bgpPeerStatus": [
562 {
563 "status": "A String", # Status of the BGP peer: {UP, DOWN}
564 "uptime": "A String", # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
565 "name": "A String", # Name of this BGP peer. Unique within the Routers resource.
566 "uptimeSeconds": "A String", # Time this session has been up, in seconds. Format: 145
567 "linkedVpnTunnel": "A String", # URL of the VPN tunnel that this BGP peer controls.
568 "peerIpAddress": "A String", # IP address of the remote BGP interface.
569 "advertisedRoutes": [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700571 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)
573 "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 -0700574 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
575 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 "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 -0700577 "tags": [ # A list of instance tags to which this route applies.
578 "A String",
579 ],
580 "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:
581 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 "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.
583 "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 -0700584 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
585 "network": "A String", # Fully-qualified URL of the network that this route applies to.
586 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
587 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
588 {
589 "message": "A String", # [Output Only] A human-readable description of the warning code.
590 "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.
591 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
592 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
593 {
594 "value": "A String", # [Output Only] A warning data value corresponding to the key.
595 "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).
596 },
597 ],
598 },
599 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400600 "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 -0700601 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
602 "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 -0400603 "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 -0700604 "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 -0700605 },
606 ],
607 "state": "A String", # BGP state as specified in RFC1771.
608 "ipAddress": "A String", # IP address of the local BGP interface.
609 "numLearnedRoutes": 42, # Number of routes learned from the remote BGP Peer.
610 },
611 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400612 "bestRoutesForRouter": [ # Best routes learned by this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613 { # Represents a Route resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400614 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)
616 "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 -0400617 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
618 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 "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 -0400620 "tags": [ # A list of instance tags to which this route applies.
621 "A String",
622 ],
623 "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:
624 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 "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.
626 "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 -0400627 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
628 "network": "A String", # Fully-qualified URL of the network that this route applies to.
629 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
630 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
631 {
632 "message": "A String", # [Output Only] A human-readable description of the warning code.
633 "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.
634 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
635 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
636 {
637 "value": "A String", # [Output Only] A warning data value corresponding to the key.
638 "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).
639 },
640 ],
641 },
642 ],
643 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
644 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
645 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
646 "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 -0700647 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
648 },
649 ],
650 "natStatus": [
651 { # Status of a NAT contained in this router. Next tag: 9
652 "userAllocatedNatIps": [ # A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
653 "A String",
654 ],
655 "name": "A String", # Unique name of this NAT.
656 "autoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
657 "A String",
658 ],
659 "numVmEndpointsWithNatMappings": 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
660 "userAllocatedNatIpResources": [ # A list of fully qualified URLs of reserved IP address resources.
661 "A String",
662 ],
663 "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 -0400664 },
665 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700666 "network": "A String", # URI of the network to which this router belongs.
667 "bestRoutes": [ # Best routes for this router's network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700668 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700669 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)
671 "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 -0700672 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
673 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 "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 -0700675 "tags": [ # A list of instance tags to which this route applies.
676 "A String",
677 ],
678 "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:
679 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 "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.
681 "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 -0700682 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
683 "network": "A String", # Fully-qualified URL of the network that this route applies to.
684 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
685 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
686 {
687 "message": "A String", # [Output Only] A human-readable description of the warning code.
688 "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.
689 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
690 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
691 {
692 "value": "A String", # [Output Only] A warning data value corresponding to the key.
693 "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).
694 },
695 ],
696 },
697 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400698 "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 -0700699 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
700 "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 -0400701 "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 -0700702 "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 -0700703 },
704 ],
705 },
706 }</pre>
707</div>
708
709<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 <code class="details" id="insert">insert(project, region, body, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700711 <pre>Creates a Router resource in the specified project and region using the data included in the request.
712
713Args:
714 project: string, Project ID for this request. (required)
715 region: string, Name of the region for this request. (required)
716 body: object, The request body. (required)
717 The object takes the form of:
718
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719{ # Represents a Cloud Router resource.
720 #
721 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700722 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
723 "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 -0700724 "nats": [ # A list of NAT services created in this router.
725 { # 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.
726 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
727 "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.
728 "A String",
729 ],
730 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
731 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
732 "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.
733 { # Defines the IP ranges that want to use NAT for a subnetwork.
734 "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]
735 "A String",
736 ],
737 "name": "A String", # URL for the subnetwork resource that will use NAT.
738 "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.
739 "A String",
740 ],
741 },
742 ],
743 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
744 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
745 # - 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.
746 # - 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.
747 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
748 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
749 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
750 # - 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.
751 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
752 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
753 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
754 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
755 },
756 "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.
757 },
758 ],
759 "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 -0700760 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
762 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
763 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700764 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
766 # - MANAGED_BY_USER is the default value and can be managed directly by users.
767 # - 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 -0700768 },
769 ],
770 "bgp": { # BGP information specific to this router.
771 "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 -0700772 "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.
773 { # Description-tagged IP ranges for the router to advertise.
774 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
775 "description": "A String", # User-specified description for the IP range.
776 },
777 ],
778 "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.
779 "A String",
780 ],
781 "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 -0700782 },
783 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700784 "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 -0700785 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700787 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700788 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
790 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
791 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
792 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
793 # - 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.
794 "A String",
795 ],
796 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
797 # - MANAGED_BY_USER is the default value and can be managed by you or other users
798 # - 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.
799 "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.
800 { # Description-tagged IP ranges for the router to advertise.
801 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
802 "description": "A String", # User-specified description for the IP range.
803 },
804 ],
805 "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.
806 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
807 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700808 },
809 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 "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 -0700811 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
812 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
813 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 "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 -0700815 }
816
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 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.
818
819For 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.
820
821The 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 -0700822
823Returns:
824 An object of the form:
825
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 { # Represents an Operation resource.
827 #
828 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
829 #
830 # Operations can be global, regional or zonal.
831 # - For global operations, use the globalOperations resource.
832 # - For regional operations, use the regionOperations resource.
833 # - For zonal operations, use the zonalOperations resource.
834 #
835 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700836 "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 -0700837 "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 -0400838 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700839 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700840 "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 -0700841 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
842 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
843 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
844 "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.
845 "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.
846 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
847 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
848 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
849 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
850 {
851 "message": "A String", # [Output Only] A human-readable description of the warning code.
852 "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.
853 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
854 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
855 {
856 "value": "A String", # [Output Only] A warning data value corresponding to the key.
857 "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).
858 },
859 ],
860 },
861 ],
862 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
863 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
864 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
865 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 "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 -0700867 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
868 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
869 {
870 "message": "A String", # [Output Only] An optional, human-readable error message.
871 "code": "A String", # [Output Only] The error type identifier for this error.
872 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
873 },
874 ],
875 },
876 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
877 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800878 "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 -0700879 }</pre>
880</div>
881
882<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700883 <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 -0700884 <pre>Retrieves a list of Router resources available to the specified project.
885
886Args:
887 project: string, Project ID for this request. (required)
888 region: string, Name of the region for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700889 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
890
891You 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.
892
893Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400894 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)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700895 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700897
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898For 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 -0700899
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900You 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 -0700901
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902To 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 -0700903
904Returns:
905 An object of the form:
906
907 { # Contains a list of Router resources.
908 "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 -0700909 "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700910 "items": [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 { # Represents a Cloud Router resource.
912 #
913 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700914 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
915 "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 -0700916 "nats": [ # A list of NAT services created in this router.
917 { # 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.
918 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
919 "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.
920 "A String",
921 ],
922 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
923 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
924 "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.
925 { # Defines the IP ranges that want to use NAT for a subnetwork.
926 "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]
927 "A String",
928 ],
929 "name": "A String", # URL for the subnetwork resource that will use NAT.
930 "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.
931 "A String",
932 ],
933 },
934 ],
935 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
936 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
937 # - 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.
938 # - 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.
939 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
940 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
941 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
942 # - 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.
943 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
944 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
945 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
946 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
947 },
948 "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.
949 },
950 ],
951 "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 -0700952 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700953 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
954 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
955 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700956 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
958 # - MANAGED_BY_USER is the default value and can be managed directly by users.
959 # - 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 -0700960 },
961 ],
962 "bgp": { # BGP information specific to this router.
963 "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 -0700964 "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.
965 { # Description-tagged IP ranges for the router to advertise.
966 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
967 "description": "A String", # User-specified description for the IP range.
968 },
969 ],
970 "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.
971 "A String",
972 ],
973 "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 -0700974 },
975 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 "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 -0700977 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700979 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700980 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
982 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
983 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
984 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
985 # - 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.
986 "A String",
987 ],
988 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
989 # - MANAGED_BY_USER is the default value and can be managed by you or other users
990 # - 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.
991 "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.
992 { # Description-tagged IP ranges for the router to advertise.
993 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
994 "description": "A String", # User-specified description for the IP range.
995 },
996 ],
997 "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.
998 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
999 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001000 },
1001 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 "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 -07001003 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1004 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1005 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 "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 -07001007 },
1008 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001009 "warning": { # [Output Only] Informational warning message.
1010 "message": "A String", # [Output Only] A human-readable description of the warning code.
1011 "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.
1012 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1013 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1014 {
1015 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1016 "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).
1017 },
1018 ],
1019 },
1020 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001021 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001022 }</pre>
1023</div>
1024
1025<div class="method">
1026 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1027 <pre>Retrieves the next page of results.
1028
1029Args:
1030 previous_request: The request for the previous page. (required)
1031 previous_response: The response from the request for the previous page. (required)
1032
1033Returns:
1034 A request object that you can call 'execute()' on to request the next
1035 page. Returns None if there are no more items in the collection.
1036 </pre>
1037</div>
1038
1039<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 <code class="details" id="patch">patch(project, region, router, body, requestId=None)</code>
1041 <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 -07001042
1043Args:
1044 project: string, Project ID for this request. (required)
1045 region: string, Name of the region for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001046 router: string, Name of the Router resource to patch. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001047 body: object, The request body. (required)
1048 The object takes the form of:
1049
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050{ # Represents a Cloud Router resource.
1051 #
1052 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001053 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1054 "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 -07001055 "nats": [ # A list of NAT services created in this router.
1056 { # 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.
1057 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1058 "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.
1059 "A String",
1060 ],
1061 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1062 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1063 "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.
1064 { # Defines the IP ranges that want to use NAT for a subnetwork.
1065 "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]
1066 "A String",
1067 ],
1068 "name": "A String", # URL for the subnetwork resource that will use NAT.
1069 "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.
1070 "A String",
1071 ],
1072 },
1073 ],
1074 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1075 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1076 # - 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.
1077 # - 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.
1078 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1079 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1080 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1081 # - 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.
1082 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1083 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1084 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1085 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1086 },
1087 "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.
1088 },
1089 ],
1090 "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 -07001091 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001092 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
1093 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
1094 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001095 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1097 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1098 # - 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 -07001099 },
1100 ],
1101 "bgp": { # BGP information specific to this router.
1102 "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 -07001103 "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.
1104 { # Description-tagged IP ranges for the router to advertise.
1105 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1106 "description": "A String", # User-specified description for the IP range.
1107 },
1108 ],
1109 "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.
1110 "A String",
1111 ],
1112 "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 -07001113 },
1114 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 "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 -07001116 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001117 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001118 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001119 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1121 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1122 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1123 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1124 # - 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.
1125 "A String",
1126 ],
1127 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1128 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1129 # - 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.
1130 "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.
1131 { # Description-tagged IP ranges for the router to advertise.
1132 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1133 "description": "A String", # User-specified description for the IP range.
1134 },
1135 ],
1136 "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.
1137 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1138 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001139 },
1140 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001141 "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 -07001142 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1143 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1144 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 "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 -07001146 }
1147
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 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.
1149
1150For 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.
1151
1152The 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 -07001153
1154Returns:
1155 An object of the form:
1156
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 { # Represents an Operation resource.
1158 #
1159 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1160 #
1161 # Operations can be global, regional or zonal.
1162 # - For global operations, use the globalOperations resource.
1163 # - For regional operations, use the regionOperations resource.
1164 # - For zonal operations, use the zonalOperations resource.
1165 #
1166 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001167 "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 -07001168 "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 -04001169 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001170 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 "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 -07001172 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1173 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1174 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1175 "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.
1176 "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.
1177 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1178 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1179 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1180 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1181 {
1182 "message": "A String", # [Output Only] A human-readable description of the warning code.
1183 "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.
1184 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1185 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1186 {
1187 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1188 "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).
1189 },
1190 ],
1191 },
1192 ],
1193 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1194 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1195 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1196 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 "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 -07001198 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1199 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1200 {
1201 "message": "A String", # [Output Only] An optional, human-readable error message.
1202 "code": "A String", # [Output Only] The error type identifier for this error.
1203 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1204 },
1205 ],
1206 },
1207 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1208 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001209 "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 -07001210 }</pre>
1211</div>
1212
1213<div class="method">
1214 <code class="details" id="preview">preview(project, region, router, body)</code>
1215 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1216
1217Args:
1218 project: string, Project ID for this request. (required)
1219 region: string, Name of the region for this request. (required)
1220 router: string, Name of the Router resource to query. (required)
1221 body: object, The request body. (required)
1222 The object takes the form of:
1223
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001224{ # Represents a Cloud Router resource.
1225 #
1226 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001227 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1228 "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 -07001229 "nats": [ # A list of NAT services created in this router.
1230 { # 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.
1231 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1232 "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.
1233 "A String",
1234 ],
1235 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1236 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1237 "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.
1238 { # Defines the IP ranges that want to use NAT for a subnetwork.
1239 "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]
1240 "A String",
1241 ],
1242 "name": "A String", # URL for the subnetwork resource that will use NAT.
1243 "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.
1244 "A String",
1245 ],
1246 },
1247 ],
1248 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1249 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1250 # - 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.
1251 # - 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.
1252 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1253 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1254 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1255 # - 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.
1256 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1257 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1258 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1259 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1260 },
1261 "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.
1262 },
1263 ],
1264 "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 -07001265 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
1267 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
1268 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001269 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001270 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1271 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1272 # - 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 -07001273 },
1274 ],
1275 "bgp": { # BGP information specific to this router.
1276 "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 -07001277 "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.
1278 { # Description-tagged IP ranges for the router to advertise.
1279 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1280 "description": "A String", # User-specified description for the IP range.
1281 },
1282 ],
1283 "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.
1284 "A String",
1285 ],
1286 "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 -07001287 },
1288 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001289 "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 -07001290 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001291 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001292 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001293 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1295 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1296 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1297 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1298 # - 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.
1299 "A String",
1300 ],
1301 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1302 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1303 # - 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.
1304 "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.
1305 { # Description-tagged IP ranges for the router to advertise.
1306 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1307 "description": "A String", # User-specified description for the IP range.
1308 },
1309 ],
1310 "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.
1311 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1312 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001313 },
1314 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001315 "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 -07001316 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1317 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1318 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001319 "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 -07001320 }
1321
1322
1323Returns:
1324 An object of the form:
1325
1326 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001327 "resource": { # Represents a Cloud Router resource. # Preview of given router.
1328 #
1329 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001330 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1331 "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 -07001332 "nats": [ # A list of NAT services created in this router.
1333 { # 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.
1334 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1335 "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.
1336 "A String",
1337 ],
1338 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1339 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1340 "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.
1341 { # Defines the IP ranges that want to use NAT for a subnetwork.
1342 "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]
1343 "A String",
1344 ],
1345 "name": "A String", # URL for the subnetwork resource that will use NAT.
1346 "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.
1347 "A String",
1348 ],
1349 },
1350 ],
1351 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1352 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1353 # - 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.
1354 # - 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.
1355 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1356 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1357 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1358 # - 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.
1359 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1360 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1361 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1362 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1363 },
1364 "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.
1365 },
1366 ],
1367 "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 -07001368 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
1370 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
1371 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001372 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1374 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1375 # - 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 -07001376 },
1377 ],
1378 "bgp": { # BGP information specific to this router.
1379 "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 -07001380 "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.
1381 { # Description-tagged IP ranges for the router to advertise.
1382 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1383 "description": "A String", # User-specified description for the IP range.
1384 },
1385 ],
1386 "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.
1387 "A String",
1388 ],
1389 "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 -07001390 },
1391 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 "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 -07001393 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001395 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001396 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1398 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1399 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1400 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1401 # - 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.
1402 "A String",
1403 ],
1404 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1405 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1406 # - 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.
1407 "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.
1408 { # Description-tagged IP ranges for the router to advertise.
1409 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1410 "description": "A String", # User-specified description for the IP range.
1411 },
1412 ],
1413 "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.
1414 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1415 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001416 },
1417 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001418 "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 -07001419 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1420 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1421 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 "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 -07001423 },
1424 }</pre>
1425</div>
1426
1427<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 <code class="details" id="update">update(project, region, router, body, requestId=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001429 <pre>Updates the specified Router resource with the data included in the request.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001430
1431Args:
1432 project: string, Project ID for this request. (required)
1433 region: string, Name of the region for this request. (required)
1434 router: string, Name of the Router resource to update. (required)
1435 body: object, The request body. (required)
1436 The object takes the form of:
1437
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001438{ # Represents a Cloud Router resource.
1439 #
1440 # For more information about Cloud Router, read the the Cloud Router overview.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001441 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1442 "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 -07001443 "nats": [ # A list of NAT services created in this router.
1444 { # 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.
1445 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1446 "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.
1447 "A String",
1448 ],
1449 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1450 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
1451 "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.
1452 { # Defines the IP ranges that want to use NAT for a subnetwork.
1453 "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]
1454 "A String",
1455 ],
1456 "name": "A String", # URL for the subnetwork resource that will use NAT.
1457 "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.
1458 "A String",
1459 ],
1460 },
1461 ],
1462 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1463 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1464 # - 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.
1465 # - 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.
1466 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1467 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1468 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1469 # - 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.
1470 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
1471 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
1472 "filter": "A String", # Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.
1473 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1474 },
1475 "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.
1476 },
1477 ],
1478 "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 -07001479 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be either be a VPN tunnel or an Interconnect attachment.
1481 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be either a VPN tunnel or an Interconnect attachment.
1482 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001483 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001484 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1485 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1486 # - 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 -07001487 },
1488 ],
1489 "bgp": { # BGP information specific to this router.
1490 "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 -07001491 "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.
1492 { # Description-tagged IP ranges for the router to advertise.
1493 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1494 "description": "A String", # User-specified description for the IP range.
1495 },
1496 ],
1497 "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.
1498 "A String",
1499 ],
1500 "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 -07001501 },
1502 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001503 "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 -07001504 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001505 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001506 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001507 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1509 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1510 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1511 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1512 # - 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.
1513 "A String",
1514 ],
1515 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1516 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1517 # - 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.
1518 "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.
1519 { # Description-tagged IP ranges for the router to advertise.
1520 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1521 "description": "A String", # User-specified description for the IP range.
1522 },
1523 ],
1524 "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.
1525 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1526 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001527 },
1528 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529 "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 -07001530 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1531 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1532 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001533 "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 -07001534 }
1535
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001536 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.
1537
1538For 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.
1539
1540The 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 -07001541
1542Returns:
1543 An object of the form:
1544
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001545 { # Represents an Operation resource.
1546 #
1547 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1548 #
1549 # Operations can be global, regional or zonal.
1550 # - For global operations, use the globalOperations resource.
1551 # - For regional operations, use the regionOperations resource.
1552 # - For zonal operations, use the zonalOperations resource.
1553 #
1554 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001555 "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 -07001556 "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 -04001557 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001558 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 "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 -07001560 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1561 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1562 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1563 "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.
1564 "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.
1565 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1566 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1567 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1568 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1569 {
1570 "message": "A String", # [Output Only] A human-readable description of the warning code.
1571 "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.
1572 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1573 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1574 {
1575 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1576 "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).
1577 },
1578 ],
1579 },
1580 ],
1581 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1582 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1583 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1584 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 "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 -07001586 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1587 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1588 {
1589 "message": "A String", # [Output Only] An optional, human-readable error message.
1590 "code": "A String", # [Output Only] The error type identifier for this error.
1591 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1592 },
1593 ],
1594 },
1595 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1596 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001597 "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 -07001598 }</pre>
1599</div>
1600
1601</body></html>