blob: c0749a9546efb9025209bc1354bf59f87ee555c0 [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.firewallPolicies.html">firewallPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None)</a></code></p>
79<p class="firstline">Inserts an association for the specified firewall policy.</p>
80<p class="toc_element">
81 <code><a href="#addRule">addRule(firewallPolicy, body=None, requestId=None)</a></code></p>
82<p class="firstline">Inserts a rule into a firewall policy.</p>
83<p class="toc_element">
84 <code><a href="#cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None)</a></code></p>
85<p class="firstline">Copies rules to the specified firewall policy.</p>
86<p class="toc_element">
87 <code><a href="#close">close()</a></code></p>
88<p class="firstline">Close httplib2 connections.</p>
89<p class="toc_element">
90 <code><a href="#delete">delete(firewallPolicy, requestId=None)</a></code></p>
91<p class="firstline">Deletes the specified policy.</p>
92<p class="toc_element">
93 <code><a href="#get">get(firewallPolicy)</a></code></p>
94<p class="firstline">Returns the specified firewall policy.</p>
95<p class="toc_element">
96 <code><a href="#getAssociation">getAssociation(firewallPolicy, name=None)</a></code></p>
97<p class="firstline">Gets an association with the specified name.</p>
98<p class="toc_element">
99 <code><a href="#getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None)</a></code></p>
100<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
101<p class="toc_element">
102 <code><a href="#getRule">getRule(firewallPolicy, priority=None)</a></code></p>
103<p class="firstline">Gets a rule of the specified priority.</p>
104<p class="toc_element">
105 <code><a href="#insert">insert(body=None, parentId=None, requestId=None)</a></code></p>
106<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p>
107<p class="toc_element">
108 <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None)</a></code></p>
109<p class="firstline">Lists all the policies that have been configured for the specified project.</p>
110<p class="toc_element">
111 <code><a href="#listAssociations">listAssociations(targetResource=None)</a></code></p>
112<p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p>
113<p class="toc_element">
114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
117 <code><a href="#move">move(firewallPolicy, parentId=None, requestId=None)</a></code></p>
118<p class="firstline">Moves the specified firewall policy.</p>
119<p class="toc_element">
120 <code><a href="#patch">patch(firewallPolicy, body=None, requestId=None)</a></code></p>
121<p class="firstline">Patches the specified policy with the data included in the request.</p>
122<p class="toc_element">
123 <code><a href="#patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None)</a></code></p>
124<p class="firstline">Patches a rule of the specified priority.</p>
125<p class="toc_element">
126 <code><a href="#removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None)</a></code></p>
127<p class="firstline">Removes an association for the specified firewall policy.</p>
128<p class="toc_element">
129 <code><a href="#removeRule">removeRule(firewallPolicy, priority=None, requestId=None)</a></code></p>
130<p class="firstline">Deletes a rule of the specified priority.</p>
131<p class="toc_element">
132 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None)</a></code></p>
133<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
134<p class="toc_element">
135 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None)</a></code></p>
136<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
137<h3>Method Details</h3>
138<div class="method">
139 <code class="details" id="addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None)</code>
140 <pre>Inserts an association for the specified firewall policy.
141
142Args:
143 firewallPolicy: string, Name of the firewall policy to update. (required)
144 body: object, The request body.
145 The object takes the form of:
146
147{
148 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
149 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
150 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
151 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
152}
153
154 replaceExistingAssociation: boolean, Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.
155 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.
156
157For 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.
158
159The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
160
161Returns:
162 An object of the form:
163
164 { # Represents an Operation resource.
165 #
166 # Google Compute Engine has three Operation resources:
167 #
168 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
169 #
170 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
171 #
172 # Operations can be global, regional or zonal.
173 # - For global operations, use the `globalOperations` resource.
174 # - For regional operations, use the `regionOperations` resource.
175 # - For zonal operations, use the `zonalOperations` resource.
176 #
177 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
178 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
179 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
180 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
181 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
182 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
183 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
184 {
185 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
186 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
188 },
189 ],
190 },
191 &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`.
192 &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.
193 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
194 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
195 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
196 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
197 #
198 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
199 #
200 # Example 1: Pack and unpack a message in C++.
201 #
202 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
203 #
204 # Example 2: Pack and unpack a message in Java.
205 #
206 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
207 #
208 # Example 3: Pack and unpack a message in Python.
209 #
210 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
211 #
212 # Example 4: Pack and unpack a message in Go
213 #
214 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
215 #
216 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
217 #
218 #
219 #
220 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
221 #
222 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
223 #
224 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
225 #
226 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
227 #
228 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
229 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
230 #
231 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
232 #
233 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
234 #
235 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
236 #
237 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
238 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
239 },
240 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
241 &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.
242 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
243 &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.
244 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
245 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
246 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
247 &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.
248 &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`.
249 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
250 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
251 &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.
252 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
253 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
254 {
255 &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.
256 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
257 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
258 {
259 &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).
260 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
261 },
262 ],
263 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
264 },
265 ],
266 &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.
267}</pre>
268</div>
269
270<div class="method">
271 <code class="details" id="addRule">addRule(firewallPolicy, body=None, requestId=None)</code>
272 <pre>Inserts a rule into a firewall policy.
273
274Args:
275 firewallPolicy: string, Name of the firewall policy to update. (required)
276 body: object, The request body.
277 The object takes the form of:
278
279{ # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
280 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
281 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
282 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
283 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
284 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
285 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
286 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
287 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
288 &quot;A String&quot;,
289 ],
290 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
291 {
292 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
293 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
294 #
295 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
296 &quot;A String&quot;,
297 ],
298 },
299 ],
300 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
301 &quot;A String&quot;,
302 ],
303 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
304 &quot;A String&quot;,
305 ],
306 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
307 {
308 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
309 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
310 },
311 ],
312 },
313 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
314 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
315 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
316 &quot;A String&quot;,
317 ],
318 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
319 &quot;A String&quot;,
320 ],
321 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
322 {
323 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
324 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
325 },
326 ],
327 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
328 &quot;A String&quot;,
329 ],
330}
331
332 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.
333
334For 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.
335
336The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
337
338Returns:
339 An object of the form:
340
341 { # Represents an Operation resource.
342 #
343 # Google Compute Engine has three Operation resources:
344 #
345 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
346 #
347 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
348 #
349 # Operations can be global, regional or zonal.
350 # - For global operations, use the `globalOperations` resource.
351 # - For regional operations, use the `regionOperations` resource.
352 # - For zonal operations, use the `zonalOperations` resource.
353 #
354 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
355 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
356 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
357 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
358 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
359 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
360 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
361 {
362 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
363 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
364 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
365 },
366 ],
367 },
368 &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`.
369 &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.
370 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
371 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
372 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
373 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
374 #
375 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
376 #
377 # Example 1: Pack and unpack a message in C++.
378 #
379 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
380 #
381 # Example 2: Pack and unpack a message in Java.
382 #
383 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
384 #
385 # Example 3: Pack and unpack a message in Python.
386 #
387 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
388 #
389 # Example 4: Pack and unpack a message in Go
390 #
391 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
392 #
393 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
394 #
395 #
396 #
397 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
398 #
399 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
400 #
401 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
402 #
403 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
404 #
405 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
406 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
407 #
408 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
409 #
410 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
411 #
412 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
413 #
414 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
415 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
416 },
417 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
418 &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.
419 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
420 &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.
421 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
422 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
423 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
424 &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.
425 &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`.
426 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
427 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
428 &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.
429 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
430 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
431 {
432 &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.
433 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
434 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
435 {
436 &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).
437 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
438 },
439 ],
440 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
441 },
442 ],
443 &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.
444}</pre>
445</div>
446
447<div class="method">
448 <code class="details" id="cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None)</code>
449 <pre>Copies rules to the specified firewall policy.
450
451Args:
452 firewallPolicy: string, Name of the firewall policy to update. (required)
453 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.
454
455For 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.
456
457The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
458 sourceFirewallPolicy: string, The firewall policy from which to copy rules.
459
460Returns:
461 An object of the form:
462
463 { # Represents an Operation resource.
464 #
465 # Google Compute Engine has three Operation resources:
466 #
467 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
468 #
469 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
470 #
471 # Operations can be global, regional or zonal.
472 # - For global operations, use the `globalOperations` resource.
473 # - For regional operations, use the `regionOperations` resource.
474 # - For zonal operations, use the `zonalOperations` resource.
475 #
476 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
477 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
478 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
479 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
480 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
481 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
482 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
483 {
484 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
485 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
486 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
487 },
488 ],
489 },
490 &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`.
491 &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.
492 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
493 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
494 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
495 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
496 #
497 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
498 #
499 # Example 1: Pack and unpack a message in C++.
500 #
501 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
502 #
503 # Example 2: Pack and unpack a message in Java.
504 #
505 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
506 #
507 # Example 3: Pack and unpack a message in Python.
508 #
509 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
510 #
511 # Example 4: Pack and unpack a message in Go
512 #
513 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
514 #
515 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
516 #
517 #
518 #
519 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
520 #
521 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
522 #
523 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
524 #
525 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
526 #
527 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
528 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
529 #
530 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
531 #
532 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
533 #
534 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
535 #
536 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
537 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
538 },
539 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
540 &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.
541 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
542 &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.
543 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
544 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
545 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
546 &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.
547 &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`.
548 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
549 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
550 &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.
551 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
552 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
553 {
554 &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.
555 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
556 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
557 {
558 &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).
559 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
560 },
561 ],
562 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
563 },
564 ],
565 &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.
566}</pre>
567</div>
568
569<div class="method">
570 <code class="details" id="close">close()</code>
571 <pre>Close httplib2 connections.</pre>
572</div>
573
574<div class="method">
575 <code class="details" id="delete">delete(firewallPolicy, requestId=None)</code>
576 <pre>Deletes the specified policy.
577
578Args:
579 firewallPolicy: string, Name of the firewall policy to delete. (required)
580 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.
581
582For 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.
583
584The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
585
586Returns:
587 An object of the form:
588
589 { # Represents an Operation resource.
590 #
591 # Google Compute Engine has three Operation resources:
592 #
593 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
594 #
595 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
596 #
597 # Operations can be global, regional or zonal.
598 # - For global operations, use the `globalOperations` resource.
599 # - For regional operations, use the `regionOperations` resource.
600 # - For zonal operations, use the `zonalOperations` resource.
601 #
602 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
603 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
604 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
605 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
606 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
607 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
608 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
609 {
610 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
611 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
612 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
613 },
614 ],
615 },
616 &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`.
617 &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.
618 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
619 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
620 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
621 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
622 #
623 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
624 #
625 # Example 1: Pack and unpack a message in C++.
626 #
627 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
628 #
629 # Example 2: Pack and unpack a message in Java.
630 #
631 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
632 #
633 # Example 3: Pack and unpack a message in Python.
634 #
635 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
636 #
637 # Example 4: Pack and unpack a message in Go
638 #
639 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
640 #
641 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
642 #
643 #
644 #
645 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
646 #
647 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
648 #
649 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
650 #
651 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
652 #
653 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
654 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
655 #
656 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
657 #
658 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
659 #
660 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
661 #
662 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
663 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
664 },
665 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
666 &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.
667 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
668 &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.
669 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
670 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
671 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
672 &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.
673 &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`.
674 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
675 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
676 &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.
677 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
678 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
679 {
680 &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.
681 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
682 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
683 {
684 &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).
685 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
686 },
687 ],
688 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
689 },
690 ],
691 &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.
692}</pre>
693</div>
694
695<div class="method">
696 <code class="details" id="get">get(firewallPolicy)</code>
697 <pre>Returns the specified firewall policy.
698
699Args:
700 firewallPolicy: string, Name of the firewall policy to get. (required)
701
702Returns:
703 An object of the form:
704
705 { # Represents a Firewall Policy resource. (== resource_for {$api_version}.firewallPolicies ==)
706 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
707 {
708 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
709 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
710 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
711 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
712 },
713 ],
714 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
715 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
716 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy 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.
717 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
718 #
719 # To see the latest fingerprint, make get() request to the firewall policy.
720 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
721 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
722 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy.
723 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
724 &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
725 &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a firewall policy, a default rule with action &quot;allow&quot; will be added.
726 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
727 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
728 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
729 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
730 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
731 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
732 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
733 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
734 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
735 &quot;A String&quot;,
736 ],
737 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
738 {
739 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
740 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
741 #
742 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
743 &quot;A String&quot;,
744 ],
745 },
746 ],
747 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
748 &quot;A String&quot;,
749 ],
750 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
751 &quot;A String&quot;,
752 ],
753 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
754 {
755 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
756 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
757 },
758 ],
759 },
760 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
761 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
762 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
763 &quot;A String&quot;,
764 ],
765 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
766 &quot;A String&quot;,
767 ],
768 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
769 {
770 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
771 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
772 },
773 ],
774 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
775 &quot;A String&quot;,
776 ],
777 },
778 ],
779 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
780 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
781}</pre>
782</div>
783
784<div class="method">
785 <code class="details" id="getAssociation">getAssociation(firewallPolicy, name=None)</code>
786 <pre>Gets an association with the specified name.
787
788Args:
789 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required)
790 name: string, The name of the association to get from the firewall policy.
791
792Returns:
793 An object of the form:
794
795 {
796 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
797 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
798 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
799 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
800}</pre>
801</div>
802
803<div class="method">
804 <code class="details" id="getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None)</code>
805 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
806
807Args:
808 resource: string, Name or id of the resource for this request. (required)
809 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
810
811Returns:
812 An object of the form:
813
814 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
815 #
816 #
817 #
818 # 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.
819 #
820 # 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).
821 #
822 # **JSON example:**
823 #
824 # { &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 }
825 #
826 # **YAML example:**
827 #
828 # 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
829 #
830 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
831 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
832 { # 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.
833 #
834 # 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.
835 #
836 # Example Policy with multiple AuditConfigs:
837 #
838 # { &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; ] } ] } ] }
839 #
840 # 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.
841 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
842 { # Provides the configuration for logging a type of permissions. Example:
843 #
844 # { &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; } ] }
845 #
846 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
847 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
848 &quot;A String&quot;,
849 ],
850 &quot;ignoreChildExemptions&quot;: True or False,
851 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
852 },
853 ],
854 &quot;exemptedMembers&quot;: [
855 &quot;A String&quot;,
856 ],
857 &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.
858 },
859 ],
860 &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.
861 { # Associates `members` with a `role`.
862 &quot;bindingId&quot;: &quot;A String&quot;,
863 &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.
864 #
865 # If the condition evaluates to `true`, then this binding applies to the current request.
866 #
867 # 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.
868 #
869 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
870 #
871 # Example (Comparison):
872 #
873 # 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;
874 #
875 # Example (Equality):
876 #
877 # 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;
878 #
879 # Example (Logic):
880 #
881 # 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;
882 #
883 # Example (Data Manipulation):
884 #
885 # 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;
886 #
887 # 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.
888 &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.
889 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
890 &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.
891 &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.
892 },
893 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
894 #
895 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
896 #
897 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
898 #
899 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
900 #
901 #
902 #
903 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
904 #
905 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
906 #
907 # * `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.
908 #
909 # * `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.
910 #
911 # * `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.
912 #
913 #
914 #
915 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
916 &quot;A String&quot;,
917 ],
918 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
919 },
920 ],
921 &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.
922 #
923 # **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.
924 &quot;iamOwned&quot;: True or False,
925 &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.
926 { # A rule to be applied in a Policy.
927 &quot;action&quot;: &quot;A String&quot;, # Required
928 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
929 { # A condition to be met.
930 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
931 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
932 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
933 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
934 &quot;values&quot;: [ # The objects of the condition.
935 &quot;A String&quot;,
936 ],
937 },
938 ],
939 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
940 &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.
941 &quot;A String&quot;,
942 ],
943 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
944 { # Specifies what kind of log the caller must write
945 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
946 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
947 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
948 },
949 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
950 },
951 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
952 #
953 # 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.
954 #
955 # Field names correspond to IAM request parameters and field values are their respective values.
956 #
957 # 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.
958 #
959 # 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]}
960 &quot;customFields&quot;: [ # Custom fields.
961 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
962 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
963 &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.
964 },
965 ],
966 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
967 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
968 },
969 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
970 &quot;logMode&quot;: &quot;A String&quot;,
971 },
972 },
973 ],
974 &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.
975 &quot;A String&quot;,
976 ],
977 &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.
978 &quot;A String&quot;,
979 ],
980 },
981 ],
982 &quot;version&quot;: 42, # Specifies the format of the policy.
983 #
984 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
985 #
986 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
987 #
988 # * 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
989 #
990 # **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.
991 #
992 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
993 #
994 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
995}</pre>
996</div>
997
998<div class="method">
999 <code class="details" id="getRule">getRule(firewallPolicy, priority=None)</code>
1000 <pre>Gets a rule of the specified priority.
1001
1002Args:
1003 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required)
1004 priority: integer, The priority of the rule to get from the firewall policy.
1005
1006Returns:
1007 An object of the form:
1008
1009 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1010 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1011 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1012 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1013 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
1014 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
1015 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1016 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1017 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1018 &quot;A String&quot;,
1019 ],
1020 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1021 {
1022 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1023 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1024 #
1025 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1026 &quot;A String&quot;,
1027 ],
1028 },
1029 ],
1030 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1031 &quot;A String&quot;,
1032 ],
1033 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
1034 &quot;A String&quot;,
1035 ],
1036 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
1037 {
1038 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1039 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1040 },
1041 ],
1042 },
1043 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1044 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1045 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1046 &quot;A String&quot;,
1047 ],
1048 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
1049 &quot;A String&quot;,
1050 ],
1051 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
1052 {
1053 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1054 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1055 },
1056 ],
1057 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1058 &quot;A String&quot;,
1059 ],
1060}</pre>
1061</div>
1062
1063<div class="method">
1064 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None)</code>
1065 <pre>Creates a new policy in the specified project using the data included in the request.
1066
1067Args:
1068 body: object, The request body.
1069 The object takes the form of:
1070
1071{ # Represents a Firewall Policy resource. (== resource_for {$api_version}.firewallPolicies ==)
1072 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
1073 {
1074 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
1075 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
1076 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
1077 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1078 },
1079 ],
1080 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1081 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1082 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy 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.
1083 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1084 #
1085 # To see the latest fingerprint, make get() request to the firewall policy.
1086 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1087 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
1088 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy.
1089 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
1090 &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
1091 &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a firewall policy, a default rule with action &quot;allow&quot; will be added.
1092 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1093 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1094 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1095 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1096 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
1097 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
1098 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1099 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1100 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1101 &quot;A String&quot;,
1102 ],
1103 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1104 {
1105 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1106 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1107 #
1108 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1109 &quot;A String&quot;,
1110 ],
1111 },
1112 ],
1113 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1114 &quot;A String&quot;,
1115 ],
1116 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
1117 &quot;A String&quot;,
1118 ],
1119 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
1120 {
1121 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1122 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1123 },
1124 ],
1125 },
1126 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1127 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1128 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1129 &quot;A String&quot;,
1130 ],
1131 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
1132 &quot;A String&quot;,
1133 ],
1134 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
1135 {
1136 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1137 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1138 },
1139 ],
1140 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1141 &quot;A String&quot;,
1142 ],
1143 },
1144 ],
1145 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1146 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1147}
1148
1149 parentId: string, Parent ID for this request. The ID can be either be &quot;folders/[FOLDER_ID]&quot; if the parent is a folder or &quot;organizations/[ORGANIZATION_ID]&quot; if the parent is an organization.
1150 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.
1151
1152For 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.
1153
1154The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1155
1156Returns:
1157 An object of the form:
1158
1159 { # Represents an Operation resource.
1160 #
1161 # Google Compute Engine has three Operation resources:
1162 #
1163 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1164 #
1165 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1166 #
1167 # Operations can be global, regional or zonal.
1168 # - For global operations, use the `globalOperations` resource.
1169 # - For regional operations, use the `regionOperations` resource.
1170 # - For zonal operations, use the `zonalOperations` resource.
1171 #
1172 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1173 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1174 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1175 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1176 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1177 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1178 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1179 {
1180 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1181 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1182 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1183 },
1184 ],
1185 },
1186 &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`.
1187 &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.
1188 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1189 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1190 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1191 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1192 #
1193 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1194 #
1195 # Example 1: Pack and unpack a message in C++.
1196 #
1197 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1198 #
1199 # Example 2: Pack and unpack a message in Java.
1200 #
1201 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1202 #
1203 # Example 3: Pack and unpack a message in Python.
1204 #
1205 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1206 #
1207 # Example 4: Pack and unpack a message in Go
1208 #
1209 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1210 #
1211 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1212 #
1213 #
1214 #
1215 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1216 #
1217 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1218 #
1219 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1220 #
1221 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1222 #
1223 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1224 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1225 #
1226 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1227 #
1228 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1229 #
1230 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1231 #
1232 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1233 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1234 },
1235 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1236 &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.
1237 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1238 &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.
1239 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1240 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1241 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1242 &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.
1243 &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`.
1244 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1245 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1246 &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.
1247 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1248 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1249 {
1250 &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.
1251 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1252 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1253 {
1254 &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).
1255 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1256 },
1257 ],
1258 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1259 },
1260 ],
1261 &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.
1262}</pre>
1263</div>
1264
1265<div class="method">
1266 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None)</code>
1267 <pre>Lists all the policies that have been configured for the specified project.
1268
1269Args:
1270 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;`.
1271
1272For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1273
1274You 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.
1275
1276To 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) ```
1277 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`)
1278 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1279
1280You 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.
1281
1282Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1283 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.
1284 parentId: string, Parent ID for this request.
1285 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1286
1287Returns:
1288 An object of the form:
1289
1290 {
1291 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1292 &quot;items&quot;: [ # A list of FirewallPolicy resources.
1293 { # Represents a Firewall Policy resource. (== resource_for {$api_version}.firewallPolicies ==)
1294 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
1295 {
1296 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
1297 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
1298 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
1299 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1300 },
1301 ],
1302 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1303 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1304 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy 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.
1305 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1306 #
1307 # To see the latest fingerprint, make get() request to the firewall policy.
1308 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1309 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
1310 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy.
1311 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
1312 &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
1313 &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a firewall policy, a default rule with action &quot;allow&quot; will be added.
1314 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1315 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1316 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1317 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1318 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
1319 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
1320 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1321 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1322 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1323 &quot;A String&quot;,
1324 ],
1325 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1326 {
1327 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1328 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1329 #
1330 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1331 &quot;A String&quot;,
1332 ],
1333 },
1334 ],
1335 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1336 &quot;A String&quot;,
1337 ],
1338 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
1339 &quot;A String&quot;,
1340 ],
1341 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
1342 {
1343 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1344 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1345 },
1346 ],
1347 },
1348 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1349 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1350 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1351 &quot;A String&quot;,
1352 ],
1353 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
1354 &quot;A String&quot;,
1355 ],
1356 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
1357 {
1358 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1359 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1360 },
1361 ],
1362 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1363 &quot;A String&quot;,
1364 ],
1365 },
1366 ],
1367 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1368 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1369 },
1370 ],
1371 &quot;kind&quot;: &quot;compute#firewallPolicyList&quot;, # [Output Only] Type of resource. Always compute#firewallPolicyList for listsof FirewallPolicies
1372 &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.
1373 &quot;warning&quot;: { # [Output Only] Informational warning message.
1374 &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.
1375 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1376 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1377 {
1378 &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).
1379 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1380 },
1381 ],
1382 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1383 },
1384}</pre>
1385</div>
1386
1387<div class="method">
1388 <code class="details" id="listAssociations">listAssociations(targetResource=None)</code>
1389 <pre>Lists associations of a specified target, i.e., organization or folder.
1390
1391Args:
1392 targetResource: string, The target resource to list associations. It is an organization, or a folder.
1393
1394Returns:
1395 An object of the form:
1396
1397 {
1398 &quot;associations&quot;: [ # A list of associations.
1399 {
1400 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
1401 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
1402 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
1403 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1404 },
1405 ],
1406 &quot;kind&quot;: &quot;compute#firewallPoliciesListAssociationsResponse&quot;, # [Output Only] Type of firewallPolicy associations. Always compute#FirewallPoliciesListAssociations for lists of firewallPolicy associations.
1407}</pre>
1408</div>
1409
1410<div class="method">
1411 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1412 <pre>Retrieves the next page of results.
1413
1414Args:
1415 previous_request: The request for the previous page. (required)
1416 previous_response: The response from the request for the previous page. (required)
1417
1418Returns:
1419 A request object that you can call &#x27;execute()&#x27; on to request the next
1420 page. Returns None if there are no more items in the collection.
1421 </pre>
1422</div>
1423
1424<div class="method">
1425 <code class="details" id="move">move(firewallPolicy, parentId=None, requestId=None)</code>
1426 <pre>Moves the specified firewall policy.
1427
1428Args:
1429 firewallPolicy: string, Name of the firewall policy to update. (required)
1430 parentId: string, The new parent of the firewall policy.
1431 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.
1432
1433For 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.
1434
1435The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1436
1437Returns:
1438 An object of the form:
1439
1440 { # Represents an Operation resource.
1441 #
1442 # Google Compute Engine has three Operation resources:
1443 #
1444 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1445 #
1446 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1447 #
1448 # Operations can be global, regional or zonal.
1449 # - For global operations, use the `globalOperations` resource.
1450 # - For regional operations, use the `regionOperations` resource.
1451 # - For zonal operations, use the `zonalOperations` resource.
1452 #
1453 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1454 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1455 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1456 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1457 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1458 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1459 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1460 {
1461 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1462 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1463 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1464 },
1465 ],
1466 },
1467 &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`.
1468 &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.
1469 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1470 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1471 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1472 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1473 #
1474 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1475 #
1476 # Example 1: Pack and unpack a message in C++.
1477 #
1478 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1479 #
1480 # Example 2: Pack and unpack a message in Java.
1481 #
1482 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1483 #
1484 # Example 3: Pack and unpack a message in Python.
1485 #
1486 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1487 #
1488 # Example 4: Pack and unpack a message in Go
1489 #
1490 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1491 #
1492 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1493 #
1494 #
1495 #
1496 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1497 #
1498 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1499 #
1500 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1501 #
1502 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1503 #
1504 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1505 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1506 #
1507 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1508 #
1509 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1510 #
1511 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1512 #
1513 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1514 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1515 },
1516 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1517 &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.
1518 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1519 &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.
1520 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1521 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1522 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1523 &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.
1524 &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`.
1525 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1526 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1527 &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.
1528 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1529 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1530 {
1531 &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.
1532 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1533 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1534 {
1535 &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).
1536 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1537 },
1538 ],
1539 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1540 },
1541 ],
1542 &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.
1543}</pre>
1544</div>
1545
1546<div class="method">
1547 <code class="details" id="patch">patch(firewallPolicy, body=None, requestId=None)</code>
1548 <pre>Patches the specified policy with the data included in the request.
1549
1550Args:
1551 firewallPolicy: string, Name of the firewall policy to update. (required)
1552 body: object, The request body.
1553 The object takes the form of:
1554
1555{ # Represents a Firewall Policy resource. (== resource_for {$api_version}.firewallPolicies ==)
1556 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
1557 {
1558 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
1559 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the firewall policy of the association.
1560 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
1561 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1562 },
1563 ],
1564 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1565 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1566 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy 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.
1567 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1568 #
1569 # To see the latest fingerprint, make get() request to the firewall policy.
1570 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1571 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
1572 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy.
1573 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
1574 &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
1575 &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a firewall policy, a default rule with action &quot;allow&quot; will be added.
1576 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1577 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1578 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1579 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1580 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
1581 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
1582 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1583 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1584 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1585 &quot;A String&quot;,
1586 ],
1587 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1588 {
1589 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1590 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1591 #
1592 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1593 &quot;A String&quot;,
1594 ],
1595 },
1596 ],
1597 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1598 &quot;A String&quot;,
1599 ],
1600 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
1601 &quot;A String&quot;,
1602 ],
1603 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
1604 {
1605 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1606 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1607 },
1608 ],
1609 },
1610 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1611 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1612 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1613 &quot;A String&quot;,
1614 ],
1615 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
1616 &quot;A String&quot;,
1617 ],
1618 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
1619 {
1620 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1621 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1622 },
1623 ],
1624 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1625 &quot;A String&quot;,
1626 ],
1627 },
1628 ],
1629 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1630 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1631}
1632
1633 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.
1634
1635For 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.
1636
1637The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1638
1639Returns:
1640 An object of the form:
1641
1642 { # Represents an Operation resource.
1643 #
1644 # Google Compute Engine has three Operation resources:
1645 #
1646 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1647 #
1648 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1649 #
1650 # Operations can be global, regional or zonal.
1651 # - For global operations, use the `globalOperations` resource.
1652 # - For regional operations, use the `regionOperations` resource.
1653 # - For zonal operations, use the `zonalOperations` resource.
1654 #
1655 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1656 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1657 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1658 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1659 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1660 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1661 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1662 {
1663 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1664 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1665 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1666 },
1667 ],
1668 },
1669 &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`.
1670 &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.
1671 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1672 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1673 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1674 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1675 #
1676 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1677 #
1678 # Example 1: Pack and unpack a message in C++.
1679 #
1680 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1681 #
1682 # Example 2: Pack and unpack a message in Java.
1683 #
1684 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1685 #
1686 # Example 3: Pack and unpack a message in Python.
1687 #
1688 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1689 #
1690 # Example 4: Pack and unpack a message in Go
1691 #
1692 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1693 #
1694 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1695 #
1696 #
1697 #
1698 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1699 #
1700 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1701 #
1702 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1703 #
1704 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1705 #
1706 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1707 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1708 #
1709 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1710 #
1711 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1712 #
1713 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1714 #
1715 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1716 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1717 },
1718 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1719 &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.
1720 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1721 &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.
1722 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1723 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1724 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1725 &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.
1726 &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`.
1727 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1728 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1729 &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.
1730 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1731 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1732 {
1733 &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.
1734 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1735 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1736 {
1737 &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).
1738 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1739 },
1740 ],
1741 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1742 },
1743 ],
1744 &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.
1745}</pre>
1746</div>
1747
1748<div class="method">
1749 <code class="details" id="patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None)</code>
1750 <pre>Patches a rule of the specified priority.
1751
1752Args:
1753 firewallPolicy: string, Name of the firewall policy to update. (required)
1754 body: object, The request body.
1755 The object takes the form of:
1756
1757{ # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1758 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1759 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1760 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1761 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
1762 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules.
1763 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1764 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1765 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1766 &quot;A String&quot;,
1767 ],
1768 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1769 {
1770 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1771 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1772 #
1773 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1774 &quot;A String&quot;,
1775 ],
1776 },
1777 ],
1778 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1779 &quot;A String&quot;,
1780 ],
1781 &quot;srcSecureLabels&quot;: [ # List of firewall label values, which should be matched at the source of the traffic. Maximum number of source label values allowed is 256.
1782 &quot;A String&quot;,
1783 ],
1784 &quot;srcSecureTags&quot;: [ # List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.
1785 {
1786 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1787 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1788 },
1789 ],
1790 },
1791 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1792 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1793 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1794 &quot;A String&quot;,
1795 ],
1796 &quot;targetSecureLabels&quot;: [ # A list of secure labels that controls which instances the firewall rule applies to. If targetSecureLabel are specified, then the firewall rule applies only to instances in the VPC network that have one of those secure labels. targetSecureLabel may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureLabel are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label values allowed is 256.
1797 &quot;A String&quot;,
1798 ],
1799 &quot;targetSecureTags&quot;: [ # A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
1800 {
1801 &quot;name&quot;: &quot;A String&quot;, # Name of the secure tag, created with TagManager&#x27;s TagValue API.
1802 &quot;state&quot;: &quot;A String&quot;, # [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
1803 },
1804 ],
1805 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1806 &quot;A String&quot;,
1807 ],
1808}
1809
1810 priority: integer, The priority of the rule to patch.
1811 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.
1812
1813For 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.
1814
1815The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1816
1817Returns:
1818 An object of the form:
1819
1820 { # Represents an Operation resource.
1821 #
1822 # Google Compute Engine has three Operation resources:
1823 #
1824 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1825 #
1826 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1827 #
1828 # Operations can be global, regional or zonal.
1829 # - For global operations, use the `globalOperations` resource.
1830 # - For regional operations, use the `regionOperations` resource.
1831 # - For zonal operations, use the `zonalOperations` resource.
1832 #
1833 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1834 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1835 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1836 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1837 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1838 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1839 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1840 {
1841 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1842 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1843 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1844 },
1845 ],
1846 },
1847 &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`.
1848 &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.
1849 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1850 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1851 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1852 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1853 #
1854 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1855 #
1856 # Example 1: Pack and unpack a message in C++.
1857 #
1858 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1859 #
1860 # Example 2: Pack and unpack a message in Java.
1861 #
1862 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1863 #
1864 # Example 3: Pack and unpack a message in Python.
1865 #
1866 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1867 #
1868 # Example 4: Pack and unpack a message in Go
1869 #
1870 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1871 #
1872 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1873 #
1874 #
1875 #
1876 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1877 #
1878 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1879 #
1880 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1881 #
1882 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1883 #
1884 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1885 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1886 #
1887 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1888 #
1889 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1890 #
1891 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1892 #
1893 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1894 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1895 },
1896 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1897 &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.
1898 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1899 &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.
1900 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1901 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1902 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1903 &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.
1904 &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`.
1905 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1906 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1907 &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.
1908 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1909 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1910 {
1911 &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.
1912 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1913 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1914 {
1915 &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).
1916 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1917 },
1918 ],
1919 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1920 },
1921 ],
1922 &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.
1923}</pre>
1924</div>
1925
1926<div class="method">
1927 <code class="details" id="removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None)</code>
1928 <pre>Removes an association for the specified firewall policy.
1929
1930Args:
1931 firewallPolicy: string, Name of the firewall policy to update. (required)
1932 name: string, Name for the attachment that will be removed.
1933 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.
1934
1935For 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.
1936
1937The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1938
1939Returns:
1940 An object of the form:
1941
1942 { # Represents an Operation resource.
1943 #
1944 # Google Compute Engine has three Operation resources:
1945 #
1946 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1947 #
1948 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1949 #
1950 # Operations can be global, regional or zonal.
1951 # - For global operations, use the `globalOperations` resource.
1952 # - For regional operations, use the `regionOperations` resource.
1953 # - For zonal operations, use the `zonalOperations` resource.
1954 #
1955 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1956 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1957 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1958 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1959 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1960 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1961 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1962 {
1963 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1964 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1965 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1966 },
1967 ],
1968 },
1969 &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`.
1970 &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.
1971 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1972 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1973 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1974 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1975 #
1976 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1977 #
1978 # Example 1: Pack and unpack a message in C++.
1979 #
1980 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1981 #
1982 # Example 2: Pack and unpack a message in Java.
1983 #
1984 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1985 #
1986 # Example 3: Pack and unpack a message in Python.
1987 #
1988 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1989 #
1990 # Example 4: Pack and unpack a message in Go
1991 #
1992 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1993 #
1994 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1995 #
1996 #
1997 #
1998 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1999 #
2000 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
2001 #
2002 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
2003 #
2004 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
2005 #
2006 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
2007 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
2008 #
2009 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
2010 #
2011 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
2012 #
2013 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
2014 #
2015 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
2016 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
2017 },
2018 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2019 &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.
2020 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2021 &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.
2022 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2023 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2024 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2025 &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.
2026 &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`.
2027 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2028 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2029 &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.
2030 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2031 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2032 {
2033 &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.
2034 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2035 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2036 {
2037 &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).
2038 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2039 },
2040 ],
2041 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2042 },
2043 ],
2044 &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.
2045}</pre>
2046</div>
2047
2048<div class="method">
2049 <code class="details" id="removeRule">removeRule(firewallPolicy, priority=None, requestId=None)</code>
2050 <pre>Deletes a rule of the specified priority.
2051
2052Args:
2053 firewallPolicy: string, Name of the firewall policy to update. (required)
2054 priority: integer, The priority of the rule to remove from the firewall policy.
2055 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.
2056
2057For 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.
2058
2059The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2060
2061Returns:
2062 An object of the form:
2063
2064 { # Represents an Operation resource.
2065 #
2066 # Google Compute Engine has three Operation resources:
2067 #
2068 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2069 #
2070 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2071 #
2072 # Operations can be global, regional or zonal.
2073 # - For global operations, use the `globalOperations` resource.
2074 # - For regional operations, use the `regionOperations` resource.
2075 # - For zonal operations, use the `zonalOperations` resource.
2076 #
2077 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2078 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2079 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2080 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2081 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2082 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2083 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
2084 {
2085 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2086 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2087 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
2088 },
2089 ],
2090 },
2091 &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`.
2092 &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.
2093 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2094 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2095 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2096 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
2097 #
2098 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
2099 #
2100 # Example 1: Pack and unpack a message in C++.
2101 #
2102 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
2103 #
2104 # Example 2: Pack and unpack a message in Java.
2105 #
2106 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
2107 #
2108 # Example 3: Pack and unpack a message in Python.
2109 #
2110 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
2111 #
2112 # Example 4: Pack and unpack a message in Go
2113 #
2114 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
2115 #
2116 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
2117 #
2118 #
2119 #
2120 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
2121 #
2122 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
2123 #
2124 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
2125 #
2126 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
2127 #
2128 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
2129 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
2130 #
2131 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
2132 #
2133 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
2134 #
2135 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
2136 #
2137 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
2138 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
2139 },
2140 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2141 &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.
2142 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2143 &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.
2144 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2145 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2146 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2147 &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.
2148 &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`.
2149 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2150 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2151 &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.
2152 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2153 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2154 {
2155 &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.
2156 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2157 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2158 {
2159 &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).
2160 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2161 },
2162 ],
2163 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2164 },
2165 ],
2166 &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.
2167}</pre>
2168</div>
2169
2170<div class="method">
2171 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None)</code>
2172 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2173
2174Args:
2175 resource: string, Name or id of the resource for this request. (required)
2176 body: object, The request body.
2177 The object takes the form of:
2178
2179{
2180 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
2181 { # Associates `members` with a `role`.
2182 &quot;bindingId&quot;: &quot;A String&quot;,
2183 &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.
2184 #
2185 # If the condition evaluates to `true`, then this binding applies to the current request.
2186 #
2187 # 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.
2188 #
2189 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2190 #
2191 # Example (Comparison):
2192 #
2193 # 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;
2194 #
2195 # Example (Equality):
2196 #
2197 # 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;
2198 #
2199 # Example (Logic):
2200 #
2201 # 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;
2202 #
2203 # Example (Data Manipulation):
2204 #
2205 # 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;
2206 #
2207 # 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.
2208 &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.
2209 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2210 &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.
2211 &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.
2212 },
2213 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2214 #
2215 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2216 #
2217 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2218 #
2219 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2220 #
2221 #
2222 #
2223 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2224 #
2225 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2226 #
2227 # * `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.
2228 #
2229 # * `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.
2230 #
2231 # * `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.
2232 #
2233 #
2234 #
2235 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2236 &quot;A String&quot;,
2237 ],
2238 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2239 },
2240 ],
2241 &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.
2242 &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.
2243 #
2244 #
2245 #
2246 # 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.
2247 #
2248 # 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).
2249 #
2250 # **JSON example:**
2251 #
2252 # { &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 }
2253 #
2254 # **YAML example:**
2255 #
2256 # 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
2257 #
2258 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
2259 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2260 { # 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.
2261 #
2262 # 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.
2263 #
2264 # Example Policy with multiple AuditConfigs:
2265 #
2266 # { &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; ] } ] } ] }
2267 #
2268 # 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.
2269 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2270 { # Provides the configuration for logging a type of permissions. Example:
2271 #
2272 # { &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; } ] }
2273 #
2274 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2275 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2276 &quot;A String&quot;,
2277 ],
2278 &quot;ignoreChildExemptions&quot;: True or False,
2279 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2280 },
2281 ],
2282 &quot;exemptedMembers&quot;: [
2283 &quot;A String&quot;,
2284 ],
2285 &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.
2286 },
2287 ],
2288 &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.
2289 { # Associates `members` with a `role`.
2290 &quot;bindingId&quot;: &quot;A String&quot;,
2291 &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.
2292 #
2293 # If the condition evaluates to `true`, then this binding applies to the current request.
2294 #
2295 # 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.
2296 #
2297 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2298 #
2299 # Example (Comparison):
2300 #
2301 # 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;
2302 #
2303 # Example (Equality):
2304 #
2305 # 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;
2306 #
2307 # Example (Logic):
2308 #
2309 # 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;
2310 #
2311 # Example (Data Manipulation):
2312 #
2313 # 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;
2314 #
2315 # 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.
2316 &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.
2317 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2318 &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.
2319 &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.
2320 },
2321 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2322 #
2323 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2324 #
2325 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2326 #
2327 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2328 #
2329 #
2330 #
2331 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2332 #
2333 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2334 #
2335 # * `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.
2336 #
2337 # * `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.
2338 #
2339 # * `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.
2340 #
2341 #
2342 #
2343 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2344 &quot;A String&quot;,
2345 ],
2346 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2347 },
2348 ],
2349 &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.
2350 #
2351 # **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.
2352 &quot;iamOwned&quot;: True or False,
2353 &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.
2354 { # A rule to be applied in a Policy.
2355 &quot;action&quot;: &quot;A String&quot;, # Required
2356 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2357 { # A condition to be met.
2358 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2359 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2360 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2361 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2362 &quot;values&quot;: [ # The objects of the condition.
2363 &quot;A String&quot;,
2364 ],
2365 },
2366 ],
2367 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2368 &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.
2369 &quot;A String&quot;,
2370 ],
2371 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2372 { # Specifies what kind of log the caller must write
2373 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2374 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2375 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2376 },
2377 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2378 },
2379 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2380 #
2381 # 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.
2382 #
2383 # Field names correspond to IAM request parameters and field values are their respective values.
2384 #
2385 # 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.
2386 #
2387 # 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]}
2388 &quot;customFields&quot;: [ # Custom fields.
2389 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2390 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2391 &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.
2392 },
2393 ],
2394 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2395 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2396 },
2397 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2398 &quot;logMode&quot;: &quot;A String&quot;,
2399 },
2400 },
2401 ],
2402 &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.
2403 &quot;A String&quot;,
2404 ],
2405 &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.
2406 &quot;A String&quot;,
2407 ],
2408 },
2409 ],
2410 &quot;version&quot;: 42, # Specifies the format of the policy.
2411 #
2412 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2413 #
2414 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2415 #
2416 # * 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
2417 #
2418 # **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.
2419 #
2420 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2421 #
2422 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2423 },
2424}
2425
2426
2427Returns:
2428 An object of the form:
2429
2430 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
2431 #
2432 #
2433 #
2434 # 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.
2435 #
2436 # 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).
2437 #
2438 # **JSON example:**
2439 #
2440 # { &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 }
2441 #
2442 # **YAML example:**
2443 #
2444 # 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
2445 #
2446 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
2447 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2448 { # 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.
2449 #
2450 # 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.
2451 #
2452 # Example Policy with multiple AuditConfigs:
2453 #
2454 # { &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; ] } ] } ] }
2455 #
2456 # 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.
2457 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2458 { # Provides the configuration for logging a type of permissions. Example:
2459 #
2460 # { &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; } ] }
2461 #
2462 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2463 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2464 &quot;A String&quot;,
2465 ],
2466 &quot;ignoreChildExemptions&quot;: True or False,
2467 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2468 },
2469 ],
2470 &quot;exemptedMembers&quot;: [
2471 &quot;A String&quot;,
2472 ],
2473 &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.
2474 },
2475 ],
2476 &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.
2477 { # Associates `members` with a `role`.
2478 &quot;bindingId&quot;: &quot;A String&quot;,
2479 &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.
2480 #
2481 # If the condition evaluates to `true`, then this binding applies to the current request.
2482 #
2483 # 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.
2484 #
2485 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2486 #
2487 # Example (Comparison):
2488 #
2489 # 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;
2490 #
2491 # Example (Equality):
2492 #
2493 # 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;
2494 #
2495 # Example (Logic):
2496 #
2497 # 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;
2498 #
2499 # Example (Data Manipulation):
2500 #
2501 # 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;
2502 #
2503 # 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.
2504 &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.
2505 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2506 &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.
2507 &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.
2508 },
2509 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2510 #
2511 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2512 #
2513 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2514 #
2515 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2516 #
2517 #
2518 #
2519 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2520 #
2521 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2522 #
2523 # * `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.
2524 #
2525 # * `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.
2526 #
2527 # * `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.
2528 #
2529 #
2530 #
2531 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2532 &quot;A String&quot;,
2533 ],
2534 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2535 },
2536 ],
2537 &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.
2538 #
2539 # **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.
2540 &quot;iamOwned&quot;: True or False,
2541 &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.
2542 { # A rule to be applied in a Policy.
2543 &quot;action&quot;: &quot;A String&quot;, # Required
2544 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2545 { # A condition to be met.
2546 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2547 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2548 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2549 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2550 &quot;values&quot;: [ # The objects of the condition.
2551 &quot;A String&quot;,
2552 ],
2553 },
2554 ],
2555 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2556 &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.
2557 &quot;A String&quot;,
2558 ],
2559 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2560 { # Specifies what kind of log the caller must write
2561 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2562 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2563 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2564 },
2565 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2566 },
2567 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2568 #
2569 # 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.
2570 #
2571 # Field names correspond to IAM request parameters and field values are their respective values.
2572 #
2573 # 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.
2574 #
2575 # 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]}
2576 &quot;customFields&quot;: [ # Custom fields.
2577 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2578 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2579 &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.
2580 },
2581 ],
2582 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2583 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2584 },
2585 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2586 &quot;logMode&quot;: &quot;A String&quot;,
2587 },
2588 },
2589 ],
2590 &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.
2591 &quot;A String&quot;,
2592 ],
2593 &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.
2594 &quot;A String&quot;,
2595 ],
2596 },
2597 ],
2598 &quot;version&quot;: 42, # Specifies the format of the policy.
2599 #
2600 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2601 #
2602 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2603 #
2604 # * 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
2605 #
2606 # **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.
2607 #
2608 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2609 #
2610 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2611}</pre>
2612</div>
2613
2614<div class="method">
2615 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None)</code>
2616 <pre>Returns permissions that a caller has on the specified resource.
2617
2618Args:
2619 resource: string, Name or id of the resource for this request. (required)
2620 body: object, The request body.
2621 The object takes the form of:
2622
2623{
2624 &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.
2625 &quot;A String&quot;,
2626 ],
2627}
2628
2629
2630Returns:
2631 An object of the form:
2632
2633 {
2634 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2635 &quot;A String&quot;,
2636 ],
2637}</pre>
2638</div>
2639
2640</body></html>