blob: e8f66f9b432abfbd42371574153a58e33a3ab517 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.addresses.html">addresses</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Retrieves an aggregated list of addresses.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#delete">delete(project, region, address, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Deletes the specified address resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, region, address)</a></code></p>
91<p class="firstline">Returns the specified address resource.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Creates an address resource in the specified project by using the data included in the request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Retrieves a list of addresses contained within the specified region.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setLabels">setLabels(project, region, resource, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<h3>Method Details</h3>
108<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110 <pre>Retrieves an aggregated list of addresses.
111
112Args:
113 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115
Dan O'Mearadd494642020-05-01 07:42:23 -0700116For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700117
Dan O'Mearadd494642020-05-01 07:42:23 -0700118You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119
Bu Sun Kim65020912020-05-20 12:08:20 -0700120To 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) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 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`)
123 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
124
125You can also sort results in descending order based on the creation timestamp using `orderBy=&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.
126
127Currently, only sorting by `name` or `creationTimestamp desc` is supported.
128 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 -0800129 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130
131Returns:
132 An object of the form:
133
134 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800135 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
136 &quot;items&quot;: { # A list of AddressesScopedList resources.
137 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of addresses.
138 &quot;addresses&quot;: [ # [Output Only] A list of addresses contained in this scope.
139 { # Use global external addresses for GFE-based external HTTP(S) load balancers in Premium Tier.
140 #
141 # Use global internal addresses for reserved peering network range.
142 #
143 # Use regional external addresses for the following resources:
144 #
145 # - External IP addresses for VM instances - Regional external forwarding rules - Cloud NAT external IP addresses - GFE based LBs in Standard Tier - Network LBs in Premium or Standard Tier - Cloud VPN gateways (both Classic and HA)
146 #
147 # Use regional internal IP addresses for subnet IP ranges (primary and secondary). This includes:
148 #
149 # - Internal IP addresses for VM instances - Alias IP ranges of VM instances (/32 only) - Regional internal forwarding rules - Internal TCP/UDP load balancer addresses - Internal HTTP(S) load balancer addresses - Cloud DNS inbound forwarding IP addresses
150 #
151 # For more information, read reserved IP address.
152 #
153 # (== resource_for {$api_version}.addresses ==) (== resource_for {$api_version}.globalAddresses ==)
154 &quot;address&quot;: &quot;A String&quot;, # The static IP address represented by this resource.
155 &quot;addressType&quot;: &quot;A String&quot;, # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
156 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
157 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
158 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
159 &quot;ipVersion&quot;: &quot;A String&quot;, # The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
160 &quot;kind&quot;: &quot;compute#address&quot;, # [Output Only] Type of the resource. Always compute#address for addresses.
161 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 # To see the latest fingerprint, make a get() request to retrieve an Address.
164 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
165 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800167 &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])?`. 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.
168 &quot;network&quot;: &quot;A String&quot;, # The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
169 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
170 #
171 # If this field is not specified, it is assumed to be PREMIUM.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700172 &quot;prefixLength&quot;: 42, # The prefix length if the resource represents an IP range.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800173 &quot;purpose&quot;: &quot;A String&quot;, # The purpose of this resource, which can be one of the following values:
174 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
175 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
176 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
177 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700178 # - `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800179 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800180 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
181 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
182 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
183 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
184 &quot;users&quot;: [ # [Output Only] The URLs of the resources that are using this address.
185 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 },
188 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800189 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of addresses when the list is empty.
190 &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.
191 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
192 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
193 {
194 &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).
195 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
196 },
197 ],
198 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
199 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800201 },
202 &quot;kind&quot;: &quot;compute#addressAggregatedList&quot;, # [Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.
203 &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.
204 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
205 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
206 &quot;A String&quot;,
207 ],
208 &quot;warning&quot;: { # [Output Only] Informational warning message.
209 &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.
210 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
211 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
212 {
213 &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).
214 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
215 },
216 ],
217 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
218 },
219}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700220</div>
221
222<div class="method">
223 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
224 <pre>Retrieves the next page of results.
225
226Args:
227 previous_request: The request for the previous page. (required)
228 previous_response: The response from the request for the previous page. (required)
229
230Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700232 page. Returns None if there are no more items in the collection.
233 </pre>
234</div>
235
236<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700237 <code class="details" id="close">close()</code>
238 <pre>Close httplib2 connections.</pre>
239</div>
240
241<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400242 <code class="details" id="delete">delete(project, region, address, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700243 <pre>Deletes the specified address resource.
244
245Args:
246 project: string, Project ID for this request. (required)
247 region: string, Name of the region for this request. (required)
248 address: string, Name of the address resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 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.
250
251For 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.
252
253The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700254
255Returns:
256 An object of the form:
257
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800259 #
260 # Google Compute Engine has three Operation resources:
261 #
262 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
263 #
264 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
265 #
266 # Operations can be global, regional or zonal.
267 # - For global operations, use the `globalOperations` resource.
268 # - For regional operations, use the `regionOperations` resource.
269 # - For zonal operations, use the `zonalOperations` resource.
270 #
271 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
272 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
273 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
274 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
275 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
276 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
277 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800279 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
280 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
281 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 },
283 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800284 },
285 &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`.
286 &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.
287 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
288 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
289 &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 -0800290 &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.
291 #
292 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
293 #
294 # Example 1: Pack and unpack a message in C++.
295 #
296 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
297 #
298 # Example 2: Pack and unpack a message in Java.
299 #
300 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
301 #
302 # Example 3: Pack and unpack a message in Python.
303 #
304 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
305 #
306 # Example 4: Pack and unpack a message in Go
307 #
308 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
309 #
310 # 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;.
311 #
312 #
313 #
314 # 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:
315 #
316 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
317 #
318 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
319 #
320 # 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][]):
321 #
322 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
323 &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).
324 #
325 # 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:
326 #
327 # * 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.)
328 #
329 # 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.
330 #
331 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
332 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
333 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800334 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800335 &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 -0800336 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
337 &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.
338 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
339 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
340 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
341 &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.
342 &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`.
343 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
344 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
345 &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.
346 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
347 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
348 {
349 &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.
350 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
351 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
352 {
353 &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).
354 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
355 },
356 ],
357 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
358 },
359 ],
360 &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.
361}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700362</div>
363
364<div class="method">
365 <code class="details" id="get">get(project, region, address)</code>
366 <pre>Returns the specified address resource.
367
368Args:
369 project: string, Project ID for this request. (required)
370 region: string, Name of the region for this request. (required)
371 address: string, Name of the address resource to return. (required)
372
373Returns:
374 An object of the form:
375
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 { # Use global external addresses for GFE-based external HTTP(S) load balancers in Premium Tier.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800377 #
378 # Use global internal addresses for reserved peering network range.
379 #
380 # Use regional external addresses for the following resources:
381 #
382 # - External IP addresses for VM instances - Regional external forwarding rules - Cloud NAT external IP addresses - GFE based LBs in Standard Tier - Network LBs in Premium or Standard Tier - Cloud VPN gateways (both Classic and HA)
383 #
384 # Use regional internal IP addresses for subnet IP ranges (primary and secondary). This includes:
385 #
386 # - Internal IP addresses for VM instances - Alias IP ranges of VM instances (/32 only) - Regional internal forwarding rules - Internal TCP/UDP load balancer addresses - Internal HTTP(S) load balancer addresses - Cloud DNS inbound forwarding IP addresses
387 #
388 # For more information, read reserved IP address.
389 #
390 # (== resource_for {$api_version}.addresses ==) (== resource_for {$api_version}.globalAddresses ==)
391 &quot;address&quot;: &quot;A String&quot;, # The static IP address represented by this resource.
392 &quot;addressType&quot;: &quot;A String&quot;, # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
393 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
394 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
395 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
396 &quot;ipVersion&quot;: &quot;A String&quot;, # The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
397 &quot;kind&quot;: &quot;compute#address&quot;, # [Output Only] Type of the resource. Always compute#address for addresses.
398 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800400 # To see the latest fingerprint, make a get() request to retrieve an Address.
401 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
402 &quot;a_key&quot;: &quot;A String&quot;,
403 },
404 &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])?`. 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.
405 &quot;network&quot;: &quot;A String&quot;, # The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
406 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800408 # If this field is not specified, it is assumed to be PREMIUM.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700409 &quot;prefixLength&quot;: 42, # The prefix length if the resource represents an IP range.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800410 &quot;purpose&quot;: &quot;A String&quot;, # The purpose of this resource, which can be one of the following values:
411 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
412 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
413 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
414 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700415 # - `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800416 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800417 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
418 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
419 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
420 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
421 &quot;users&quot;: [ # [Output Only] The URLs of the resources that are using this address.
422 &quot;A String&quot;,
423 ],
424}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700425</div>
426
427<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 <pre>Creates an address resource in the specified project by using the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700430
431Args:
432 project: string, Project ID for this request. (required)
433 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700435 The object takes the form of:
436
Dan O'Mearadd494642020-05-01 07:42:23 -0700437{ # Use global external addresses for GFE-based external HTTP(S) load balancers in Premium Tier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 #
439 # Use global internal addresses for reserved peering network range.
440 #
441 # Use regional external addresses for the following resources:
442 #
443 # - External IP addresses for VM instances - Regional external forwarding rules - Cloud NAT external IP addresses - GFE based LBs in Standard Tier - Network LBs in Premium or Standard Tier - Cloud VPN gateways (both Classic and HA)
444 #
445 # Use regional internal IP addresses for subnet IP ranges (primary and secondary). This includes:
446 #
447 # - Internal IP addresses for VM instances - Alias IP ranges of VM instances (/32 only) - Regional internal forwarding rules - Internal TCP/UDP load balancer addresses - Internal HTTP(S) load balancer addresses - Cloud DNS inbound forwarding IP addresses
448 #
449 # For more information, read reserved IP address.
450 #
451 # (== resource_for {$api_version}.addresses ==) (== resource_for {$api_version}.globalAddresses ==)
452 &quot;address&quot;: &quot;A String&quot;, # The static IP address represented by this resource.
453 &quot;addressType&quot;: &quot;A String&quot;, # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
454 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
455 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
456 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
457 &quot;ipVersion&quot;: &quot;A String&quot;, # The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
458 &quot;kind&quot;: &quot;compute#address&quot;, # [Output Only] Type of the resource. Always compute#address for addresses.
459 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 # To see the latest fingerprint, make a get() request to retrieve an Address.
462 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
463 &quot;a_key&quot;: &quot;A String&quot;,
464 },
465 &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])?`. 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.
466 &quot;network&quot;: &quot;A String&quot;, # The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
467 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 # If this field is not specified, it is assumed to be PREMIUM.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700470 &quot;prefixLength&quot;: 42, # The prefix length if the resource represents an IP range.
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 &quot;purpose&quot;: &quot;A String&quot;, # The purpose of this resource, which can be one of the following values:
472 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
473 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
474 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
475 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700476 # - `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800477 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
Bu Sun Kim65020912020-05-20 12:08:20 -0700478 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
479 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
480 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
481 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
482 &quot;users&quot;: [ # [Output Only] The URLs of the resources that are using this address.
483 &quot;A String&quot;,
484 ],
485}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700486
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 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.
488
489For 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.
490
491The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700492
493Returns:
494 An object of the form:
495
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800497 #
498 # Google Compute Engine has three Operation resources:
499 #
500 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
501 #
502 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
503 #
504 # Operations can be global, regional or zonal.
505 # - For global operations, use the `globalOperations` resource.
506 # - For regional operations, use the `regionOperations` resource.
507 # - For zonal operations, use the `zonalOperations` resource.
508 #
509 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
510 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
511 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
512 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
513 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
514 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
515 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700516 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800517 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
518 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
519 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 },
521 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800522 },
523 &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`.
524 &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.
525 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
526 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
527 &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 -0800528 &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.
529 #
530 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
531 #
532 # Example 1: Pack and unpack a message in C++.
533 #
534 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
535 #
536 # Example 2: Pack and unpack a message in Java.
537 #
538 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
539 #
540 # Example 3: Pack and unpack a message in Python.
541 #
542 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
543 #
544 # Example 4: Pack and unpack a message in Go
545 #
546 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
547 #
548 # 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;.
549 #
550 #
551 #
552 # 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:
553 #
554 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
555 #
556 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
557 #
558 # 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][]):
559 #
560 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
561 &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).
562 #
563 # 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:
564 #
565 # * 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.)
566 #
567 # 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.
568 #
569 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
570 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
571 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800572 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800573 &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 -0800574 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
575 &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.
576 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
577 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
578 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
579 &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.
580 &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`.
581 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
582 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
583 &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.
584 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
585 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
586 {
587 &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.
588 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
589 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
590 {
591 &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).
592 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
593 },
594 ],
595 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
596 },
597 ],
598 &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.
599}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700600</div>
601
602<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700603 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700604 <pre>Retrieves a list of addresses contained within the specified region.
605
606Args:
607 project: string, Project ID for this request. (required)
608 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700610
Dan O'Mearadd494642020-05-01 07:42:23 -0700611For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700612
Dan O'Mearadd494642020-05-01 07:42:23 -0700613You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700614
Bu Sun Kim65020912020-05-20 12:08:20 -0700615To 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) ```
616 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`)
617 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
618
619You 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.
620
621Currently, only sorting by `name` or `creationTimestamp desc` is supported.
622 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 -0800623 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700624
625Returns:
626 An object of the form:
627
628 { # Contains a list of addresses.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800629 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
630 &quot;items&quot;: [ # A list of Address resources.
631 { # Use global external addresses for GFE-based external HTTP(S) load balancers in Premium Tier.
632 #
633 # Use global internal addresses for reserved peering network range.
634 #
635 # Use regional external addresses for the following resources:
636 #
637 # - External IP addresses for VM instances - Regional external forwarding rules - Cloud NAT external IP addresses - GFE based LBs in Standard Tier - Network LBs in Premium or Standard Tier - Cloud VPN gateways (both Classic and HA)
638 #
639 # Use regional internal IP addresses for subnet IP ranges (primary and secondary). This includes:
640 #
641 # - Internal IP addresses for VM instances - Alias IP ranges of VM instances (/32 only) - Regional internal forwarding rules - Internal TCP/UDP load balancer addresses - Internal HTTP(S) load balancer addresses - Cloud DNS inbound forwarding IP addresses
642 #
643 # For more information, read reserved IP address.
644 #
645 # (== resource_for {$api_version}.addresses ==) (== resource_for {$api_version}.globalAddresses ==)
646 &quot;address&quot;: &quot;A String&quot;, # The static IP address represented by this resource.
647 &quot;addressType&quot;: &quot;A String&quot;, # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
648 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
649 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
650 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
651 &quot;ipVersion&quot;: &quot;A String&quot;, # The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
652 &quot;kind&quot;: &quot;compute#address&quot;, # [Output Only] Type of the resource. Always compute#address for addresses.
653 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800655 # To see the latest fingerprint, make a get() request to retrieve an Address.
656 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
657 &quot;a_key&quot;: &quot;A String&quot;,
658 },
659 &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])?`. 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.
660 &quot;network&quot;: &quot;A String&quot;, # The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
661 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800663 # If this field is not specified, it is assumed to be PREMIUM.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700664 &quot;prefixLength&quot;: 42, # The prefix length if the resource represents an IP range.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800665 &quot;purpose&quot;: &quot;A String&quot;, # The purpose of this resource, which can be one of the following values:
666 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
667 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
668 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
669 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700670 # - `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800671 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800672 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
673 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
674 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
675 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
676 &quot;users&quot;: [ # [Output Only] The URLs of the resources that are using this address.
677 &quot;A String&quot;,
678 ],
679 },
680 ],
681 &quot;kind&quot;: &quot;compute#addressList&quot;, # [Output Only] Type of resource. Always compute#addressList for lists of addresses.
682 &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.
683 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
684 &quot;warning&quot;: { # [Output Only] Informational warning message.
685 &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.
686 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
687 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
688 {
689 &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).
690 &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 -0700691 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800693 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
694 },
695}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700696</div>
697
698<div class="method">
699 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
700 <pre>Retrieves the next page of results.
701
702Args:
703 previous_request: The request for the previous page. (required)
704 previous_response: The response from the request for the previous page. (required)
705
706Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700708 page. Returns None if there are no more items in the collection.
709 </pre>
710</div>
711
712<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700713 <code class="details" id="setLabels">setLabels(project, region, resource, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 <pre>Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400715
716Args:
717 project: string, Project ID for this request. (required)
718 region: string, The region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700720 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400721 The object takes the form of:
722
723{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800724 &quot;labelFingerprint&quot;: &quot;A String&quot;, # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.
725 &quot;labels&quot;: { # The labels to set for this resource.
726 &quot;a_key&quot;: &quot;A String&quot;,
727 },
728}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400729
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 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.
731
732For 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.
733
734The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400735
736Returns:
737 An object of the form:
738
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800740 #
741 # Google Compute Engine has three Operation resources:
742 #
743 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
744 #
745 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
746 #
747 # Operations can be global, regional or zonal.
748 # - For global operations, use the `globalOperations` resource.
749 # - For regional operations, use the `regionOperations` resource.
750 # - For zonal operations, use the `zonalOperations` resource.
751 #
752 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
753 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
755 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
756 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
757 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
758 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800760 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
761 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
762 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 },
764 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800765 },
766 &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`.
767 &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.
768 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
769 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
770 &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 -0800771 &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.
772 #
773 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
774 #
775 # Example 1: Pack and unpack a message in C++.
776 #
777 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
778 #
779 # Example 2: Pack and unpack a message in Java.
780 #
781 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
782 #
783 # Example 3: Pack and unpack a message in Python.
784 #
785 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
786 #
787 # Example 4: Pack and unpack a message in Go
788 #
789 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
790 #
791 # 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;.
792 #
793 #
794 #
795 # 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:
796 #
797 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
798 #
799 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
800 #
801 # 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][]):
802 #
803 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
804 &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).
805 #
806 # 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:
807 #
808 # * 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.)
809 #
810 # 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.
811 #
812 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
813 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
814 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800815 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800816 &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 -0800817 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
818 &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.
819 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
820 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
821 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
822 &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.
823 &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`.
824 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
825 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
826 &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.
827 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
828 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
829 {
830 &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.
831 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
832 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
833 {
834 &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).
835 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
836 },
837 ],
838 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
839 },
840 ],
841 &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.
842}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400843</div>
844
845<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700847 <pre>Returns permissions that a caller has on the specified resource.
848
849Args:
850 project: string, Project ID for this request. (required)
851 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700852 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700854 The object takes the form of:
855
856{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800857 &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.
858 &quot;A String&quot;,
859 ],
860}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700861
862
863Returns:
864 An object of the form:
865
866 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800867 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
868 &quot;A String&quot;,
869 ],
870}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700871</div>
872
873</body></html>