blob: 6658b42b4e43ef3016765c481ec9a2342e690778 [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.vpnTunnels.html">vpnTunnels</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 VPN tunnels.</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, vpnTunnel, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified VpnTunnel resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, vpnTunnel)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Creates a VpnTunnel resource in the specified project and region using the data included in the request.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <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 -070094<p class="firstline">Retrieves a list of VpnTunnel resources contained in the specified project and region.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#setLabels">setLabels(project, region, resource, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <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 -0700107 <pre>Retrieves an aggregated list of VPN tunnels.
108
109Args:
110 project: string, Project ID for this request. (required)
111 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
112
Dan O'Mearadd494642020-05-01 07:42:23 -0700113You 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 -0700114
Dan O'Mearadd494642020-05-01 07:42:23 -0700115Currently, only sorting by `name` or `creationTimestamp desc` is supported.
116 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`)
117 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.
118 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.
119 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 -0700120
Dan O'Mearadd494642020-05-01 07:42:23 -0700121For 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 -0700122
Dan O'Mearadd494642020-05-01 07:42:23 -0700123You 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 -0700124
Dan O'Mearadd494642020-05-01 07:42:23 -0700125To 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) ```
126 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 -0700127
128Returns:
129 An object of the form:
130
131 {
132 "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 -0700133 "kind": "compute#vpnTunnelAggregatedList", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
134 "items": { # A list of VpnTunnelsScopedList resources.
135 "a_key": { # Name of the scope containing this set of VPN tunnels.
136 "vpnTunnels": [ # A list of VPN tunnels contained in this scope.
137 { # Represents a Cloud VPN Tunnel resource.
138 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 # For more information about VPN, read the the Cloud VPN Overview. (== resource_for {$api_version}.vpnTunnels ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140 "detailedStatus": "A String", # [Output Only] Detailed status message for the VPN tunnel.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "labels": { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142 "a_key": "A String",
143 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 "vpnGateway": "A String", # URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
145 "peerExternalGatewayInterface": 42, # The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700146 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
147 "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 -0700148 "peerIp": "A String", # IP address of the peer VPN gateway. Only IPv4 is supported.
149 "targetVpnGateway": "A String", # URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
150 "status": "A String", # [Output Only] The status of the VPN tunnel, which can be one of the following:
151 # - PROVISIONING: Resource is being allocated for the VPN tunnel.
152 # - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel.
153 # - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.
154 # - ESTABLISHED: Secure session is successfully established with the peer VPN.
155 # - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS
156 # - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret).
157 # - NEGOTIATION_FAILURE: Handshake failed.
158 # - DEPROVISIONING: Resources are being deallocated for the VPN tunnel.
159 # - FAILED: Tunnel creation has failed and the tunnel is not ready to be used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 # - NO_INCOMING_PACKETS: No incoming packets from peer.
161 # - REJECTED: Tunnel configuration was rejected, can be result of being blacklisted.
162 # - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources.
163 # - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state.
164 # - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT.
165 # - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 "ikeVersion": 42, # IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
167 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
168 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
169 #
170 # To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.
171 "localTrafficSelector": [ # Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
172 "A String",
173 ],
174 "peerGcpGateway": "A String", # URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
175 "sharedSecretHash": "A String", # Hash of the shared secret.
176 "vpnGatewayInterface": 42, # The interface ID of the VPN gateway with which this VPN tunnel is associated.
177 "sharedSecret": "A String", # Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
178 "kind": "compute#vpnTunnel", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
179 "remoteTrafficSelector": [ # Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
180 "A String",
181 ],
182 "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.
183 "region": "A String", # [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
184 "peerExternalGateway": "A String", # URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
185 "router": "A String", # URL of the router resource to be used for dynamic routing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700187 },
188 ],
189 "warning": { # Informational warning which replaces the list of addresses when the list is empty.
190 "message": "A String", # [Output Only] A human-readable description of the warning code.
191 "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.
192 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
193 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
194 {
195 "value": "A String", # [Output Only] A warning data value corresponding to the key.
196 "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).
197 },
198 ],
199 },
200 },
201 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 "warning": { # [Output Only] Informational warning message.
203 "message": "A String", # [Output Only] A human-readable description of the warning code.
204 "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.
205 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
206 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
207 {
208 "value": "A String", # [Output Only] A warning data value corresponding to the key.
209 "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).
210 },
211 ],
212 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 "unreachables": [ # [Output Only] Unreachable resources.
214 "A String",
215 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700217 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
218 }</pre>
219</div>
220
221<div class="method">
222 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
223 <pre>Retrieves the next page of results.
224
225Args:
226 previous_request: The request for the previous page. (required)
227 previous_response: The response from the request for the previous page. (required)
228
229Returns:
230 A request object that you can call 'execute()' on to request the next
231 page. Returns None if there are no more items in the collection.
232 </pre>
233</div>
234
235<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 <code class="details" id="delete">delete(project, region, vpnTunnel, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700237 <pre>Deletes the specified VpnTunnel resource.
238
239Args:
240 project: string, Project ID for this request. (required)
241 region: string, Name of the region for this request. (required)
242 vpnTunnel: string, Name of the VpnTunnel resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 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.
244
245For 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.
246
247The 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 -0700248
249Returns:
250 An object of the form:
251
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 { # Represents an Operation resource.
253 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 # Google Compute Engine has three Operation resources:
255 #
256 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
257 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
259 #
260 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 # - For global operations, use the `globalOperations` resource.
262 # - For regional operations, use the `regionOperations` resource.
263 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 # 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 -0700266 "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 -0700267 "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 -0400268 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 "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 -0700270 "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 -0700271 "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 -0700272 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
273 "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 -0700274 "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 -0700275 "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 -0700276 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "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 -0700278 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
279 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
280 {
281 "message": "A String", # [Output Only] A human-readable description of the warning code.
282 "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.
283 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
284 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
285 {
286 "value": "A String", # [Output Only] A warning data value corresponding to the key.
287 "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).
288 },
289 ],
290 },
291 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700294 "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 -0700295 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
296 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 "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 -0700298 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
299 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
300 {
301 "message": "A String", # [Output Only] An optional, human-readable error message.
302 "code": "A String", # [Output Only] The error type identifier for this error.
303 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
304 },
305 ],
306 },
307 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
308 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800309 "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 -0700310 }</pre>
311</div>
312
313<div class="method">
314 <code class="details" id="get">get(project, region, vpnTunnel)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 <pre>Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700316
317Args:
318 project: string, Project ID for this request. (required)
319 region: string, Name of the region for this request. (required)
320 vpnTunnel: string, Name of the VpnTunnel resource to return. (required)
321
322Returns:
323 An object of the form:
324
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 { # Represents a Cloud VPN Tunnel resource.
326 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 # For more information about VPN, read the the Cloud VPN Overview. (== resource_for {$api_version}.vpnTunnels ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700328 "detailedStatus": "A String", # [Output Only] Detailed status message for the VPN tunnel.
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 "labels": { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700330 "a_key": "A String",
331 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 "vpnGateway": "A String", # URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
333 "peerExternalGatewayInterface": 42, # The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700334 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
335 "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 -0700336 "peerIp": "A String", # IP address of the peer VPN gateway. Only IPv4 is supported.
337 "targetVpnGateway": "A String", # URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
338 "status": "A String", # [Output Only] The status of the VPN tunnel, which can be one of the following:
339 # - PROVISIONING: Resource is being allocated for the VPN tunnel.
340 # - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel.
341 # - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.
342 # - ESTABLISHED: Secure session is successfully established with the peer VPN.
343 # - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS
344 # - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret).
345 # - NEGOTIATION_FAILURE: Handshake failed.
346 # - DEPROVISIONING: Resources are being deallocated for the VPN tunnel.
347 # - FAILED: Tunnel creation has failed and the tunnel is not ready to be used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # - NO_INCOMING_PACKETS: No incoming packets from peer.
349 # - REJECTED: Tunnel configuration was rejected, can be result of being blacklisted.
350 # - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources.
351 # - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state.
352 # - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT.
353 # - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 "ikeVersion": 42, # IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
355 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
356 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
357 #
358 # To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.
359 "localTrafficSelector": [ # Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
360 "A String",
361 ],
362 "peerGcpGateway": "A String", # URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
363 "sharedSecretHash": "A String", # Hash of the shared secret.
364 "vpnGatewayInterface": 42, # The interface ID of the VPN gateway with which this VPN tunnel is associated.
365 "sharedSecret": "A String", # Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
366 "kind": "compute#vpnTunnel", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
367 "remoteTrafficSelector": [ # Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
368 "A String",
369 ],
370 "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.
371 "region": "A String", # [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
372 "peerExternalGateway": "A String", # URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
373 "router": "A String", # URL of the router resource to be used for dynamic routing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700374 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700375 }</pre>
376</div>
377
378<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700380 <pre>Creates a VpnTunnel resource in the specified project and region using the data included in the request.
381
382Args:
383 project: string, Project ID for this request. (required)
384 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700386 The object takes the form of:
387
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388{ # Represents a Cloud VPN Tunnel resource.
389 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 # For more information about VPN, read the the Cloud VPN Overview. (== resource_for {$api_version}.vpnTunnels ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700391 "detailedStatus": "A String", # [Output Only] Detailed status message for the VPN tunnel.
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 "labels": { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700393 "a_key": "A String",
394 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 "vpnGateway": "A String", # URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
396 "peerExternalGatewayInterface": 42, # The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700397 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
398 "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 -0700399 "peerIp": "A String", # IP address of the peer VPN gateway. Only IPv4 is supported.
400 "targetVpnGateway": "A String", # URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
401 "status": "A String", # [Output Only] The status of the VPN tunnel, which can be one of the following:
402 # - PROVISIONING: Resource is being allocated for the VPN tunnel.
403 # - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel.
404 # - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.
405 # - ESTABLISHED: Secure session is successfully established with the peer VPN.
406 # - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS
407 # - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret).
408 # - NEGOTIATION_FAILURE: Handshake failed.
409 # - DEPROVISIONING: Resources are being deallocated for the VPN tunnel.
410 # - FAILED: Tunnel creation has failed and the tunnel is not ready to be used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 # - NO_INCOMING_PACKETS: No incoming packets from peer.
412 # - REJECTED: Tunnel configuration was rejected, can be result of being blacklisted.
413 # - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources.
414 # - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state.
415 # - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT.
416 # - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 "ikeVersion": 42, # IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
418 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
419 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
420 #
421 # To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.
422 "localTrafficSelector": [ # Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
423 "A String",
424 ],
425 "peerGcpGateway": "A String", # URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
426 "sharedSecretHash": "A String", # Hash of the shared secret.
427 "vpnGatewayInterface": 42, # The interface ID of the VPN gateway with which this VPN tunnel is associated.
428 "sharedSecret": "A String", # Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
429 "kind": "compute#vpnTunnel", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
430 "remoteTrafficSelector": [ # Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
431 "A String",
432 ],
433 "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.
434 "region": "A String", # [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
435 "peerExternalGateway": "A String", # URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
436 "router": "A String", # URL of the router resource to be used for dynamic routing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700437 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700438 }
439
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 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.
441
442For 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.
443
444The 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 -0700445
446Returns:
447 An object of the form:
448
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 { # Represents an Operation resource.
450 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 # Google Compute Engine has three Operation resources:
452 #
453 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
454 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
456 #
457 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700458 # - For global operations, use the `globalOperations` resource.
459 # - For regional operations, use the `regionOperations` resource.
460 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # 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 -0700463 "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 -0700464 "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 -0400465 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700466 "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 -0700467 "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 -0700468 "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 -0700469 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
470 "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 -0700471 "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 -0700472 "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 -0700473 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 "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 -0700475 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
476 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
477 {
478 "message": "A String", # [Output Only] A human-readable description of the warning code.
479 "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.
480 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
481 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
482 {
483 "value": "A String", # [Output Only] A warning data value corresponding to the key.
484 "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).
485 },
486 ],
487 },
488 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700491 "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 -0700492 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
493 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 "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 -0700495 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
496 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
497 {
498 "message": "A String", # [Output Only] An optional, human-readable error message.
499 "code": "A String", # [Output Only] The error type identifier for this error.
500 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
501 },
502 ],
503 },
504 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
505 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800506 "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 -0700507 }</pre>
508</div>
509
510<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700511 <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 -0700512 <pre>Retrieves a list of VpnTunnel resources contained in the specified project and region.
513
514Args:
515 project: string, Project ID for this request. (required)
516 region: string, Name of the region for this request. (required)
517 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
518
Dan O'Mearadd494642020-05-01 07:42:23 -0700519You 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 -0700520
Dan O'Mearadd494642020-05-01 07:42:23 -0700521Currently, only sorting by `name` or `creationTimestamp desc` is supported.
522 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`)
523 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.
524 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.
525 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 -0700526
Dan O'Mearadd494642020-05-01 07:42:23 -0700527For 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 -0700528
Dan O'Mearadd494642020-05-01 07:42:23 -0700529You 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 -0700530
Dan O'Mearadd494642020-05-01 07:42:23 -0700531To 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 -0700532
533Returns:
534 An object of the form:
535
536 { # Contains a list of VpnTunnel resources.
537 "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 -0700538 "kind": "compute#vpnTunnelList", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
539 "items": [ # A list of VpnTunnel resources.
540 { # Represents a Cloud VPN Tunnel resource.
541 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 # For more information about VPN, read the the Cloud VPN Overview. (== resource_for {$api_version}.vpnTunnels ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700543 "detailedStatus": "A String", # [Output Only] Detailed status message for the VPN tunnel.
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 "labels": { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700545 "a_key": "A String",
546 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 "vpnGateway": "A String", # URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
548 "peerExternalGatewayInterface": 42, # The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
550 "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 -0700551 "peerIp": "A String", # IP address of the peer VPN gateway. Only IPv4 is supported.
552 "targetVpnGateway": "A String", # URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
553 "status": "A String", # [Output Only] The status of the VPN tunnel, which can be one of the following:
554 # - PROVISIONING: Resource is being allocated for the VPN tunnel.
555 # - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel.
556 # - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.
557 # - ESTABLISHED: Secure session is successfully established with the peer VPN.
558 # - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS
559 # - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret).
560 # - NEGOTIATION_FAILURE: Handshake failed.
561 # - DEPROVISIONING: Resources are being deallocated for the VPN tunnel.
562 # - FAILED: Tunnel creation has failed and the tunnel is not ready to be used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # - NO_INCOMING_PACKETS: No incoming packets from peer.
564 # - REJECTED: Tunnel configuration was rejected, can be result of being blacklisted.
565 # - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources.
566 # - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state.
567 # - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT.
568 # - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "ikeVersion": 42, # IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
570 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
571 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
572 #
573 # To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.
574 "localTrafficSelector": [ # Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
575 "A String",
576 ],
577 "peerGcpGateway": "A String", # URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
578 "sharedSecretHash": "A String", # Hash of the shared secret.
579 "vpnGatewayInterface": 42, # The interface ID of the VPN gateway with which this VPN tunnel is associated.
580 "sharedSecret": "A String", # Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
581 "kind": "compute#vpnTunnel", # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
582 "remoteTrafficSelector": [ # Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
583 "A String",
584 ],
585 "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.
586 "region": "A String", # [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
587 "peerExternalGateway": "A String", # URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
588 "router": "A String", # URL of the router resource to be used for dynamic routing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700589 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700590 },
591 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 "warning": { # [Output Only] Informational warning message.
593 "message": "A String", # [Output Only] A human-readable description of the warning code.
594 "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.
595 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
596 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
597 {
598 "value": "A String", # [Output Only] A warning data value corresponding to the key.
599 "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).
600 },
601 ],
602 },
603 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700604 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
605 }</pre>
606</div>
607
608<div class="method">
609 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
610 <pre>Retrieves the next page of results.
611
612Args:
613 previous_request: The request for the previous page. (required)
614 previous_response: The response from the request for the previous page. (required)
615
616Returns:
617 A request object that you can call 'execute()' on to request the next
618 page. Returns None if there are no more items in the collection.
619 </pre>
620</div>
621
622<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 <code class="details" id="setLabels">setLabels(project, region, resource, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 <pre>Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400625
626Args:
627 project: string, Project ID for this request. (required)
628 region: string, The region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700630 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400631 The object takes the form of:
632
633{
634 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.
635 "labels": { # The labels to set for this resource.
636 "a_key": "A String",
637 },
638 }
639
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 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.
641
642For 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.
643
644The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400645
646Returns:
647 An object of the form:
648
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 { # Represents an Operation resource.
650 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 # Google Compute Engine has three Operation resources:
652 #
653 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
654 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
656 #
657 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 # - For global operations, use the `globalOperations` resource.
659 # - For regional operations, use the `regionOperations` resource.
660 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400663 "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 -0700664 "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 -0400665 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700666 "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 -0700667 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400668 "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 -0700669 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
670 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400671 "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 -0700672 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400673 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700674 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400675 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
676 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
677 {
678 "message": "A String", # [Output Only] A human-readable description of the warning code.
679 "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.
680 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
681 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
682 {
683 "value": "A String", # [Output Only] A warning data value corresponding to the key.
684 "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).
685 },
686 ],
687 },
688 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700690 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400691 "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 -0700692 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
693 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
696 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
697 {
698 "message": "A String", # [Output Only] An optional, human-readable error message.
699 "code": "A String", # [Output Only] The error type identifier for this error.
700 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
701 },
702 ],
703 },
704 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
705 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
706 "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.
707 }</pre>
708</div>
709
710<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700712 <pre>Returns permissions that a caller has on the specified resource.
713
714Args:
715 project: string, Project ID for this request. (required)
716 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700719 The object takes the form of:
720
721{
722 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
723 "A String",
724 ],
725 }
726
727
728Returns:
729 An object of the form:
730
731 {
732 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
733 "A String",
734 ],
735 }</pre>
736</div>
737
738</body></html>