blob: f15644ab97490c47a413b3c2a420dd410ab8707a [file] [log] [blame]
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.serviceAttachments.html">serviceAttachments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
79<p class="firstline">Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.</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">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(project, region, serviceAttachment, requestId=None)</a></code></p>
88<p class="firstline">Deletes the specified ServiceAttachment in the given scope</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, region, serviceAttachment)</a></code></p>
91<p class="firstline">Returns the specified ServiceAttachment resource in the given scope.</p>
92<p class="toc_element">
yoshi-code-bota8b35b92021-03-31 13:33:30 -070093 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
94<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
95<p class="toc_element">
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080096 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
97<p class="firstline">Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.</p>
98<p class="toc_element">
99 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
100<p class="firstline">Lists the ServiceAttachments for a project in the given scope.</p>
101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700104<p class="toc_element">
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700105 <code><a href="#patch">patch(project, region, serviceAttachment, body=None, requestId=None)</a></code></p>
106<p class="firstline">Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
107<p class="toc_element">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700108 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
111 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800113<h3>Method Details</h3>
114<div class="method">
115 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
116 <pre>Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.
117
118Args:
119 project: string, Name of the project scoping this request. (required)
120 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;`.
121
122For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
123
124You 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.
125
126To 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) ```
127 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.
128 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`)
129 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
130
131You 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.
132
133Currently, only sorting by `name` or `creationTimestamp desc` is supported.
134 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.
135 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
136
137Returns:
138 An object of the form:
139
140 { # Contains a list of ServiceAttachmentsScopedList.
141 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
142 &quot;items&quot;: { # A list of ServiceAttachmentsScopedList resources.
143 &quot;a_key&quot;: { # Name of the scope containing this set of ServiceAttachments.
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700144 &quot;serviceAttachments&quot;: [ # A list of ServiceAttachments contained in this scope.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800145 { # Represents a ServiceAttachment resource.
146 #
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400147 # A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 19
148 &quot;connectedEndpoints&quot;: [ # [Output Only] An array of connections for all the consumers connected to this service attachment.
149 { # [Output Only] A connection connected to this service attachment.
150 &quot;endpoint&quot;: &quot;A String&quot;, # The url of a connected endpoint.
151 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule. [Deprecated] Do not use.
152 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the connected endpoint.
153 &quot;status&quot;: &quot;A String&quot;, # The status of a connected endpoint to this service attachment.
154 },
155 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800156 &quot;connectionPreference&quot;: &quot;A String&quot;, # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700157 &quot;consumerAcceptLists&quot;: [ # Projects that are allowed to connect to this service attachment.
158 {
159 &quot;connectionLimit&quot;: 42, # The value of the limit to set.
160 &quot;projectIdOrNum&quot;: &quot;A String&quot;, # The project id or number for the project to set the limit for.
161 },
162 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800163 &quot;consumerForwardingRules&quot;: [ # [Output Only] An array of forwarding rules for all the consumers connected to this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400164 { # [Output Only] A consumer forwarding rule connected to this service attachment. [Deprecated] Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800165 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400166 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the PSC Forwarding Rule.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800167 &quot;status&quot;: &quot;A String&quot;, # The status of the forwarding rule.
168 },
169 ],
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700170 &quot;consumerRejectLists&quot;: [ # Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number.
171 &quot;A String&quot;,
172 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800173 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
174 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
175 &quot;enableProxyProtocol&quot;: True or False, # If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700176 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800177 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource type. The server generates this identifier.
178 &quot;kind&quot;: &quot;compute#serviceAttachment&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
179 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
180 &quot;natSubnets&quot;: [ # An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
181 &quot;A String&quot;,
182 ],
183 &quot;producerForwardingRule&quot;: &quot;A String&quot;, # The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400184 &quot;pscServiceAttachmentId&quot;: { # [Output Only] An 128-bit global unique ID of the PSC service attachment.
185 &quot;high&quot;: &quot;A String&quot;,
186 &quot;low&quot;: &quot;A String&quot;,
187 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800188 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
189 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400190 &quot;targetService&quot;: &quot;A String&quot;, # The URL of a service serving the endpoint identified by this service attachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800191 },
192 ],
193 &quot;warning&quot;: { # Informational warning which replaces the list of service attachments when the list is empty.
194 &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.
195 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
196 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
197 {
198 &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).
199 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
200 },
201 ],
202 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
203 },
204 },
205 },
206 &quot;kind&quot;: &quot;compute#serviceAttachmentAggregatedList&quot;, # Type of resource.
207 &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.
208 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
209 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
210 &quot;A String&quot;,
211 ],
212 &quot;warning&quot;: { # [Output Only] Informational warning message.
213 &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.
214 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
215 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
216 {
217 &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).
218 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
219 },
220 ],
221 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
222 },
223}</pre>
224</div>
225
226<div class="method">
227 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
228 <pre>Retrieves the next page of results.
229
230Args:
231 previous_request: The request for the previous page. (required)
232 previous_response: The response from the request for the previous page. (required)
233
234Returns:
235 A request object that you can call &#x27;execute()&#x27; on to request the next
236 page. Returns None if there are no more items in the collection.
237 </pre>
238</div>
239
240<div class="method">
241 <code class="details" id="close">close()</code>
242 <pre>Close httplib2 connections.</pre>
243</div>
244
245<div class="method">
246 <code class="details" id="delete">delete(project, region, serviceAttachment, requestId=None)</code>
247 <pre>Deletes the specified ServiceAttachment in the given scope
248
249Args:
250 project: string, Project ID for this request. (required)
251 region: string, Name of the region of this request. (required)
252 serviceAttachment: string, Name of the ServiceAttachment resource to delete. (required)
253 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.
254
255For 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.
256
257The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
258
259Returns:
260 An object of the form:
261
262 { # Represents an Operation resource.
263 #
264 # Google Compute Engine has three Operation resources:
265 #
266 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
267 #
268 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
269 #
270 # Operations can be global, regional or zonal.
271 # - For global operations, use the `globalOperations` resource.
272 # - For regional operations, use the `regionOperations` resource.
273 # - For zonal operations, use the `zonalOperations` resource.
274 #
275 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
276 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
277 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
278 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
279 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
280 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
281 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
282 {
283 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
284 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
285 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
286 },
287 ],
288 },
289 &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`.
290 &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.
291 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
292 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
293 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
294 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
295 &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.
296 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
297 &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.
298 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
299 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
300 &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.
301 &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`.
302 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
303 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
304 &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.
305 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
306 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
307 {
308 &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.
309 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
310 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
311 {
312 &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).
313 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
314 },
315 ],
316 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
317 },
318 ],
319 &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.
320}</pre>
321</div>
322
323<div class="method">
324 <code class="details" id="get">get(project, region, serviceAttachment)</code>
325 <pre>Returns the specified ServiceAttachment resource in the given scope.
326
327Args:
328 project: string, Project ID for this request. (required)
329 region: string, Name of the region of this request. (required)
330 serviceAttachment: string, Name of the ServiceAttachment resource to return. (required)
331
332Returns:
333 An object of the form:
334
335 { # Represents a ServiceAttachment resource.
336 #
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400337 # A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 19
338 &quot;connectedEndpoints&quot;: [ # [Output Only] An array of connections for all the consumers connected to this service attachment.
339 { # [Output Only] A connection connected to this service attachment.
340 &quot;endpoint&quot;: &quot;A String&quot;, # The url of a connected endpoint.
341 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule. [Deprecated] Do not use.
342 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the connected endpoint.
343 &quot;status&quot;: &quot;A String&quot;, # The status of a connected endpoint to this service attachment.
344 },
345 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800346 &quot;connectionPreference&quot;: &quot;A String&quot;, # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700347 &quot;consumerAcceptLists&quot;: [ # Projects that are allowed to connect to this service attachment.
348 {
349 &quot;connectionLimit&quot;: 42, # The value of the limit to set.
350 &quot;projectIdOrNum&quot;: &quot;A String&quot;, # The project id or number for the project to set the limit for.
351 },
352 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800353 &quot;consumerForwardingRules&quot;: [ # [Output Only] An array of forwarding rules for all the consumers connected to this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400354 { # [Output Only] A consumer forwarding rule connected to this service attachment. [Deprecated] Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800355 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400356 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the PSC Forwarding Rule.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800357 &quot;status&quot;: &quot;A String&quot;, # The status of the forwarding rule.
358 },
359 ],
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700360 &quot;consumerRejectLists&quot;: [ # Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number.
361 &quot;A String&quot;,
362 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800363 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
364 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
365 &quot;enableProxyProtocol&quot;: True or False, # If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700366 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800367 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource type. The server generates this identifier.
368 &quot;kind&quot;: &quot;compute#serviceAttachment&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
369 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
370 &quot;natSubnets&quot;: [ # An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
371 &quot;A String&quot;,
372 ],
373 &quot;producerForwardingRule&quot;: &quot;A String&quot;, # The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400374 &quot;pscServiceAttachmentId&quot;: { # [Output Only] An 128-bit global unique ID of the PSC service attachment.
375 &quot;high&quot;: &quot;A String&quot;,
376 &quot;low&quot;: &quot;A String&quot;,
377 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800378 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
379 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400380 &quot;targetService&quot;: &quot;A String&quot;, # The URL of a service serving the endpoint identified by this service attachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800381}</pre>
382</div>
383
384<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700385 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
386 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
387
388Args:
389 project: string, Project ID for this request. (required)
390 region: string, The name of the region for this request. (required)
391 resource: string, Name or id of the resource for this request. (required)
392 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
393
394Returns:
395 An object of the form:
396
397 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
398 #
399 #
400 #
401 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
402 #
403 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
404 #
405 # **JSON example:**
406 #
407 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
408 #
409 # **YAML example:**
410 #
411 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
412 #
413 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
414 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
415 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
416 #
417 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
418 #
419 # Example Policy with multiple AuditConfigs:
420 #
421 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
422 #
423 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
424 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
425 { # Provides the configuration for logging a type of permissions. Example:
426 #
427 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
428 #
429 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
430 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
431 &quot;A String&quot;,
432 ],
433 &quot;ignoreChildExemptions&quot;: True or False,
434 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
435 },
436 ],
437 &quot;exemptedMembers&quot;: [
438 &quot;A String&quot;,
439 ],
440 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
441 },
442 ],
443 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
444 { # Associates `members` with a `role`.
445 &quot;bindingId&quot;: &quot;A String&quot;,
446 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
447 #
448 # If the condition evaluates to `true`, then this binding applies to the current request.
449 #
450 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
451 #
452 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
453 #
454 # Example (Comparison):
455 #
456 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
457 #
458 # Example (Equality):
459 #
460 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
461 #
462 # Example (Logic):
463 #
464 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
465 #
466 # Example (Data Manipulation):
467 #
468 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
469 #
470 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
471 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
472 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
473 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
474 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
475 },
476 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
477 #
478 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
479 #
480 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
481 #
482 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
483 #
484 #
485 #
486 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
487 #
488 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
489 #
490 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
491 #
492 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
493 #
494 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
495 #
496 #
497 #
498 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
499 &quot;A String&quot;,
500 ],
501 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
502 },
503 ],
504 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
505 #
506 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
507 &quot;iamOwned&quot;: True or False,
508 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
509 { # A rule to be applied in a Policy.
510 &quot;action&quot;: &quot;A String&quot;, # Required
511 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
512 { # A condition to be met.
513 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
514 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
515 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
516 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
517 &quot;values&quot;: [ # The objects of the condition.
518 &quot;A String&quot;,
519 ],
520 },
521 ],
522 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
523 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
524 &quot;A String&quot;,
525 ],
526 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
527 { # Specifies what kind of log the caller must write
528 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
529 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
530 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
531 },
532 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
533 },
534 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
535 #
536 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
537 #
538 # Field names correspond to IAM request parameters and field values are their respective values.
539 #
540 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
541 #
542 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
543 &quot;customFields&quot;: [ # Custom fields.
544 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
545 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
546 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
547 },
548 ],
549 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
550 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
551 },
552 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
553 &quot;logMode&quot;: &quot;A String&quot;,
554 },
555 },
556 ],
557 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
558 &quot;A String&quot;,
559 ],
560 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
561 &quot;A String&quot;,
562 ],
563 },
564 ],
565 &quot;version&quot;: 42, # Specifies the format of the policy.
566 #
567 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
568 #
569 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
570 #
571 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
572 #
573 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
574 #
575 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
576 #
577 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
578}</pre>
579</div>
580
581<div class="method">
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800582 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
583 <pre>Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.
584
585Args:
586 project: string, Project ID for this request. (required)
587 region: string, Name of the region of this request. (required)
588 body: object, The request body.
589 The object takes the form of:
590
591{ # Represents a ServiceAttachment resource.
592 #
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400593 # A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 19
594 &quot;connectedEndpoints&quot;: [ # [Output Only] An array of connections for all the consumers connected to this service attachment.
595 { # [Output Only] A connection connected to this service attachment.
596 &quot;endpoint&quot;: &quot;A String&quot;, # The url of a connected endpoint.
597 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule. [Deprecated] Do not use.
598 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the connected endpoint.
599 &quot;status&quot;: &quot;A String&quot;, # The status of a connected endpoint to this service attachment.
600 },
601 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800602 &quot;connectionPreference&quot;: &quot;A String&quot;, # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700603 &quot;consumerAcceptLists&quot;: [ # Projects that are allowed to connect to this service attachment.
604 {
605 &quot;connectionLimit&quot;: 42, # The value of the limit to set.
606 &quot;projectIdOrNum&quot;: &quot;A String&quot;, # The project id or number for the project to set the limit for.
607 },
608 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800609 &quot;consumerForwardingRules&quot;: [ # [Output Only] An array of forwarding rules for all the consumers connected to this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400610 { # [Output Only] A consumer forwarding rule connected to this service attachment. [Deprecated] Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800611 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400612 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the PSC Forwarding Rule.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800613 &quot;status&quot;: &quot;A String&quot;, # The status of the forwarding rule.
614 },
615 ],
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700616 &quot;consumerRejectLists&quot;: [ # Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number.
617 &quot;A String&quot;,
618 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800619 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
620 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
621 &quot;enableProxyProtocol&quot;: True or False, # If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700622 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800623 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource type. The server generates this identifier.
624 &quot;kind&quot;: &quot;compute#serviceAttachment&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
625 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
626 &quot;natSubnets&quot;: [ # An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
627 &quot;A String&quot;,
628 ],
629 &quot;producerForwardingRule&quot;: &quot;A String&quot;, # The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400630 &quot;pscServiceAttachmentId&quot;: { # [Output Only] An 128-bit global unique ID of the PSC service attachment.
631 &quot;high&quot;: &quot;A String&quot;,
632 &quot;low&quot;: &quot;A String&quot;,
633 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800634 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
635 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400636 &quot;targetService&quot;: &quot;A String&quot;, # The URL of a service serving the endpoint identified by this service attachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800637}
638
639 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.
640
641For 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.
642
643The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
644
645Returns:
646 An object of the form:
647
648 { # Represents an Operation resource.
649 #
650 # Google Compute Engine has three Operation resources:
651 #
652 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
653 #
654 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
655 #
656 # Operations can be global, regional or zonal.
657 # - For global operations, use the `globalOperations` resource.
658 # - For regional operations, use the `regionOperations` resource.
659 # - For zonal operations, use the `zonalOperations` resource.
660 #
661 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
662 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
663 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
664 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
665 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
666 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
667 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
668 {
669 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
670 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
671 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
672 },
673 ],
674 },
675 &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`.
676 &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.
677 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
678 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
679 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
680 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
681 &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.
682 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
683 &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.
684 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
685 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
686 &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.
687 &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`.
688 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
689 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
690 &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.
691 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
692 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
693 {
694 &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.
695 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
696 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
697 {
698 &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).
699 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
700 },
701 ],
702 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
703 },
704 ],
705 &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.
706}</pre>
707</div>
708
709<div class="method">
710 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
711 <pre>Lists the ServiceAttachments for a project in the given scope.
712
713Args:
714 project: string, Project ID for this request. (required)
715 region: string, Name of the region of this request. (required)
716 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;`.
717
718For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
719
720You 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.
721
722To 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) ```
723 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`)
724 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
725
726You 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.
727
728Currently, only sorting by `name` or `creationTimestamp desc` is supported.
729 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.
730 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
731
732Returns:
733 An object of the form:
734
735 {
736 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
737 &quot;items&quot;: [ # A list of ServiceAttachment resources.
738 { # Represents a ServiceAttachment resource.
739 #
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400740 # A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 19
741 &quot;connectedEndpoints&quot;: [ # [Output Only] An array of connections for all the consumers connected to this service attachment.
742 { # [Output Only] A connection connected to this service attachment.
743 &quot;endpoint&quot;: &quot;A String&quot;, # The url of a connected endpoint.
744 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule. [Deprecated] Do not use.
745 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the connected endpoint.
746 &quot;status&quot;: &quot;A String&quot;, # The status of a connected endpoint to this service attachment.
747 },
748 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800749 &quot;connectionPreference&quot;: &quot;A String&quot;, # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700750 &quot;consumerAcceptLists&quot;: [ # Projects that are allowed to connect to this service attachment.
751 {
752 &quot;connectionLimit&quot;: 42, # The value of the limit to set.
753 &quot;projectIdOrNum&quot;: &quot;A String&quot;, # The project id or number for the project to set the limit for.
754 },
755 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800756 &quot;consumerForwardingRules&quot;: [ # [Output Only] An array of forwarding rules for all the consumers connected to this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400757 { # [Output Only] A consumer forwarding rule connected to this service attachment. [Deprecated] Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800758 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400759 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the PSC Forwarding Rule.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800760 &quot;status&quot;: &quot;A String&quot;, # The status of the forwarding rule.
761 },
762 ],
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700763 &quot;consumerRejectLists&quot;: [ # Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number.
764 &quot;A String&quot;,
765 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800766 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
767 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
768 &quot;enableProxyProtocol&quot;: True or False, # If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700769 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800770 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource type. The server generates this identifier.
771 &quot;kind&quot;: &quot;compute#serviceAttachment&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
772 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
773 &quot;natSubnets&quot;: [ # An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
774 &quot;A String&quot;,
775 ],
776 &quot;producerForwardingRule&quot;: &quot;A String&quot;, # The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400777 &quot;pscServiceAttachmentId&quot;: { # [Output Only] An 128-bit global unique ID of the PSC service attachment.
778 &quot;high&quot;: &quot;A String&quot;,
779 &quot;low&quot;: &quot;A String&quot;,
780 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800781 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
782 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400783 &quot;targetService&quot;: &quot;A String&quot;, # The URL of a service serving the endpoint identified by this service attachment.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800784 },
785 ],
786 &quot;kind&quot;: &quot;compute#serviceAttachmentList&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
787 &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.
788 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
789 &quot;warning&quot;: { # [Output Only] Informational warning message.
790 &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.
791 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
792 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
793 {
794 &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).
795 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
796 },
797 ],
798 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
799 },
800}</pre>
801</div>
802
803<div class="method">
804 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
805 <pre>Retrieves the next page of results.
806
807Args:
808 previous_request: The request for the previous page. (required)
809 previous_response: The response from the request for the previous page. (required)
810
811Returns:
812 A request object that you can call &#x27;execute()&#x27; on to request the next
813 page. Returns None if there are no more items in the collection.
814 </pre>
815</div>
816
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700817<div class="method">
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700818 <code class="details" id="patch">patch(project, region, serviceAttachment, body=None, requestId=None)</code>
819 <pre>Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
820
821Args:
822 project: string, Project ID for this request. (required)
823 region: string, The region scoping this request and should conform to RFC1035. (required)
824 serviceAttachment: string, The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number. (required)
825 body: object, The request body.
826 The object takes the form of:
827
828{ # Represents a ServiceAttachment resource.
829 #
830 # A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 19
831 &quot;connectedEndpoints&quot;: [ # [Output Only] An array of connections for all the consumers connected to this service attachment.
832 { # [Output Only] A connection connected to this service attachment.
833 &quot;endpoint&quot;: &quot;A String&quot;, # The url of a connected endpoint.
834 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule. [Deprecated] Do not use.
835 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the connected endpoint.
836 &quot;status&quot;: &quot;A String&quot;, # The status of a connected endpoint to this service attachment.
837 },
838 ],
839 &quot;connectionPreference&quot;: &quot;A String&quot;, # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
840 &quot;consumerAcceptLists&quot;: [ # Projects that are allowed to connect to this service attachment.
841 {
842 &quot;connectionLimit&quot;: 42, # The value of the limit to set.
843 &quot;projectIdOrNum&quot;: &quot;A String&quot;, # The project id or number for the project to set the limit for.
844 },
845 ],
846 &quot;consumerForwardingRules&quot;: [ # [Output Only] An array of forwarding rules for all the consumers connected to this service attachment.
847 { # [Output Only] A consumer forwarding rule connected to this service attachment. [Deprecated] Do not use.
848 &quot;forwardingRule&quot;: &quot;A String&quot;, # The url of a consumer forwarding rule.
849 &quot;pscConnectionId&quot;: &quot;A String&quot;, # The PSC connection id of the PSC Forwarding Rule.
850 &quot;status&quot;: &quot;A String&quot;, # The status of the forwarding rule.
851 },
852 ],
853 &quot;consumerRejectLists&quot;: [ # Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number.
854 &quot;A String&quot;,
855 ],
856 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
857 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
858 &quot;enableProxyProtocol&quot;: True or False, # If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
859 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
860 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource type. The server generates this identifier.
861 &quot;kind&quot;: &quot;compute#serviceAttachment&quot;, # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments.
862 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
863 &quot;natSubnets&quot;: [ # An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
864 &quot;A String&quot;,
865 ],
866 &quot;producerForwardingRule&quot;: &quot;A String&quot;, # The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
867 &quot;pscServiceAttachmentId&quot;: { # [Output Only] An 128-bit global unique ID of the PSC service attachment.
868 &quot;high&quot;: &quot;A String&quot;,
869 &quot;low&quot;: &quot;A String&quot;,
870 },
871 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
872 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
873 &quot;targetService&quot;: &quot;A String&quot;, # The URL of a service serving the endpoint identified by this service attachment.
874}
875
876 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.
877
878For 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.
879
880The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
881
882Returns:
883 An object of the form:
884
885 { # Represents an Operation resource.
886 #
887 # Google Compute Engine has three Operation resources:
888 #
889 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
890 #
891 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
892 #
893 # Operations can be global, regional or zonal.
894 # - For global operations, use the `globalOperations` resource.
895 # - For regional operations, use the `regionOperations` resource.
896 # - For zonal operations, use the `zonalOperations` resource.
897 #
898 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
899 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
900 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
901 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
902 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
903 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
904 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
905 {
906 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
907 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
908 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
909 },
910 ],
911 },
912 &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`.
913 &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.
914 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
915 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
916 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
917 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
918 &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.
919 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
920 &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.
921 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
922 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
923 &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.
924 &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`.
925 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
926 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
927 &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.
928 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
929 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
930 {
931 &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.
932 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
933 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
934 {
935 &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).
936 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
937 },
938 ],
939 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
940 },
941 ],
942 &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.
943}</pre>
944</div>
945
946<div class="method">
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700947 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
948 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
949
950Args:
951 project: string, Project ID for this request. (required)
952 region: string, The name of the region for this request. (required)
953 resource: string, Name or id of the resource for this request. (required)
954 body: object, The request body.
955 The object takes the form of:
956
957{
958 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
959 { # Associates `members` with a `role`.
960 &quot;bindingId&quot;: &quot;A String&quot;,
961 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
962 #
963 # If the condition evaluates to `true`, then this binding applies to the current request.
964 #
965 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
966 #
967 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
968 #
969 # Example (Comparison):
970 #
971 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
972 #
973 # Example (Equality):
974 #
975 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
976 #
977 # Example (Logic):
978 #
979 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
980 #
981 # Example (Data Manipulation):
982 #
983 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
984 #
985 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
986 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
987 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
988 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
989 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
990 },
991 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
992 #
993 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
994 #
995 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
996 #
997 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
998 #
999 #
1000 #
1001 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1002 #
1003 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1004 #
1005 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1006 #
1007 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1008 #
1009 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1010 #
1011 #
1012 #
1013 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1014 &quot;A String&quot;,
1015 ],
1016 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1017 },
1018 ],
1019 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
1020 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
1021 #
1022 #
1023 #
1024 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
1025 #
1026 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1027 #
1028 # **JSON example:**
1029 #
1030 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
1031 #
1032 # **YAML example:**
1033 #
1034 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
1035 #
1036 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1037 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1038 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1039 #
1040 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1041 #
1042 # Example Policy with multiple AuditConfigs:
1043 #
1044 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
1045 #
1046 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
1047 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1048 { # Provides the configuration for logging a type of permissions. Example:
1049 #
1050 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
1051 #
1052 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1053 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1054 &quot;A String&quot;,
1055 ],
1056 &quot;ignoreChildExemptions&quot;: True or False,
1057 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1058 },
1059 ],
1060 &quot;exemptedMembers&quot;: [
1061 &quot;A String&quot;,
1062 ],
1063 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1064 },
1065 ],
1066 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
1067 { # Associates `members` with a `role`.
1068 &quot;bindingId&quot;: &quot;A String&quot;,
1069 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1070 #
1071 # If the condition evaluates to `true`, then this binding applies to the current request.
1072 #
1073 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1074 #
1075 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1076 #
1077 # Example (Comparison):
1078 #
1079 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1080 #
1081 # Example (Equality):
1082 #
1083 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1084 #
1085 # Example (Logic):
1086 #
1087 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1088 #
1089 # Example (Data Manipulation):
1090 #
1091 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1092 #
1093 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1094 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1095 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1096 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1097 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1098 },
1099 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1100 #
1101 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1102 #
1103 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1104 #
1105 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1106 #
1107 #
1108 #
1109 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1110 #
1111 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1112 #
1113 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1114 #
1115 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1116 #
1117 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1118 #
1119 #
1120 #
1121 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1122 &quot;A String&quot;,
1123 ],
1124 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1125 },
1126 ],
1127 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1128 #
1129 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1130 &quot;iamOwned&quot;: True or False,
1131 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1132 { # A rule to be applied in a Policy.
1133 &quot;action&quot;: &quot;A String&quot;, # Required
1134 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1135 { # A condition to be met.
1136 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1137 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1138 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1139 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1140 &quot;values&quot;: [ # The objects of the condition.
1141 &quot;A String&quot;,
1142 ],
1143 },
1144 ],
1145 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1146 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1147 &quot;A String&quot;,
1148 ],
1149 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1150 { # Specifies what kind of log the caller must write
1151 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1152 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1153 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1154 },
1155 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1156 },
1157 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1158 #
1159 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1160 #
1161 # Field names correspond to IAM request parameters and field values are their respective values.
1162 #
1163 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1164 #
1165 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1166 &quot;customFields&quot;: [ # Custom fields.
1167 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1168 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1169 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1170 },
1171 ],
1172 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1173 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1174 },
1175 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1176 &quot;logMode&quot;: &quot;A String&quot;,
1177 },
1178 },
1179 ],
1180 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1181 &quot;A String&quot;,
1182 ],
1183 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1184 &quot;A String&quot;,
1185 ],
1186 },
1187 ],
1188 &quot;version&quot;: 42, # Specifies the format of the policy.
1189 #
1190 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1191 #
1192 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1193 #
1194 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1195 #
1196 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1197 #
1198 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1199 #
1200 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1201 },
1202}
1203
1204
1205Returns:
1206 An object of the form:
1207
1208 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1209 #
1210 #
1211 #
1212 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
1213 #
1214 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1215 #
1216 # **JSON example:**
1217 #
1218 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
1219 #
1220 # **YAML example:**
1221 #
1222 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
1223 #
1224 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1225 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1226 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1227 #
1228 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1229 #
1230 # Example Policy with multiple AuditConfigs:
1231 #
1232 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
1233 #
1234 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
1235 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1236 { # Provides the configuration for logging a type of permissions. Example:
1237 #
1238 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
1239 #
1240 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1241 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1242 &quot;A String&quot;,
1243 ],
1244 &quot;ignoreChildExemptions&quot;: True or False,
1245 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1246 },
1247 ],
1248 &quot;exemptedMembers&quot;: [
1249 &quot;A String&quot;,
1250 ],
1251 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1252 },
1253 ],
1254 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
1255 { # Associates `members` with a `role`.
1256 &quot;bindingId&quot;: &quot;A String&quot;,
1257 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1258 #
1259 # If the condition evaluates to `true`, then this binding applies to the current request.
1260 #
1261 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1262 #
1263 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1264 #
1265 # Example (Comparison):
1266 #
1267 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1268 #
1269 # Example (Equality):
1270 #
1271 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1272 #
1273 # Example (Logic):
1274 #
1275 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1276 #
1277 # Example (Data Manipulation):
1278 #
1279 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1280 #
1281 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1282 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1283 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1284 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1285 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1286 },
1287 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1288 #
1289 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1290 #
1291 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1292 #
1293 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1294 #
1295 #
1296 #
1297 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1298 #
1299 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1300 #
1301 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1302 #
1303 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1304 #
1305 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1306 #
1307 #
1308 #
1309 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1310 &quot;A String&quot;,
1311 ],
1312 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1313 },
1314 ],
1315 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1316 #
1317 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1318 &quot;iamOwned&quot;: True or False,
1319 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1320 { # A rule to be applied in a Policy.
1321 &quot;action&quot;: &quot;A String&quot;, # Required
1322 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1323 { # A condition to be met.
1324 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1325 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1326 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1327 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1328 &quot;values&quot;: [ # The objects of the condition.
1329 &quot;A String&quot;,
1330 ],
1331 },
1332 ],
1333 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1334 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1335 &quot;A String&quot;,
1336 ],
1337 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1338 { # Specifies what kind of log the caller must write
1339 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1340 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1341 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1342 },
1343 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1344 },
1345 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1346 #
1347 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1348 #
1349 # Field names correspond to IAM request parameters and field values are their respective values.
1350 #
1351 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1352 #
1353 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1354 &quot;customFields&quot;: [ # Custom fields.
1355 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1356 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1357 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1358 },
1359 ],
1360 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1361 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1362 },
1363 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1364 &quot;logMode&quot;: &quot;A String&quot;,
1365 },
1366 },
1367 ],
1368 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1369 &quot;A String&quot;,
1370 ],
1371 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1372 &quot;A String&quot;,
1373 ],
1374 },
1375 ],
1376 &quot;version&quot;: 42, # Specifies the format of the policy.
1377 #
1378 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1379 #
1380 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1381 #
1382 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1383 #
1384 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1385 #
1386 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1387 #
1388 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1389}</pre>
1390</div>
1391
1392<div class="method">
1393 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
1394 <pre>Returns permissions that a caller has on the specified resource.
1395
1396Args:
1397 project: string, Project ID for this request. (required)
1398 region: string, The name of the region for this request. (required)
1399 resource: string, Name or id of the resource for this request. (required)
1400 body: object, The request body.
1401 The object takes the form of:
1402
1403{
1404 &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.
1405 &quot;A String&quot;,
1406 ],
1407}
1408
1409
1410Returns:
1411 An object of the form:
1412
1413 {
1414 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1415 &quot;A String&quot;,
1416 ],
1417}</pre>
1418</div>
1419
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001420</body></html>