1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.securityPolicies.html">securityPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#addRule">addRule(project, securityPolicy, body, validateOnly=None)</a></code></p>
79<p class="firstline">Inserts a rule into a security policy.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(project, securityPolicy, requestId=None)</a></code></p>
82<p class="firstline">Deletes the specified policy.</p>
83<p class="toc_element">
84  <code><a href="#get">get(project, securityPolicy)</a></code></p>
85<p class="firstline">List all of the ordered rules present in a single specified policy.</p>
86<p class="toc_element">
87  <code><a href="#getRule">getRule(project, securityPolicy, priority=None)</a></code></p>
88<p class="firstline">Gets a rule at the specified priority.</p>
89<p class="toc_element">
90  <code><a href="#insert">insert(project, body, requestId=None, validateOnly=None)</a></code></p>
91<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p>
92<p class="toc_element">
93  <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">List all the policies that have been configured for the specified project.</p>
95<p class="toc_element">
96  <code><a href="#listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Gets the current list of preconfigured Web Application Firewall (WAF) expressions.</p>
98<p class="toc_element">
99  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102  <code><a href="#patch">patch(project, securityPolicy, body, requestId=None)</a></code></p>
103<p class="firstline">Patches the specified policy with the data included in the request.</p>
104<p class="toc_element">
105  <code><a href="#patchRule">patchRule(project, securityPolicy, body, validateOnly=None, priority=None)</a></code></p>
106<p class="firstline">Patches a rule at the specified priority.</p>
107<p class="toc_element">
108  <code><a href="#removeRule">removeRule(project, securityPolicy, priority=None)</a></code></p>
109<p class="firstline">Deletes a rule at the specified priority.</p>
110<p class="toc_element">
111  <code><a href="#setLabels">setLabels(project, resource, body)</a></code></p>
112<p class="firstline">Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.</p>
113<p class="toc_element">
114  <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
118    <code class="details" id="addRule">addRule(project, securityPolicy, body, validateOnly=None)</code>
119  <pre>Inserts a rule into a security policy.
120
121Args:
122  project: string, Project ID for this request. (required)
123  securityPolicy: string, Name of the security policy to update. (required)
124  body: object, The request body. (required)
125    The object takes the form of:
126
127{ # 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).
128  "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
129  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
130  "priority": 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.
131  "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
132  "preview": True or False, # If set to true, the specified action is not enforced.
133  "match": { # 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 ?action? is enforced.
134    "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
135        #
136        # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
137      "title": "A String", # An 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.
138      "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
139          #
140          # The application context of the containing message determines which well-known feature set of CEL is supported.
141      "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
142      "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
143    },
144    "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
145      "srcIpRanges": [ # CIDR IP address range.
146        "A String",
147      ],
148    },
149    "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
150  },
151}
152
153  validateOnly: boolean, If true, the request will not be committed.
154
155Returns:
156  An object of the form:
157
158    { # Represents an Operation resource.
159      #
160      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
161      #
162      # Operations can be global, regional or zonal.
163      # - For global operations, use the globalOperations resource.
164      # - For regional operations, use the regionOperations resource.
165      # - For zonal operations, use the zonalOperations resource.
166      #
167      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
168    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
169    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
170    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
171    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
172    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
173    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
174    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
175    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
176    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
177    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
178    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
179    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
180    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
181    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
182      {
183        "message": "A String", # [Output Only] A human-readable description of the warning code.
184        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
185        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
186            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
187          {
188            "value": "A String", # [Output Only] A warning data value corresponding to the key.
189            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
190          },
191        ],
192      },
193    ],
194    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
195    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
196    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
197    "name": "A String", # [Output Only] Name of the resource.
198    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
199    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
200      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
201        {
202          "message": "A String", # [Output Only] An optional, human-readable error message.
203          "code": "A String", # [Output Only] The error type identifier for this error.
204          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
205        },
206      ],
207    },
208    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
209    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
210    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
211  }</pre>
212</div>
213
214<div class="method">
215    <code class="details" id="delete">delete(project, securityPolicy, requestId=None)</code>
216  <pre>Deletes the specified policy.
217
218Args:
219  project: string, Project ID for this request. (required)
220  securityPolicy: string, Name of the security policy to delete. (required)
221  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.
222
223For 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.
224
225The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
226
227Returns:
228  An object of the form:
229
230    { # Represents an Operation resource.
231      #
232      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
233      #
234      # Operations can be global, regional or zonal.
235      # - For global operations, use the globalOperations resource.
236      # - For regional operations, use the regionOperations resource.
237      # - For zonal operations, use the zonalOperations resource.
238      #
239      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
240    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
241    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
242    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
243    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
244    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
245    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
246    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
247    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
248    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
249    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
250    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
251    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
252    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
253    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
254      {
255        "message": "A String", # [Output Only] A human-readable description of the warning code.
256        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
257        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
258            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
259          {
260            "value": "A String", # [Output Only] A warning data value corresponding to the key.
261            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
262          },
263        ],
264      },
265    ],
266    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
267    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
268    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
269    "name": "A String", # [Output Only] Name of the resource.
270    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
271    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
272      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
273        {
274          "message": "A String", # [Output Only] An optional, human-readable error message.
275          "code": "A String", # [Output Only] The error type identifier for this error.
276          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
277        },
278      ],
279    },
280    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
281    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
282    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
283  }</pre>
284</div>
285
286<div class="method">
287    <code class="details" id="get">get(project, securityPolicy)</code>
288  <pre>List all of the ordered rules present in a single specified policy.
289
290Args:
291  project: string, Project ID for this request. (required)
292  securityPolicy: string, Name of the security policy to get. (required)
293
294Returns:
295  An object of the form:
296
297    { # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)
298    "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
299    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
300    "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
301      { # 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).
302        "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
303        "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
304        "priority": 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.
305        "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
306        "preview": True or False, # If set to true, the specified action is not enforced.
307        "match": { # 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 ?action? is enforced.
308          "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
309              #
310              # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
311            "title": "A String", # An 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.
312            "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
313                #
314                # The application context of the containing message determines which well-known feature set of CEL is supported.
315            "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
316            "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
317          },
318          "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
319            "srcIpRanges": [ # CIDR IP address range.
320              "A String",
321            ],
322          },
323          "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
324        },
325      },
326    ],
327    "labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
328        #
329        # To see the latest fingerprint, make get() request to the security policy.
330    "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
331      "a_key": "A String",
332    },
333    "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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.
334        #
335        # To see the latest fingerprint, make get() request to the security policy.
336    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
337    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
338    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
339    "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` 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.
340  }</pre>
341</div>
342
343<div class="method">
344    <code class="details" id="getRule">getRule(project, securityPolicy, priority=None)</code>
345  <pre>Gets a rule at the specified priority.
346
347Args:
348  project: string, Project ID for this request. (required)
349  securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
350  priority: integer, The priority of the rule to get from the security policy.
351
352Returns:
353  An object of the form:
354
355    { # 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).
356    "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
357    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
358    "priority": 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.
359    "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
360    "preview": True or False, # If set to true, the specified action is not enforced.
361    "match": { # 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 ?action? is enforced.
362      "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
363          #
364          # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
365        "title": "A String", # An 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.
366        "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
367            #
368            # The application context of the containing message determines which well-known feature set of CEL is supported.
369        "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
370        "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
371      },
372      "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
373        "srcIpRanges": [ # CIDR IP address range.
374          "A String",
375        ],
376      },
377      "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
378    },
379  }</pre>
380</div>
381
382<div class="method">
383    <code class="details" id="insert">insert(project, body, requestId=None, validateOnly=None)</code>
384  <pre>Creates a new policy in the specified project using the data included in the request.
385
386Args:
387  project: string, Project ID for this request. (required)
388  body: object, The request body. (required)
389    The object takes the form of:
390
391{ # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)
392  "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
393  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
394  "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
395    { # 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).
396      "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
397      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
398      "priority": 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.
399      "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
400      "preview": True or False, # If set to true, the specified action is not enforced.
401      "match": { # 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 ?action? is enforced.
402        "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
403            #
404            # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
405          "title": "A String", # An 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.
406          "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
407              #
408              # The application context of the containing message determines which well-known feature set of CEL is supported.
409          "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
410          "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
411        },
412        "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
413          "srcIpRanges": [ # CIDR IP address range.
414            "A String",
415          ],
416        },
417        "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
418      },
419    },
420  ],
421  "labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
422      #
423      # To see the latest fingerprint, make get() request to the security policy.
424  "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
425    "a_key": "A String",
426  },
427  "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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.
428      #
429      # To see the latest fingerprint, make get() request to the security policy.
430  "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
431  "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
432  "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
433  "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` 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.
434}
435
436  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.
437
438For 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.
439
440The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
441  validateOnly: boolean, If true, the request will not be committed.
442
443Returns:
444  An object of the form:
445
446    { # Represents an Operation resource.
447      #
448      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
449      #
450      # Operations can be global, regional or zonal.
451      # - For global operations, use the globalOperations resource.
452      # - For regional operations, use the regionOperations resource.
453      # - For zonal operations, use the zonalOperations resource.
454      #
455      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
456    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
457    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
458    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
459    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
460    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
461    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
462    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
463    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
464    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
465    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
466    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
467    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
468    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
469    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
470      {
471        "message": "A String", # [Output Only] A human-readable description of the warning code.
472        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
473        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
474            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
475          {
476            "value": "A String", # [Output Only] A warning data value corresponding to the key.
477            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
478          },
479        ],
480      },
481    ],
482    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
483    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
484    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
485    "name": "A String", # [Output Only] Name of the resource.
486    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
487    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
488      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
489        {
490          "message": "A String", # [Output Only] An optional, human-readable error message.
491          "code": "A String", # [Output Only] The error type identifier for this error.
492          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
493        },
494      ],
495    },
496    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
497    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
498    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
499  }</pre>
500</div>
501
502<div class="method">
503    <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
504  <pre>List all the policies that have been configured for the specified project.
505
506Args:
507  project: string, Project ID for this request. (required)
508  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
509
510You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
511
512Currently, only sorting by name or creationTimestamp desc is supported.
513  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)
514  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.
515  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
516
517For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
518
519You 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.
520
521To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
522
523Returns:
524  An object of the form:
525
526    {
527    "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
528    "items": [ # A list of SecurityPolicy resources.
529      { # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)
530        "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
531        "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
532        "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
533          { # 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).
534            "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
535            "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
536            "priority": 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.
537            "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
538            "preview": True or False, # If set to true, the specified action is not enforced.
539            "match": { # 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 ?action? is enforced.
540              "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
541                  #
542                  # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
543                "title": "A String", # An 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.
544                "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
545                    #
546                    # The application context of the containing message determines which well-known feature set of CEL is supported.
547                "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
548                "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
549              },
550              "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
551                "srcIpRanges": [ # CIDR IP address range.
552                  "A String",
553                ],
554              },
555              "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
556            },
557          },
558        ],
559        "labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
560            #
561            # To see the latest fingerprint, make get() request to the security policy.
562        "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
563          "a_key": "A String",
564        },
565        "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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.
566            #
567            # To see the latest fingerprint, make get() request to the security policy.
568        "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
569        "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
570        "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
571        "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` 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.
572      },
573    ],
574    "kind": "compute#securityPolicyList", # [Output Only] Type of resource. Always compute#securityPolicyList for listsof securityPolicies
575    "warning": { # [Output Only] Informational warning message.
576      "message": "A String", # [Output Only] A human-readable description of the warning code.
577      "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
578      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
579          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
580        {
581          "value": "A String", # [Output Only] A warning data value corresponding to the key.
582          "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
583        },
584      ],
585    },
586    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
587  }</pre>
588</div>
589
590<div class="method">
591    <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
592  <pre>Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
593
594Args:
595  project: string, Project ID for this request. (required)
596  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
597
598You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
599
600Currently, only sorting by name or creationTimestamp desc is supported.
601  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)
602  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.
603  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
604
605For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
606
607You 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.
608
609To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
610
611Returns:
612  An object of the form:
613
614    {
615    "preconfiguredExpressionSets": {
616      "wafRules": {
617        "expressionSets": [ # List of entities that are currently supported for WAF rules.
618          {
619            "expressions": [ # List of available expressions.
620              {
621                "id": "A String", # Expression ID should uniquely identify the origin of the expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set version 2.9.1 rule id 973337. The ID could be used to determine the individual attack definition that has been detected. It could also be used to exclude it from the policy in case of false positive.
622              },
623            ],
624            "id": "A String", # Google specified expression set ID. The format should be: - E.g. XSS-20170329
625            "aliases": [ # A list of alternate IDs. The format should be: - E.g. XSS-stable Generic suffix like "stable" is particularly useful if a policy likes to avail newer set of expressions without having to change the policy. A given alias name can't be used for more than one entity set.
626              "A String",
627            ],
628          },
629        ],
630      },
631    },
632  }</pre>
633</div>
634
635<div class="method">
636    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
637  <pre>Retrieves the next page of results.
638
639Args:
640  previous_request: The request for the previous page. (required)
641  previous_response: The response from the request for the previous page. (required)
642
643Returns:
644  A request object that you can call 'execute()' on to request the next
645  page. Returns None if there are no more items in the collection.
646    </pre>
647</div>
648
649<div class="method">
650    <code class="details" id="patch">patch(project, securityPolicy, body, requestId=None)</code>
651  <pre>Patches the specified policy with the data included in the request.
652
653Args:
654  project: string, Project ID for this request. (required)
655  securityPolicy: string, Name of the security policy to update. (required)
656  body: object, The request body. (required)
657    The object takes the form of:
658
659{ # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)
660  "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
661  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
662  "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
663    { # 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).
664      "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
665      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
666      "priority": 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.
667      "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
668      "preview": True or False, # If set to true, the specified action is not enforced.
669      "match": { # 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 ?action? is enforced.
670        "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
671            #
672            # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
673          "title": "A String", # An 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.
674          "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
675              #
676              # The application context of the containing message determines which well-known feature set of CEL is supported.
677          "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
678          "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
679        },
680        "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
681          "srcIpRanges": [ # CIDR IP address range.
682            "A String",
683          ],
684        },
685        "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
686      },
687    },
688  ],
689  "labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
690      #
691      # To see the latest fingerprint, make get() request to the security policy.
692  "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.
693    "a_key": "A String",
694  },
695  "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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.
696      #
697      # To see the latest fingerprint, make get() request to the security policy.
698  "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
699  "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
700  "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
701  "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` 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.
702}
703
704  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.
705
706For 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.
707
708The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
709
710Returns:
711  An object of the form:
712
713    { # Represents an Operation resource.
714      #
715      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
716      #
717      # Operations can be global, regional or zonal.
718      # - For global operations, use the globalOperations resource.
719      # - For regional operations, use the regionOperations resource.
720      # - For zonal operations, use the zonalOperations resource.
721      #
722      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
723    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
724    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
725    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
726    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
727    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
728    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
729    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
730    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
731    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
732    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
733    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
734    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
735    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
736    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
737      {
738        "message": "A String", # [Output Only] A human-readable description of the warning code.
739        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
740        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
741            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
742          {
743            "value": "A String", # [Output Only] A warning data value corresponding to the key.
744            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
745          },
746        ],
747      },
748    ],
749    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
750    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
751    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
752    "name": "A String", # [Output Only] Name of the resource.
753    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
754    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
755      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
756        {
757          "message": "A String", # [Output Only] An optional, human-readable error message.
758          "code": "A String", # [Output Only] The error type identifier for this error.
759          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
760        },
761      ],
762    },
763    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
764    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
765    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
766  }</pre>
767</div>
768
769<div class="method">
770    <code class="details" id="patchRule">patchRule(project, securityPolicy, body, validateOnly=None, priority=None)</code>
771  <pre>Patches a rule at the specified priority.
772
773Args:
774  project: string, Project ID for this request. (required)
775  securityPolicy: string, Name of the security policy to update. (required)
776  body: object, The request body. (required)
777    The object takes the form of:
778
779{ # 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).
780  "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
781  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
782  "priority": 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.
783  "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
784  "preview": True or False, # If set to true, the specified action is not enforced.
785  "match": { # 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 ?action? is enforced.
786    "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
787        #
788        # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
789      "title": "A String", # An 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.
790      "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
791          #
792          # The application context of the containing message determines which well-known feature set of CEL is supported.
793      "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
794      "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
795    },
796    "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
797      "srcIpRanges": [ # CIDR IP address range.
798        "A String",
799      ],
800    },
801    "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
802  },
803}
804
805  validateOnly: boolean, If true, the request will not be committed.
806  priority: integer, The priority of the rule to patch.
807
808Returns:
809  An object of the form:
810
811    { # Represents an Operation resource.
812      #
813      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
814      #
815      # Operations can be global, regional or zonal.
816      # - For global operations, use the globalOperations resource.
817      # - For regional operations, use the regionOperations resource.
818      # - For zonal operations, use the zonalOperations resource.
819      #
820      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
821    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
822    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
823    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
824    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
825    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
826    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
827    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
828    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
829    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
830    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
831    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
832    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
833    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
834    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
835      {
836        "message": "A String", # [Output Only] A human-readable description of the warning code.
837        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
838        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
839            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
840          {
841            "value": "A String", # [Output Only] A warning data value corresponding to the key.
842            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
843          },
844        ],
845      },
846    ],
847    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
848    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
849    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
850    "name": "A String", # [Output Only] Name of the resource.
851    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
852    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
853      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
854        {
855          "message": "A String", # [Output Only] An optional, human-readable error message.
856          "code": "A String", # [Output Only] The error type identifier for this error.
857          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
858        },
859      ],
860    },
861    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
862    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
863    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
864  }</pre>
865</div>
866
867<div class="method">
868    <code class="details" id="removeRule">removeRule(project, securityPolicy, priority=None)</code>
869  <pre>Deletes a rule at the specified priority.
870
871Args:
872  project: string, Project ID for this request. (required)
873  securityPolicy: string, Name of the security policy to update. (required)
874  priority: integer, The priority of the rule to remove from the security policy.
875
876Returns:
877  An object of the form:
878
879    { # Represents an Operation resource.
880      #
881      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
882      #
883      # Operations can be global, regional or zonal.
884      # - For global operations, use the globalOperations resource.
885      # - For regional operations, use the regionOperations resource.
886      # - For zonal operations, use the zonalOperations resource.
887      #
888      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
889    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
890    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
891    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
892    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
893    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
894    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
895    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
896    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
897    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
898    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
899    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
900    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
901    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
902    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
903      {
904        "message": "A String", # [Output Only] A human-readable description of the warning code.
905        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
906        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
907            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
908          {
909            "value": "A String", # [Output Only] A warning data value corresponding to the key.
910            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
911          },
912        ],
913      },
914    ],
915    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
916    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
917    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
918    "name": "A String", # [Output Only] Name of the resource.
919    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
920    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
921      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
922        {
923          "message": "A String", # [Output Only] An optional, human-readable error message.
924          "code": "A String", # [Output Only] The error type identifier for this error.
925          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
926        },
927      ],
928    },
929    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
930    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
931    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
932  }</pre>
933</div>
934
935<div class="method">
936    <code class="details" id="setLabels">setLabels(project, resource, body)</code>
937  <pre>Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.
938
939Args:
940  project: string, Project ID for this request. (required)
941  resource: string, Name or id of the resource for this request. (required)
942  body: object, The request body. (required)
943    The object takes the form of:
944
945{
946    "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.
947    "labels": { # A list of labels to apply for this resource. Each label key & value must 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. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").
948      "a_key": "A String",
949    },
950  }
951
952
953Returns:
954  An object of the form:
955
956    { # Represents an Operation resource.
957      #
958      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
959      #
960      # Operations can be global, regional or zonal.
961      # - For global operations, use the globalOperations resource.
962      # - For regional operations, use the regionOperations resource.
963      # - For zonal operations, use the zonalOperations resource.
964      #
965      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
966    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
967    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
968    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
969    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
970    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
971    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
972    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
973    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
974    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
975    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
976    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
977    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
978    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
979    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
980      {
981        "message": "A String", # [Output Only] A human-readable description of the warning code.
982        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
983        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
984            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
985          {
986            "value": "A String", # [Output Only] A warning data value corresponding to the key.
987            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
988          },
989        ],
990      },
991    ],
992    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
993    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
994    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
995    "name": "A String", # [Output Only] Name of the resource.
996    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
997    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
998      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
999        {
1000          "message": "A String", # [Output Only] An optional, human-readable error message.
1001          "code": "A String", # [Output Only] The error type identifier for this error.
1002          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1003        },
1004      ],
1005    },
1006    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1007    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1008    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1009  }</pre>
1010</div>
1011
1012<div class="method">
1013    <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
1014  <pre>Returns permissions that a caller has on the specified resource.
1015
1016Args:
1017  project: string, Project ID for this request. (required)
1018  resource: string, Name or id of the resource for this request. (required)
1019  body: object, The request body. (required)
1020    The object takes the form of:
1021
1022{
1023    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1024      "A String",
1025    ],
1026  }
1027
1028
1029Returns:
1030  An object of the form:
1031
1032    {
1033    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1034      "A String",
1035    ],
1036  }</pre>
1037</div>
1038
1039</body></html>