blob: 0f1b6a99a2b8426feab69d22286fab7e94bc91f0 [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">
78 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#delete">delete(project, region, address, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified address resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, address)</a></code></p>
88<p class="firstline">Returns the specified address resource.</p>
89<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040090 <code><a href="#insert">insert(project, region, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<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 -070092<p class="toc_element">
93 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves a list of addresses contained within the specified region.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#setLabels">setLabels(project, region, resource, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<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 -0400101<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700102 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
107 <pre>Retrieves an aggregated list of addresses.
108
109Args:
110 project: string, Project ID for this request. (required)
111 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
112
113You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
114
115Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116 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)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700117 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 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 =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120For 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 -0700121
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122You 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 -0700123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700125
126Returns:
127 An object of the form:
128
129 {
130 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 "kind": "compute#addressAggregatedList", # [Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.
132 "items": { # A list of AddressesScopedList resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133 "a_key": { # [Output Only] Name of the scope containing this set of addresses.
134 "warning": { # [Output Only] Informational warning which replaces the list of addresses when the list is empty.
135 "message": "A String", # [Output Only] A human-readable description of the warning code.
136 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
137 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
138 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
139 {
140 "value": "A String", # [Output Only] A warning data value corresponding to the key.
141 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
142 },
143 ],
144 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 "addresses": [ # [Output Only] A list of addresses contained in this scope.
146 { # Represents an IP Address resource.
147 #
148 # An address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.
149 #
150 # A globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)
151 "status": "A String", # [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.
152 "users": [ # [Output Only] The URLs of the resources that are using this address.
153 "A String",
154 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155 "kind": "compute#address", # [Output Only] Type of the resource. Always compute#address for addresses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 "addressType": "A String", # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
157 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
158 "networkTier": "A String", # 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.
159 #
160 # If this field is not specified, it is assumed to be PREMIUM.
161 "prefixLength": 42, # The prefix length if the resource reprensents an IP range.
162 "labelFingerprint": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163 #
164 # To see the latest fingerprint, make a get() request to retrieve an Address.
165 "labels": { # Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
166 "a_key": "A String",
167 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
169 "ipVersion": "A String", # 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.
170 "network": "A String", # 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.
171 "purpose": "A String", # The purpose of this resource, which can be one of the following values:
172 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
173 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
174 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
175 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
176 "address": "A String", # The static IP address represented by this resource.
177 "region": "A String", # [Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.
178 "subnetwork": "A String", # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700179 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
180 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
181 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700183 },
184 ],
185 },
186 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 "warning": { # [Output Only] Informational warning message.
188 "message": "A String", # [Output Only] A human-readable description of the warning code.
189 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
190 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
191 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
192 {
193 "value": "A String", # [Output Only] A warning data value corresponding to the key.
194 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
195 },
196 ],
197 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700198 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
199 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
205 <pre>Retrieves the next page of results.
206
207Args:
208 previous_request: The request for the previous page. (required)
209 previous_response: The response from the request for the previous page. (required)
210
211Returns:
212 A request object that you can call 'execute()' on to request the next
213 page. Returns None if there are no more items in the collection.
214 </pre>
215</div>
216
217<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400218 <code class="details" id="delete">delete(project, region, address, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700219 <pre>Deletes the specified address resource.
220
221Args:
222 project: string, Project ID for this request. (required)
223 region: string, Name of the region for this request. (required)
224 address: string, Name of the address resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 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.
226
227For 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.
228
229The 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 -0700230
231Returns:
232 An object of the form:
233
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 { # Represents an Operation resource.
235 #
236 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
237 #
238 # Operations can be global, regional or zonal.
239 # - For global operations, use the globalOperations resource.
240 # - For regional operations, use the regionOperations resource.
241 # - For zonal operations, use the zonalOperations resource.
242 #
243 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700247 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700249 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
250 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
251 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
252 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
253 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
254 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
255 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
256 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
257 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
258 {
259 "message": "A String", # [Output Only] A human-readable description of the warning code.
260 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
261 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
262 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
263 {
264 "value": "A String", # [Output Only] A warning data value corresponding to the key.
265 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
266 },
267 ],
268 },
269 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700271 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
272 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
273 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
274 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700276 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
277 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
278 {
279 "message": "A String", # [Output Only] An optional, human-readable error message.
280 "code": "A String", # [Output Only] The error type identifier for this error.
281 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
282 },
283 ],
284 },
285 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
286 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800287 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700288 }</pre>
289</div>
290
291<div class="method">
292 <code class="details" id="get">get(project, region, address)</code>
293 <pre>Returns the specified address resource.
294
295Args:
296 project: string, Project ID for this request. (required)
297 region: string, Name of the region for this request. (required)
298 address: string, Name of the address resource to return. (required)
299
300Returns:
301 An object of the form:
302
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 { # Represents an IP Address resource.
304 #
305 # An address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.
306 #
307 # A globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)
308 "status": "A String", # [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.
309 "users": [ # [Output Only] The URLs of the resources that are using this address.
310 "A String",
311 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 "kind": "compute#address", # [Output Only] Type of the resource. Always compute#address for addresses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 "addressType": "A String", # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
314 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
315 "networkTier": "A String", # 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.
316 #
317 # If this field is not specified, it is assumed to be PREMIUM.
318 "prefixLength": 42, # The prefix length if the resource reprensents an IP range.
319 "labelFingerprint": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700320 #
321 # To see the latest fingerprint, make a get() request to retrieve an Address.
322 "labels": { # Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
323 "a_key": "A String",
324 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
326 "ipVersion": "A String", # 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.
327 "network": "A String", # 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.
328 "purpose": "A String", # The purpose of this resource, which can be one of the following values:
329 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
330 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
331 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
332 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
333 "address": "A String", # The static IP address represented by this resource.
334 "region": "A String", # [Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.
335 "subnetwork": "A String", # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700336 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
337 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
338 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700340 }</pre>
341</div>
342
343<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400344 <code class="details" id="insert">insert(project, region, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 <pre>Creates an address resource in the specified project by using the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700346
347Args:
348 project: string, Project ID for this request. (required)
349 region: string, Name of the region for this request. (required)
350 body: object, The request body. (required)
351 The object takes the form of:
352
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353{ # Represents an IP Address resource.
354 #
355 # An address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.
356 #
357 # A globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)
358 "status": "A String", # [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.
359 "users": [ # [Output Only] The URLs of the resources that are using this address.
360 "A String",
361 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700362 "kind": "compute#address", # [Output Only] Type of the resource. Always compute#address for addresses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 "addressType": "A String", # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
364 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
365 "networkTier": "A String", # 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.
366 #
367 # If this field is not specified, it is assumed to be PREMIUM.
368 "prefixLength": 42, # The prefix length if the resource reprensents an IP range.
369 "labelFingerprint": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700370 #
371 # To see the latest fingerprint, make a get() request to retrieve an Address.
372 "labels": { # Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
373 "a_key": "A String",
374 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
376 "ipVersion": "A String", # 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.
377 "network": "A String", # 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.
378 "purpose": "A String", # The purpose of this resource, which can be one of the following values:
379 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
380 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
381 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
382 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
383 "address": "A String", # The static IP address represented by this resource.
384 "region": "A String", # [Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.
385 "subnetwork": "A String", # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700386 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
387 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
388 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700390 }
391
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 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.
393
394For 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.
395
396The 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 -0700397
398Returns:
399 An object of the form:
400
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 { # Represents an Operation resource.
402 #
403 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
404 #
405 # Operations can be global, regional or zonal.
406 # - For global operations, use the globalOperations resource.
407 # - For regional operations, use the regionOperations resource.
408 # - For zonal operations, use the zonalOperations resource.
409 #
410 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700411 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400413 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700414 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700416 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
417 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
418 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
419 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
420 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
421 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
422 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
423 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
424 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
425 {
426 "message": "A String", # [Output Only] A human-readable description of the warning code.
427 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
428 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
429 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
430 {
431 "value": "A String", # [Output Only] A warning data value corresponding to the key.
432 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
433 },
434 ],
435 },
436 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700438 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
439 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
440 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
441 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700443 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
444 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
445 {
446 "message": "A String", # [Output Only] An optional, human-readable error message.
447 "code": "A String", # [Output Only] The error type identifier for this error.
448 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
449 },
450 ],
451 },
452 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
453 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800454 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700455 }</pre>
456</div>
457
458<div class="method">
459 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
460 <pre>Retrieves a list of addresses contained within the specified region.
461
462Args:
463 project: string, Project ID for this request. (required)
464 region: string, Name of the region for this request. (required)
465 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
466
467You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
468
469Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400470 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)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700471 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 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 =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700473
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474For 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 -0700475
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476You 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 -0700477
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700479
480Returns:
481 An object of the form:
482
483 { # Contains a list of addresses.
484 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 "kind": "compute#addressList", # [Output Only] Type of resource. Always compute#addressList for lists of addresses.
486 "items": [ # A list of Address resources.
487 { # Represents an IP Address resource.
488 #
489 # An address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.
490 #
491 # A globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)
492 "status": "A String", # [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.
493 "users": [ # [Output Only] The URLs of the resources that are using this address.
494 "A String",
495 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700496 "kind": "compute#address", # [Output Only] Type of the resource. Always compute#address for addresses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 "addressType": "A String", # The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
498 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
499 "networkTier": "A String", # 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.
500 #
501 # If this field is not specified, it is assumed to be PREMIUM.
502 "prefixLength": 42, # The prefix length if the resource reprensents an IP range.
503 "labelFingerprint": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700504 #
505 # To see the latest fingerprint, make a get() request to retrieve an Address.
506 "labels": { # Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
507 "a_key": "A String",
508 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
510 "ipVersion": "A String", # 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.
511 "network": "A String", # 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.
512 "purpose": "A String", # The purpose of this resource, which can be one of the following values:
513 # - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
514 # - `DNS_RESOLVER` for a DNS resolver address in a subnetwork
515 # - `VPC_PEERING` for addresses that are reserved for VPC peer networks.
516 # - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
517 "address": "A String", # The static IP address represented by this resource.
518 "region": "A String", # [Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.
519 "subnetwork": "A String", # The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700520 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
521 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
522 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700524 },
525 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 "warning": { # [Output Only] Informational warning message.
527 "message": "A String", # [Output Only] A human-readable description of the warning code.
528 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
529 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
530 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
531 {
532 "value": "A String", # [Output Only] A warning data value corresponding to the key.
533 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
534 },
535 ],
536 },
537 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
538 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 }</pre>
540</div>
541
542<div class="method">
543 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
544 <pre>Retrieves the next page of results.
545
546Args:
547 previous_request: The request for the previous page. (required)
548 previous_response: The response from the request for the previous page. (required)
549
550Returns:
551 A request object that you can call 'execute()' on to request the next
552 page. Returns None if there are no more items in the collection.
553 </pre>
554</div>
555
556<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400557 <code class="details" id="setLabels">setLabels(project, region, resource, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 <pre>Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400559
560Args:
561 project: string, Project ID for this request. (required)
562 region: string, The region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400564 body: object, The request body. (required)
565 The object takes the form of:
566
567{
568 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.
569 "labels": { # The labels to set for this resource.
570 "a_key": "A String",
571 },
572 }
573
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 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.
575
576For 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.
577
578The 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 -0400579
580Returns:
581 An object of the form:
582
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 { # Represents an Operation resource.
584 #
585 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
586 #
587 # Operations can be global, regional or zonal.
588 # - For global operations, use the globalOperations resource.
589 # - For regional operations, use the regionOperations resource.
590 # - For zonal operations, use the zonalOperations resource.
591 #
592 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400593 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400595 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
596 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400598 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
599 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
600 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
601 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
602 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
603 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
604 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
605 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
606 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
607 {
608 "message": "A String", # [Output Only] A human-readable description of the warning code.
609 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
610 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
611 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
612 {
613 "value": "A String", # [Output Only] A warning data value corresponding to the key.
614 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
615 },
616 ],
617 },
618 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400620 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
621 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
622 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
623 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400625 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
626 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
627 {
628 "message": "A String", # [Output Only] An optional, human-readable error message.
629 "code": "A String", # [Output Only] The error type identifier for this error.
630 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
631 },
632 ],
633 },
634 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
635 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
636 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
637 }</pre>
638</div>
639
640<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700641 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
642 <pre>Returns permissions that a caller has on the specified resource.
643
644Args:
645 project: string, Project ID for this request. (required)
646 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700648 body: object, The request body. (required)
649 The object takes the form of:
650
651{
652 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
653 "A String",
654 ],
655 }
656
657
658Returns:
659 An object of the form:
660
661 {
662 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
663 "A String",
664 ],
665 }</pre>
666</div>
667
668</body></html>