blob: 686cdf28456f011b2d613e910f9917c34acbcb06 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.routes.html">routes</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#delete">delete(project, route, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Deletes the specified Route resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#get">get(project, route)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Returns the specified Route resource. Gets a list of available routes by making a list() request.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Creates a Route resource in the specified project using the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070087 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Retrieves the list of Route resources available to the specified project.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094 <code class="details" id="delete">delete(project, route, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070095 <pre>Deletes the specified Route resource.
John Asmuth614db982014-04-24 15:46:26 -040096
97Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070099 route: string, Name of the Route resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100 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.
101
102For 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.
103
104The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400105
106Returns:
107 An object of the form:
108
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 { # Represents an Operation resource.
110 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 # Google Compute Engine has three Operation resources:
112 #
113 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
114 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
116 #
117 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 # - For global operations, use the `globalOperations` resource.
119 # - For regional operations, use the `regionOperations` resource.
120 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123 "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 -0700124 "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 -0400125 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 "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 -0700127 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800128 "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 -0700129 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
130 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800131 "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 -0700132 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800133 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800135 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000136 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400137 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 "message": "A String", # [Output Only] A human-readable description of the warning code.
139 "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.
140 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
141 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400142 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000143 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700144 "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).
John Asmuth614db982014-04-24 15:46:26 -0400145 },
146 ],
147 },
148 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800150 "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 -0700151 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
152 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000154 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800155 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400156 {
Craig Citroe633be12015-03-02 13:40:36 -0800157 "message": "A String", # [Output Only] An optional, human-readable error message.
158 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700159 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400160 },
161 ],
162 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700164 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800165 "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.
John Asmuth614db982014-04-24 15:46:26 -0400166 }</pre>
167</div>
168
169<div class="method">
170 <code class="details" id="get">get(project, route)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 <pre>Returns the specified Route resource. Gets a list of available routes by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400172
173Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800174 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700175 route: string, Name of the Route resource to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400176
177Returns:
178 An object of the form:
179
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700181 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 # 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 -0700183 "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
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000184 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 "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.
John Asmuth614db982014-04-24 15:46:26 -0400187 "tags": [ # A list of instance tags to which this route applies.
188 "A String",
189 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 "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:
191 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
192 # - regions/region/forwardingRules/forwardingRule
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 "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:
Takashi Matsuo06694102015-09-11 13:55:40 -0700194 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 "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.
196 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000197 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
Takashi Matsuo06694102015-09-11 13:55:40 -0700198 "network": "A String", # Fully-qualified URL of the network that this route applies to.
199 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
200 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
John Asmuth614db982014-04-24 15:46:26 -0400201 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202 "message": "A String", # [Output Only] A human-readable description of the warning code.
203 "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.
204 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
205 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400206 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000207 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700208 "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).
John Asmuth614db982014-04-24 15:46:26 -0400209 },
210 ],
211 },
212 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400213 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Takashi Matsuo06694102015-09-11 13:55:40 -0700214 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800215 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400216 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700218 }</pre>
219</div>
220
221<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700223 <pre>Creates a Route resource in the specified project using the data included in the request.
224
225Args:
226 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700228 The object takes the form of:
229
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230{ # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700231 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 # 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 -0700233 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
235 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700237 "tags": [ # A list of instance tags to which this route applies.
238 "A String",
239 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 "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:
241 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
242 # - regions/region/forwardingRules/forwardingRule
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700243 "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:
244 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 "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.
246 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700247 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
248 "network": "A String", # Fully-qualified URL of the network that this route applies to.
249 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
250 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
251 {
252 "message": "A String", # [Output Only] A human-readable description of the warning code.
253 "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.
254 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
255 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
256 {
257 "value": "A String", # [Output Only] A warning data value corresponding to the key.
258 "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).
259 },
260 ],
261 },
262 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400263 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700264 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
265 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400266 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700268}
John Asmuth614db982014-04-24 15:46:26 -0400269
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 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.
271
272For 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.
273
274The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400275
276Returns:
277 An object of the form:
278
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279 { # Represents an Operation resource.
280 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 # Google Compute Engine has three Operation resources:
282 #
283 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
284 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
286 #
287 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700288 # - For global operations, use the `globalOperations` resource.
289 # - For regional operations, use the `regionOperations` resource.
290 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700292 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800293 "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 -0700294 "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 -0400295 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 "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 -0700297 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800298 "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 -0700299 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
300 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800301 "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 -0700302 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800303 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000306 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400307 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800308 "message": "A String", # [Output Only] A human-readable description of the warning code.
309 "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.
310 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
311 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400312 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000313 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700314 "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).
John Asmuth614db982014-04-24 15:46:26 -0400315 },
316 ],
317 },
318 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800320 "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 -0700321 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
322 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700323 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000324 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800325 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400326 {
Craig Citroe633be12015-03-02 13:40:36 -0800327 "message": "A String", # [Output Only] An optional, human-readable error message.
328 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700329 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400330 },
331 ],
332 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800333 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700334 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800335 "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.
John Asmuth614db982014-04-24 15:46:26 -0400336 }</pre>
337</div>
338
339<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700340 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700341 <pre>Retrieves the list of Route resources available to the specified project.
John Asmuth614db982014-04-24 15:46:26 -0400342
343Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800344 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700345 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
346
Dan O'Mearadd494642020-05-01 07:42:23 -0700347You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700348
Dan O'Mearadd494642020-05-01 07:42:23 -0700349Currently, only sorting by `name` or `creationTimestamp desc` is supported.
350 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`)
351 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.
352 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700353
Dan O'Mearadd494642020-05-01 07:42:23 -0700354For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700355
Dan O'Mearadd494642020-05-01 07:42:23 -0700356You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800357
Dan O'Mearadd494642020-05-01 07:42:23 -0700358To 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) ```
John Asmuth614db982014-04-24 15:46:26 -0400359
360Returns:
361 An object of the form:
362
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700363 { # Contains a list of Route resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800364 "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 -0700365 "kind": "compute#routeList", # Type of resource.
366 "items": [ # A list of Route resources.
367 { # Represents a Route resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700368 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # 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 -0700370 "nextHopGateway": "A String", # The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700371 "nextHopVpnTunnel": "A String", # The URL to a VpnTunnel that should handle matching packets.
372 "kind": "compute#route", # [Output Only] Type of this resource. Always compute#routes for Route resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700374 "tags": [ # A list of instance tags to which this route applies.
375 "A String",
376 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 "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:
378 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
379 # - regions/region/forwardingRules/forwardingRule
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700380 "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:
381 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 "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.
383 "nextHopPeering": "A String", # [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700384 "nextHopNetwork": "A String", # The URL of the local network if it should handle matching packets.
385 "network": "A String", # Fully-qualified URL of the network that this route applies to.
386 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
387 "warnings": [ # [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
388 {
389 "message": "A String", # [Output Only] A human-readable description of the warning code.
390 "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.
391 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
392 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
393 {
394 "value": "A String", # [Output Only] A warning data value corresponding to the key.
395 "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).
396 },
397 ],
398 },
399 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400400 "destRange": "A String", # The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700401 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
402 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400403 "nextHopIp": "A String", # The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700405 },
John Asmuth614db982014-04-24 15:46:26 -0400406 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 "warning": { # [Output Only] Informational warning message.
408 "message": "A String", # [Output Only] A human-readable description of the warning code.
409 "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.
410 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
411 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
412 {
413 "value": "A String", # [Output Only] A warning data value corresponding to the key.
414 "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).
415 },
416 ],
417 },
418 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700419 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400420 }</pre>
421</div>
422
423<div class="method">
424 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
425 <pre>Retrieves the next page of results.
426
427Args:
428 previous_request: The request for the previous page. (required)
429 previous_response: The response from the request for the previous page. (required)
430
431Returns:
432 A request object that you can call 'execute()' on to request the next
433 page. Returns None if there are no more items in the collection.
434 </pre>
435</div>
436
437</body></html>