blob: c4a8212171baecf0314e01b533d72d4cca7f5f22 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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
Sai Cheemalapatidf613972016-10-21 13:59:49 -070075<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.targetTcpProxies.html">targetTcpProxies</a></h1>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#delete">delete(project, targetTcpProxy, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Deletes the specified TargetTcpProxy resource.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080083<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070084 <code><a href="#get">get(project, targetTcpProxy)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Creates a TargetTcpProxy resource in the specified project using the data included in the request.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080089<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Retrieves the list of TargetTcpProxy resources available to the specified project.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#setBackendService">setBackendService(project, targetTcpProxy, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Changes the BackendService for TargetTcpProxy.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#setProxyHeader">setProxyHeader(project, targetTcpProxy, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Changes the ProxyHeaderType for TargetTcpProxy.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#testIamPermissions">testIamPermissions(project, 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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <code class="details" id="delete">delete(project, targetTcpProxy, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112 <pre>Deletes the specified TargetTcpProxy resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113
114Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115 project: string, Project ID for this request. (required)
116 targetTcpProxy: string, Name of the TargetTcpProxy resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 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.
118
119For 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.
120
121The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122
123Returns:
124 An object of the form:
125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 #
128 # Google Compute Engine has three Operation resources:
129 #
130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
131 #
132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
133 #
134 # Operations can be global, regional or zonal.
135 # - For global operations, use the `globalOperations` resource.
136 # - For regional operations, use the `regionOperations` resource.
137 # - For zonal operations, use the `zonalOperations` resource.
138 #
139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 },
151 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 },
153 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
154 &quot;httpErrorStatusCode&quot;: 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.
155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800158 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
159 #
160 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
161 #
162 # Example 1: Pack and unpack a message in C++.
163 #
164 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
165 #
166 # Example 2: Pack and unpack a message in Java.
167 #
168 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
169 #
170 # Example 3: Pack and unpack a message in Python.
171 #
172 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
173 #
174 # Example 4: Pack and unpack a message in Go
175 #
176 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
177 #
178 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
179 #
180 #
181 #
182 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
183 #
184 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
185 #
186 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
187 #
188 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
189 #
190 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
191 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
192 #
193 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
194 #
195 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
196 #
197 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
198 #
199 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
200 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
201 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800202 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800203 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800204 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
205 &quot;progress&quot;: 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.
206 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
207 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
208 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
209 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
210 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
211 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
212 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
213 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
214 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
215 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
216 {
217 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
218 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
219 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
220 {
221 &quot;key&quot;: &quot;A String&quot;, # [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).
222 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
223 },
224 ],
225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
226 },
227 ],
228 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
229}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800230</div>
231
232<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700233 <code class="details" id="get">get(project, targetTcpProxy)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 <pre>Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800235
236Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700237 project: string, Project ID for this request. (required)
238 targetTcpProxy: string, Name of the TargetTcpProxy resource to return. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800239
240Returns:
241 An object of the form:
242
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 { # Represents a Target TCP Proxy resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 #
245 # A target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing overview. (== resource_for {$api_version}.targetTcpProxies ==)
246 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
247 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
248 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
249 &quot;kind&quot;: &quot;compute#targetTcpProxy&quot;, # [Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.
250 &quot;name&quot;: &quot;A String&quot;, # 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.
251 &quot;proxyBind&quot;: True or False, # This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800253 # When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them.
254 #
255 # The default is false.
256 &quot;proxyHeader&quot;: &quot;A String&quot;, # Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.
257 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
258 &quot;service&quot;: &quot;A String&quot;, # URL to the BackendService resource.
259}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800260</div>
261
262<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700264 <pre>Creates a TargetTcpProxy resource in the specified project using the data included in the request.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265
266Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700267 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800269 The object takes the form of:
270
Dan O'Mearadd494642020-05-01 07:42:23 -0700271{ # Represents a Target TCP Proxy resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 #
273 # A target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing overview. (== resource_for {$api_version}.targetTcpProxies ==)
274 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
275 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
276 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
277 &quot;kind&quot;: &quot;compute#targetTcpProxy&quot;, # [Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.
278 &quot;name&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700279 &quot;proxyBind&quot;: True or False, # This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
280 #
281 # When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them.
282 #
283 # The default is false.
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;proxyHeader&quot;: &quot;A String&quot;, # Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.
285 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
286 &quot;service&quot;: &quot;A String&quot;, # URL to the BackendService resource.
287}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800288
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 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.
290
291For 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.
292
293The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800294
295Returns:
296 An object of the form:
297
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800299 #
300 # Google Compute Engine has three Operation resources:
301 #
302 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
303 #
304 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
305 #
306 # Operations can be global, regional or zonal.
307 # - For global operations, use the `globalOperations` resource.
308 # - For regional operations, use the `regionOperations` resource.
309 # - For zonal operations, use the `zonalOperations` resource.
310 #
311 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
312 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
313 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
314 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
315 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
316 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
317 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800319 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
320 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
321 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 },
323 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800324 },
325 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
326 &quot;httpErrorStatusCode&quot;: 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.
327 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
328 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
329 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800330 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
331 #
332 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
333 #
334 # Example 1: Pack and unpack a message in C++.
335 #
336 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
337 #
338 # Example 2: Pack and unpack a message in Java.
339 #
340 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
341 #
342 # Example 3: Pack and unpack a message in Python.
343 #
344 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
345 #
346 # Example 4: Pack and unpack a message in Go
347 #
348 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
349 #
350 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
351 #
352 #
353 #
354 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
355 #
356 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
357 #
358 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
359 #
360 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
361 #
362 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
363 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
364 #
365 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
366 #
367 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
368 #
369 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
370 #
371 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
372 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
373 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800374 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800375 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800376 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
377 &quot;progress&quot;: 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.
378 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
379 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
380 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
381 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
382 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
383 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
384 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
385 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
386 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
387 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
388 {
389 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
390 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
391 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
392 {
393 &quot;key&quot;: &quot;A String&quot;, # [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).
394 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
395 },
396 ],
397 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
398 },
399 ],
400 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
401}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800402</div>
403
404<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700405 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406 <pre>Retrieves the list of TargetTcpProxy resources available to the specified project.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800407
408Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700409 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800411
Dan O'Mearadd494642020-05-01 07:42:23 -0700412For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800413
Dan O'Mearadd494642020-05-01 07:42:23 -0700414You 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 -0800415
Bu Sun Kim65020912020-05-20 12:08:20 -0700416To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
417 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`)
418 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
419
420You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
421
422Currently, only sorting by `name` or `creationTimestamp desc` is supported.
423 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800424 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800425
426Returns:
427 An object of the form:
428
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700429 { # Contains a list of TargetTcpProxy resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800430 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
431 &quot;items&quot;: [ # A list of TargetTcpProxy resources.
432 { # Represents a Target TCP Proxy resource.
433 #
434 # A target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing overview. (== resource_for {$api_version}.targetTcpProxies ==)
435 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
436 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
437 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
438 &quot;kind&quot;: &quot;compute#targetTcpProxy&quot;, # [Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.
439 &quot;name&quot;: &quot;A String&quot;, # 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.
440 &quot;proxyBind&quot;: True or False, # This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800442 # When this field is set to true, Envoy proxies set up inbound traffic interception and bind to the IP address and port specified in the forwarding rule. This is generally useful when using Traffic Director to configure Envoy as a gateway or middle proxy (in other words, not a sidecar proxy). The Envoy proxy listens for inbound requests and handles requests when it receives them.
443 #
444 # The default is false.
445 &quot;proxyHeader&quot;: &quot;A String&quot;, # Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.
446 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
447 &quot;service&quot;: &quot;A String&quot;, # URL to the BackendService resource.
448 },
449 ],
450 &quot;kind&quot;: &quot;compute#targetTcpProxyList&quot;, # Type of resource.
451 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
452 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
453 &quot;warning&quot;: { # [Output Only] Informational warning message.
454 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
455 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
456 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
457 {
458 &quot;key&quot;: &quot;A String&quot;, # [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).
459 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800462 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
463 },
464}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800465</div>
466
467<div class="method">
468 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
469 <pre>Retrieves the next page of results.
470
471Args:
472 previous_request: The request for the previous page. (required)
473 previous_response: The response from the request for the previous page. (required)
474
475Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800477 page. Returns None if there are no more items in the collection.
478 </pre>
479</div>
480
481<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 <code class="details" id="setBackendService">setBackendService(project, targetTcpProxy, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700483 <pre>Changes the BackendService for TargetTcpProxy.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800484
485Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700486 project: string, Project ID for this request. (required)
487 targetTcpProxy: string, Name of the TargetTcpProxy resource whose BackendService resource is to be set. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 The object takes the form of:
490
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700491{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800492 &quot;service&quot;: &quot;A String&quot;, # The URL of the new BackendService resource for the targetTcpProxy.
493}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800494
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 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.
496
497For 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.
498
499The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800500
501Returns:
502 An object of the form:
503
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800505 #
506 # Google Compute Engine has three Operation resources:
507 #
508 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
509 #
510 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
511 #
512 # Operations can be global, regional or zonal.
513 # - For global operations, use the `globalOperations` resource.
514 # - For regional operations, use the `regionOperations` resource.
515 # - For zonal operations, use the `zonalOperations` resource.
516 #
517 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
518 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
519 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
520 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
521 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
522 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
523 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800525 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
526 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
527 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 },
529 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800530 },
531 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
532 &quot;httpErrorStatusCode&quot;: 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.
533 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
534 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
535 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800536 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
537 #
538 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
539 #
540 # Example 1: Pack and unpack a message in C++.
541 #
542 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
543 #
544 # Example 2: Pack and unpack a message in Java.
545 #
546 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
547 #
548 # Example 3: Pack and unpack a message in Python.
549 #
550 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
551 #
552 # Example 4: Pack and unpack a message in Go
553 #
554 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
555 #
556 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
557 #
558 #
559 #
560 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
561 #
562 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
563 #
564 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
565 #
566 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
567 #
568 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
569 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
570 #
571 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
572 #
573 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
574 #
575 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
576 #
577 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
578 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
579 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800580 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800581 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800582 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
583 &quot;progress&quot;: 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.
584 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
585 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
586 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
587 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
588 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
589 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
590 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
591 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
592 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
593 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
594 {
595 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
596 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
597 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
598 {
599 &quot;key&quot;: &quot;A String&quot;, # [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 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
601 },
602 ],
603 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
604 },
605 ],
606 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
607}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800608</div>
609
610<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 <code class="details" id="setProxyHeader">setProxyHeader(project, targetTcpProxy, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700612 <pre>Changes the ProxyHeaderType for TargetTcpProxy.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800613
614Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700615 project: string, Project ID for this request. (required)
616 targetTcpProxy: string, Name of the TargetTcpProxy resource whose ProxyHeader is to be set. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800618 The object takes the form of:
619
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700620{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800621 &quot;proxyHeader&quot;: &quot;A String&quot;, # The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.
622}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800623
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 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.
625
626For 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.
627
628The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800629
630Returns:
631 An object of the form:
632
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700633 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800634 #
635 # Google Compute Engine has three Operation resources:
636 #
637 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
638 #
639 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
640 #
641 # Operations can be global, regional or zonal.
642 # - For global operations, use the `globalOperations` resource.
643 # - For regional operations, use the `regionOperations` resource.
644 # - For zonal operations, use the `zonalOperations` resource.
645 #
646 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
647 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
648 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
649 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
650 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
651 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
652 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800654 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
655 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
656 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 },
658 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800659 },
660 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
661 &quot;httpErrorStatusCode&quot;: 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.
662 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
663 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
664 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800665 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
666 #
667 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
668 #
669 # Example 1: Pack and unpack a message in C++.
670 #
671 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
672 #
673 # Example 2: Pack and unpack a message in Java.
674 #
675 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
676 #
677 # Example 3: Pack and unpack a message in Python.
678 #
679 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
680 #
681 # Example 4: Pack and unpack a message in Go
682 #
683 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
684 #
685 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
686 #
687 #
688 #
689 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
690 #
691 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
692 #
693 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
694 #
695 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
696 #
697 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
698 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
699 #
700 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
701 #
702 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
703 #
704 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
705 #
706 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
707 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
708 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800709 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800710 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800711 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
712 &quot;progress&quot;: 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.
713 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
714 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
715 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
716 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
717 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
718 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
719 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
720 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
721 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
722 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
723 {
724 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
725 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
726 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
727 {
728 &quot;key&quot;: &quot;A String&quot;, # [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).
729 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
730 },
731 ],
732 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
733 },
734 ],
735 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
736}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700737</div>
738
739<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700740 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700741 <pre>Returns permissions that a caller has on the specified resource.
742
743Args:
744 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700747 The object takes the form of:
748
749{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800750 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
751 &quot;A String&quot;,
752 ],
753}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700754
755
756Returns:
757 An object of the form:
758
759 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800760 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
761 &quot;A String&quot;,
762 ],
763}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764</div>
765
766</body></html>