blob: bb839a8c235eea9dcdc1b66d24144d381528defc [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_v1.html">Compute Engine API</a> . <a href="compute_v1.firewallPolicies.html">firewallPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070078 <code><a href="#addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080079<p class="firstline">Inserts an association for the specified firewall policy.</p>
80<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070081 <code><a href="#addRule">addRule(firewallPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080082<p class="firstline">Inserts a rule into a firewall policy.</p>
83<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070084 <code><a href="#cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080085<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">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070090 <code><a href="#delete">delete(firewallPolicy, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080091<p class="firstline">Deletes the specified policy.</p>
92<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070093 <code><a href="#get">get(firewallPolicy, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080094<p class="firstline">Returns the specified firewall policy.</p>
95<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070096 <code><a href="#getAssociation">getAssociation(firewallPolicy, name=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080097<p class="firstline">Gets an association with the specified name.</p>
98<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -070099 <code><a href="#getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800100<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">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700102 <code><a href="#getRule">getRule(firewallPolicy, priority=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800103<p class="firstline">Gets a rule of the specified priority.</p>
104<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700105 <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800106<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p>
107<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700108 <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
yoshi-code-bot87595382021-06-05 00:38:05 -0700109<p class="firstline">Lists all the policies that have been configured for the specified folder or organization.</p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800110<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700111 <code><a href="#listAssociations">listAssociations(targetResource=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800112<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">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700117 <code><a href="#move">move(firewallPolicy, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800118<p class="firstline">Moves the specified firewall policy.</p>
119<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700120 <code><a href="#patch">patch(firewallPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800121<p class="firstline">Patches the specified policy with the data included in the request.</p>
122<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700123 <code><a href="#patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800124<p class="firstline">Patches a rule of the specified priority.</p>
125<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700126 <code><a href="#removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800127<p class="firstline">Removes an association for the specified firewall policy.</p>
128<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700129 <code><a href="#removeRule">removeRule(firewallPolicy, priority=None, requestId=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800130<p class="firstline">Deletes a rule of the specified priority.</p>
131<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700132 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800133<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
134<p class="toc_element">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700135 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800136<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
137<h3>Method Details</h3>
138<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700139 <code class="details" id="addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800140 <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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700149 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800150 &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.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700152 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800153}
154
155 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700156 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
157 x__xgafv: string, V1 error format.
158 Allowed values
159 1 - v1 error format
160 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800161
162Returns:
163 An object of the form:
164
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700165 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800166 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
167 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
168 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
169 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
170 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
171 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
172 {
173 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
174 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
175 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
176 },
177 ],
178 },
179 &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`.
180 &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.
181 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
182 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
183 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
184 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
185 &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.
186 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
187 &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.
188 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
189 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
190 &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.
191 &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`.
192 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
193 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
194 &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.
195 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
196 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
197 {
198 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700199 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800200 {
201 &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).
202 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
203 },
204 ],
205 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
206 },
207 ],
208 &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.
209}</pre>
210</div>
211
212<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700213 <code class="details" id="addRule">addRule(firewallPolicy, body=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800214 <pre>Inserts a rule into a firewall policy.
215
216Args:
217 firewallPolicy: string, Name of the firewall policy to update. (required)
218 body: object, The request body.
219 The object takes the form of:
220
221{ # 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).
222 &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.
223 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
224 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
225 &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.
226 &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.
227 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
228 &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.
229 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
230 &quot;A String&quot;,
231 ],
232 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
233 {
234 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700235 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800236 &quot;A String&quot;,
237 ],
238 },
239 ],
240 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
241 &quot;A String&quot;,
242 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800243 },
244 &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.
245 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
246 &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.
247 &quot;A String&quot;,
248 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800249 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
250 &quot;A String&quot;,
251 ],
252}
253
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700254 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
255 x__xgafv: string, V1 error format.
256 Allowed values
257 1 - v1 error format
258 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800259
260Returns:
261 An object of the form:
262
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700263 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800264 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
265 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
266 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
267 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
268 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
269 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
270 {
271 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
272 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
273 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
274 },
275 ],
276 },
277 &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`.
278 &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.
279 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
280 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
281 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
282 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
283 &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.
284 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
285 &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.
286 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
287 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
288 &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.
289 &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`.
290 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
291 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
292 &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.
293 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
294 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
295 {
296 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700297 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800298 {
299 &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).
300 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
301 },
302 ],
303 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
304 },
305 ],
306 &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.
307}</pre>
308</div>
309
310<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700311 <code class="details" id="cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800312 <pre>Copies rules to the specified firewall policy.
313
314Args:
315 firewallPolicy: string, Name of the firewall policy to update. (required)
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700316 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800317 sourceFirewallPolicy: string, The firewall policy from which to copy rules.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700318 x__xgafv: string, V1 error format.
319 Allowed values
320 1 - v1 error format
321 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800322
323Returns:
324 An object of the form:
325
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700326 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800327 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
328 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
329 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
330 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
331 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
332 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
333 {
334 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
335 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
336 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
337 },
338 ],
339 },
340 &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`.
341 &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.
342 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
343 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
344 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
345 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
346 &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.
347 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
348 &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.
349 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
350 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
351 &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.
352 &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`.
353 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
354 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
355 &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.
356 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
357 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
358 {
359 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700360 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800361 {
362 &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).
363 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
364 },
365 ],
366 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
367 },
368 ],
369 &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.
370}</pre>
371</div>
372
373<div class="method">
374 <code class="details" id="close">close()</code>
375 <pre>Close httplib2 connections.</pre>
376</div>
377
378<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700379 <code class="details" id="delete">delete(firewallPolicy, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800380 <pre>Deletes the specified policy.
381
382Args:
383 firewallPolicy: string, Name of the firewall policy to delete. (required)
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700384 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
385 x__xgafv: string, V1 error format.
386 Allowed values
387 1 - v1 error format
388 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800389
390Returns:
391 An object of the form:
392
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700393 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800394 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
395 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
396 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
397 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
398 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
399 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
400 {
401 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
402 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
403 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
404 },
405 ],
406 },
407 &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`.
408 &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.
409 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
410 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
411 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
412 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
413 &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.
414 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
415 &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.
416 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
417 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
418 &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.
419 &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`.
420 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
421 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
422 &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.
423 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
424 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
425 {
426 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700427 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800428 {
429 &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).
430 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
431 },
432 ],
433 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
434 },
435 ],
436 &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.
437}</pre>
438</div>
439
440<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700441 <code class="details" id="get">get(firewallPolicy, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800442 <pre>Returns the specified firewall policy.
443
444Args:
445 firewallPolicy: string, Name of the firewall policy to get. (required)
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700446 x__xgafv: string, V1 error format.
447 Allowed values
448 1 - v1 error format
449 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800450
451Returns:
452 An object of the form:
453
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700454 { # Represents a Firewall Policy resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800455 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
456 {
457 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700458 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800459 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
460 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700461 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800462 },
463 ],
464 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
465 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700466 &quot;displayName&quot;: &quot;A String&quot;, # Depreacted, please use short name instead. 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700467 &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. To see the latest fingerprint, make get() request to the firewall policy.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800468 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
469 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
470 &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.
471 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
472 &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.
473 &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.
474 { # 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).
475 &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.
476 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
477 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
478 &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.
479 &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.
480 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
481 &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.
482 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
483 &quot;A String&quot;,
484 ],
485 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
486 {
487 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700488 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800489 &quot;A String&quot;,
490 ],
491 },
492 ],
493 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
494 &quot;A String&quot;,
495 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800496 },
497 &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.
498 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
499 &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.
500 &quot;A String&quot;,
501 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800502 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
503 &quot;A String&quot;,
504 ],
505 },
506 ],
507 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
508 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700509 &quot;shortName&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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800510}</pre>
511</div>
512
513<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700514 <code class="details" id="getAssociation">getAssociation(firewallPolicy, name=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800515 <pre>Gets an association with the specified name.
516
517Args:
518 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required)
519 name: string, The name of the association to get from the firewall policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700520 x__xgafv: string, V1 error format.
521 Allowed values
522 1 - v1 error format
523 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800524
525Returns:
526 An object of the form:
527
528 {
529 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700530 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800531 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
532 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700533 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800534}</pre>
535</div>
536
537<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700538 <code class="details" id="getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800539 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
540
541Args:
542 resource: string, Name or id of the resource for this request. (required)
543 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700544 x__xgafv: string, V1 error format.
545 Allowed values
546 1 - v1 error format
547 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800548
549Returns:
550 An object of the form:
551
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700552 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. 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. 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). **JSON example:** { &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 } **YAML example:** 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 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800553 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700554 { # 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. 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. Example Policy with multiple AuditConfigs: { &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; ] } ] } ] } 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800555 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700556 { # Provides the configuration for logging a type of permissions. Example: { &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; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
557 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800558 &quot;A String&quot;,
559 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700560 &quot;ignoreChildExemptions&quot;: True or False, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800561 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
562 },
563 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700564 &quot;exemptedMembers&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800565 &quot;A String&quot;,
566 ],
567 &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.
568 },
569 ],
570 &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.
571 { # Associates `members` with a `role`.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700572 &quot;bindingId&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
573 &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. Example (Comparison): 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; Example (Equality): 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; Example (Logic): 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; Example (Data Manipulation): 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; 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. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800574 &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.
575 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
576 &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.
577 &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.
578 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700579 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `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. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800580 &quot;A String&quot;,
581 ],
582 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
583 },
584 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700585 &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. **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.
586 &quot;iamOwned&quot;: True or False, # This is deprecated and has no effect. Do not use.
587 &quot;rules&quot;: [ # This is deprecated and has no effect. Do not use.
588 { # This is deprecated and has no effect. Do not use.
589 &quot;action&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
590 &quot;conditions&quot;: [ # This is deprecated and has no effect. Do not use.
591 { # This is deprecated and has no effect. Do not use.
592 &quot;iam&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
593 &quot;op&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
594 &quot;svc&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
595 &quot;sys&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
596 &quot;values&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800597 &quot;A String&quot;,
598 ],
599 },
600 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700601 &quot;description&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
602 &quot;ins&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800603 &quot;A String&quot;,
604 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700605 &quot;logConfigs&quot;: [ # This is deprecated and has no effect. Do not use.
606 { # This is deprecated and has no effect. Do not use.
607 &quot;cloudAudit&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
608 &quot;authorizationLoggingOptions&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
609 &quot;permissionType&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800610 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700611 &quot;logName&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800612 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700613 &quot;counter&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
614 &quot;customFields&quot;: [ # This is deprecated and has no effect. Do not use.
615 { # This is deprecated and has no effect. Do not use.
616 &quot;name&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
617 &quot;value&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800618 },
619 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700620 &quot;field&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
621 &quot;metric&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800622 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700623 &quot;dataAccess&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
624 &quot;logMode&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800625 },
626 },
627 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700628 &quot;notIns&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800629 &quot;A String&quot;,
630 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700631 &quot;permissions&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800632 &quot;A String&quot;,
633 ],
634 },
635 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700636 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * 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 **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. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800637}</pre>
638</div>
639
640<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700641 <code class="details" id="getRule">getRule(firewallPolicy, priority=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800642 <pre>Gets a rule of the specified priority.
643
644Args:
645 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required)
646 priority: integer, The priority of the rule to get from the firewall policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700647 x__xgafv: string, V1 error format.
648 Allowed values
649 1 - v1 error format
650 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800651
652Returns:
653 An object of the form:
654
655 { # 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).
656 &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.
657 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
658 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
659 &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.
660 &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.
661 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
662 &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.
663 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
664 &quot;A String&quot;,
665 ],
666 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
667 {
668 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700669 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800670 &quot;A String&quot;,
671 ],
672 },
673 ],
674 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
675 &quot;A String&quot;,
676 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800677 },
678 &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.
679 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
680 &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.
681 &quot;A String&quot;,
682 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800683 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
684 &quot;A String&quot;,
685 ],
686}</pre>
687</div>
688
689<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700690 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800691 <pre>Creates a new policy in the specified project using the data included in the request.
692
693Args:
694 body: object, The request body.
695 The object takes the form of:
696
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700697{ # Represents a Firewall Policy resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800698 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
699 {
700 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700701 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800702 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
703 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700704 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800705 },
706 ],
707 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
708 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700709 &quot;displayName&quot;: &quot;A String&quot;, # Depreacted, please use short name instead. 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700710 &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. To see the latest fingerprint, make get() request to the firewall policy.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800711 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
712 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
713 &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.
714 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
715 &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.
716 &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.
717 { # 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).
718 &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.
719 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
720 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
721 &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.
722 &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.
723 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
724 &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.
725 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
726 &quot;A String&quot;,
727 ],
728 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
729 {
730 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700731 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800732 &quot;A String&quot;,
733 ],
734 },
735 ],
736 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
737 &quot;A String&quot;,
738 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800739 },
740 &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.
741 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
742 &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.
743 &quot;A String&quot;,
744 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800745 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
746 &quot;A String&quot;,
747 ],
748 },
749 ],
750 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
751 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700752 &quot;shortName&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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800753}
754
755 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700756 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
757 x__xgafv: string, V1 error format.
758 Allowed values
759 1 - v1 error format
760 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800761
762Returns:
763 An object of the form:
764
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700765 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800766 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
767 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
768 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
769 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
770 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
771 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
772 {
773 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
774 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
775 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
776 },
777 ],
778 },
779 &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`.
780 &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.
781 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
782 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
783 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
784 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
785 &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.
786 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
787 &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.
788 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
789 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
790 &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.
791 &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`.
792 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
793 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
794 &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.
795 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
796 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
797 {
798 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700799 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800800 {
801 &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).
802 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
803 },
804 ],
805 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
806 },
807 ],
808 &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.
809}</pre>
810</div>
811
812<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700813 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
yoshi-code-bot87595382021-06-05 00:38:05 -0700814 <pre>Lists all the policies that have been configured for the specified folder or organization.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800815
816Args:
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700817 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;`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You 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. To 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) ```
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800818 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`)
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700819 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800820 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.
821 parentId: string, Parent ID for this request.
822 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700823 x__xgafv: string, V1 error format.
824 Allowed values
825 1 - v1 error format
826 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800827
828Returns:
829 An object of the form:
830
831 {
832 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
833 &quot;items&quot;: [ # A list of FirewallPolicy resources.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700834 { # Represents a Firewall Policy resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800835 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
836 {
837 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700838 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800839 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
840 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700841 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800842 },
843 ],
844 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
845 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700846 &quot;displayName&quot;: &quot;A String&quot;, # Depreacted, please use short name instead. 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700847 &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. To see the latest fingerprint, make get() request to the firewall policy.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800848 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
849 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
850 &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.
851 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
852 &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.
853 &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.
854 { # 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).
855 &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.
856 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
857 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
858 &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.
859 &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.
860 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
861 &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.
862 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
863 &quot;A String&quot;,
864 ],
865 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
866 {
867 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700868 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800869 &quot;A String&quot;,
870 ],
871 },
872 ],
873 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
874 &quot;A String&quot;,
875 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800876 },
877 &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.
878 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
879 &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.
880 &quot;A String&quot;,
881 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800882 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
883 &quot;A String&quot;,
884 ],
885 },
886 ],
887 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
888 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700889 &quot;shortName&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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800890 },
891 ],
892 &quot;kind&quot;: &quot;compute#firewallPolicyList&quot;, # [Output Only] Type of resource. Always compute#firewallPolicyList for listsof FirewallPolicies
893 &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.
894 &quot;warning&quot;: { # [Output Only] Informational warning message.
895 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700896 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800897 {
898 &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).
899 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
900 },
901 ],
902 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
903 },
904}</pre>
905</div>
906
907<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700908 <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800909 <pre>Lists associations of a specified target, i.e., organization or folder.
910
911Args:
912 targetResource: string, The target resource to list associations. It is an organization, or a folder.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700913 x__xgafv: string, V1 error format.
914 Allowed values
915 1 - v1 error format
916 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800917
918Returns:
919 An object of the form:
920
921 {
922 &quot;associations&quot;: [ # A list of associations.
923 {
924 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700925 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800926 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
927 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700928 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800929 },
930 ],
931 &quot;kind&quot;: &quot;compute#firewallPoliciesListAssociationsResponse&quot;, # [Output Only] Type of firewallPolicy associations. Always compute#FirewallPoliciesListAssociations for lists of firewallPolicy associations.
932}</pre>
933</div>
934
935<div class="method">
936 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
937 <pre>Retrieves the next page of results.
938
939Args:
940 previous_request: The request for the previous page. (required)
941 previous_response: The response from the request for the previous page. (required)
942
943Returns:
944 A request object that you can call &#x27;execute()&#x27; on to request the next
945 page. Returns None if there are no more items in the collection.
946 </pre>
947</div>
948
949<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700950 <code class="details" id="move">move(firewallPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800951 <pre>Moves the specified firewall policy.
952
953Args:
954 firewallPolicy: string, Name of the firewall policy to update. (required)
955 parentId: string, The new parent of the firewall policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700956 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
957 x__xgafv: string, V1 error format.
958 Allowed values
959 1 - v1 error format
960 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800961
962Returns:
963 An object of the form:
964
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700965 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800966 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
967 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
968 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
969 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
970 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
971 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
972 {
973 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
974 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
975 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
976 },
977 ],
978 },
979 &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`.
980 &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.
981 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
982 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
983 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
984 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
985 &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.
986 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
987 &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.
988 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
989 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
990 &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.
991 &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`.
992 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
993 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
994 &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.
995 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
996 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
997 {
998 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -0700999 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001000 {
1001 &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).
1002 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1003 },
1004 ],
1005 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1006 },
1007 ],
1008 &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.
1009}</pre>
1010</div>
1011
1012<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001013 <code class="details" id="patch">patch(firewallPolicy, body=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001014 <pre>Patches the specified policy with the data included in the request.
1015
1016Args:
1017 firewallPolicy: string, Name of the firewall policy to update. (required)
1018 body: object, The request body.
1019 The object takes the form of:
1020
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001021{ # Represents a Firewall Policy resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001022 &quot;associations&quot;: [ # A list of associations that belong to this firewall policy.
1023 {
1024 &quot;attachmentTarget&quot;: &quot;A String&quot;, # The target that the firewall policy is attached to.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001025 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001026 &quot;firewallPolicyId&quot;: &quot;A String&quot;, # [Output Only] The firewall policy ID of the association.
1027 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001028 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy of the association.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001029 },
1030 ],
1031 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1032 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001033 &quot;displayName&quot;: &quot;A String&quot;, # Depreacted, please use short name instead. 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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001034 &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. To see the latest fingerprint, make get() request to the firewall policy.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001035 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1036 &quot;kind&quot;: &quot;compute#firewallPolicy&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
1037 &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.
1038 &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the firewall policy.
1039 &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.
1040 &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.
1041 { # 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).
1042 &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.
1043 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1044 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1045 &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.
1046 &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.
1047 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1048 &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.
1049 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1050 &quot;A String&quot;,
1051 ],
1052 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1053 {
1054 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001055 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001056 &quot;A String&quot;,
1057 ],
1058 },
1059 ],
1060 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1061 &quot;A String&quot;,
1062 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001063 },
1064 &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.
1065 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1066 &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.
1067 &quot;A String&quot;,
1068 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001069 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1070 &quot;A String&quot;,
1071 ],
1072 },
1073 ],
1074 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1075 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001076 &quot;shortName&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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001077}
1078
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001079 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1080 x__xgafv: string, V1 error format.
1081 Allowed values
1082 1 - v1 error format
1083 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001084
1085Returns:
1086 An object of the form:
1087
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001088 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001089 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1090 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1091 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1092 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1093 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1094 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1095 {
1096 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1097 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1098 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1099 },
1100 ],
1101 },
1102 &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`.
1103 &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.
1104 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1105 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1106 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1107 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1108 &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.
1109 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1110 &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.
1111 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1112 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1113 &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.
1114 &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`.
1115 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1116 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1117 &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.
1118 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1119 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1120 {
1121 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001122 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001123 {
1124 &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).
1125 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1126 },
1127 ],
1128 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1129 },
1130 ],
1131 &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.
1132}</pre>
1133</div>
1134
1135<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001136 <code class="details" id="patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001137 <pre>Patches a rule of the specified priority.
1138
1139Args:
1140 firewallPolicy: string, Name of the firewall policy to update. (required)
1141 body: object, The request body.
1142 The object takes the form of:
1143
1144{ # 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).
1145 &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.
1146 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
1147 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
1148 &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.
1149 &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.
1150 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
1151 &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.
1152 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
1153 &quot;A String&quot;,
1154 ],
1155 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1156 {
1157 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001158 &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. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001159 &quot;A String&quot;,
1160 ],
1161 },
1162 ],
1163 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
1164 &quot;A String&quot;,
1165 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001166 },
1167 &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.
1168 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
1169 &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.
1170 &quot;A String&quot;,
1171 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001172 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1173 &quot;A String&quot;,
1174 ],
1175}
1176
1177 priority: integer, The priority of the rule to patch.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001178 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1179 x__xgafv: string, V1 error format.
1180 Allowed values
1181 1 - v1 error format
1182 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001183
1184Returns:
1185 An object of the form:
1186
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001187 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001188 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1189 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1190 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1191 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1192 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1193 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1194 {
1195 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1196 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1197 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1198 },
1199 ],
1200 },
1201 &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`.
1202 &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.
1203 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1204 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1205 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1206 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1207 &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.
1208 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1209 &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.
1210 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1211 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1212 &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.
1213 &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`.
1214 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1215 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1216 &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.
1217 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1218 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1219 {
1220 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001221 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001222 {
1223 &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).
1224 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1225 },
1226 ],
1227 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1228 },
1229 ],
1230 &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.
1231}</pre>
1232</div>
1233
1234<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001235 <code class="details" id="removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001236 <pre>Removes an association for the specified firewall policy.
1237
1238Args:
1239 firewallPolicy: string, Name of the firewall policy to update. (required)
1240 name: string, Name for the attachment that will be removed.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001241 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1242 x__xgafv: string, V1 error format.
1243 Allowed values
1244 1 - v1 error format
1245 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001246
1247Returns:
1248 An object of the form:
1249
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001250 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001251 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1252 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1253 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1254 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1255 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1256 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1257 {
1258 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1259 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1260 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1261 },
1262 ],
1263 },
1264 &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`.
1265 &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.
1266 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1267 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1268 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1269 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1270 &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.
1271 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1272 &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.
1273 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1274 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1275 &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.
1276 &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`.
1277 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1278 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1279 &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.
1280 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1281 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1282 {
1283 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001284 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001285 {
1286 &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).
1287 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1288 },
1289 ],
1290 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1291 },
1292 ],
1293 &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.
1294}</pre>
1295</div>
1296
1297<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001298 <code class="details" id="removeRule">removeRule(firewallPolicy, priority=None, requestId=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001299 <pre>Deletes a rule of the specified priority.
1300
1301Args:
1302 firewallPolicy: string, Name of the firewall policy to update. (required)
1303 priority: integer, The priority of the rule to remove from the firewall policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001304 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. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1305 x__xgafv: string, V1 error format.
1306 Allowed values
1307 1 - v1 error format
1308 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001309
1310Returns:
1311 An object of the form:
1312
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001313 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001314 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1315 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1316 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1317 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1318 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1319 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1320 {
1321 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1322 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1323 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1324 },
1325 ],
1326 },
1327 &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`.
1328 &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.
1329 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1330 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1331 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1332 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1333 &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.
1334 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1335 &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.
1336 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1337 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1338 &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.
1339 &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`.
1340 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1341 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1342 &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.
1343 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1344 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1345 {
1346 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001347 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001348 {
1349 &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).
1350 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1351 },
1352 ],
1353 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1354 },
1355 ],
1356 &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.
1357}</pre>
1358</div>
1359
1360<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001361 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001362 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1363
1364Args:
1365 resource: string, Name or id of the resource for this request. (required)
1366 body: object, The request body.
1367 The object takes the form of:
1368
1369{
1370 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1371 { # Associates `members` with a `role`.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001372 &quot;bindingId&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1373 &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. Example (Comparison): 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; Example (Equality): 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; Example (Logic): 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; Example (Data Manipulation): 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; 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. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001374 &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.
1375 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1376 &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.
1377 &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.
1378 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001379 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `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. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001380 &quot;A String&quot;,
1381 ],
1382 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1383 },
1384 ],
1385 &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.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001386 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. 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. 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). **JSON example:** { &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 } **YAML example:** 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 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001387 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001388 { # 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. 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. Example Policy with multiple AuditConfigs: { &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; ] } ] } ] } 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001389 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001390 { # Provides the configuration for logging a type of permissions. Example: { &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; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1391 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001392 &quot;A String&quot;,
1393 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001394 &quot;ignoreChildExemptions&quot;: True or False, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001395 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1396 },
1397 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001398 &quot;exemptedMembers&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001399 &quot;A String&quot;,
1400 ],
1401 &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.
1402 },
1403 ],
1404 &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.
1405 { # Associates `members` with a `role`.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001406 &quot;bindingId&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1407 &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. Example (Comparison): 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; Example (Equality): 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; Example (Logic): 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; Example (Data Manipulation): 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; 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. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001408 &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.
1409 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1410 &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.
1411 &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.
1412 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001413 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `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. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001414 &quot;A String&quot;,
1415 ],
1416 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1417 },
1418 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001419 &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. **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.
1420 &quot;iamOwned&quot;: True or False, # This is deprecated and has no effect. Do not use.
1421 &quot;rules&quot;: [ # This is deprecated and has no effect. Do not use.
1422 { # This is deprecated and has no effect. Do not use.
1423 &quot;action&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1424 &quot;conditions&quot;: [ # This is deprecated and has no effect. Do not use.
1425 { # This is deprecated and has no effect. Do not use.
1426 &quot;iam&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1427 &quot;op&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1428 &quot;svc&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1429 &quot;sys&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1430 &quot;values&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001431 &quot;A String&quot;,
1432 ],
1433 },
1434 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001435 &quot;description&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1436 &quot;ins&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001437 &quot;A String&quot;,
1438 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001439 &quot;logConfigs&quot;: [ # This is deprecated and has no effect. Do not use.
1440 { # This is deprecated and has no effect. Do not use.
1441 &quot;cloudAudit&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1442 &quot;authorizationLoggingOptions&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1443 &quot;permissionType&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001444 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001445 &quot;logName&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001446 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001447 &quot;counter&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1448 &quot;customFields&quot;: [ # This is deprecated and has no effect. Do not use.
1449 { # This is deprecated and has no effect. Do not use.
1450 &quot;name&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1451 &quot;value&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001452 },
1453 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001454 &quot;field&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1455 &quot;metric&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001456 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001457 &quot;dataAccess&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1458 &quot;logMode&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001459 },
1460 },
1461 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001462 &quot;notIns&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001463 &quot;A String&quot;,
1464 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001465 &quot;permissions&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001466 &quot;A String&quot;,
1467 ],
1468 },
1469 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001470 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * 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 **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. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001471 },
1472}
1473
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001474 x__xgafv: string, V1 error format.
1475 Allowed values
1476 1 - v1 error format
1477 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001478
1479Returns:
1480 An object of the form:
1481
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001482 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. 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. 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). **JSON example:** { &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 } **YAML example:** 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 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001483 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001484 { # 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. 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. Example Policy with multiple AuditConfigs: { &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; ] } ] } ] } 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001485 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001486 { # Provides the configuration for logging a type of permissions. Example: { &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; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1487 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001488 &quot;A String&quot;,
1489 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001490 &quot;ignoreChildExemptions&quot;: True or False, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001491 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1492 },
1493 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001494 &quot;exemptedMembers&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001495 &quot;A String&quot;,
1496 ],
1497 &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.
1498 },
1499 ],
1500 &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.
1501 { # Associates `members` with a `role`.
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001502 &quot;bindingId&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1503 &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. Example (Comparison): 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; Example (Equality): 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; Example (Logic): 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; Example (Data Manipulation): 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; 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. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001504 &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.
1505 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1506 &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.
1507 &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.
1508 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001509 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `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. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001510 &quot;A String&quot;,
1511 ],
1512 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1513 },
1514 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001515 &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. **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.
1516 &quot;iamOwned&quot;: True or False, # This is deprecated and has no effect. Do not use.
1517 &quot;rules&quot;: [ # This is deprecated and has no effect. Do not use.
1518 { # This is deprecated and has no effect. Do not use.
1519 &quot;action&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1520 &quot;conditions&quot;: [ # This is deprecated and has no effect. Do not use.
1521 { # This is deprecated and has no effect. Do not use.
1522 &quot;iam&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1523 &quot;op&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1524 &quot;svc&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1525 &quot;sys&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1526 &quot;values&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001527 &quot;A String&quot;,
1528 ],
1529 },
1530 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001531 &quot;description&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1532 &quot;ins&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001533 &quot;A String&quot;,
1534 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001535 &quot;logConfigs&quot;: [ # This is deprecated and has no effect. Do not use.
1536 { # This is deprecated and has no effect. Do not use.
1537 &quot;cloudAudit&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1538 &quot;authorizationLoggingOptions&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1539 &quot;permissionType&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001540 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001541 &quot;logName&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001542 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001543 &quot;counter&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1544 &quot;customFields&quot;: [ # This is deprecated and has no effect. Do not use.
1545 { # This is deprecated and has no effect. Do not use.
1546 &quot;name&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1547 &quot;value&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001548 },
1549 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001550 &quot;field&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
1551 &quot;metric&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001552 },
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001553 &quot;dataAccess&quot;: { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use.
1554 &quot;logMode&quot;: &quot;A String&quot;, # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001555 },
1556 },
1557 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001558 &quot;notIns&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001559 &quot;A String&quot;,
1560 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001561 &quot;permissions&quot;: [ # This is deprecated and has no effect. Do not use.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001562 &quot;A String&quot;,
1563 ],
1564 },
1565 ],
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001566 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * 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 **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. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001567}</pre>
1568</div>
1569
1570<div class="method">
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001571 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001572 <pre>Returns permissions that a caller has on the specified resource.
1573
1574Args:
1575 resource: string, Name or id of the resource for this request. (required)
1576 body: object, The request body.
1577 The object takes the form of:
1578
1579{
1580 &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.
1581 &quot;A String&quot;,
1582 ],
1583}
1584
yoshi-code-bot0f0918f2021-06-11 00:22:02 -07001585 x__xgafv: string, V1 error format.
1586 Allowed values
1587 1 - v1 error format
1588 2 - v2 error format
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001589
1590Returns:
1591 An object of the form:
1592
1593 {
1594 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1595 &quot;A String&quot;,
1596 ],
1597}</pre>
1598</div>
1599
1600</body></html>