blob: 7ba4390039d848e8e47b673bafb25a0816b7def9 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.routers.html">routers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of routers.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#delete">delete(project, region, router, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified Router resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, router)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified Router resource. Gets a list of available routers by making a list() request.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, natName=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Retrieves runtime Nat mapping information of VM endpoints.</p>
92<p class="toc_element">
93 <code><a href="#getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
96 <code><a href="#getRouterStatus">getRouterStatus(project, region, router)</a></code></p>
97<p class="firstline">Retrieves runtime information of the specified router.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Creates a Router resource in the specified project and region using the data included in the request.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Retrieves a list of Router resources available to the specified project.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(project, region, router, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#preview">preview(project, region, router, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#update">update(project, region, router, body=None, requestId=None)</a></code></p>
118<p class="firstline">Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119<h3>Method Details</h3>
120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122 <pre>Retrieves an aggregated list of routers.
123
124Args:
125 project: string, Project ID for this request. (required)
126 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
127
Dan O'Mearadd494642020-05-01 07:42:23 -0700128You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129
Dan O'Mearadd494642020-05-01 07:42:23 -0700130Currently, only sorting by `name` or `creationTimestamp desc` is supported.
131 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
132 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
133 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
134 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700135
Dan O'Mearadd494642020-05-01 07:42:23 -0700136For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137
Dan O'Mearadd494642020-05-01 07:42:23 -0700138You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700139
Dan O'Mearadd494642020-05-01 07:42:23 -0700140To 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) ```
141 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142
143Returns:
144 An object of the form:
145
146 { # Contains a list of routers.
147 "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 -0700148 "kind": "compute#routerAggregatedList", # Type of resource.
149 "items": { # A list of Router resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700150 "a_key": { # Name of the scope containing this set of routers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 "routers": [ # A list of routers contained in this scope.
152 { # Represents a Cloud Router resource.
153 #
154 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
156 "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 -0700157 "nats": [ # A list of NAT services created in this router.
158 { # 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.
159 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
160 "A String",
161 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "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.
164 "A String",
165 ],
166 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
167 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "rules": [ # A list of rules associated with this NAT.
169 {
170 "action": { # The action to be enforced for traffic that matches this rule.
171 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
172 "A String",
173 ],
174 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
175 "A String",
176 ],
177 },
178 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
179 "description": "A String", # An optional description of this rule.
180 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
181 #
182 # The following examples are valid match expressions:
183 #
184 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
185 #
186 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
187 },
188 ],
189 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
190 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
191 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "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.
193 { # Defines the IP ranges that want to use NAT for a subnetwork.
194 "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]
195 "A String",
196 ],
197 "name": "A String", # URL for the subnetwork resource that will use NAT.
198 "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.
199 "A String",
200 ],
201 },
202 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
204 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
205 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
206 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
208 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
209 # - 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.
210 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
213 # - ERRORS_ONLY: Export logs only for connection failures.
214 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
215 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
217 },
218 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700219 },
220 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221 "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.
222 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
224 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
228 # - MANAGED_BY_USER is the default value and can be managed directly by users.
229 # - 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.
230 },
231 ],
232 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700233 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 "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.
235 "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.
236 { # Description-tagged IP ranges for the router to advertise.
237 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
238 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400239 },
240 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400242 "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.
243 "A String",
244 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700246 },
247 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700249 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
251 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400252 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 "bfd": { # BFD configuration for the BGP peering.
255 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
258 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
261 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
262 },
263 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
264 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
265 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
266 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
267 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400268 "A String",
269 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
271 # - MANAGED_BY_USER is the default value and can be managed by you or other users
272 # - 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.
273 "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.
274 { # Description-tagged IP ranges for the router to advertise.
275 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
276 "description": "A String", # User-specified description for the IP range.
277 },
278 ],
279 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400281 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282 },
283 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
286 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
287 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700289 },
290 ],
291 "warning": { # Informational warning which replaces the list of routers when the list is empty.
292 "message": "A String", # [Output Only] A human-readable description of the warning code.
293 "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.
294 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
295 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
296 {
297 "value": "A String", # [Output Only] A warning data value corresponding to the key.
298 "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).
299 },
300 ],
301 },
302 },
303 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "warning": { # [Output Only] Informational warning message.
305 "message": "A String", # [Output Only] A human-readable description of the warning code.
306 "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.
307 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
308 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
309 {
310 "value": "A String", # [Output Only] A warning data value corresponding to the key.
311 "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).
312 },
313 ],
314 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 "unreachables": [ # [Output Only] Unreachable resources.
316 "A String",
317 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
320 }</pre>
321</div>
322
323<div class="method">
324 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
325 <pre>Retrieves the next page of results.
326
327Args:
328 previous_request: The request for the previous page. (required)
329 previous_response: The response from the request for the previous page. (required)
330
331Returns:
332 A request object that you can call 'execute()' on to request the next
333 page. Returns None if there are no more items in the collection.
334 </pre>
335</div>
336
337<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400338 <code class="details" id="delete">delete(project, region, router, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700339 <pre>Deletes the specified Router resource.
340
341Args:
342 project: string, Project ID for this request. (required)
343 region: string, Name of the region for this request. (required)
344 router: string, Name of the Router resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 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.
346
347For 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.
348
349The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700350
351Returns:
352 An object of the form:
353
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 { # Represents an Operation resource.
355 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # Google Compute Engine has three Operation resources:
357 #
358 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
359 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
361 #
362 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # - For global operations, use the `globalOperations` resource.
364 # - For regional operations, use the `regionOperations` resource.
365 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700368 "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 -0700369 "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 -0400370 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700372 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700373 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700374 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
375 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700376 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700378 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700380 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
381 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
382 {
383 "message": "A String", # [Output Only] A human-readable description of the warning code.
384 "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.
385 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
386 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
387 {
388 "value": "A String", # [Output Only] A warning data value corresponding to the key.
389 "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).
390 },
391 ],
392 },
393 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700396 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
398 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700399 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700400 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
401 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
402 {
403 "message": "A String", # [Output Only] An optional, human-readable error message.
404 "code": "A String", # [Output Only] The error type identifier for this error.
405 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
406 },
407 ],
408 },
409 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
410 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800411 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700412 }</pre>
413</div>
414
415<div class="method">
416 <code class="details" id="get">get(project, region, router)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 <pre>Returns the specified Router resource. Gets a list of available routers by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700418
419Args:
420 project: string, Project ID for this request. (required)
421 region: string, Name of the region for this request. (required)
422 router: string, Name of the Router resource to return. (required)
423
424Returns:
425 An object of the form:
426
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 { # Represents a Cloud Router resource.
428 #
429 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700430 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
431 "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 -0700432 "nats": [ # A list of NAT services created in this router.
433 { # 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.
434 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
435 "A String",
436 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 "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.
439 "A String",
440 ],
441 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
442 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 "rules": [ # A list of rules associated with this NAT.
444 {
445 "action": { # The action to be enforced for traffic that matches this rule.
446 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
447 "A String",
448 ],
449 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
450 "A String",
451 ],
452 },
453 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
454 "description": "A String", # An optional description of this rule.
455 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
456 #
457 # The following examples are valid match expressions:
458 #
459 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
460 #
461 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
462 },
463 ],
464 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
465 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
466 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467 "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.
468 { # Defines the IP ranges that want to use NAT for a subnetwork.
469 "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]
470 "A String",
471 ],
472 "name": "A String", # URL for the subnetwork resource that will use NAT.
473 "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.
474 "A String",
475 ],
476 },
477 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
479 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
480 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
481 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
483 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
484 # - 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.
485 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
488 # - ERRORS_ONLY: Export logs only for connection failures.
489 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
490 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
492 },
493 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494 },
495 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 "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.
497 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700498 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
499 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
503 # - MANAGED_BY_USER is the default value and can be managed directly by users.
504 # - 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.
505 },
506 ],
507 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700508 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 "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.
510 "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.
511 { # Description-tagged IP ranges for the router to advertise.
512 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
513 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400514 },
515 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700516 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400517 "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.
518 "A String",
519 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521 },
522 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700524 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
526 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400527 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 "bfd": { # BFD configuration for the BGP peering.
530 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
533 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -0700534 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
536 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
537 },
538 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
539 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
540 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
541 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
542 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400543 "A String",
544 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
546 # - MANAGED_BY_USER is the default value and can be managed by you or other users
547 # - 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.
548 "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.
549 { # Description-tagged IP ranges for the router to advertise.
550 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
551 "description": "A String", # User-specified description for the IP range.
552 },
553 ],
554 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400555 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400556 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700557 },
558 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
561 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
562 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 }</pre>
565</div>
566
567<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 <code class="details" id="getNatMappingInfo">getNatMappingInfo(project, region, router, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, natName=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 <pre>Retrieves runtime Nat mapping information of VM endpoints.
570
571Args:
572 project: string, Project ID for this request. (required)
573 region: string, Name of the region for this request. (required)
574 router: string, Name of the Router resource to query for Nat Mapping information of VM endpoints. (required)
575 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
576
Dan O'Mearadd494642020-05-01 07:42:23 -0700577You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578
Dan O'Mearadd494642020-05-01 07:42:23 -0700579Currently, only sorting by `name` or `creationTimestamp desc` is supported.
580 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`)
581 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.
582 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 natName: string, Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585
Dan O'Mearadd494642020-05-01 07:42:23 -0700586For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587
Dan O'Mearadd494642020-05-01 07:42:23 -0700588You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589
Dan O'Mearadd494642020-05-01 07:42:23 -0700590To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591
592Returns:
593 An object of the form:
594
595 { # Contains a list of VmEndpointNatMappings.
596 "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.
597 "kind": "compute#vmEndpointNatMappingsList", # [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.
598 "warning": { # [Output Only] Informational warning message.
599 "message": "A String", # [Output Only] A human-readable description of the warning code.
600 "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.
601 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
602 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
603 {
604 "value": "A String", # [Output Only] A warning data value corresponding to the key.
605 "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).
606 },
607 ],
608 },
609 "result": [ # [Output Only] A list of Nat mapping information of VM endpoints.
610 { # Contain information of Nat mapping for a VM endpoint (i.e., NIC).
611 "interfaceNatMappings": [
612 { # Contain information of Nat mapping for an interface of this endpoint.
613 "sourceVirtualIp": "A String", # Primary IP of the VM for this NIC.
614 "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"].
615 "A String",
616 ],
617 "drainNatIpPortRanges": [ # List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"].
618 "A String",
619 ],
620 "numTotalDrainNatPorts": 42, # Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.
621 "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.
622 "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".
623 },
624 ],
625 "instanceName": "A String", # Name of the VM instance which the endpoint belongs to
626 },
627 ],
628 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
629 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
630 }</pre>
631</div>
632
633<div class="method">
634 <code class="details" id="getNatMappingInfo_next">getNatMappingInfo_next(previous_request, previous_response)</code>
635 <pre>Retrieves the next page of results.
636
637Args:
638 previous_request: The request for the previous page. (required)
639 previous_response: The response from the request for the previous page. (required)
640
641Returns:
642 A request object that you can call 'execute()' on to request the next
643 page. Returns None if there are no more items in the collection.
644 </pre>
645</div>
646
647<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700648 <code class="details" id="getRouterStatus">getRouterStatus(project, region, router)</code>
649 <pre>Retrieves runtime information of the specified router.
650
651Args:
652 project: string, Project ID for this request. (required)
653 region: string, Name of the region for this request. (required)
654 router: string, Name of the Router resource to query. (required)
655
656Returns:
657 An object of the form:
658
659 {
660 "kind": "compute#routerStatusResponse", # Type of resource.
661 "result": {
662 "bgpPeerStatus": [
663 {
664 "status": "A String", # Status of the BGP peer: {UP, DOWN}
665 "uptime": "A String", # Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
666 "name": "A String", # Name of this BGP peer. Unique within the Routers resource.
667 "uptimeSeconds": "A String", # Time this session has been up, in seconds. Format: 145
668 "linkedVpnTunnel": "A String", # URL of the VPN tunnel that this BGP peer controls.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700669 "bfdStatus": { # Next free: 15
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 "negotiatedLocalControlTxIntervalMs": 42, # Negotiated transmit interval for control packets.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700671 "controlPacketCounts": { # Control packet counts for the current BFD session.
672 "numTx": 42, # Number of packets transmitted since the beginning of the current BFD session.
673 "numRx": 42, # Number of packets received since the beginning of the current BFD session.
674 "numRxRejected": 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
675 "numRxSuccessful": 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
676 },
677 "localState": "A String", # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
678 "echoPacketCounts": { # Echo packet counts for the current BFD session.
679 "numTx": 42, # Number of packets transmitted since the beginning of the current BFD session.
680 "numRx": 42, # Number of packets received since the beginning of the current BFD session.
681 "numRxRejected": 42, # Number of packets received that were rejected because of errors since the beginning of the current BFD session.
682 "numRxSuccessful": 42, # Number of packets received that were successfully processed since the beginning of the current BFD session.
683 },
684 "echoPacketIntervals": [ # Inter-packet time interval statistics for echo packets.
685 { # Next free: 7
686 "numIntervals": "A String", # Number of inter-packet intervals from which these statistics were derived.
687 "maxMs": "A String", # Maximum observed inter-packet interval in milliseconds.
688 "minMs": "A String", # Minimum observed inter-packet interval in milliseconds.
689 "duration": "A String", # From how long ago in the past these intervals were observed.
690 "avgMs": "A String", # Average observed inter-packet interval in milliseconds.
691 "type": "A String", # The type of packets for which inter-packet intervals were computed.
692 },
693 ],
694 "bfdSessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.
695 "configUpdateTimestampMicros": "A String", # Unix timestamp of the most recent config update.
696 "txPacket": { # The most recent Tx control packet for this BFD session.
697 "minTxIntervalMs": 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
698 "multipoint": True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
699 "yourDiscriminator": 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
700 "authenticationPresent": True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
701 "myDiscriminator": 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
702 "multiplier": 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
703 "state": "A String", # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
704 "diagnostic": "A String", # The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
705 "controlPlaneIndependent": True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
706 "length": 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
707 "version": 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
708 "minRxIntervalMs": 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
709 "demand": True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
710 "minEchoRxIntervalMs": 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
711 "poll": True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
712 "final": True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
713 },
714 "rxPacket": { # The most recent Rx control packet for this BFD session.
715 "minTxIntervalMs": 42, # The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
716 "multipoint": True or False, # The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880
717 "yourDiscriminator": 42, # The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
718 "authenticationPresent": True or False, # The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880
719 "myDiscriminator": 42, # The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880
720 "multiplier": 42, # The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880
721 "state": "A String", # The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880
722 "diagnostic": "A String", # The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
723 "controlPlaneIndependent": True or False, # The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880
724 "length": 42, # The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880
725 "version": 42, # The version number of the BFD protocol, as specified in section 4.1 of RFC5880.
726 "minRxIntervalMs": 42, # The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
727 "demand": True or False, # The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880
728 "minEchoRxIntervalMs": 42, # The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880
729 "poll": True or False, # The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880
730 "final": True or False, # The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880
731 },
732 "negotiatedLocalEchoTxIntervalMs": 42, # Negotiated transmit interval for echo packets.
733 "localDiagnostic": "A String", # The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880
734 "uptimeMs": "A String", # Session uptime in milliseconds. Value will be 0 if session is not up.
735 "controlPacketIntervals": [ # Inter-packet time interval statistics for control packets.
736 { # Next free: 7
737 "numIntervals": "A String", # Number of inter-packet intervals from which these statistics were derived.
738 "maxMs": "A String", # Maximum observed inter-packet interval in milliseconds.
739 "minMs": "A String", # Minimum observed inter-packet interval in milliseconds.
740 "duration": "A String", # From how long ago in the past these intervals were observed.
741 "avgMs": "A String", # Average observed inter-packet interval in milliseconds.
742 "type": "A String", # The type of packets for which inter-packet intervals were computed.
743 },
744 ],
745 "usingEchoMode": True or False, # Indicates if echo mode is currently being used.
746 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700747 "peerIpAddress": "A String", # IP address of the remote BGP interface.
748 "advertisedRoutes": [ # Routes that were advertised to the remote BGP peer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 { # Represents a Route resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700750 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700753 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
754 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700756 "tags": [ # A list of instance tags to which this route applies.
757 "A String",
758 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 "nextHopIlb": "A String", # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
760 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # - regions/region/forwardingRules/forwardingRule
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700762 "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:
763 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800765 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700767 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
768 "network": "A String", # Fully-qualified URL of the network that this route applies to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700770 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
771 {
772 "message": "A String", # [Output Only] A human-readable description of the warning code.
773 "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.
774 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
775 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
776 {
777 "value": "A String", # [Output Only] A warning data value corresponding to the key.
778 "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).
779 },
780 ],
781 },
782 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700783 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400784 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
786 "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 -0700787 "nextHopInterconnectAttachment": "A String", # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
788 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 },
790 ],
791 "state": "A String", # BGP state as specified in RFC1771.
792 "ipAddress": "A String", # IP address of the local BGP interface.
793 "numLearnedRoutes": 42, # Number of routes learned from the remote BGP Peer.
794 },
795 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400796 "bestRoutesForRouter": [ # Best routes learned by this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 { # Represents a Route resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700798 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700801 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
802 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700804 "tags": [ # A list of instance tags to which this route applies.
805 "A String",
806 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 "nextHopIlb": "A String", # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
808 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 # - regions/region/forwardingRules/forwardingRule
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700810 "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:
811 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800813 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700815 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
816 "network": "A String", # Fully-qualified URL of the network that this route applies to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700818 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
819 {
820 "message": "A String", # [Output Only] A human-readable description of the warning code.
821 "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.
822 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
823 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
824 {
825 "value": "A String", # [Output Only] A warning data value corresponding to the key.
826 "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).
827 },
828 ],
829 },
830 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400832 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700833 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
834 "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 -0700835 "nextHopInterconnectAttachment": "A String", # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
836 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
837 },
838 ],
839 "natStatus": [
840 { # Status of a NAT contained in this router. Next tag: 9
841 "userAllocatedNatIps": [ # A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
842 "A String",
843 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 "drainUserAllocatedNatIps": [ # A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 "A String",
846 ],
847 "name": "A String", # Unique name of this NAT.
848 "autoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
849 "A String",
850 ],
851 "numVmEndpointsWithNatMappings": 42, # Number of VM endpoints (i.e., Nics) that can use NAT.
852 "userAllocatedNatIpResources": [ # A list of fully qualified URLs of reserved IP address resources.
853 "A String",
854 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 "drainAutoAllocatedNatIps": [ # A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 "A String",
857 ],
858 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400859 },
860 ],
861 "network": "A String", # URI of the network to which this router belongs.
862 "bestRoutes": [ # Best routes for this router's network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 { # Represents a Route resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400864 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 # A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400867 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
868 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400870 "tags": [ # A list of instance tags to which this route applies.
871 "A String",
872 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 "nextHopIlb": "A String", # The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs:
874 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 # - regions/region/forwardingRules/forwardingRule
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400876 "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:
877 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400879 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400881 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
882 "network": "A String", # Fully-qualified URL of the network that this route applies to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400884 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
885 {
886 "message": "A String", # [Output Only] A human-readable description of the warning code.
887 "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.
888 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
889 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
890 {
891 "value": "A String", # [Output Only] A warning data value corresponding to the key.
892 "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).
893 },
894 ],
895 },
896 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400898 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
899 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
900 "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 -0700901 "nextHopInterconnectAttachment": "A String", # [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.
902 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700903 },
904 ],
905 },
906 }</pre>
907</div>
908
909<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700911 <pre>Creates a Router resource in the specified project and region using the data included in the request.
912
913Args:
914 project: string, Project ID for this request. (required)
915 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700916 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700917 The object takes the form of:
918
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700919{ # Represents a Cloud Router resource.
920 #
921 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700922 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
923 "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 -0700924 "nats": [ # A list of NAT services created in this router.
925 { # 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.
926 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
927 "A String",
928 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 "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.
931 "A String",
932 ],
933 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
934 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700935 "rules": [ # A list of rules associated with this NAT.
936 {
937 "action": { # The action to be enforced for traffic that matches this rule.
938 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
939 "A String",
940 ],
941 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
942 "A String",
943 ],
944 },
945 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
946 "description": "A String", # An optional description of this rule.
947 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
948 #
949 # The following examples are valid match expressions:
950 #
951 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
952 #
953 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
954 },
955 ],
956 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
957 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
958 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 "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.
960 { # Defines the IP ranges that want to use NAT for a subnetwork.
961 "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]
962 "A String",
963 ],
964 "name": "A String", # URL for the subnetwork resource that will use NAT.
965 "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.
966 "A String",
967 ],
968 },
969 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
971 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
972 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
973 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700974 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
975 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
976 # - 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.
977 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700979 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
980 # - ERRORS_ONLY: Export logs only for connection failures.
981 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
982 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700983 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
984 },
985 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700986 },
987 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700988 "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.
989 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700990 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
991 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
995 # - MANAGED_BY_USER is the default value and can be managed directly by users.
996 # - 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.
997 },
998 ],
999 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001000 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 "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.
1002 "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.
1003 { # Description-tagged IP ranges for the router to advertise.
1004 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1005 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001006 },
1007 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001008 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001009 "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.
1010 "A String",
1011 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001013 },
1014 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001016 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001017 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1018 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001019 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001020 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 "bfd": { # BFD configuration for the BGP peering.
1022 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001023 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1025 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001027 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1028 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1029 },
1030 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1031 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1032 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1033 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1034 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001035 "A String",
1036 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1038 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1039 # - 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.
1040 "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.
1041 { # Description-tagged IP ranges for the router to advertise.
1042 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1043 "description": "A String", # User-specified description for the IP range.
1044 },
1045 ],
1046 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001047 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001048 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001049 },
1050 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001051 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001052 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1053 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1054 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001055 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001056 }
1057
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 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.
1059
1060For 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.
1061
1062The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001063
1064Returns:
1065 An object of the form:
1066
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 { # Represents an Operation resource.
1068 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001069 # Google Compute Engine has three Operation resources:
1070 #
1071 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1072 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1074 #
1075 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 # - For global operations, use the `globalOperations` resource.
1077 # - For regional operations, use the `regionOperations` resource.
1078 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001080 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001081 "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 -07001082 "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 -04001083 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001086 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1088 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001089 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001090 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001091 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001093 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1094 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1095 {
1096 "message": "A String", # [Output Only] A human-readable description of the warning code.
1097 "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.
1098 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1099 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1100 {
1101 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1102 "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).
1103 },
1104 ],
1105 },
1106 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001108 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001109 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001110 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1111 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001113 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1114 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1115 {
1116 "message": "A String", # [Output Only] An optional, human-readable error message.
1117 "code": "A String", # [Output Only] The error type identifier for this error.
1118 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1119 },
1120 ],
1121 },
1122 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1123 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001124 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001125 }</pre>
1126</div>
1127
1128<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001130 <pre>Retrieves a list of Router resources available to the specified project.
1131
1132Args:
1133 project: string, Project ID for this request. (required)
1134 region: string, Name of the region for this request. (required)
1135 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1136
Dan O'Mearadd494642020-05-01 07:42:23 -07001137You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001138
Dan O'Mearadd494642020-05-01 07:42:23 -07001139Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1140 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`)
1141 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.
1142 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1143 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001144
Dan O'Mearadd494642020-05-01 07:42:23 -07001145For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001146
Dan O'Mearadd494642020-05-01 07:42:23 -07001147You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001148
Dan O'Mearadd494642020-05-01 07:42:23 -07001149To 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) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001150
1151Returns:
1152 An object of the form:
1153
1154 { # Contains a list of Router resources.
1155 "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 -07001156 "kind": "compute#routerList", # [Output Only] Type of resource. Always compute#router for routers.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001157 "items": [ # A list of Router resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 { # Represents a Cloud Router resource.
1159 #
1160 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001161 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1162 "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 -07001163 "nats": [ # A list of NAT services created in this router.
1164 { # 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.
1165 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1166 "A String",
1167 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001168 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001169 "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.
1170 "A String",
1171 ],
1172 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1173 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001174 "rules": [ # A list of rules associated with this NAT.
1175 {
1176 "action": { # The action to be enforced for traffic that matches this rule.
1177 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
1178 "A String",
1179 ],
1180 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1181 "A String",
1182 ],
1183 },
1184 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1185 "description": "A String", # An optional description of this rule.
1186 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1187 #
1188 # The following examples are valid match expressions:
1189 #
1190 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
1191 #
1192 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
1193 },
1194 ],
1195 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1196 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1197 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001198 "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.
1199 { # Defines the IP ranges that want to use NAT for a subnetwork.
1200 "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]
1201 "A String",
1202 ],
1203 "name": "A String", # URL for the subnetwork resource that will use NAT.
1204 "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.
1205 "A String",
1206 ],
1207 },
1208 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1210 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1211 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1212 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001213 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1214 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1215 # - 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.
1216 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001217 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001218 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1219 # - ERRORS_ONLY: Export logs only for connection failures.
1220 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1221 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1223 },
1224 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001225 },
1226 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001227 "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.
1228 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1230 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001231 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1234 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1235 # - 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.
1236 },
1237 ],
1238 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001239 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 "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.
1241 "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.
1242 { # Description-tagged IP ranges for the router to advertise.
1243 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1244 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001245 },
1246 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001247 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001248 "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.
1249 "A String",
1250 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001251 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001252 },
1253 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001255 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1257 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001258 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001259 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 "bfd": { # BFD configuration for the BGP peering.
1261 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001262 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1264 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001265 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1267 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1268 },
1269 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1270 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1271 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1272 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1273 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001274 "A String",
1275 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001276 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1277 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1278 # - 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.
1279 "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.
1280 { # Description-tagged IP ranges for the router to advertise.
1281 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1282 "description": "A String", # User-specified description for the IP range.
1283 },
1284 ],
1285 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001286 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001287 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001288 },
1289 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001291 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1292 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1293 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001295 },
1296 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001297 "warning": { # [Output Only] Informational warning message.
1298 "message": "A String", # [Output Only] A human-readable description of the warning code.
1299 "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.
1300 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1301 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1302 {
1303 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1304 "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).
1305 },
1306 ],
1307 },
1308 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001309 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1310 }</pre>
1311</div>
1312
1313<div class="method">
1314 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1315 <pre>Retrieves the next page of results.
1316
1317Args:
1318 previous_request: The request for the previous page. (required)
1319 previous_response: The response from the request for the previous page. (required)
1320
1321Returns:
1322 A request object that you can call 'execute()' on to request the next
1323 page. Returns None if there are no more items in the collection.
1324 </pre>
1325</div>
1326
1327<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001328 <code class="details" id="patch">patch(project, region, router, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 <pre>Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001330
1331Args:
1332 project: string, Project ID for this request. (required)
1333 region: string, Name of the region for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001334 router: string, Name of the Router resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001335 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001336 The object takes the form of:
1337
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338{ # Represents a Cloud Router resource.
1339 #
1340 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001341 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1342 "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 -07001343 "nats": [ # A list of NAT services created in this router.
1344 { # 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.
1345 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1346 "A String",
1347 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001348 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001349 "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.
1350 "A String",
1351 ],
1352 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1353 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001354 "rules": [ # A list of rules associated with this NAT.
1355 {
1356 "action": { # The action to be enforced for traffic that matches this rule.
1357 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
1358 "A String",
1359 ],
1360 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1361 "A String",
1362 ],
1363 },
1364 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1365 "description": "A String", # An optional description of this rule.
1366 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1367 #
1368 # The following examples are valid match expressions:
1369 #
1370 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
1371 #
1372 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
1373 },
1374 ],
1375 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1376 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1377 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378 "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.
1379 { # Defines the IP ranges that want to use NAT for a subnetwork.
1380 "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]
1381 "A String",
1382 ],
1383 "name": "A String", # URL for the subnetwork resource that will use NAT.
1384 "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.
1385 "A String",
1386 ],
1387 },
1388 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001389 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1390 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1391 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1392 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001393 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1394 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1395 # - 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.
1396 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001398 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1399 # - ERRORS_ONLY: Export logs only for connection failures.
1400 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1401 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1403 },
1404 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001405 },
1406 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001407 "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.
1408 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001409 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1410 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001411 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -07001412 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1414 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1415 # - 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.
1416 },
1417 ],
1418 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001419 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001420 "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.
1421 "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.
1422 { # Description-tagged IP ranges for the router to advertise.
1423 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1424 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001425 },
1426 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001427 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001428 "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.
1429 "A String",
1430 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001431 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001432 },
1433 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001434 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001435 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001436 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1437 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001438 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001439 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 "bfd": { # BFD configuration for the BGP peering.
1441 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001442 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001443 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1444 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001445 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1447 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1448 },
1449 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1450 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1451 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1452 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1453 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001454 "A String",
1455 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001456 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1457 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1458 # - 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.
1459 "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.
1460 { # Description-tagged IP ranges for the router to advertise.
1461 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1462 "description": "A String", # User-specified description for the IP range.
1463 },
1464 ],
1465 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001466 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001467 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001468 },
1469 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001470 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001471 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1472 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1473 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001474 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001475 }
1476
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 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.
1478
1479For 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.
1480
1481The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001482
1483Returns:
1484 An object of the form:
1485
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 { # Represents an Operation resource.
1487 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001488 # Google Compute Engine has three Operation resources:
1489 #
1490 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1491 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1493 #
1494 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001495 # - For global operations, use the `globalOperations` resource.
1496 # - For regional operations, use the `regionOperations` resource.
1497 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001498 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001499 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001500 "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 -07001501 "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 -04001502 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001503 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001505 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1507 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001508 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001509 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001510 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001511 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001512 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1513 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1514 {
1515 "message": "A String", # [Output Only] A human-readable description of the warning code.
1516 "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.
1517 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1518 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1519 {
1520 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1521 "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).
1522 },
1523 ],
1524 },
1525 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001527 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001528 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001529 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1530 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001531 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001532 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1533 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1534 {
1535 "message": "A String", # [Output Only] An optional, human-readable error message.
1536 "code": "A String", # [Output Only] The error type identifier for this error.
1537 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1538 },
1539 ],
1540 },
1541 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1542 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001543 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001544 }</pre>
1545</div>
1546
1547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001548 <code class="details" id="preview">preview(project, region, router, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001549 <pre>Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
1550
1551Args:
1552 project: string, Project ID for this request. (required)
1553 region: string, Name of the region for this request. (required)
1554 router: string, Name of the Router resource to query. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001555 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001556 The object takes the form of:
1557
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558{ # Represents a Cloud Router resource.
1559 #
1560 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001561 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1562 "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 -07001563 "nats": [ # A list of NAT services created in this router.
1564 { # 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.
1565 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1566 "A String",
1567 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 "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.
1570 "A String",
1571 ],
1572 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1573 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001574 "rules": [ # A list of rules associated with this NAT.
1575 {
1576 "action": { # The action to be enforced for traffic that matches this rule.
1577 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
1578 "A String",
1579 ],
1580 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1581 "A String",
1582 ],
1583 },
1584 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1585 "description": "A String", # An optional description of this rule.
1586 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1587 #
1588 # The following examples are valid match expressions:
1589 #
1590 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
1591 #
1592 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
1593 },
1594 ],
1595 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1596 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1597 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 "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.
1599 { # Defines the IP ranges that want to use NAT for a subnetwork.
1600 "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]
1601 "A String",
1602 ],
1603 "name": "A String", # URL for the subnetwork resource that will use NAT.
1604 "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.
1605 "A String",
1606 ],
1607 },
1608 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1610 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1611 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1612 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001613 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1614 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1615 # - 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.
1616 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001617 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001618 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1619 # - ERRORS_ONLY: Export logs only for connection failures.
1620 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1621 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001622 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1623 },
1624 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001625 },
1626 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001627 "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.
1628 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001629 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1630 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -07001632 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1634 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1635 # - 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.
1636 },
1637 ],
1638 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001639 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001640 "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.
1641 "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.
1642 { # Description-tagged IP ranges for the router to advertise.
1643 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1644 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001645 },
1646 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001647 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001648 "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.
1649 "A String",
1650 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001651 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001652 },
1653 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001654 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001655 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001656 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1657 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001658 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001659 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001660 "bfd": { # BFD configuration for the BGP peering.
1661 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001662 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001663 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1664 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001665 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001666 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1667 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1668 },
1669 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1670 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1671 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1672 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1673 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001674 "A String",
1675 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001676 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1677 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1678 # - 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.
1679 "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.
1680 { # Description-tagged IP ranges for the router to advertise.
1681 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1682 "description": "A String", # User-specified description for the IP range.
1683 },
1684 ],
1685 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001686 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001687 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001688 },
1689 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001690 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001691 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1692 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1693 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001694 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001695 }
1696
1697
1698Returns:
1699 An object of the form:
1700
1701 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001702 "resource": { # Represents a Cloud Router resource. # Preview of given router.
1703 #
1704 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001705 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1706 "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 -07001707 "nats": [ # A list of NAT services created in this router.
1708 { # 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.
1709 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1710 "A String",
1711 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001712 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 "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.
1714 "A String",
1715 ],
1716 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1717 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001718 "rules": [ # A list of rules associated with this NAT.
1719 {
1720 "action": { # The action to be enforced for traffic that matches this rule.
1721 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
1722 "A String",
1723 ],
1724 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1725 "A String",
1726 ],
1727 },
1728 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1729 "description": "A String", # An optional description of this rule.
1730 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1731 #
1732 # The following examples are valid match expressions:
1733 #
1734 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
1735 #
1736 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
1737 },
1738 ],
1739 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1740 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1741 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001742 "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.
1743 { # Defines the IP ranges that want to use NAT for a subnetwork.
1744 "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]
1745 "A String",
1746 ],
1747 "name": "A String", # URL for the subnetwork resource that will use NAT.
1748 "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.
1749 "A String",
1750 ],
1751 },
1752 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001753 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1754 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1755 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1756 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001757 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1758 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1759 # - 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.
1760 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001761 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001762 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1763 # - ERRORS_ONLY: Export logs only for connection failures.
1764 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1765 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1767 },
1768 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001769 },
1770 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001771 "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.
1772 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001773 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1774 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001775 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -07001776 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001777 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1778 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1779 # - 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.
1780 },
1781 ],
1782 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001783 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 "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.
1785 "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.
1786 { # Description-tagged IP ranges for the router to advertise.
1787 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1788 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001789 },
1790 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001791 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001792 "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.
1793 "A String",
1794 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001795 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001796 },
1797 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001798 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001799 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001800 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1801 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001802 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001803 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001804 "bfd": { # BFD configuration for the BGP peering.
1805 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001806 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001807 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1808 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001809 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1811 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1812 },
1813 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1814 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1815 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1816 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1817 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001818 "A String",
1819 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
1821 # - MANAGED_BY_USER is the default value and can be managed by you or other users
1822 # - 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.
1823 "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.
1824 { # Description-tagged IP ranges for the router to advertise.
1825 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1826 "description": "A String", # User-specified description for the IP range.
1827 },
1828 ],
1829 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001830 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001831 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001832 },
1833 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001834 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001835 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1836 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1837 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001838 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001839 },
1840 }</pre>
1841</div>
1842
1843<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001844 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001845 <pre>Returns permissions that a caller has on the specified resource.
1846
1847Args:
1848 project: string, Project ID for this request. (required)
1849 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001850 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001851 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001852 The object takes the form of:
1853
1854{
1855 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1856 "A String",
1857 ],
1858 }
1859
1860
1861Returns:
1862 An object of the form:
1863
1864 {
1865 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1866 "A String",
1867 ],
1868 }</pre>
1869</div>
1870
1871<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001872 <code class="details" id="update">update(project, region, router, body=None, requestId=None)</code>
1873 <pre>Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001874
1875Args:
1876 project: string, Project ID for this request. (required)
1877 region: string, Name of the region for this request. (required)
1878 router: string, Name of the Router resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001879 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001880 The object takes the form of:
1881
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882{ # Represents a Cloud Router resource.
1883 #
1884 # For more information about Cloud Router, read the the Cloud Router overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001885 "kind": "compute#router", # [Output Only] Type of resource. Always compute#router for routers.
1886 "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 -07001887 "nats": [ # A list of NAT services created in this router.
1888 { # 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.
1889 "drainNatIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
1890 "A String",
1891 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001892 "enableEndpointIndependentMapping": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001893 "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.
1894 "A String",
1895 ],
1896 "name": "A String", # Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
1897 "tcpTransitoryIdleTimeoutSec": 42, # Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001898 "rules": [ # A list of rules associated with this NAT.
1899 {
1900 "action": { # The action to be enforced for traffic that matches this rule.
1901 "sourceNatDrainIps": [ # A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only.
1902 "A String",
1903 ],
1904 "sourceNatActiveIps": [ # A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the project.
1905 "A String",
1906 ],
1907 },
1908 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 65000. The priority must be unique among rules within a NAT.
1909 "description": "A String", # An optional description of this rule.
1910 "match": "A String", # CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1911 #
1912 # The following examples are valid match expressions:
1913 #
1914 # "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
1915 #
1916 # "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
1917 },
1918 ],
1919 "tcpEstablishedIdleTimeoutSec": 42, # Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
1920 "udpIdleTimeoutSec": 42, # Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
1921 "icmpIdleTimeoutSec": 42, # Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001922 "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.
1923 { # Defines the IP ranges that want to use NAT for a subnetwork.
1924 "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]
1925 "A String",
1926 ],
1927 "name": "A String", # URL for the subnetwork resource that will use NAT.
1928 "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.
1929 "A String",
1930 ],
1931 },
1932 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001933 "sourceSubnetworkIpRangesToNat": "A String", # Specify the Nat option, which can take one of the following values:
1934 # - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
1935 # - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
1936 # - 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 "tcpTimeWaitTimeoutSec": 42, # Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
1938 "natIpAllocateOption": "A String", # Specify the NatIpAllocateOption, which can take one of the following values:
1939 # - 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.
1940 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001941 "logConfig": { # Configuration of logging on a NAT. # Configure logging on this NAT.
Dan O'Mearadd494642020-05-01 07:42:23 -07001942 "filter": "A String", # Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
1943 # - ERRORS_ONLY: Export logs only for connection failures.
1944 # - TRANSLATIONS_ONLY: Export logs only for successful connections.
1945 # - ALL: Export logs for all connections, successful and unsuccessful.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001946 "enable": True or False, # Indicates whether or not to export logs. This is false by default.
1947 },
1948 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001949 },
1950 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 "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.
1952 {
Dan O'Mearadd494642020-05-01 07:42:23 -07001953 "linkedInterconnectAttachment": "A String", # URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
1954 "linkedVpnTunnel": "A String", # URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001955 "ipRange": "A String", # IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
Dan O'Mearadd494642020-05-01 07:42:23 -07001956 "name": "A String", # Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 "managementType": "A String", # [Output Only] The resource that configures and manages this interface.
1958 # - MANAGED_BY_USER is the default value and can be managed directly by users.
1959 # - 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.
1960 },
1961 ],
1962 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001963 "bgp": { # BGP information specific to this router.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001964 "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.
1965 "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.
1966 { # Description-tagged IP ranges for the router to advertise.
1967 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
1968 "description": "A String", # User-specified description for the IP range.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001969 },
1970 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001971 "keepaliveInterval": 42, # The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001972 "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.
1973 "A String",
1974 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001976 },
1977 "network": "A String", # URI of the network to which this router belongs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001978 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001979 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 "enable": "A String", # The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
1981 "peerAsn": 42, # Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001982 "interfaceName": "A String", # Name of the interface the BGP peer is associated with.
Dan O'Mearadd494642020-05-01 07:42:23 -07001983 "name": "A String", # Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001984 "bfd": { # BFD configuration for the BGP peering.
1985 "sessionInitializationMode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001986 "minTransmitInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 "packetMode": "A String", # The BFD packet mode for this BGP peer. If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. In this mode, if the peer router also has BFD echo mode enabled, BFD echo packets will be sent to the other router. If the peer router does not have BFD echo mode enabled, only control packets will be sent. If set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If this router and the peer router have a multihop connection, this should be set to CONTROL_ONLY as BFD echo mode is only supported on singlehop connections. The default is CONTROL_AND_ECHO.
1988 "mode": "A String", # The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.
Dan O'Mearadd494642020-05-01 07:42:23 -07001989 "minReceiveInterval": 42, # The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001990 "multiplier": 42, # The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.
1991 "slowTimerInterval": 42, # The minimum interval, in milliseconds, between BFD control packets transmitted to and received from the peer router when BFD echo mode is enabled on both routers. The actual transmit and receive intervals are negotiated between the two routers and are equal to the greater of this value and the corresponding interval on the other router. If set, this value must be between 1000 and 30000. The default is 5000.
1992 },
1993 "peerIpAddress": "A String", # IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1994 "advertisedGroups": [ # User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
1995 # - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
1996 # - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
1997 # - 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001998 "A String",
1999 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002000 "managementType": "A String", # [Output Only] The resource that configures and manages this BGP peer.
2001 # - MANAGED_BY_USER is the default value and can be managed by you or other users
2002 # - 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.
2003 "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.
2004 { # Description-tagged IP ranges for the router to advertise.
2005 "range": "A String", # The IP range to advertise. The value must be a CIDR-formatted string.
2006 "description": "A String", # User-specified description for the IP range.
2007 },
2008 ],
2009 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002010 "ipAddress": "A String", # IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002011 "advertiseMode": "A String", # User-specified flag to indicate which mode to use for advertisement.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002012 },
2013 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002014 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002015 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2016 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2017 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002018 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002019 }
2020
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 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.
2022
2023For 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.
2024
2025The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002026
2027Returns:
2028 An object of the form:
2029
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002030 { # Represents an Operation resource.
2031 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 # Google Compute Engine has three Operation resources:
2033 #
2034 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2035 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2037 #
2038 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002039 # - For global operations, use the `globalOperations` resource.
2040 # - For regional operations, use the `regionOperations` resource.
2041 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002042 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002043 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002044 "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 -07002045 "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 -04002046 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002047 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002048 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002049 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002050 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2051 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002052 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07002053 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002054 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002055 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002056 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2057 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2058 {
2059 "message": "A String", # [Output Only] A human-readable description of the warning code.
2060 "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.
2061 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2062 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2063 {
2064 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2065 "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).
2066 },
2067 ],
2068 },
2069 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002070 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07002071 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002072 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002073 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2074 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002075 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002076 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2077 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2078 {
2079 "message": "A String", # [Output Only] An optional, human-readable error message.
2080 "code": "A String", # [Output Only] The error type identifier for this error.
2081 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2082 },
2083 ],
2084 },
2085 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2086 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002087 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002088 }</pre>
2089</div>
2090
2091</body></html>