| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, 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 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.securityPolicies.html">securityPolicies</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#addRule">addRule(project, securityPolicy, body=None, validateOnly=None, x__xgafv=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="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Retrieves the list of all SecurityPolicy resources, regional and global,</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#aggregatedList_next">aggregatedList_next()</a></code></p> |
| 85 |
<p class="firstline">Retrieves the next page of results.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#close">close()</a></code></p> |
| 88 |
<p class="firstline">Close httplib2 connections.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#delete">delete(project, securityPolicy, requestId=None, x__xgafv=None)</a></code></p> |
| 91 |
<p class="firstline">Deletes the specified policy.</p> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#get">get(project, securityPolicy, x__xgafv=None)</a></code></p> |
| 94 |
<p class="firstline">List all of the ordered rules present in a single specified policy.</p> |
| 95 |
<p class="toc_element"> |
| 96 |
<code><a href="#getRule">getRule(project, securityPolicy, priority=None, x__xgafv=None)</a></code></p> |
| 97 |
<p class="firstline">Gets a rule at the specified priority.</p> |
| 98 |
<p class="toc_element"> |
| 99 |
<code><a href="#insert">insert(project, body=None, requestId=None, validateOnly=None, x__xgafv=None)</a></code></p> |
| 100 |
<p class="firstline">Creates a new policy in the specified project using the data included in</p> |
| 101 |
<p class="toc_element"> |
| 102 |
<code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> |
| 103 |
<p class="firstline">List all the policies that have been configured for the specified project.</p> |
| 104 |
<p class="toc_element"> |
| 105 |
<code><a href="#listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> |
| 106 |
<p class="firstline">Gets the current list of preconfigured Web Application Firewall (WAF)</p> |
| 107 |
<p class="toc_element"> |
| 108 |
<code><a href="#list_next">list_next()</a></code></p> |
| 109 |
<p class="firstline">Retrieves the next page of results.</p> |
| 110 |
<p class="toc_element"> |
| 111 |
<code><a href="#patch">patch(project, securityPolicy, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p> |
| 112 |
<p class="firstline">Patches the specified policy with the data included in the request. To</p> |
| 113 |
<p class="toc_element"> |
| 114 |
<code><a href="#patchRule">patchRule(project, securityPolicy, body=None, priority=None, updateMask=None, validateOnly=None, x__xgafv=None)</a></code></p> |
| 115 |
<p class="firstline">Patches a rule at the specified priority. To clear fields in the rule,</p> |
| 116 |
<p class="toc_element"> |
| 117 |
<code><a href="#removeRule">removeRule(project, securityPolicy, priority=None, x__xgafv=None)</a></code></p> |
| 118 |
<p class="firstline">Deletes a rule at the specified priority.</p> |
| 119 |
<p class="toc_element"> |
| 120 |
<code><a href="#setLabels">setLabels(project, resource, body=None, x__xgafv=None)</a></code></p> |
| 121 |
<p class="firstline">Sets the labels on a security policy. To learn more about labels,</p> |
| 122 |
<p class="toc_element"> |
| 123 |
<code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</a></code></p> |
| 124 |
<p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 125 |
<h3>Method Details</h3> |
| 126 |
<div class="method"> |
| 127 |
<code class="details" id="addRule">addRule(project, securityPolicy, body=None, validateOnly=None, x__xgafv=None)</code> |
| 128 |
<pre>Inserts a rule into a security policy. |
| 129 |
|
| 130 |
Args: |
| 131 |
project: string, Project ID for this request. (required) |
| 132 |
securityPolicy: string, Name of the security policy to update. (required) |
| 133 |
body: object, The request body. |
| 134 |
The object takes the form of: |
| 135 |
|
| 136 |
{ # Represents a rule that describes one or more match conditions along with |
| 137 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 138 |
"action": "A String", # The Action to perform when the rule is matched. |
| 139 |
# The following are the valid actions: |
| 140 |
# |
| 141 |
# - allow: allow access to target. |
| 142 |
# - deny(STATUS): deny access to target, returns the |
| 143 |
# HTTP response code specified. Valid values for `STATUS` |
| 144 |
# are 403, 404, and 502. |
| 145 |
# - rate_based_ban: limit client traffic to the configured |
| 146 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 147 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 148 |
# rate_limit_options to be set. |
| 149 |
# - redirect: redirect to a different target. This can |
| 150 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 151 |
# redirect via a 302 response. Parameters for this action can be configured |
| 152 |
# via redirectOptions. This action is only supported in Global Security |
| 153 |
# Policies of type CLOUD_ARMOR. |
| 154 |
# - throttle: limit |
| 155 |
# client traffic to the configured threshold. Configure parameters for this |
| 156 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 157 |
# this. |
| 158 |
# - fairshare (preview only): when traffic reaches the |
| 159 |
# threshold limit, requests from the clients matching this rule begin to be |
| 160 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 161 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 162 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 163 |
# create the resource. |
| 164 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 165 |
# specified when versioned_expr is set to FIREWALL. |
| 166 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 167 |
# enabled, logs will be exported to the configured export destination in |
| 168 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 169 |
# cannot enable logging on "goto_next" rules. |
| 170 |
# |
| 171 |
# This field may only be specified when the versioned_expr is set to |
| 172 |
# FIREWALL. |
| 173 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 174 |
# This field is only supported in Global Security Policies of type |
| 175 |
# CLOUD_ARMOR. |
| 176 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 177 |
# present. |
| 178 |
{ |
| 179 |
"headerName": "A String", # The name of the header to set. |
| 180 |
"headerValue": "A String", # The value to set the named header to. |
| 181 |
}, |
| 182 |
], |
| 183 |
}, |
| 184 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 185 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 186 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 187 |
# Exactly one field must be specified. |
| 188 |
"config": { # The configuration options available when specifying versioned_expr. |
| 189 |
# This field must be specified if versioned_expr is specified and cannot |
| 190 |
# be specified if versioned_expr is not specified. |
| 191 |
"destIpRanges": [ # CIDR IP address range. |
| 192 |
# |
| 193 |
# This field may only be specified when versioned_expr is set to |
| 194 |
# FIREWALL. |
| 195 |
"A String", |
| 196 |
], |
| 197 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 198 |
# |
| 199 |
# This field may only be specified when versioned_expr is set to |
| 200 |
# FIREWALL. |
| 201 |
{ |
| 202 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 203 |
# required when creating a firewall rule. This value can either be |
| 204 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 205 |
# protocol number. |
| 206 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 207 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 208 |
# an integer or a range. If not specified, this rule applies to |
| 209 |
# connections through any port. |
| 210 |
# |
| 211 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 212 |
# |
| 213 |
# This field may only be specified when versioned_expr is set to |
| 214 |
# FIREWALL. |
| 215 |
"A String", |
| 216 |
], |
| 217 |
}, |
| 218 |
], |
| 219 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 220 |
# |
| 221 |
# This field may only be specified when versioned_expr is set to |
| 222 |
# FIREWALL. |
| 223 |
{ |
| 224 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 225 |
# required when creating a firewall rule. This value can either be |
| 226 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 227 |
# protocol number. |
| 228 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 229 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 230 |
# an integer or a range. If not specified, this rule applies to |
| 231 |
# connections through any port. |
| 232 |
# |
| 233 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 234 |
# |
| 235 |
# This field may only be specified when versioned_expr is set to |
| 236 |
# FIREWALL. |
| 237 |
"A String", |
| 238 |
], |
| 239 |
}, |
| 240 |
], |
| 241 |
"srcIpRanges": [ # CIDR IP address range. |
| 242 |
# Maximum number of src_ip_ranges allowed is 10. |
| 243 |
"A String", |
| 244 |
], |
| 245 |
}, |
| 246 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 247 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 248 |
# source.region_code and contents in the request header. |
| 249 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 250 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 251 |
# nor in Regional Policies. Expressions containing |
| 252 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 253 |
# Enterprise subscription and are only supported in Global Security |
| 254 |
# Policies. |
| 255 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 256 |
# are documented at https://github.com/google/cel-spec. |
| 257 |
# |
| 258 |
# Example (Comparison): |
| 259 |
# |
| 260 |
# title: "Summary size limit" |
| 261 |
# description: "Determines if a summary is less than 100 chars" |
| 262 |
# expression: "document.summary.size() < 100" |
| 263 |
# |
| 264 |
# Example (Equality): |
| 265 |
# |
| 266 |
# title: "Requestor is owner" |
| 267 |
# description: "Determines if requestor is the document owner" |
| 268 |
# expression: "document.owner == request.auth.claims.email" |
| 269 |
# |
| 270 |
# Example (Logic): |
| 271 |
# |
| 272 |
# title: "Public documents" |
| 273 |
# description: "Determine whether the document should be publicly visible" |
| 274 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 275 |
# |
| 276 |
# Example (Data Manipulation): |
| 277 |
# |
| 278 |
# title: "Notification string" |
| 279 |
# description: "Create a notification string with a timestamp." |
| 280 |
# expression: "'New message received at ' + string(document.create_time)" |
| 281 |
# |
| 282 |
# The exact variables and functions that may be referenced within an expression |
| 283 |
# are determined by the service that evaluates it. See the service |
| 284 |
# documentation for additional information. |
| 285 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 286 |
# describes the expression, e.g. when hovered over it in a UI. |
| 287 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 288 |
# syntax. |
| 289 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 290 |
# reporting, e.g. a file name and a position in the file. |
| 291 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 292 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 293 |
# expression. |
| 294 |
}, |
| 295 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 296 |
# CEVAL expression (i.e., 'expr'). |
| 297 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 298 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 299 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 300 |
# action-tokens. The provided site keys need to be created from |
| 301 |
# reCAPTCHA API under the same project where the security policy is |
| 302 |
# created. |
| 303 |
"A String", |
| 304 |
], |
| 305 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 306 |
# session-tokens. The provided site keys need to be created from |
| 307 |
# reCAPTCHA API under the same project where the security policy is |
| 308 |
# created. |
| 309 |
"A String", |
| 310 |
], |
| 311 |
}, |
| 312 |
}, |
| 313 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 314 |
# If this field is specified, config must also be specified. |
| 315 |
# Available preconfigured expressions along with their requirements are: |
| 316 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 317 |
# config. |
| 318 |
}, |
| 319 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 320 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 321 |
# 'action' is enforced. |
| 322 |
# |
| 323 |
# The match criteria for a rule consists of built-in match fields (like |
| 324 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 325 |
# ('userDefinedFields'). |
| 326 |
# |
| 327 |
# Field values may be extracted directly from the packet or derived from it |
| 328 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 329 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 330 |
# header is found in the packet and the entire field is in bounds. |
| 331 |
# |
| 332 |
# Each match field may specify which values can match it, listing one or |
| 333 |
# more ranges, prefixes, or exact values that are considered a match for |
| 334 |
# the field. A field value must be present in order to match a specified |
| 335 |
# match field. If no match values are specified for a match field, then any |
| 336 |
# field value is considered to match it, and it's not required to be |
| 337 |
# present. For strings specifying '*' is also equivalent to match all. |
| 338 |
# |
| 339 |
# For a packet to match a rule, all specified match fields must match the |
| 340 |
# corresponding field values derived from the packet. |
| 341 |
# |
| 342 |
# Example: |
| 343 |
# |
| 344 |
# networkMatch: |
| 345 |
# srcIpRanges: |
| 346 |
# - "192.0.2.0/24" |
| 347 |
# - "198.51.100.0/24" |
| 348 |
# userDefinedFields: |
| 349 |
# - name: "ipv4_fragment_offset" |
| 350 |
# values: |
| 351 |
# - "1-0x1fff" |
| 352 |
# |
| 353 |
# The above match condition matches packets with a source IP in |
| 354 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 355 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 356 |
# against. |
| 357 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 358 |
# format. |
| 359 |
"A String", |
| 360 |
], |
| 361 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 362 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 363 |
"A String", |
| 364 |
], |
| 365 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 366 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 367 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 368 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 369 |
"A String", |
| 370 |
], |
| 371 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 372 |
42, |
| 373 |
], |
| 374 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 375 |
"A String", |
| 376 |
], |
| 377 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 378 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 379 |
"A String", |
| 380 |
], |
| 381 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 382 |
# IP address. |
| 383 |
"A String", |
| 384 |
], |
| 385 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 386 |
# matching values for that field. |
| 387 |
{ |
| 388 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 389 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 390 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 391 |
# range (e.g. "0x400-0x7ff"). |
| 392 |
"A String", |
| 393 |
], |
| 394 |
}, |
| 395 |
], |
| 396 |
}, |
| 397 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 398 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 399 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 400 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 401 |
{ |
| 402 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 403 |
# preconfigured WAF evaluation. |
| 404 |
{ |
| 405 |
"op": "A String", # The match operator for the field. |
| 406 |
"val": "A String", # The value of the field. |
| 407 |
}, |
| 408 |
], |
| 409 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 410 |
# inspection during preconfigured WAF evaluation. |
| 411 |
{ |
| 412 |
"op": "A String", # The match operator for the field. |
| 413 |
"val": "A String", # The value of the field. |
| 414 |
}, |
| 415 |
], |
| 416 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 417 |
# inspection during preconfigured WAF evaluation. |
| 418 |
{ |
| 419 |
"op": "A String", # The match operator for the field. |
| 420 |
"val": "A String", # The value of the field. |
| 421 |
}, |
| 422 |
], |
| 423 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 424 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 425 |
# parameter can be in the query string or in the POST body. |
| 426 |
{ |
| 427 |
"op": "A String", # The match operator for the field. |
| 428 |
"val": "A String", # The value of the field. |
| 429 |
}, |
| 430 |
], |
| 431 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 432 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 433 |
# field, the query or fragment part should be excluded. |
| 434 |
{ |
| 435 |
"op": "A String", # The match operator for the field. |
| 436 |
"val": "A String", # The value of the field. |
| 437 |
}, |
| 438 |
], |
| 439 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 440 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 441 |
# IDs under the WAF rule set. |
| 442 |
"A String", |
| 443 |
], |
| 444 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 445 |
}, |
| 446 |
], |
| 447 |
}, |
| 448 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 449 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 450 |
# must be a positive value between 0 and 2147483647. |
| 451 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 452 |
# highest priority and 2147483647 is the lowest priority. |
| 453 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 454 |
# "fairshare". Cannot be specified for any other actions. |
| 455 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 456 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 457 |
# the traffic will continue to be banned by the rate limit after the |
| 458 |
# rate falls below the threshold. |
| 459 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 460 |
# "rate_based_ban". If specified, the key will be banned for the |
| 461 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 462 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 463 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 464 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 465 |
}, |
| 466 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 467 |
# threshold. Valid option is "allow" only. |
| 468 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 469 |
# values are: |
| 470 |
# |
| 471 |
# - ALL: A single rate limit threshold is applied to all |
| 472 |
# the requests matching this rule. This is the default value if |
| 473 |
# "enforceOnKey" is not configured. |
| 474 |
# - IP: The source IP address of |
| 475 |
# the request is the key. Each IP has this limit enforced |
| 476 |
# separately. |
| 477 |
# - HTTP_HEADER: The value of the HTTP |
| 478 |
# header whose name is configured under "enforceOnKeyName". The key |
| 479 |
# value is truncated to the first 128 bytes of the header value. If no |
| 480 |
# such header is present in the request, the key type defaults toALL. |
| 481 |
# - XFF_IP: The first IP address (i.e. the |
| 482 |
# originating client IP address) specified in the list of IPs under |
| 483 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 484 |
# is not a valid IP, the key defaults to the source IP address of |
| 485 |
# the request i.e. key type IP. |
| 486 |
# - HTTP_COOKIE: The value of the HTTP |
| 487 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 488 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 489 |
# such cookie is present in the request, the key type defaults toALL. |
| 490 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 491 |
# value is truncated to the first 128 bytes. |
| 492 |
# - SNI: Server name indication in the TLS session of the |
| 493 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 494 |
# key type defaults to ALL on a HTTP session. |
| 495 |
# - REGION_CODE: The country/region from which the request |
| 496 |
# originates. |
| 497 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 498 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 499 |
# key type defaults to ALL. |
| 500 |
# - USER_IP: The IP address of the originating client, |
| 501 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 502 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 503 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 504 |
# |
| 505 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 506 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 507 |
# key type defaults to ALL. |
| 508 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 509 |
# limit threshold is enforced for all the requests matching the rule. |
| 510 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 511 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 512 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 513 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 514 |
# enforce_on_key must not be specified. |
| 515 |
{ |
| 516 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 517 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 518 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 519 |
# taken as the key value. |
| 520 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 521 |
# values are: |
| 522 |
# |
| 523 |
# - ALL: A single rate limit threshold is applied to all |
| 524 |
# the requests matching this rule. This is the default value if |
| 525 |
# "enforceOnKeyConfigs" is not configured. |
| 526 |
# - IP: The source IP address of |
| 527 |
# the request is the key. Each IP has this limit enforced |
| 528 |
# separately. |
| 529 |
# - HTTP_HEADER: The value of the HTTP |
| 530 |
# header whose name is configured under "enforceOnKeyName". The key |
| 531 |
# value is truncated to the first 128 bytes of the header value. If no |
| 532 |
# such header is present in the request, the key type defaults toALL. |
| 533 |
# - XFF_IP: The first IP address (i.e. the |
| 534 |
# originating client IP address) specified in the list of IPs under |
| 535 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 536 |
# value is not a valid IP, the key defaults to the source IP address of |
| 537 |
# the request i.e. key type IP. |
| 538 |
# - HTTP_COOKIE: The value of the HTTP |
| 539 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 540 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 541 |
# such cookie is present in the request, the key type defaults toALL. |
| 542 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 543 |
# value is truncated to the first 128 bytes. |
| 544 |
# - SNI: Server name indication in the TLS session of |
| 545 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 546 |
# The key type defaults to ALL on a HTTP session. |
| 547 |
# - REGION_CODE: The country/region from which the |
| 548 |
# request originates. |
| 549 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 550 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 551 |
# key type defaults to ALL. |
| 552 |
# - USER_IP: The IP address of the originating client, |
| 553 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 554 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 555 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 556 |
# |
| 557 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 558 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 559 |
# key type defaults to ALL. |
| 560 |
}, |
| 561 |
], |
| 562 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 563 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 564 |
# value. |
| 565 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 566 |
# value. |
| 567 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 568 |
# threshold, to either deny with a specified HTTP response code, or |
| 569 |
# redirect to a different endpoint. |
| 570 |
# Valid options are `deny(STATUS)`, where valid values for |
| 571 |
# `STATUS` are 403, 404, 429, and 502, and |
| 572 |
# `redirect`, where the redirect parameters come from |
| 573 |
# `exceedRedirectOptions` below. |
| 574 |
# The `redirect` action is only supported in Global Security Policies of |
| 575 |
# type CLOUD_ARMOR. |
| 576 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 577 |
# above the configured rate limit threshold |
| 578 |
"code": 42, # The status code, which should be an enum value of |
| 579 |
# google.rpc.Code. |
| 580 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 581 |
}, |
| 582 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 583 |
# action. Cannot be specified if the exceed action is not redirect. |
| 584 |
# This field is only supported in Global Security Policies of type |
| 585 |
# CLOUD_ARMOR. |
| 586 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 587 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 588 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 589 |
# |
| 590 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 591 |
# challenge assessment. |
| 592 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 593 |
# response. |
| 594 |
}, |
| 595 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 596 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 597 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 598 |
}, |
| 599 |
}, |
| 600 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 601 |
# other actions. |
| 602 |
# This field is only supported in Global Security Policies of type |
| 603 |
# CLOUD_ARMOR. |
| 604 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 605 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 606 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 607 |
# |
| 608 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 609 |
# challenge assessment. |
| 610 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 611 |
# response. |
| 612 |
}, |
| 613 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 614 |
# other actions. |
| 615 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 616 |
# rule. |
| 617 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 618 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 619 |
# policy. This can only be set during rule creation, if rule number is not |
| 620 |
# specified it will be generated by the server. |
| 621 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 622 |
# policy rule. |
| 623 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 624 |
# allows you to control which network's VMs get this rule. If this field |
| 625 |
# is left blank, all VMs within the organization will receive the rule. |
| 626 |
# |
| 627 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 628 |
"A String", |
| 629 |
], |
| 630 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 631 |
# applied with this rule. |
| 632 |
"A String", |
| 633 |
], |
| 634 |
} |
| 635 |
|
| 636 |
validateOnly: boolean, If true, the request will not be committed. |
| 637 |
x__xgafv: string, V1 error format. |
| 638 |
Allowed values |
| 639 |
1 - v1 error format |
| 640 |
2 - v2 error format |
| 641 |
|
| 642 |
Returns: |
| 643 |
An object of the form: |
| 644 |
|
| 645 |
{ # Represents an Operation resource. |
| 646 |
# |
| 647 |
# Google Compute Engine has three Operation resources: |
| 648 |
# |
| 649 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 650 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 651 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 652 |
# |
| 653 |
# You can use an operation resource to manage asynchronous API requests. |
| 654 |
# For more information, readHandling |
| 655 |
# API responses. |
| 656 |
# |
| 657 |
# Operations can be global, regional or zonal. |
| 658 |
# |
| 659 |
# - For global operations, use the `globalOperations` |
| 660 |
# resource. |
| 661 |
# - For regional operations, use the |
| 662 |
# `regionOperations` resource. |
| 663 |
# - For zonal operations, use |
| 664 |
# the `zoneOperations` resource. |
| 665 |
# |
| 666 |
# |
| 667 |
# |
| 668 |
# For more information, read |
| 669 |
# Global, Regional, and Zonal Resources. |
| 670 |
# |
| 671 |
# Note that completed Operation resources have a limited |
| 672 |
# retention period. |
| 673 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 674 |
# Not present otherwise. |
| 675 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 676 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 677 |
# set when the operation is created. |
| 678 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 679 |
# text format. |
| 680 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 681 |
# this field will be populated. |
| 682 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 683 |
# operation. |
| 684 |
{ |
| 685 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 686 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 687 |
# details. There is a set of defined message types to use for providing |
| 688 |
# details.The syntax depends on the error code. For example, |
| 689 |
# QuotaExceededInfo will have details when the error code is |
| 690 |
# QUOTA_EXCEEDED. |
| 691 |
{ |
| 692 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 693 |
# |
| 694 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 695 |
# is not enabled: |
| 696 |
# |
| 697 |
# { "reason": "API_DISABLED" |
| 698 |
# "domain": "googleapis.com" |
| 699 |
# "metadata": { |
| 700 |
# "resource": "projects/123", |
| 701 |
# "service": "pubsub.googleapis.com" |
| 702 |
# } |
| 703 |
# } |
| 704 |
# |
| 705 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 706 |
# |
| 707 |
# Example of an error that is returned when attempting to create a Spanner |
| 708 |
# instance in a region that is out of stock: |
| 709 |
# |
| 710 |
# { "reason": "STOCKOUT" |
| 711 |
# "domain": "spanner.googleapis.com", |
| 712 |
# "metadata": { |
| 713 |
# "availableRegions": "us-central1,us-east2" |
| 714 |
# } |
| 715 |
# } |
| 716 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 717 |
# is typically the registered service name of the tool or product that |
| 718 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 719 |
# generated by some common infrastructure, the error domain must be a |
| 720 |
# globally unique value that identifies the infrastructure. For Google API |
| 721 |
# infrastructure, the error domain is "googleapis.com". |
| 722 |
"metadatas": { # Additional structured details about this error. |
| 723 |
# |
| 724 |
# Keys must match a regular expression of `a-z+` but should |
| 725 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 726 |
# length. When identifying the current value of an exceeded limit, the units |
| 727 |
# should be contained in the key, not the value. For example, rather than |
| 728 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 729 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 730 |
# instances that can be created in a single (batch) request. |
| 731 |
"a_key": "A String", |
| 732 |
}, |
| 733 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 734 |
# proximate cause of the error. Error reasons are unique within a particular |
| 735 |
# domain of errors. This should be at most 63 characters and match a |
| 736 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 737 |
# UPPER_SNAKE_CASE. |
| 738 |
}, |
| 739 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 740 |
# |
| 741 |
# For example, if a quota check failed with an error indicating the calling |
| 742 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 743 |
# directly to the right place in the developer console to flip the bit. |
| 744 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 745 |
{ # Describes a URL link. |
| 746 |
"description": "A String", # Describes what the link offers. |
| 747 |
"url": "A String", # The URL of the link. |
| 748 |
}, |
| 749 |
], |
| 750 |
}, |
| 751 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 752 |
# which can be attached to an RPC error. |
| 753 |
"locale": "A String", # The locale used following the specification defined at |
| 754 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 755 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 756 |
"message": "A String", # The localized error message in the above locale. |
| 757 |
}, |
| 758 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 759 |
"dimensions": { # The map holding related quota dimensions. |
| 760 |
"a_key": "A String", |
| 761 |
}, |
| 762 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 763 |
# type or metric. |
| 764 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 765 |
# or metric. |
| 766 |
"limitName": "A String", # The name of the quota limit. |
| 767 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 768 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 769 |
}, |
| 770 |
}, |
| 771 |
], |
| 772 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 773 |
# This property is optional. |
| 774 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 775 |
}, |
| 776 |
], |
| 777 |
}, |
| 778 |
"getVersionOperationMetadata": { |
| 779 |
"inlineSbomInfo": { |
| 780 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 781 |
# appropriate identifiers. |
| 782 |
"a_key": "A String", |
| 783 |
}, |
| 784 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 785 |
# identifiers. |
| 786 |
"a_key": "A String", |
| 787 |
}, |
| 788 |
}, |
| 789 |
}, |
| 790 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 791 |
# message that was returned, such as `NOT FOUND`. |
| 792 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 793 |
# status code that was returned. For example, a `404` means the |
| 794 |
# resource was not found. |
| 795 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 796 |
# defined by the server. |
| 797 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 798 |
# This value is inRFC3339 |
| 799 |
# text format. |
| 800 |
"instancesBulkInsertOperationMetadata": { |
| 801 |
"perLocationStatus": { # Status information per location (location name is key). |
| 802 |
# Example key: zones/us-central1-a |
| 803 |
"a_key": { |
| 804 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 805 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 806 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 807 |
# error. |
| 808 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 809 |
# if the flow is rolling forward or rolling back. |
| 810 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 811 |
}, |
| 812 |
}, |
| 813 |
}, |
| 814 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 815 |
# Operation resources. |
| 816 |
"name": "A String", # [Output Only] Name of the operation. |
| 817 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 818 |
# group of operations results from a `bulkInsert` API request. |
| 819 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 820 |
# `update`, or `delete`, and so on. |
| 821 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 822 |
# There is no requirement that this be linear or support any granularity of |
| 823 |
# operations. This should not be used to guess when the operation will be |
| 824 |
# complete. This number should monotonically increase as the operation |
| 825 |
# progresses. |
| 826 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 827 |
# applicable when performing regional operations. |
| 828 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 829 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 830 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 831 |
# this field will contain information on all underlying zonal actions and |
| 832 |
# their state. |
| 833 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 834 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 835 |
# Example key: zones/us-central1-a |
| 836 |
"a_key": { |
| 837 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 838 |
# populated. |
| 839 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 840 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 841 |
# three pieces of data: error code, error message, and error details. |
| 842 |
# |
| 843 |
# You can find out more about this error model and how to work with it in the |
| 844 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 845 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 846 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 847 |
# message types for APIs to use. |
| 848 |
{ |
| 849 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 850 |
}, |
| 851 |
], |
| 852 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 853 |
# user-facing error message should be localized and sent in the |
| 854 |
# google.rpc.Status.details field, or localized by the client. |
| 855 |
}, |
| 856 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 857 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 858 |
}, |
| 859 |
}, |
| 860 |
}, |
| 861 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 862 |
# This value is inRFC3339 |
| 863 |
# text format. |
| 864 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 865 |
# following: |
| 866 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 867 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 868 |
# operation. |
| 869 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 870 |
# of the target resource. |
| 871 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 872 |
# operations related to creating a snapshot, this points to the disk |
| 873 |
# that the snapshot was created from. |
| 874 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 875 |
# `[email protected]` or |
| 876 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 877 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 878 |
# operation, this field will be populated. |
| 879 |
{ |
| 880 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 881 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 882 |
# are no results in the response. |
| 883 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 884 |
# value format. For example: |
| 885 |
# |
| 886 |
# "data": [ |
| 887 |
# { |
| 888 |
# "key": "scope", |
| 889 |
# "value": "zones/us-east1-d" |
| 890 |
# } |
| 891 |
{ |
| 892 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 893 |
# returned. For example, for warnings where there are no results in a list |
| 894 |
# request for a particular zone, this key might be scope and |
| 895 |
# the key value might be the zone name. Other examples might be a key |
| 896 |
# indicating a deprecated resource and a suggested replacement, or a |
| 897 |
# warning about invalid network settings (for example, if an instance |
| 898 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 899 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 900 |
}, |
| 901 |
], |
| 902 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 903 |
}, |
| 904 |
], |
| 905 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 906 |
# applicable when performing per-zone operations. |
| 907 |
}</pre> |
| 908 |
</div> |
| 909 |
|
| 910 |
<div class="method"> |
| 911 |
<code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</code> |
| 912 |
<pre>Retrieves the list of all SecurityPolicy resources, regional and global, |
| 913 |
available to the specified project. |
| 914 |
|
| 915 |
To prevent failure, Google recommends that you set the |
| 916 |
`returnPartialSuccess` parameter to `true`. |
| 917 |
|
| 918 |
Args: |
| 919 |
project: string, Name of the project scoping this request. (required) |
| 920 |
filter: string, A filter expression that filters resources listed in the response. Most |
| 921 |
Compute resources support two types of filter expressions: |
| 922 |
expressions that support regular expressions and expressions that follow |
| 923 |
API improvement proposal AIP-160. |
| 924 |
These two types of filter expressions cannot be mixed in one request. |
| 925 |
|
| 926 |
If you want to use AIP-160, your expression must specify the field name, an |
| 927 |
operator, and the value that you want to use for filtering. The value |
| 928 |
must be a string, a number, or a boolean. The operator |
| 929 |
must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| 930 |
|
| 931 |
For example, if you are filtering Compute Engine instances, you can |
| 932 |
exclude instances named `example-instance` by specifying |
| 933 |
`name != example-instance`. |
| 934 |
|
| 935 |
The `:*` comparison can be used to test whether a key has been defined. |
| 936 |
For example, to find all objects with `owner` label use: |
| 937 |
``` |
| 938 |
labels.owner:* |
| 939 |
``` |
| 940 |
|
| 941 |
You can also filter nested fields. For example, you could specify |
| 942 |
`scheduling.automaticRestart = false` to include instances only |
| 943 |
if they are not scheduled for automatic restarts. You can use filtering |
| 944 |
on nested fields to filter based onresource labels. |
| 945 |
|
| 946 |
To filter on multiple expressions, provide each separate expression within |
| 947 |
parentheses. For example: |
| 948 |
``` |
| 949 |
(scheduling.automaticRestart = true) |
| 950 |
(cpuPlatform = "Intel Skylake") |
| 951 |
``` |
| 952 |
By default, each expression is an `AND` expression. However, you |
| 953 |
can include `AND` and `OR` expressions explicitly. |
| 954 |
For example: |
| 955 |
``` |
| 956 |
(cpuPlatform = "Intel Skylake") OR |
| 957 |
(cpuPlatform = "Intel Broadwell") AND |
| 958 |
(scheduling.automaticRestart = true) |
| 959 |
``` |
| 960 |
|
| 961 |
If you want to use a regular expression, use the `eq` (equal) or `ne` |
| 962 |
(not equal) operator against a single un-parenthesized expression with or |
| 963 |
without quotes or against multiple parenthesized expressions. Examples: |
| 964 |
|
| 965 |
`fieldname eq unquoted literal` |
| 966 |
`fieldname eq 'single quoted literal'` |
| 967 |
`fieldname eq "double quoted literal"` |
| 968 |
`(fieldname1 eq literal) (fieldname2 ne "literal")` |
| 969 |
|
| 970 |
The literal value is interpreted as a regular expression using GoogleRE2 library syntax. |
| 971 |
The literal value must match the entire field. |
| 972 |
|
| 973 |
For example, to filter for instances that do not end with name "instance", |
| 974 |
you would use `name ne .*instance`. |
| 975 |
|
| 976 |
You cannot combine constraints on multiple fields using regular |
| 977 |
expressions. |
| 978 |
includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, |
| 979 |
global) should be included in the response. For new resource types added |
| 980 |
after this field, the flag has no effect as new resource types will always |
| 981 |
include every visible scope for each scope type in response. For resource |
| 982 |
types which predate this field, if this flag is omitted or false, only |
| 983 |
scopes of the scope types where the resource type is expected to be found |
| 984 |
will be included. |
| 985 |
maxResults: integer, The maximum number of results per page that should be returned. |
| 986 |
If the number of available results is larger than `maxResults`, |
| 987 |
Compute Engine returns a `nextPageToken` that can be used to get |
| 988 |
the next page of results in subsequent list requests. Acceptable values are |
| 989 |
`0` to `500`, inclusive. (Default: `500`) |
| 990 |
orderBy: string, Sorts list results by a certain order. By default, results |
| 991 |
are returned in alphanumerical order based on the resource name. |
| 992 |
|
| 993 |
You can also sort results in descending order based on the creation |
| 994 |
timestamp using `orderBy="creationTimestamp desc"`. This sorts |
| 995 |
results based on the `creationTimestamp` field in |
| 996 |
reverse chronological order (newest result first). Use this to sort |
| 997 |
resources like operations so that the newest operation is returned first. |
| 998 |
|
| 999 |
Currently, only sorting by `name` or |
| 1000 |
`creationTimestamp desc` is supported. |
| 1001 |
pageToken: string, Specifies a page token to use. Set `pageToken` to the |
| 1002 |
`nextPageToken` returned by a previous list request to get |
| 1003 |
the next page of results. |
| 1004 |
returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case |
| 1005 |
of failure. The default value is false. |
| 1006 |
|
| 1007 |
For example, when partial success behavior is enabled, aggregatedList for a |
| 1008 |
single zone scope either returns all resources in the zone or no resources, |
| 1009 |
with an error code. |
| 1010 |
serviceProjectNumber: string, The Shared VPC service project id or service project number for which |
| 1011 |
aggregated list request is invoked for subnetworks list-usable api. |
| 1012 |
x__xgafv: string, V1 error format. |
| 1013 |
Allowed values |
| 1014 |
1 - v1 error format |
| 1015 |
2 - v2 error format |
| 1016 |
|
| 1017 |
Returns: |
| 1018 |
An object of the form: |
| 1019 |
|
| 1020 |
{ |
| 1021 |
"etag": "A String", |
| 1022 |
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. |
| 1023 |
"items": { # A list of SecurityPoliciesScopedList resources. |
| 1024 |
"a_key": { # Name of the scope containing this set of security policies. |
| 1025 |
"securityPolicies": [ # A list of SecurityPolicies contained in this scope. |
| 1026 |
{ # Represents a Google Cloud Armor security policy resource. |
| 1027 |
# |
| 1028 |
# Only external backend services that use load balancers can |
| 1029 |
# reference a security policy. For more information, see |
| 1030 |
# Google Cloud Armor security policy overview. |
| 1031 |
"adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). |
| 1032 |
"autoDeployConfig": { # Configuration options for Adaptive Protection auto-deploy feature. |
| 1033 |
"confidenceThreshold": 3.14, |
| 1034 |
"expirationSec": 42, |
| 1035 |
"impactedBaselineThreshold": 3.14, |
| 1036 |
"loadThreshold": 3.14, |
| 1037 |
}, |
| 1038 |
"layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. |
| 1039 |
# This field is only supported in Global Security Policies of type |
| 1040 |
# CLOUD_ARMOR. |
| 1041 |
"enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. |
| 1042 |
# This field is only supported in Global Security Policies of type |
| 1043 |
# CLOUD_ARMOR. |
| 1044 |
"ruleVisibility": "A String", # Rule visibility can be one of the following: |
| 1045 |
# STANDARD - opaque rules. (default) |
| 1046 |
# PREMIUM - transparent rules. |
| 1047 |
# This field is only supported in Global Security Policies of type |
| 1048 |
# CLOUD_ARMOR. |
| 1049 |
"thresholdConfigs": [ # Configuration options for layer7 adaptive protection for various |
| 1050 |
# customizable thresholds. |
| 1051 |
{ |
| 1052 |
"autoDeployConfidenceThreshold": 3.14, |
| 1053 |
"autoDeployExpirationSec": 42, |
| 1054 |
"autoDeployImpactedBaselineThreshold": 3.14, |
| 1055 |
"autoDeployLoadThreshold": 3.14, |
| 1056 |
"detectionAbsoluteQps": 3.14, |
| 1057 |
"detectionLoadThreshold": 3.14, |
| 1058 |
"detectionRelativeToBaselineQps": 3.14, |
| 1059 |
"name": "A String", # The name must be 1-63 characters long, and comply withRFC1035. |
| 1060 |
# The name must be unique within the security policy. |
| 1061 |
"trafficGranularityConfigs": [ # Configuration options for enabling Adaptive Protection to operate |
| 1062 |
# on specified granular traffic units. |
| 1063 |
{ # Configurations to specifc granular traffic units processed by |
| 1064 |
# Adaptive Protection. |
| 1065 |
"enableEachUniqueValue": True or False, # If enabled, traffic matching each unique value for the specified |
| 1066 |
# type constitutes a separate traffic unit. |
| 1067 |
# It can only be set to true if `value` is empty. |
| 1068 |
"type": "A String", # Type of this configuration. |
| 1069 |
"value": "A String", # Requests that match this value constitute a granular traffic unit. |
| 1070 |
}, |
| 1071 |
], |
| 1072 |
}, |
| 1073 |
], |
| 1074 |
}, |
| 1075 |
}, |
| 1076 |
"advancedOptionsConfig": { |
| 1077 |
"jsonCustomConfig": { # Custom configuration to apply the JSON parsing. Only applicable when |
| 1078 |
# json_parsing is set to STANDARD. |
| 1079 |
"contentTypes": [ # A list of custom Content-Type header values to apply the JSON parsing. |
| 1080 |
# |
| 1081 |
# As per RFC 1341, a Content-Type header value has the following format: |
| 1082 |
# |
| 1083 |
# Content-Type := type "/" subtype *[";" parameter] |
| 1084 |
# |
| 1085 |
# When configuring a custom Content-Type header value, only the |
| 1086 |
# type/subtype needs to be specified, and the parameters should be |
| 1087 |
# excluded. |
| 1088 |
"A String", |
| 1089 |
], |
| 1090 |
}, |
| 1091 |
"jsonParsing": "A String", |
| 1092 |
"logLevel": "A String", |
| 1093 |
"requestBodyInspectionSize": "A String", # The maximum request size chosen by the customer with Waf enabled. |
| 1094 |
# Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". |
| 1095 |
# Values are case insensitive. |
| 1096 |
"userIpRequestHeaders": [ # An optional list of case-insensitive request header names to use for |
| 1097 |
# resolving the callers client IP address. |
| 1098 |
"A String", |
| 1099 |
], |
| 1100 |
}, |
| 1101 |
"associations": [ # A list of associations that belong to this policy. |
| 1102 |
{ |
| 1103 |
"attachmentId": "A String", # The resource that the security policy is attached to. |
| 1104 |
"displayName": "A String", # Output only. [Output Only] The display name of the security policy of the association. |
| 1105 |
"excludedFolders": [ # A list of folders to exclude from the security policy. |
| 1106 |
"A String", |
| 1107 |
], |
| 1108 |
"excludedProjects": [ # A list of projects to exclude from the security policy. |
| 1109 |
"A String", |
| 1110 |
], |
| 1111 |
"name": "A String", # The name for an association. |
| 1112 |
"securityPolicyId": "A String", # Output only. [Output Only] The security policy ID of the association. |
| 1113 |
"shortName": "A String", # Output only. [Output Only] The short name of the security policy of the association. |
| 1114 |
}, |
| 1115 |
], |
| 1116 |
"cloudArmorConfig": { # Configuration options for Cloud Armor. |
| 1117 |
"enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. |
| 1118 |
}, |
| 1119 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 1120 |
# text format. |
| 1121 |
"ddosProtectionConfig": { |
| 1122 |
"ddosAdaptiveProtection": "A String", |
| 1123 |
"ddosImpactedBaselineThreshold": 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs) |
| 1124 |
# builds DDoS mitigations that minimize collateral damage. It quantifies |
| 1125 |
# this as the fraction of a non-abuse baseline that's inadvertently |
| 1126 |
# blocked. |
| 1127 |
# |
| 1128 |
# Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will |
| 1129 |
# not be deployed. Using a lower value will prioritize keeping collateral |
| 1130 |
# damage low, possibly at the cost of its effectiveness in rate limiting |
| 1131 |
# some or all of the attack. It should typically be unset, so Advanced DDoS |
| 1132 |
# (and Adaptive Protection) uses the best mitigation it can find. Setting |
| 1133 |
# the threshold is advised if there are logs for false positive detections |
| 1134 |
# with high collateral damage, and will cause Advanced DDoS to attempt to |
| 1135 |
# find a less aggressive rule that satisfies the constraint. If a suitable |
| 1136 |
# rule cannot be found, the system falls back to either no mitigation for |
| 1137 |
# smaller attacks or broader network throttles for larger ones. |
| 1138 |
"ddosProtection": "A String", |
| 1139 |
}, |
| 1140 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 1141 |
# create the resource. |
| 1142 |
"displayName": "A String", # User-provided name of the organization security policy. The name should be |
| 1143 |
# unique in the organization in which the security policy is created. This |
| 1144 |
# should only be used when SecurityPolicyType is FIREWALL. |
| 1145 |
# The name must be 1-63 characters long, and comply with |
| 1146 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 1147 |
# characters long and match the regular expression |
| 1148 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 1149 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 1150 |
# letter, or digit, except the last character, which cannot be a dash. |
| 1151 |
"fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of |
| 1152 |
# the metadata's contents and used for optimistic locking. The |
| 1153 |
# fingerprint is initially generated by Compute Engine and changes after |
| 1154 |
# every request to modify or update metadata. You must always provide an |
| 1155 |
# up-to-date fingerprint hash in order to update or change metadata, |
| 1156 |
# otherwise the request will fail with error412 conditionNotMet. |
| 1157 |
# |
| 1158 |
# To see the latest fingerprint, make get() request to the |
| 1159 |
# security policy. |
| 1160 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 1161 |
# defined by the server. |
| 1162 |
"kind": "compute#securityPolicy", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies |
| 1163 |
"labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which |
| 1164 |
# is essentially a hash of the labels set used for optimistic locking. The |
| 1165 |
# fingerprint is initially generated by Compute Engine and changes after |
| 1166 |
# every request to modify or update labels. You must always provide an |
| 1167 |
# up-to-date fingerprint hash in order to update or change labels. |
| 1168 |
# |
| 1169 |
# To see the latest fingerprint, make get() request to the |
| 1170 |
# security policy. |
| 1171 |
"labels": { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. |
| 1172 |
# Label values may be empty. |
| 1173 |
"a_key": "A String", |
| 1174 |
}, |
| 1175 |
"name": "A String", # Name of the resource. Provided by the client when the resource is created. |
| 1176 |
# The name must be 1-63 characters long, and comply withRFC1035. |
| 1177 |
# Specifically, the name must be 1-63 characters long and match the regular |
| 1178 |
# expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 1179 |
# character must be a lowercase letter, and all following characters must |
| 1180 |
# be a dash, lowercase letter, or digit, except the last character, which |
| 1181 |
# cannot be a dash. |
| 1182 |
"parent": "A String", # Output only. [Output Only] The parent of the security policy. |
| 1183 |
"recaptchaOptionsConfig": { |
| 1184 |
"redirectSiteKey": "A String", # An optional field to supply a reCAPTCHA site key to be used for all the |
| 1185 |
# rules using the redirect action with the type of GOOGLE_RECAPTCHA under |
| 1186 |
# the security policy. The specified site key needs to be created from the |
| 1187 |
# reCAPTCHA API. The user is responsible for the validity of the specified |
| 1188 |
# site key. If not specified, a Google-managed site key is used. |
| 1189 |
# This field is only supported in Global Security Policies of type |
| 1190 |
# CLOUD_ARMOR. |
| 1191 |
}, |
| 1192 |
"region": "A String", # Output only. [Output Only] URL of the region where the regional security policy |
| 1193 |
# resides. This field is not applicable to global security policies. |
| 1194 |
"ruleTupleCount": 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security |
| 1195 |
# policy can not exceed a set number of tuples. |
| 1196 |
"rules": [ # A list of rules that belong to this policy. |
| 1197 |
# There must always be a default rule which is a rule with priority |
| 1198 |
# 2147483647 and match all condition (for the match condition this means |
| 1199 |
# match "*" for srcIpRanges and for the networkMatch condition every field |
| 1200 |
# must be either match "*" or not set). If no rules are provided when |
| 1201 |
# creating a security policy, a default rule with action "allow" will be |
| 1202 |
# added. |
| 1203 |
{ # Represents a rule that describes one or more match conditions along with |
| 1204 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 1205 |
"action": "A String", # The Action to perform when the rule is matched. |
| 1206 |
# The following are the valid actions: |
| 1207 |
# |
| 1208 |
# - allow: allow access to target. |
| 1209 |
# - deny(STATUS): deny access to target, returns the |
| 1210 |
# HTTP response code specified. Valid values for `STATUS` |
| 1211 |
# are 403, 404, and 502. |
| 1212 |
# - rate_based_ban: limit client traffic to the configured |
| 1213 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 1214 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 1215 |
# rate_limit_options to be set. |
| 1216 |
# - redirect: redirect to a different target. This can |
| 1217 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 1218 |
# redirect via a 302 response. Parameters for this action can be configured |
| 1219 |
# via redirectOptions. This action is only supported in Global Security |
| 1220 |
# Policies of type CLOUD_ARMOR. |
| 1221 |
# - throttle: limit |
| 1222 |
# client traffic to the configured threshold. Configure parameters for this |
| 1223 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 1224 |
# this. |
| 1225 |
# - fairshare (preview only): when traffic reaches the |
| 1226 |
# threshold limit, requests from the clients matching this rule begin to be |
| 1227 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 1228 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 1229 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 1230 |
# create the resource. |
| 1231 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 1232 |
# specified when versioned_expr is set to FIREWALL. |
| 1233 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 1234 |
# enabled, logs will be exported to the configured export destination in |
| 1235 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 1236 |
# cannot enable logging on "goto_next" rules. |
| 1237 |
# |
| 1238 |
# This field may only be specified when the versioned_expr is set to |
| 1239 |
# FIREWALL. |
| 1240 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 1241 |
# This field is only supported in Global Security Policies of type |
| 1242 |
# CLOUD_ARMOR. |
| 1243 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 1244 |
# present. |
| 1245 |
{ |
| 1246 |
"headerName": "A String", # The name of the header to set. |
| 1247 |
"headerValue": "A String", # The value to set the named header to. |
| 1248 |
}, |
| 1249 |
], |
| 1250 |
}, |
| 1251 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 1252 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 1253 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 1254 |
# Exactly one field must be specified. |
| 1255 |
"config": { # The configuration options available when specifying versioned_expr. |
| 1256 |
# This field must be specified if versioned_expr is specified and cannot |
| 1257 |
# be specified if versioned_expr is not specified. |
| 1258 |
"destIpRanges": [ # CIDR IP address range. |
| 1259 |
# |
| 1260 |
# This field may only be specified when versioned_expr is set to |
| 1261 |
# FIREWALL. |
| 1262 |
"A String", |
| 1263 |
], |
| 1264 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 1265 |
# |
| 1266 |
# This field may only be specified when versioned_expr is set to |
| 1267 |
# FIREWALL. |
| 1268 |
{ |
| 1269 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 1270 |
# required when creating a firewall rule. This value can either be |
| 1271 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 1272 |
# protocol number. |
| 1273 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 1274 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 1275 |
# an integer or a range. If not specified, this rule applies to |
| 1276 |
# connections through any port. |
| 1277 |
# |
| 1278 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 1279 |
# |
| 1280 |
# This field may only be specified when versioned_expr is set to |
| 1281 |
# FIREWALL. |
| 1282 |
"A String", |
| 1283 |
], |
| 1284 |
}, |
| 1285 |
], |
| 1286 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 1287 |
# |
| 1288 |
# This field may only be specified when versioned_expr is set to |
| 1289 |
# FIREWALL. |
| 1290 |
{ |
| 1291 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 1292 |
# required when creating a firewall rule. This value can either be |
| 1293 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 1294 |
# protocol number. |
| 1295 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 1296 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 1297 |
# an integer or a range. If not specified, this rule applies to |
| 1298 |
# connections through any port. |
| 1299 |
# |
| 1300 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 1301 |
# |
| 1302 |
# This field may only be specified when versioned_expr is set to |
| 1303 |
# FIREWALL. |
| 1304 |
"A String", |
| 1305 |
], |
| 1306 |
}, |
| 1307 |
], |
| 1308 |
"srcIpRanges": [ # CIDR IP address range. |
| 1309 |
# Maximum number of src_ip_ranges allowed is 10. |
| 1310 |
"A String", |
| 1311 |
], |
| 1312 |
}, |
| 1313 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 1314 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 1315 |
# source.region_code and contents in the request header. |
| 1316 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 1317 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 1318 |
# nor in Regional Policies. Expressions containing |
| 1319 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 1320 |
# Enterprise subscription and are only supported in Global Security |
| 1321 |
# Policies. |
| 1322 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1323 |
# are documented at https://github.com/google/cel-spec. |
| 1324 |
# |
| 1325 |
# Example (Comparison): |
| 1326 |
# |
| 1327 |
# title: "Summary size limit" |
| 1328 |
# description: "Determines if a summary is less than 100 chars" |
| 1329 |
# expression: "document.summary.size() < 100" |
| 1330 |
# |
| 1331 |
# Example (Equality): |
| 1332 |
# |
| 1333 |
# title: "Requestor is owner" |
| 1334 |
# description: "Determines if requestor is the document owner" |
| 1335 |
# expression: "document.owner == request.auth.claims.email" |
| 1336 |
# |
| 1337 |
# Example (Logic): |
| 1338 |
# |
| 1339 |
# title: "Public documents" |
| 1340 |
# description: "Determine whether the document should be publicly visible" |
| 1341 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 1342 |
# |
| 1343 |
# Example (Data Manipulation): |
| 1344 |
# |
| 1345 |
# title: "Notification string" |
| 1346 |
# description: "Create a notification string with a timestamp." |
| 1347 |
# expression: "'New message received at ' + string(document.create_time)" |
| 1348 |
# |
| 1349 |
# The exact variables and functions that may be referenced within an expression |
| 1350 |
# are determined by the service that evaluates it. See the service |
| 1351 |
# documentation for additional information. |
| 1352 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1353 |
# describes the expression, e.g. when hovered over it in a UI. |
| 1354 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1355 |
# syntax. |
| 1356 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 1357 |
# reporting, e.g. a file name and a position in the file. |
| 1358 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1359 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 1360 |
# expression. |
| 1361 |
}, |
| 1362 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 1363 |
# CEVAL expression (i.e., 'expr'). |
| 1364 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 1365 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 1366 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 1367 |
# action-tokens. The provided site keys need to be created from |
| 1368 |
# reCAPTCHA API under the same project where the security policy is |
| 1369 |
# created. |
| 1370 |
"A String", |
| 1371 |
], |
| 1372 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 1373 |
# session-tokens. The provided site keys need to be created from |
| 1374 |
# reCAPTCHA API under the same project where the security policy is |
| 1375 |
# created. |
| 1376 |
"A String", |
| 1377 |
], |
| 1378 |
}, |
| 1379 |
}, |
| 1380 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 1381 |
# If this field is specified, config must also be specified. |
| 1382 |
# Available preconfigured expressions along with their requirements are: |
| 1383 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 1384 |
# config. |
| 1385 |
}, |
| 1386 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 1387 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 1388 |
# 'action' is enforced. |
| 1389 |
# |
| 1390 |
# The match criteria for a rule consists of built-in match fields (like |
| 1391 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 1392 |
# ('userDefinedFields'). |
| 1393 |
# |
| 1394 |
# Field values may be extracted directly from the packet or derived from it |
| 1395 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 1396 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 1397 |
# header is found in the packet and the entire field is in bounds. |
| 1398 |
# |
| 1399 |
# Each match field may specify which values can match it, listing one or |
| 1400 |
# more ranges, prefixes, or exact values that are considered a match for |
| 1401 |
# the field. A field value must be present in order to match a specified |
| 1402 |
# match field. If no match values are specified for a match field, then any |
| 1403 |
# field value is considered to match it, and it's not required to be |
| 1404 |
# present. For strings specifying '*' is also equivalent to match all. |
| 1405 |
# |
| 1406 |
# For a packet to match a rule, all specified match fields must match the |
| 1407 |
# corresponding field values derived from the packet. |
| 1408 |
# |
| 1409 |
# Example: |
| 1410 |
# |
| 1411 |
# networkMatch: |
| 1412 |
# srcIpRanges: |
| 1413 |
# - "192.0.2.0/24" |
| 1414 |
# - "198.51.100.0/24" |
| 1415 |
# userDefinedFields: |
| 1416 |
# - name: "ipv4_fragment_offset" |
| 1417 |
# values: |
| 1418 |
# - "1-0x1fff" |
| 1419 |
# |
| 1420 |
# The above match condition matches packets with a source IP in |
| 1421 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 1422 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 1423 |
# against. |
| 1424 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 1425 |
# format. |
| 1426 |
"A String", |
| 1427 |
], |
| 1428 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 1429 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 1430 |
"A String", |
| 1431 |
], |
| 1432 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 1433 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 1434 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 1435 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 1436 |
"A String", |
| 1437 |
], |
| 1438 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 1439 |
42, |
| 1440 |
], |
| 1441 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 1442 |
"A String", |
| 1443 |
], |
| 1444 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 1445 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 1446 |
"A String", |
| 1447 |
], |
| 1448 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 1449 |
# IP address. |
| 1450 |
"A String", |
| 1451 |
], |
| 1452 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 1453 |
# matching values for that field. |
| 1454 |
{ |
| 1455 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 1456 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 1457 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 1458 |
# range (e.g. "0x400-0x7ff"). |
| 1459 |
"A String", |
| 1460 |
], |
| 1461 |
}, |
| 1462 |
], |
| 1463 |
}, |
| 1464 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 1465 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 1466 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 1467 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 1468 |
{ |
| 1469 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 1470 |
# preconfigured WAF evaluation. |
| 1471 |
{ |
| 1472 |
"op": "A String", # The match operator for the field. |
| 1473 |
"val": "A String", # The value of the field. |
| 1474 |
}, |
| 1475 |
], |
| 1476 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 1477 |
# inspection during preconfigured WAF evaluation. |
| 1478 |
{ |
| 1479 |
"op": "A String", # The match operator for the field. |
| 1480 |
"val": "A String", # The value of the field. |
| 1481 |
}, |
| 1482 |
], |
| 1483 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 1484 |
# inspection during preconfigured WAF evaluation. |
| 1485 |
{ |
| 1486 |
"op": "A String", # The match operator for the field. |
| 1487 |
"val": "A String", # The value of the field. |
| 1488 |
}, |
| 1489 |
], |
| 1490 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 1491 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 1492 |
# parameter can be in the query string or in the POST body. |
| 1493 |
{ |
| 1494 |
"op": "A String", # The match operator for the field. |
| 1495 |
"val": "A String", # The value of the field. |
| 1496 |
}, |
| 1497 |
], |
| 1498 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 1499 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 1500 |
# field, the query or fragment part should be excluded. |
| 1501 |
{ |
| 1502 |
"op": "A String", # The match operator for the field. |
| 1503 |
"val": "A String", # The value of the field. |
| 1504 |
}, |
| 1505 |
], |
| 1506 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 1507 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 1508 |
# IDs under the WAF rule set. |
| 1509 |
"A String", |
| 1510 |
], |
| 1511 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 1512 |
}, |
| 1513 |
], |
| 1514 |
}, |
| 1515 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 1516 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 1517 |
# must be a positive value between 0 and 2147483647. |
| 1518 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 1519 |
# highest priority and 2147483647 is the lowest priority. |
| 1520 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 1521 |
# "fairshare". Cannot be specified for any other actions. |
| 1522 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 1523 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 1524 |
# the traffic will continue to be banned by the rate limit after the |
| 1525 |
# rate falls below the threshold. |
| 1526 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 1527 |
# "rate_based_ban". If specified, the key will be banned for the |
| 1528 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 1529 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 1530 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 1531 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 1532 |
}, |
| 1533 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 1534 |
# threshold. Valid option is "allow" only. |
| 1535 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 1536 |
# values are: |
| 1537 |
# |
| 1538 |
# - ALL: A single rate limit threshold is applied to all |
| 1539 |
# the requests matching this rule. This is the default value if |
| 1540 |
# "enforceOnKey" is not configured. |
| 1541 |
# - IP: The source IP address of |
| 1542 |
# the request is the key. Each IP has this limit enforced |
| 1543 |
# separately. |
| 1544 |
# - HTTP_HEADER: The value of the HTTP |
| 1545 |
# header whose name is configured under "enforceOnKeyName". The key |
| 1546 |
# value is truncated to the first 128 bytes of the header value. If no |
| 1547 |
# such header is present in the request, the key type defaults toALL. |
| 1548 |
# - XFF_IP: The first IP address (i.e. the |
| 1549 |
# originating client IP address) specified in the list of IPs under |
| 1550 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 1551 |
# is not a valid IP, the key defaults to the source IP address of |
| 1552 |
# the request i.e. key type IP. |
| 1553 |
# - HTTP_COOKIE: The value of the HTTP |
| 1554 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 1555 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 1556 |
# such cookie is present in the request, the key type defaults toALL. |
| 1557 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 1558 |
# value is truncated to the first 128 bytes. |
| 1559 |
# - SNI: Server name indication in the TLS session of the |
| 1560 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 1561 |
# key type defaults to ALL on a HTTP session. |
| 1562 |
# - REGION_CODE: The country/region from which the request |
| 1563 |
# originates. |
| 1564 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 1565 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 1566 |
# key type defaults to ALL. |
| 1567 |
# - USER_IP: The IP address of the originating client, |
| 1568 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 1569 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 1570 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 1571 |
# |
| 1572 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 1573 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 1574 |
# key type defaults to ALL. |
| 1575 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 1576 |
# limit threshold is enforced for all the requests matching the rule. |
| 1577 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 1578 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 1579 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 1580 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 1581 |
# enforce_on_key must not be specified. |
| 1582 |
{ |
| 1583 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 1584 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 1585 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 1586 |
# taken as the key value. |
| 1587 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 1588 |
# values are: |
| 1589 |
# |
| 1590 |
# - ALL: A single rate limit threshold is applied to all |
| 1591 |
# the requests matching this rule. This is the default value if |
| 1592 |
# "enforceOnKeyConfigs" is not configured. |
| 1593 |
# - IP: The source IP address of |
| 1594 |
# the request is the key. Each IP has this limit enforced |
| 1595 |
# separately. |
| 1596 |
# - HTTP_HEADER: The value of the HTTP |
| 1597 |
# header whose name is configured under "enforceOnKeyName". The key |
| 1598 |
# value is truncated to the first 128 bytes of the header value. If no |
| 1599 |
# such header is present in the request, the key type defaults toALL. |
| 1600 |
# - XFF_IP: The first IP address (i.e. the |
| 1601 |
# originating client IP address) specified in the list of IPs under |
| 1602 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 1603 |
# value is not a valid IP, the key defaults to the source IP address of |
| 1604 |
# the request i.e. key type IP. |
| 1605 |
# - HTTP_COOKIE: The value of the HTTP |
| 1606 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 1607 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 1608 |
# such cookie is present in the request, the key type defaults toALL. |
| 1609 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 1610 |
# value is truncated to the first 128 bytes. |
| 1611 |
# - SNI: Server name indication in the TLS session of |
| 1612 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 1613 |
# The key type defaults to ALL on a HTTP session. |
| 1614 |
# - REGION_CODE: The country/region from which the |
| 1615 |
# request originates. |
| 1616 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 1617 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 1618 |
# key type defaults to ALL. |
| 1619 |
# - USER_IP: The IP address of the originating client, |
| 1620 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 1621 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 1622 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 1623 |
# |
| 1624 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 1625 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 1626 |
# key type defaults to ALL. |
| 1627 |
}, |
| 1628 |
], |
| 1629 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 1630 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 1631 |
# value. |
| 1632 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 1633 |
# value. |
| 1634 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 1635 |
# threshold, to either deny with a specified HTTP response code, or |
| 1636 |
# redirect to a different endpoint. |
| 1637 |
# Valid options are `deny(STATUS)`, where valid values for |
| 1638 |
# `STATUS` are 403, 404, 429, and 502, and |
| 1639 |
# `redirect`, where the redirect parameters come from |
| 1640 |
# `exceedRedirectOptions` below. |
| 1641 |
# The `redirect` action is only supported in Global Security Policies of |
| 1642 |
# type CLOUD_ARMOR. |
| 1643 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 1644 |
# above the configured rate limit threshold |
| 1645 |
"code": 42, # The status code, which should be an enum value of |
| 1646 |
# google.rpc.Code. |
| 1647 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 1648 |
}, |
| 1649 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 1650 |
# action. Cannot be specified if the exceed action is not redirect. |
| 1651 |
# This field is only supported in Global Security Policies of type |
| 1652 |
# CLOUD_ARMOR. |
| 1653 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 1654 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 1655 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 1656 |
# |
| 1657 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 1658 |
# challenge assessment. |
| 1659 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 1660 |
# response. |
| 1661 |
}, |
| 1662 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 1663 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 1664 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 1665 |
}, |
| 1666 |
}, |
| 1667 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 1668 |
# other actions. |
| 1669 |
# This field is only supported in Global Security Policies of type |
| 1670 |
# CLOUD_ARMOR. |
| 1671 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 1672 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 1673 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 1674 |
# |
| 1675 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 1676 |
# challenge assessment. |
| 1677 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 1678 |
# response. |
| 1679 |
}, |
| 1680 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 1681 |
# other actions. |
| 1682 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 1683 |
# rule. |
| 1684 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 1685 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 1686 |
# policy. This can only be set during rule creation, if rule number is not |
| 1687 |
# specified it will be generated by the server. |
| 1688 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 1689 |
# policy rule. |
| 1690 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 1691 |
# allows you to control which network's VMs get this rule. If this field |
| 1692 |
# is left blank, all VMs within the organization will receive the rule. |
| 1693 |
# |
| 1694 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 1695 |
"A String", |
| 1696 |
], |
| 1697 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 1698 |
# applied with this rule. |
| 1699 |
"A String", |
| 1700 |
], |
| 1701 |
}, |
| 1702 |
], |
| 1703 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 1704 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 1705 |
"shortName": "A String", # User-provided name of the organization security policy. The name should be |
| 1706 |
# unique in the organization in which the security policy is created. This |
| 1707 |
# should only be used when SecurityPolicyType is CLOUD_ARMOR. |
| 1708 |
# The name must be 1-63 characters long, and comply with |
| 1709 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 1710 |
# characters long and match the regular expression |
| 1711 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 1712 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 1713 |
# letter, or digit, except the last character, which cannot be a dash. |
| 1714 |
"type": "A String", # The type indicates the intended use of the security policy. |
| 1715 |
# |
| 1716 |
# - CLOUD_ARMOR: Cloud Armor backend security policies can |
| 1717 |
# be configured to filter incoming HTTP requests targeting backend services. |
| 1718 |
# They filter requests before they hit the origin servers. |
| 1719 |
# - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can |
| 1720 |
# be configured to filter incoming HTTP requests targeting backend services |
| 1721 |
# (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). |
| 1722 |
# They filter requests before the request is served from Google's cache. |
| 1723 |
# - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor |
| 1724 |
# internal service policies can be configured to filter HTTP requests |
| 1725 |
# targeting services managed by Traffic Director in a service mesh. They |
| 1726 |
# filter requests before the request is served from the application. |
| 1727 |
# |
| 1728 |
# - CLOUD_ARMOR_NETWORK: Cloud Armor network policies |
| 1729 |
# can be configured to filter packets targeting network load balancing |
| 1730 |
# resources such as backend services, target pools, target instances, and |
| 1731 |
# instances with external IPs. They filter requests before the request is |
| 1732 |
# served from the application. |
| 1733 |
# |
| 1734 |
# |
| 1735 |
# This field can be set only at resource creation time. |
| 1736 |
"userDefinedFields": [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A |
| 1737 |
# user-defined field consists of up to 4 bytes extracted from a fixed offset |
| 1738 |
# in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an |
| 1739 |
# optional mask to select certain bits. Rules may then specify matching |
| 1740 |
# values for these fields. |
| 1741 |
# |
| 1742 |
# Example: |
| 1743 |
# |
| 1744 |
# userDefinedFields: |
| 1745 |
# - name: "ipv4_fragment_offset" |
| 1746 |
# base: IPV4 |
| 1747 |
# offset: 6 |
| 1748 |
# size: 2 |
| 1749 |
# mask: "0x1fff" |
| 1750 |
{ |
| 1751 |
"base": "A String", # The base relative to which 'offset' is measured. Possible values are: |
| 1752 |
# |
| 1753 |
# - IPV4: Points to the beginning of the IPv4 header. |
| 1754 |
# - IPV6: Points to the beginning of the IPv6 header. |
| 1755 |
# - TCP: Points to the beginning of the TCP header, skipping |
| 1756 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 1757 |
# non-first fragments. |
| 1758 |
# - UDP: Points to the beginning of the UDP header, skipping |
| 1759 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 1760 |
# non-first fragments. |
| 1761 |
# |
| 1762 |
# |
| 1763 |
# required |
| 1764 |
"mask": "A String", # If specified, apply this mask (bitwise AND) to the field to ignore bits |
| 1765 |
# before matching. Encoded as a hexadecimal number (starting with "0x"). |
| 1766 |
# The last byte of the field (in network byte order) corresponds to the |
| 1767 |
# least significant byte of the mask. |
| 1768 |
"name": "A String", # The name of this field. Must be unique within the policy. |
| 1769 |
"offset": 42, # Offset of the first byte of the field (in network byte order) relative to |
| 1770 |
# 'base'. |
| 1771 |
"size": 42, # Size of the field in bytes. Valid values: 1-4. |
| 1772 |
}, |
| 1773 |
], |
| 1774 |
}, |
| 1775 |
], |
| 1776 |
"warning": { # Informational warning which replaces the list of |
| 1777 |
# security policies when the list is empty. |
| 1778 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 1779 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 1780 |
# are no results in the response. |
| 1781 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 1782 |
# value format. For example: |
| 1783 |
# |
| 1784 |
# "data": [ |
| 1785 |
# { |
| 1786 |
# "key": "scope", |
| 1787 |
# "value": "zones/us-east1-d" |
| 1788 |
# } |
| 1789 |
{ |
| 1790 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 1791 |
# returned. For example, for warnings where there are no results in a list |
| 1792 |
# request for a particular zone, this key might be scope and |
| 1793 |
# the key value might be the zone name. Other examples might be a key |
| 1794 |
# indicating a deprecated resource and a suggested replacement, or a |
| 1795 |
# warning about invalid network settings (for example, if an instance |
| 1796 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 1797 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 1798 |
}, |
| 1799 |
], |
| 1800 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 1801 |
}, |
| 1802 |
}, |
| 1803 |
}, |
| 1804 |
"kind": "compute#securityPoliciesAggregatedList", # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyAggregatedList for lists of Security |
| 1805 |
# Policies. |
| 1806 |
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for |
| 1807 |
# list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for |
| 1808 |
# the query parameter pageToken in the next list request. |
| 1809 |
# Subsequent list requests will have their own nextPageToken to |
| 1810 |
# continue paging through the results. |
| 1811 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for this resource. |
| 1812 |
"unreachables": [ # Output only. [Output Only] Unreachable resources. |
| 1813 |
"A String", |
| 1814 |
], |
| 1815 |
"warning": { # [Output Only] Informational warning message. |
| 1816 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 1817 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 1818 |
# are no results in the response. |
| 1819 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 1820 |
# value format. For example: |
| 1821 |
# |
| 1822 |
# "data": [ |
| 1823 |
# { |
| 1824 |
# "key": "scope", |
| 1825 |
# "value": "zones/us-east1-d" |
| 1826 |
# } |
| 1827 |
{ |
| 1828 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 1829 |
# returned. For example, for warnings where there are no results in a list |
| 1830 |
# request for a particular zone, this key might be scope and |
| 1831 |
# the key value might be the zone name. Other examples might be a key |
| 1832 |
# indicating a deprecated resource and a suggested replacement, or a |
| 1833 |
# warning about invalid network settings (for example, if an instance |
| 1834 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 1835 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 1836 |
}, |
| 1837 |
], |
| 1838 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 1839 |
}, |
| 1840 |
}</pre> |
| 1841 |
</div> |
| 1842 |
|
| 1843 |
<div class="method"> |
| 1844 |
<code class="details" id="aggregatedList_next">aggregatedList_next()</code> |
| 1845 |
<pre>Retrieves the next page of results. |
| 1846 |
|
| 1847 |
Args: |
| 1848 |
previous_request: The request for the previous page. (required) |
| 1849 |
previous_response: The response from the request for the previous page. (required) |
| 1850 |
|
| 1851 |
Returns: |
| 1852 |
A request object that you can call 'execute()' on to request the next |
| 1853 |
page. Returns None if there are no more items in the collection. |
| 1854 |
</pre> |
| 1855 |
</div> |
| 1856 |
|
| 1857 |
<div class="method"> |
| 1858 |
<code class="details" id="close">close()</code> |
| 1859 |
<pre>Close httplib2 connections.</pre> |
| 1860 |
</div> |
| 1861 |
|
| 1862 |
<div class="method"> |
| 1863 |
<code class="details" id="delete">delete(project, securityPolicy, requestId=None, x__xgafv=None)</code> |
| 1864 |
<pre>Deletes the specified policy. |
| 1865 |
|
| 1866 |
Args: |
| 1867 |
project: string, Project ID for this request. (required) |
| 1868 |
securityPolicy: string, Name of the security policy to delete. (required) |
| 1869 |
requestId: string, An optional request ID to identify requests. Specify a unique request ID so |
| 1870 |
that if you must retry your request, the server will know to ignore the |
| 1871 |
request if it has already been completed. |
| 1872 |
|
| 1873 |
For example, consider a situation where you make an initial request and |
| 1874 |
the request times out. If you make the request again with the same |
| 1875 |
request ID, the server can check if original operation with the same |
| 1876 |
request ID was received, and if so, will ignore the second request. This |
| 1877 |
prevents clients from accidentally creating duplicate commitments. |
| 1878 |
|
| 1879 |
The request ID must be |
| 1880 |
a valid UUID with the exception that zero UUID is not supported |
| 1881 |
(00000000-0000-0000-0000-000000000000). |
| 1882 |
x__xgafv: string, V1 error format. |
| 1883 |
Allowed values |
| 1884 |
1 - v1 error format |
| 1885 |
2 - v2 error format |
| 1886 |
|
| 1887 |
Returns: |
| 1888 |
An object of the form: |
| 1889 |
|
| 1890 |
{ # Represents an Operation resource. |
| 1891 |
# |
| 1892 |
# Google Compute Engine has three Operation resources: |
| 1893 |
# |
| 1894 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 1895 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 1896 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 1897 |
# |
| 1898 |
# You can use an operation resource to manage asynchronous API requests. |
| 1899 |
# For more information, readHandling |
| 1900 |
# API responses. |
| 1901 |
# |
| 1902 |
# Operations can be global, regional or zonal. |
| 1903 |
# |
| 1904 |
# - For global operations, use the `globalOperations` |
| 1905 |
# resource. |
| 1906 |
# - For regional operations, use the |
| 1907 |
# `regionOperations` resource. |
| 1908 |
# - For zonal operations, use |
| 1909 |
# the `zoneOperations` resource. |
| 1910 |
# |
| 1911 |
# |
| 1912 |
# |
| 1913 |
# For more information, read |
| 1914 |
# Global, Regional, and Zonal Resources. |
| 1915 |
# |
| 1916 |
# Note that completed Operation resources have a limited |
| 1917 |
# retention period. |
| 1918 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 1919 |
# Not present otherwise. |
| 1920 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 1921 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 1922 |
# set when the operation is created. |
| 1923 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 1924 |
# text format. |
| 1925 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 1926 |
# this field will be populated. |
| 1927 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 1928 |
# operation. |
| 1929 |
{ |
| 1930 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 1931 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 1932 |
# details. There is a set of defined message types to use for providing |
| 1933 |
# details.The syntax depends on the error code. For example, |
| 1934 |
# QuotaExceededInfo will have details when the error code is |
| 1935 |
# QUOTA_EXCEEDED. |
| 1936 |
{ |
| 1937 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 1938 |
# |
| 1939 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 1940 |
# is not enabled: |
| 1941 |
# |
| 1942 |
# { "reason": "API_DISABLED" |
| 1943 |
# "domain": "googleapis.com" |
| 1944 |
# "metadata": { |
| 1945 |
# "resource": "projects/123", |
| 1946 |
# "service": "pubsub.googleapis.com" |
| 1947 |
# } |
| 1948 |
# } |
| 1949 |
# |
| 1950 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 1951 |
# |
| 1952 |
# Example of an error that is returned when attempting to create a Spanner |
| 1953 |
# instance in a region that is out of stock: |
| 1954 |
# |
| 1955 |
# { "reason": "STOCKOUT" |
| 1956 |
# "domain": "spanner.googleapis.com", |
| 1957 |
# "metadata": { |
| 1958 |
# "availableRegions": "us-central1,us-east2" |
| 1959 |
# } |
| 1960 |
# } |
| 1961 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 1962 |
# is typically the registered service name of the tool or product that |
| 1963 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 1964 |
# generated by some common infrastructure, the error domain must be a |
| 1965 |
# globally unique value that identifies the infrastructure. For Google API |
| 1966 |
# infrastructure, the error domain is "googleapis.com". |
| 1967 |
"metadatas": { # Additional structured details about this error. |
| 1968 |
# |
| 1969 |
# Keys must match a regular expression of `a-z+` but should |
| 1970 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 1971 |
# length. When identifying the current value of an exceeded limit, the units |
| 1972 |
# should be contained in the key, not the value. For example, rather than |
| 1973 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 1974 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 1975 |
# instances that can be created in a single (batch) request. |
| 1976 |
"a_key": "A String", |
| 1977 |
}, |
| 1978 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 1979 |
# proximate cause of the error. Error reasons are unique within a particular |
| 1980 |
# domain of errors. This should be at most 63 characters and match a |
| 1981 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 1982 |
# UPPER_SNAKE_CASE. |
| 1983 |
}, |
| 1984 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 1985 |
# |
| 1986 |
# For example, if a quota check failed with an error indicating the calling |
| 1987 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 1988 |
# directly to the right place in the developer console to flip the bit. |
| 1989 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 1990 |
{ # Describes a URL link. |
| 1991 |
"description": "A String", # Describes what the link offers. |
| 1992 |
"url": "A String", # The URL of the link. |
| 1993 |
}, |
| 1994 |
], |
| 1995 |
}, |
| 1996 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 1997 |
# which can be attached to an RPC error. |
| 1998 |
"locale": "A String", # The locale used following the specification defined at |
| 1999 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 2000 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 2001 |
"message": "A String", # The localized error message in the above locale. |
| 2002 |
}, |
| 2003 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 2004 |
"dimensions": { # The map holding related quota dimensions. |
| 2005 |
"a_key": "A String", |
| 2006 |
}, |
| 2007 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 2008 |
# type or metric. |
| 2009 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 2010 |
# or metric. |
| 2011 |
"limitName": "A String", # The name of the quota limit. |
| 2012 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 2013 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 2014 |
}, |
| 2015 |
}, |
| 2016 |
], |
| 2017 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 2018 |
# This property is optional. |
| 2019 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 2020 |
}, |
| 2021 |
], |
| 2022 |
}, |
| 2023 |
"getVersionOperationMetadata": { |
| 2024 |
"inlineSbomInfo": { |
| 2025 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 2026 |
# appropriate identifiers. |
| 2027 |
"a_key": "A String", |
| 2028 |
}, |
| 2029 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 2030 |
# identifiers. |
| 2031 |
"a_key": "A String", |
| 2032 |
}, |
| 2033 |
}, |
| 2034 |
}, |
| 2035 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 2036 |
# message that was returned, such as `NOT FOUND`. |
| 2037 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 2038 |
# status code that was returned. For example, a `404` means the |
| 2039 |
# resource was not found. |
| 2040 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 2041 |
# defined by the server. |
| 2042 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 2043 |
# This value is inRFC3339 |
| 2044 |
# text format. |
| 2045 |
"instancesBulkInsertOperationMetadata": { |
| 2046 |
"perLocationStatus": { # Status information per location (location name is key). |
| 2047 |
# Example key: zones/us-central1-a |
| 2048 |
"a_key": { |
| 2049 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 2050 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 2051 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 2052 |
# error. |
| 2053 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 2054 |
# if the flow is rolling forward or rolling back. |
| 2055 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 2056 |
}, |
| 2057 |
}, |
| 2058 |
}, |
| 2059 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 2060 |
# Operation resources. |
| 2061 |
"name": "A String", # [Output Only] Name of the operation. |
| 2062 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 2063 |
# group of operations results from a `bulkInsert` API request. |
| 2064 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 2065 |
# `update`, or `delete`, and so on. |
| 2066 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 2067 |
# There is no requirement that this be linear or support any granularity of |
| 2068 |
# operations. This should not be used to guess when the operation will be |
| 2069 |
# complete. This number should monotonically increase as the operation |
| 2070 |
# progresses. |
| 2071 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 2072 |
# applicable when performing regional operations. |
| 2073 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 2074 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 2075 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 2076 |
# this field will contain information on all underlying zonal actions and |
| 2077 |
# their state. |
| 2078 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 2079 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 2080 |
# Example key: zones/us-central1-a |
| 2081 |
"a_key": { |
| 2082 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 2083 |
# populated. |
| 2084 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 2085 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 2086 |
# three pieces of data: error code, error message, and error details. |
| 2087 |
# |
| 2088 |
# You can find out more about this error model and how to work with it in the |
| 2089 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 2090 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 2091 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 2092 |
# message types for APIs to use. |
| 2093 |
{ |
| 2094 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2095 |
}, |
| 2096 |
], |
| 2097 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 2098 |
# user-facing error message should be localized and sent in the |
| 2099 |
# google.rpc.Status.details field, or localized by the client. |
| 2100 |
}, |
| 2101 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 2102 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 2103 |
}, |
| 2104 |
}, |
| 2105 |
}, |
| 2106 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 2107 |
# This value is inRFC3339 |
| 2108 |
# text format. |
| 2109 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 2110 |
# following: |
| 2111 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 2112 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 2113 |
# operation. |
| 2114 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 2115 |
# of the target resource. |
| 2116 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 2117 |
# operations related to creating a snapshot, this points to the disk |
| 2118 |
# that the snapshot was created from. |
| 2119 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 2120 |
# `[email protected]` or |
| 2121 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 2122 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 2123 |
# operation, this field will be populated. |
| 2124 |
{ |
| 2125 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 2126 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 2127 |
# are no results in the response. |
| 2128 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 2129 |
# value format. For example: |
| 2130 |
# |
| 2131 |
# "data": [ |
| 2132 |
# { |
| 2133 |
# "key": "scope", |
| 2134 |
# "value": "zones/us-east1-d" |
| 2135 |
# } |
| 2136 |
{ |
| 2137 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 2138 |
# returned. For example, for warnings where there are no results in a list |
| 2139 |
# request for a particular zone, this key might be scope and |
| 2140 |
# the key value might be the zone name. Other examples might be a key |
| 2141 |
# indicating a deprecated resource and a suggested replacement, or a |
| 2142 |
# warning about invalid network settings (for example, if an instance |
| 2143 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 2144 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 2145 |
}, |
| 2146 |
], |
| 2147 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 2148 |
}, |
| 2149 |
], |
| 2150 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 2151 |
# applicable when performing per-zone operations. |
| 2152 |
}</pre> |
| 2153 |
</div> |
| 2154 |
|
| 2155 |
<div class="method"> |
| 2156 |
<code class="details" id="get">get(project, securityPolicy, x__xgafv=None)</code> |
| 2157 |
<pre>List all of the ordered rules present in a single specified policy. |
| 2158 |
|
| 2159 |
Args: |
| 2160 |
project: string, Project ID for this request. (required) |
| 2161 |
securityPolicy: string, Name of the security policy to get. (required) |
| 2162 |
x__xgafv: string, V1 error format. |
| 2163 |
Allowed values |
| 2164 |
1 - v1 error format |
| 2165 |
2 - v2 error format |
| 2166 |
|
| 2167 |
Returns: |
| 2168 |
An object of the form: |
| 2169 |
|
| 2170 |
{ # Represents a Google Cloud Armor security policy resource. |
| 2171 |
# |
| 2172 |
# Only external backend services that use load balancers can |
| 2173 |
# reference a security policy. For more information, see |
| 2174 |
# Google Cloud Armor security policy overview. |
| 2175 |
"adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). |
| 2176 |
"autoDeployConfig": { # Configuration options for Adaptive Protection auto-deploy feature. |
| 2177 |
"confidenceThreshold": 3.14, |
| 2178 |
"expirationSec": 42, |
| 2179 |
"impactedBaselineThreshold": 3.14, |
| 2180 |
"loadThreshold": 3.14, |
| 2181 |
}, |
| 2182 |
"layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. |
| 2183 |
# This field is only supported in Global Security Policies of type |
| 2184 |
# CLOUD_ARMOR. |
| 2185 |
"enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. |
| 2186 |
# This field is only supported in Global Security Policies of type |
| 2187 |
# CLOUD_ARMOR. |
| 2188 |
"ruleVisibility": "A String", # Rule visibility can be one of the following: |
| 2189 |
# STANDARD - opaque rules. (default) |
| 2190 |
# PREMIUM - transparent rules. |
| 2191 |
# This field is only supported in Global Security Policies of type |
| 2192 |
# CLOUD_ARMOR. |
| 2193 |
"thresholdConfigs": [ # Configuration options for layer7 adaptive protection for various |
| 2194 |
# customizable thresholds. |
| 2195 |
{ |
| 2196 |
"autoDeployConfidenceThreshold": 3.14, |
| 2197 |
"autoDeployExpirationSec": 42, |
| 2198 |
"autoDeployImpactedBaselineThreshold": 3.14, |
| 2199 |
"autoDeployLoadThreshold": 3.14, |
| 2200 |
"detectionAbsoluteQps": 3.14, |
| 2201 |
"detectionLoadThreshold": 3.14, |
| 2202 |
"detectionRelativeToBaselineQps": 3.14, |
| 2203 |
"name": "A String", # The name must be 1-63 characters long, and comply withRFC1035. |
| 2204 |
# The name must be unique within the security policy. |
| 2205 |
"trafficGranularityConfigs": [ # Configuration options for enabling Adaptive Protection to operate |
| 2206 |
# on specified granular traffic units. |
| 2207 |
{ # Configurations to specifc granular traffic units processed by |
| 2208 |
# Adaptive Protection. |
| 2209 |
"enableEachUniqueValue": True or False, # If enabled, traffic matching each unique value for the specified |
| 2210 |
# type constitutes a separate traffic unit. |
| 2211 |
# It can only be set to true if `value` is empty. |
| 2212 |
"type": "A String", # Type of this configuration. |
| 2213 |
"value": "A String", # Requests that match this value constitute a granular traffic unit. |
| 2214 |
}, |
| 2215 |
], |
| 2216 |
}, |
| 2217 |
], |
| 2218 |
}, |
| 2219 |
}, |
| 2220 |
"advancedOptionsConfig": { |
| 2221 |
"jsonCustomConfig": { # Custom configuration to apply the JSON parsing. Only applicable when |
| 2222 |
# json_parsing is set to STANDARD. |
| 2223 |
"contentTypes": [ # A list of custom Content-Type header values to apply the JSON parsing. |
| 2224 |
# |
| 2225 |
# As per RFC 1341, a Content-Type header value has the following format: |
| 2226 |
# |
| 2227 |
# Content-Type := type "/" subtype *[";" parameter] |
| 2228 |
# |
| 2229 |
# When configuring a custom Content-Type header value, only the |
| 2230 |
# type/subtype needs to be specified, and the parameters should be |
| 2231 |
# excluded. |
| 2232 |
"A String", |
| 2233 |
], |
| 2234 |
}, |
| 2235 |
"jsonParsing": "A String", |
| 2236 |
"logLevel": "A String", |
| 2237 |
"requestBodyInspectionSize": "A String", # The maximum request size chosen by the customer with Waf enabled. |
| 2238 |
# Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". |
| 2239 |
# Values are case insensitive. |
| 2240 |
"userIpRequestHeaders": [ # An optional list of case-insensitive request header names to use for |
| 2241 |
# resolving the callers client IP address. |
| 2242 |
"A String", |
| 2243 |
], |
| 2244 |
}, |
| 2245 |
"associations": [ # A list of associations that belong to this policy. |
| 2246 |
{ |
| 2247 |
"attachmentId": "A String", # The resource that the security policy is attached to. |
| 2248 |
"displayName": "A String", # Output only. [Output Only] The display name of the security policy of the association. |
| 2249 |
"excludedFolders": [ # A list of folders to exclude from the security policy. |
| 2250 |
"A String", |
| 2251 |
], |
| 2252 |
"excludedProjects": [ # A list of projects to exclude from the security policy. |
| 2253 |
"A String", |
| 2254 |
], |
| 2255 |
"name": "A String", # The name for an association. |
| 2256 |
"securityPolicyId": "A String", # Output only. [Output Only] The security policy ID of the association. |
| 2257 |
"shortName": "A String", # Output only. [Output Only] The short name of the security policy of the association. |
| 2258 |
}, |
| 2259 |
], |
| 2260 |
"cloudArmorConfig": { # Configuration options for Cloud Armor. |
| 2261 |
"enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. |
| 2262 |
}, |
| 2263 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 2264 |
# text format. |
| 2265 |
"ddosProtectionConfig": { |
| 2266 |
"ddosAdaptiveProtection": "A String", |
| 2267 |
"ddosImpactedBaselineThreshold": 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs) |
| 2268 |
# builds DDoS mitigations that minimize collateral damage. It quantifies |
| 2269 |
# this as the fraction of a non-abuse baseline that's inadvertently |
| 2270 |
# blocked. |
| 2271 |
# |
| 2272 |
# Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will |
| 2273 |
# not be deployed. Using a lower value will prioritize keeping collateral |
| 2274 |
# damage low, possibly at the cost of its effectiveness in rate limiting |
| 2275 |
# some or all of the attack. It should typically be unset, so Advanced DDoS |
| 2276 |
# (and Adaptive Protection) uses the best mitigation it can find. Setting |
| 2277 |
# the threshold is advised if there are logs for false positive detections |
| 2278 |
# with high collateral damage, and will cause Advanced DDoS to attempt to |
| 2279 |
# find a less aggressive rule that satisfies the constraint. If a suitable |
| 2280 |
# rule cannot be found, the system falls back to either no mitigation for |
| 2281 |
# smaller attacks or broader network throttles for larger ones. |
| 2282 |
"ddosProtection": "A String", |
| 2283 |
}, |
| 2284 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 2285 |
# create the resource. |
| 2286 |
"displayName": "A String", # User-provided name of the organization security policy. The name should be |
| 2287 |
# unique in the organization in which the security policy is created. This |
| 2288 |
# should only be used when SecurityPolicyType is FIREWALL. |
| 2289 |
# The name must be 1-63 characters long, and comply with |
| 2290 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 2291 |
# characters long and match the regular expression |
| 2292 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 2293 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 2294 |
# letter, or digit, except the last character, which cannot be a dash. |
| 2295 |
"fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of |
| 2296 |
# the metadata's contents and used for optimistic locking. The |
| 2297 |
# fingerprint is initially generated by Compute Engine and changes after |
| 2298 |
# every request to modify or update metadata. You must always provide an |
| 2299 |
# up-to-date fingerprint hash in order to update or change metadata, |
| 2300 |
# otherwise the request will fail with error412 conditionNotMet. |
| 2301 |
# |
| 2302 |
# To see the latest fingerprint, make get() request to the |
| 2303 |
# security policy. |
| 2304 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 2305 |
# defined by the server. |
| 2306 |
"kind": "compute#securityPolicy", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies |
| 2307 |
"labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which |
| 2308 |
# is essentially a hash of the labels set used for optimistic locking. The |
| 2309 |
# fingerprint is initially generated by Compute Engine and changes after |
| 2310 |
# every request to modify or update labels. You must always provide an |
| 2311 |
# up-to-date fingerprint hash in order to update or change labels. |
| 2312 |
# |
| 2313 |
# To see the latest fingerprint, make get() request to the |
| 2314 |
# security policy. |
| 2315 |
"labels": { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. |
| 2316 |
# Label values may be empty. |
| 2317 |
"a_key": "A String", |
| 2318 |
}, |
| 2319 |
"name": "A String", # Name of the resource. Provided by the client when the resource is created. |
| 2320 |
# The name must be 1-63 characters long, and comply withRFC1035. |
| 2321 |
# Specifically, the name must be 1-63 characters long and match the regular |
| 2322 |
# expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 2323 |
# character must be a lowercase letter, and all following characters must |
| 2324 |
# be a dash, lowercase letter, or digit, except the last character, which |
| 2325 |
# cannot be a dash. |
| 2326 |
"parent": "A String", # Output only. [Output Only] The parent of the security policy. |
| 2327 |
"recaptchaOptionsConfig": { |
| 2328 |
"redirectSiteKey": "A String", # An optional field to supply a reCAPTCHA site key to be used for all the |
| 2329 |
# rules using the redirect action with the type of GOOGLE_RECAPTCHA under |
| 2330 |
# the security policy. The specified site key needs to be created from the |
| 2331 |
# reCAPTCHA API. The user is responsible for the validity of the specified |
| 2332 |
# site key. If not specified, a Google-managed site key is used. |
| 2333 |
# This field is only supported in Global Security Policies of type |
| 2334 |
# CLOUD_ARMOR. |
| 2335 |
}, |
| 2336 |
"region": "A String", # Output only. [Output Only] URL of the region where the regional security policy |
| 2337 |
# resides. This field is not applicable to global security policies. |
| 2338 |
"ruleTupleCount": 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security |
| 2339 |
# policy can not exceed a set number of tuples. |
| 2340 |
"rules": [ # A list of rules that belong to this policy. |
| 2341 |
# There must always be a default rule which is a rule with priority |
| 2342 |
# 2147483647 and match all condition (for the match condition this means |
| 2343 |
# match "*" for srcIpRanges and for the networkMatch condition every field |
| 2344 |
# must be either match "*" or not set). If no rules are provided when |
| 2345 |
# creating a security policy, a default rule with action "allow" will be |
| 2346 |
# added. |
| 2347 |
{ # Represents a rule that describes one or more match conditions along with |
| 2348 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 2349 |
"action": "A String", # The Action to perform when the rule is matched. |
| 2350 |
# The following are the valid actions: |
| 2351 |
# |
| 2352 |
# - allow: allow access to target. |
| 2353 |
# - deny(STATUS): deny access to target, returns the |
| 2354 |
# HTTP response code specified. Valid values for `STATUS` |
| 2355 |
# are 403, 404, and 502. |
| 2356 |
# - rate_based_ban: limit client traffic to the configured |
| 2357 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 2358 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 2359 |
# rate_limit_options to be set. |
| 2360 |
# - redirect: redirect to a different target. This can |
| 2361 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 2362 |
# redirect via a 302 response. Parameters for this action can be configured |
| 2363 |
# via redirectOptions. This action is only supported in Global Security |
| 2364 |
# Policies of type CLOUD_ARMOR. |
| 2365 |
# - throttle: limit |
| 2366 |
# client traffic to the configured threshold. Configure parameters for this |
| 2367 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 2368 |
# this. |
| 2369 |
# - fairshare (preview only): when traffic reaches the |
| 2370 |
# threshold limit, requests from the clients matching this rule begin to be |
| 2371 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 2372 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 2373 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 2374 |
# create the resource. |
| 2375 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 2376 |
# specified when versioned_expr is set to FIREWALL. |
| 2377 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 2378 |
# enabled, logs will be exported to the configured export destination in |
| 2379 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 2380 |
# cannot enable logging on "goto_next" rules. |
| 2381 |
# |
| 2382 |
# This field may only be specified when the versioned_expr is set to |
| 2383 |
# FIREWALL. |
| 2384 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 2385 |
# This field is only supported in Global Security Policies of type |
| 2386 |
# CLOUD_ARMOR. |
| 2387 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 2388 |
# present. |
| 2389 |
{ |
| 2390 |
"headerName": "A String", # The name of the header to set. |
| 2391 |
"headerValue": "A String", # The value to set the named header to. |
| 2392 |
}, |
| 2393 |
], |
| 2394 |
}, |
| 2395 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 2396 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 2397 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 2398 |
# Exactly one field must be specified. |
| 2399 |
"config": { # The configuration options available when specifying versioned_expr. |
| 2400 |
# This field must be specified if versioned_expr is specified and cannot |
| 2401 |
# be specified if versioned_expr is not specified. |
| 2402 |
"destIpRanges": [ # CIDR IP address range. |
| 2403 |
# |
| 2404 |
# This field may only be specified when versioned_expr is set to |
| 2405 |
# FIREWALL. |
| 2406 |
"A String", |
| 2407 |
], |
| 2408 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 2409 |
# |
| 2410 |
# This field may only be specified when versioned_expr is set to |
| 2411 |
# FIREWALL. |
| 2412 |
{ |
| 2413 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 2414 |
# required when creating a firewall rule. This value can either be |
| 2415 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 2416 |
# protocol number. |
| 2417 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 2418 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 2419 |
# an integer or a range. If not specified, this rule applies to |
| 2420 |
# connections through any port. |
| 2421 |
# |
| 2422 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 2423 |
# |
| 2424 |
# This field may only be specified when versioned_expr is set to |
| 2425 |
# FIREWALL. |
| 2426 |
"A String", |
| 2427 |
], |
| 2428 |
}, |
| 2429 |
], |
| 2430 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 2431 |
# |
| 2432 |
# This field may only be specified when versioned_expr is set to |
| 2433 |
# FIREWALL. |
| 2434 |
{ |
| 2435 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 2436 |
# required when creating a firewall rule. This value can either be |
| 2437 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 2438 |
# protocol number. |
| 2439 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 2440 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 2441 |
# an integer or a range. If not specified, this rule applies to |
| 2442 |
# connections through any port. |
| 2443 |
# |
| 2444 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 2445 |
# |
| 2446 |
# This field may only be specified when versioned_expr is set to |
| 2447 |
# FIREWALL. |
| 2448 |
"A String", |
| 2449 |
], |
| 2450 |
}, |
| 2451 |
], |
| 2452 |
"srcIpRanges": [ # CIDR IP address range. |
| 2453 |
# Maximum number of src_ip_ranges allowed is 10. |
| 2454 |
"A String", |
| 2455 |
], |
| 2456 |
}, |
| 2457 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 2458 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 2459 |
# source.region_code and contents in the request header. |
| 2460 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 2461 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 2462 |
# nor in Regional Policies. Expressions containing |
| 2463 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 2464 |
# Enterprise subscription and are only supported in Global Security |
| 2465 |
# Policies. |
| 2466 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 2467 |
# are documented at https://github.com/google/cel-spec. |
| 2468 |
# |
| 2469 |
# Example (Comparison): |
| 2470 |
# |
| 2471 |
# title: "Summary size limit" |
| 2472 |
# description: "Determines if a summary is less than 100 chars" |
| 2473 |
# expression: "document.summary.size() < 100" |
| 2474 |
# |
| 2475 |
# Example (Equality): |
| 2476 |
# |
| 2477 |
# title: "Requestor is owner" |
| 2478 |
# description: "Determines if requestor is the document owner" |
| 2479 |
# expression: "document.owner == request.auth.claims.email" |
| 2480 |
# |
| 2481 |
# Example (Logic): |
| 2482 |
# |
| 2483 |
# title: "Public documents" |
| 2484 |
# description: "Determine whether the document should be publicly visible" |
| 2485 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 2486 |
# |
| 2487 |
# Example (Data Manipulation): |
| 2488 |
# |
| 2489 |
# title: "Notification string" |
| 2490 |
# description: "Create a notification string with a timestamp." |
| 2491 |
# expression: "'New message received at ' + string(document.create_time)" |
| 2492 |
# |
| 2493 |
# The exact variables and functions that may be referenced within an expression |
| 2494 |
# are determined by the service that evaluates it. See the service |
| 2495 |
# documentation for additional information. |
| 2496 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 2497 |
# describes the expression, e.g. when hovered over it in a UI. |
| 2498 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 2499 |
# syntax. |
| 2500 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 2501 |
# reporting, e.g. a file name and a position in the file. |
| 2502 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 2503 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 2504 |
# expression. |
| 2505 |
}, |
| 2506 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 2507 |
# CEVAL expression (i.e., 'expr'). |
| 2508 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 2509 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 2510 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 2511 |
# action-tokens. The provided site keys need to be created from |
| 2512 |
# reCAPTCHA API under the same project where the security policy is |
| 2513 |
# created. |
| 2514 |
"A String", |
| 2515 |
], |
| 2516 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 2517 |
# session-tokens. The provided site keys need to be created from |
| 2518 |
# reCAPTCHA API under the same project where the security policy is |
| 2519 |
# created. |
| 2520 |
"A String", |
| 2521 |
], |
| 2522 |
}, |
| 2523 |
}, |
| 2524 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 2525 |
# If this field is specified, config must also be specified. |
| 2526 |
# Available preconfigured expressions along with their requirements are: |
| 2527 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 2528 |
# config. |
| 2529 |
}, |
| 2530 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 2531 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 2532 |
# 'action' is enforced. |
| 2533 |
# |
| 2534 |
# The match criteria for a rule consists of built-in match fields (like |
| 2535 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 2536 |
# ('userDefinedFields'). |
| 2537 |
# |
| 2538 |
# Field values may be extracted directly from the packet or derived from it |
| 2539 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 2540 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 2541 |
# header is found in the packet and the entire field is in bounds. |
| 2542 |
# |
| 2543 |
# Each match field may specify which values can match it, listing one or |
| 2544 |
# more ranges, prefixes, or exact values that are considered a match for |
| 2545 |
# the field. A field value must be present in order to match a specified |
| 2546 |
# match field. If no match values are specified for a match field, then any |
| 2547 |
# field value is considered to match it, and it's not required to be |
| 2548 |
# present. For strings specifying '*' is also equivalent to match all. |
| 2549 |
# |
| 2550 |
# For a packet to match a rule, all specified match fields must match the |
| 2551 |
# corresponding field values derived from the packet. |
| 2552 |
# |
| 2553 |
# Example: |
| 2554 |
# |
| 2555 |
# networkMatch: |
| 2556 |
# srcIpRanges: |
| 2557 |
# - "192.0.2.0/24" |
| 2558 |
# - "198.51.100.0/24" |
| 2559 |
# userDefinedFields: |
| 2560 |
# - name: "ipv4_fragment_offset" |
| 2561 |
# values: |
| 2562 |
# - "1-0x1fff" |
| 2563 |
# |
| 2564 |
# The above match condition matches packets with a source IP in |
| 2565 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 2566 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 2567 |
# against. |
| 2568 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 2569 |
# format. |
| 2570 |
"A String", |
| 2571 |
], |
| 2572 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 2573 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 2574 |
"A String", |
| 2575 |
], |
| 2576 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 2577 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 2578 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 2579 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 2580 |
"A String", |
| 2581 |
], |
| 2582 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 2583 |
42, |
| 2584 |
], |
| 2585 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 2586 |
"A String", |
| 2587 |
], |
| 2588 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 2589 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 2590 |
"A String", |
| 2591 |
], |
| 2592 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 2593 |
# IP address. |
| 2594 |
"A String", |
| 2595 |
], |
| 2596 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 2597 |
# matching values for that field. |
| 2598 |
{ |
| 2599 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 2600 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 2601 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 2602 |
# range (e.g. "0x400-0x7ff"). |
| 2603 |
"A String", |
| 2604 |
], |
| 2605 |
}, |
| 2606 |
], |
| 2607 |
}, |
| 2608 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 2609 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 2610 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 2611 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 2612 |
{ |
| 2613 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 2614 |
# preconfigured WAF evaluation. |
| 2615 |
{ |
| 2616 |
"op": "A String", # The match operator for the field. |
| 2617 |
"val": "A String", # The value of the field. |
| 2618 |
}, |
| 2619 |
], |
| 2620 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 2621 |
# inspection during preconfigured WAF evaluation. |
| 2622 |
{ |
| 2623 |
"op": "A String", # The match operator for the field. |
| 2624 |
"val": "A String", # The value of the field. |
| 2625 |
}, |
| 2626 |
], |
| 2627 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 2628 |
# inspection during preconfigured WAF evaluation. |
| 2629 |
{ |
| 2630 |
"op": "A String", # The match operator for the field. |
| 2631 |
"val": "A String", # The value of the field. |
| 2632 |
}, |
| 2633 |
], |
| 2634 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 2635 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 2636 |
# parameter can be in the query string or in the POST body. |
| 2637 |
{ |
| 2638 |
"op": "A String", # The match operator for the field. |
| 2639 |
"val": "A String", # The value of the field. |
| 2640 |
}, |
| 2641 |
], |
| 2642 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 2643 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 2644 |
# field, the query or fragment part should be excluded. |
| 2645 |
{ |
| 2646 |
"op": "A String", # The match operator for the field. |
| 2647 |
"val": "A String", # The value of the field. |
| 2648 |
}, |
| 2649 |
], |
| 2650 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 2651 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 2652 |
# IDs under the WAF rule set. |
| 2653 |
"A String", |
| 2654 |
], |
| 2655 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 2656 |
}, |
| 2657 |
], |
| 2658 |
}, |
| 2659 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 2660 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 2661 |
# must be a positive value between 0 and 2147483647. |
| 2662 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 2663 |
# highest priority and 2147483647 is the lowest priority. |
| 2664 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 2665 |
# "fairshare". Cannot be specified for any other actions. |
| 2666 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 2667 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 2668 |
# the traffic will continue to be banned by the rate limit after the |
| 2669 |
# rate falls below the threshold. |
| 2670 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 2671 |
# "rate_based_ban". If specified, the key will be banned for the |
| 2672 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 2673 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 2674 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 2675 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 2676 |
}, |
| 2677 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 2678 |
# threshold. Valid option is "allow" only. |
| 2679 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 2680 |
# values are: |
| 2681 |
# |
| 2682 |
# - ALL: A single rate limit threshold is applied to all |
| 2683 |
# the requests matching this rule. This is the default value if |
| 2684 |
# "enforceOnKey" is not configured. |
| 2685 |
# - IP: The source IP address of |
| 2686 |
# the request is the key. Each IP has this limit enforced |
| 2687 |
# separately. |
| 2688 |
# - HTTP_HEADER: The value of the HTTP |
| 2689 |
# header whose name is configured under "enforceOnKeyName". The key |
| 2690 |
# value is truncated to the first 128 bytes of the header value. If no |
| 2691 |
# such header is present in the request, the key type defaults toALL. |
| 2692 |
# - XFF_IP: The first IP address (i.e. the |
| 2693 |
# originating client IP address) specified in the list of IPs under |
| 2694 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 2695 |
# is not a valid IP, the key defaults to the source IP address of |
| 2696 |
# the request i.e. key type IP. |
| 2697 |
# - HTTP_COOKIE: The value of the HTTP |
| 2698 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 2699 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 2700 |
# such cookie is present in the request, the key type defaults toALL. |
| 2701 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 2702 |
# value is truncated to the first 128 bytes. |
| 2703 |
# - SNI: Server name indication in the TLS session of the |
| 2704 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 2705 |
# key type defaults to ALL on a HTTP session. |
| 2706 |
# - REGION_CODE: The country/region from which the request |
| 2707 |
# originates. |
| 2708 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 2709 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 2710 |
# key type defaults to ALL. |
| 2711 |
# - USER_IP: The IP address of the originating client, |
| 2712 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 2713 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 2714 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 2715 |
# |
| 2716 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 2717 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 2718 |
# key type defaults to ALL. |
| 2719 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 2720 |
# limit threshold is enforced for all the requests matching the rule. |
| 2721 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 2722 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 2723 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 2724 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 2725 |
# enforce_on_key must not be specified. |
| 2726 |
{ |
| 2727 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 2728 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 2729 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 2730 |
# taken as the key value. |
| 2731 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 2732 |
# values are: |
| 2733 |
# |
| 2734 |
# - ALL: A single rate limit threshold is applied to all |
| 2735 |
# the requests matching this rule. This is the default value if |
| 2736 |
# "enforceOnKeyConfigs" is not configured. |
| 2737 |
# - IP: The source IP address of |
| 2738 |
# the request is the key. Each IP has this limit enforced |
| 2739 |
# separately. |
| 2740 |
# - HTTP_HEADER: The value of the HTTP |
| 2741 |
# header whose name is configured under "enforceOnKeyName". The key |
| 2742 |
# value is truncated to the first 128 bytes of the header value. If no |
| 2743 |
# such header is present in the request, the key type defaults toALL. |
| 2744 |
# - XFF_IP: The first IP address (i.e. the |
| 2745 |
# originating client IP address) specified in the list of IPs under |
| 2746 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 2747 |
# value is not a valid IP, the key defaults to the source IP address of |
| 2748 |
# the request i.e. key type IP. |
| 2749 |
# - HTTP_COOKIE: The value of the HTTP |
| 2750 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 2751 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 2752 |
# such cookie is present in the request, the key type defaults toALL. |
| 2753 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 2754 |
# value is truncated to the first 128 bytes. |
| 2755 |
# - SNI: Server name indication in the TLS session of |
| 2756 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 2757 |
# The key type defaults to ALL on a HTTP session. |
| 2758 |
# - REGION_CODE: The country/region from which the |
| 2759 |
# request originates. |
| 2760 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 2761 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 2762 |
# key type defaults to ALL. |
| 2763 |
# - USER_IP: The IP address of the originating client, |
| 2764 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 2765 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 2766 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 2767 |
# |
| 2768 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 2769 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 2770 |
# key type defaults to ALL. |
| 2771 |
}, |
| 2772 |
], |
| 2773 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 2774 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 2775 |
# value. |
| 2776 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 2777 |
# value. |
| 2778 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 2779 |
# threshold, to either deny with a specified HTTP response code, or |
| 2780 |
# redirect to a different endpoint. |
| 2781 |
# Valid options are `deny(STATUS)`, where valid values for |
| 2782 |
# `STATUS` are 403, 404, 429, and 502, and |
| 2783 |
# `redirect`, where the redirect parameters come from |
| 2784 |
# `exceedRedirectOptions` below. |
| 2785 |
# The `redirect` action is only supported in Global Security Policies of |
| 2786 |
# type CLOUD_ARMOR. |
| 2787 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 2788 |
# above the configured rate limit threshold |
| 2789 |
"code": 42, # The status code, which should be an enum value of |
| 2790 |
# google.rpc.Code. |
| 2791 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 2792 |
}, |
| 2793 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 2794 |
# action. Cannot be specified if the exceed action is not redirect. |
| 2795 |
# This field is only supported in Global Security Policies of type |
| 2796 |
# CLOUD_ARMOR. |
| 2797 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 2798 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 2799 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 2800 |
# |
| 2801 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 2802 |
# challenge assessment. |
| 2803 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 2804 |
# response. |
| 2805 |
}, |
| 2806 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 2807 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 2808 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 2809 |
}, |
| 2810 |
}, |
| 2811 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 2812 |
# other actions. |
| 2813 |
# This field is only supported in Global Security Policies of type |
| 2814 |
# CLOUD_ARMOR. |
| 2815 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 2816 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 2817 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 2818 |
# |
| 2819 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 2820 |
# challenge assessment. |
| 2821 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 2822 |
# response. |
| 2823 |
}, |
| 2824 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 2825 |
# other actions. |
| 2826 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 2827 |
# rule. |
| 2828 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 2829 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 2830 |
# policy. This can only be set during rule creation, if rule number is not |
| 2831 |
# specified it will be generated by the server. |
| 2832 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 2833 |
# policy rule. |
| 2834 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 2835 |
# allows you to control which network's VMs get this rule. If this field |
| 2836 |
# is left blank, all VMs within the organization will receive the rule. |
| 2837 |
# |
| 2838 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 2839 |
"A String", |
| 2840 |
], |
| 2841 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 2842 |
# applied with this rule. |
| 2843 |
"A String", |
| 2844 |
], |
| 2845 |
}, |
| 2846 |
], |
| 2847 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 2848 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 2849 |
"shortName": "A String", # User-provided name of the organization security policy. The name should be |
| 2850 |
# unique in the organization in which the security policy is created. This |
| 2851 |
# should only be used when SecurityPolicyType is CLOUD_ARMOR. |
| 2852 |
# The name must be 1-63 characters long, and comply with |
| 2853 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 2854 |
# characters long and match the regular expression |
| 2855 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 2856 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 2857 |
# letter, or digit, except the last character, which cannot be a dash. |
| 2858 |
"type": "A String", # The type indicates the intended use of the security policy. |
| 2859 |
# |
| 2860 |
# - CLOUD_ARMOR: Cloud Armor backend security policies can |
| 2861 |
# be configured to filter incoming HTTP requests targeting backend services. |
| 2862 |
# They filter requests before they hit the origin servers. |
| 2863 |
# - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can |
| 2864 |
# be configured to filter incoming HTTP requests targeting backend services |
| 2865 |
# (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). |
| 2866 |
# They filter requests before the request is served from Google's cache. |
| 2867 |
# - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor |
| 2868 |
# internal service policies can be configured to filter HTTP requests |
| 2869 |
# targeting services managed by Traffic Director in a service mesh. They |
| 2870 |
# filter requests before the request is served from the application. |
| 2871 |
# |
| 2872 |
# - CLOUD_ARMOR_NETWORK: Cloud Armor network policies |
| 2873 |
# can be configured to filter packets targeting network load balancing |
| 2874 |
# resources such as backend services, target pools, target instances, and |
| 2875 |
# instances with external IPs. They filter requests before the request is |
| 2876 |
# served from the application. |
| 2877 |
# |
| 2878 |
# |
| 2879 |
# This field can be set only at resource creation time. |
| 2880 |
"userDefinedFields": [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A |
| 2881 |
# user-defined field consists of up to 4 bytes extracted from a fixed offset |
| 2882 |
# in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an |
| 2883 |
# optional mask to select certain bits. Rules may then specify matching |
| 2884 |
# values for these fields. |
| 2885 |
# |
| 2886 |
# Example: |
| 2887 |
# |
| 2888 |
# userDefinedFields: |
| 2889 |
# - name: "ipv4_fragment_offset" |
| 2890 |
# base: IPV4 |
| 2891 |
# offset: 6 |
| 2892 |
# size: 2 |
| 2893 |
# mask: "0x1fff" |
| 2894 |
{ |
| 2895 |
"base": "A String", # The base relative to which 'offset' is measured. Possible values are: |
| 2896 |
# |
| 2897 |
# - IPV4: Points to the beginning of the IPv4 header. |
| 2898 |
# - IPV6: Points to the beginning of the IPv6 header. |
| 2899 |
# - TCP: Points to the beginning of the TCP header, skipping |
| 2900 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 2901 |
# non-first fragments. |
| 2902 |
# - UDP: Points to the beginning of the UDP header, skipping |
| 2903 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 2904 |
# non-first fragments. |
| 2905 |
# |
| 2906 |
# |
| 2907 |
# required |
| 2908 |
"mask": "A String", # If specified, apply this mask (bitwise AND) to the field to ignore bits |
| 2909 |
# before matching. Encoded as a hexadecimal number (starting with "0x"). |
| 2910 |
# The last byte of the field (in network byte order) corresponds to the |
| 2911 |
# least significant byte of the mask. |
| 2912 |
"name": "A String", # The name of this field. Must be unique within the policy. |
| 2913 |
"offset": 42, # Offset of the first byte of the field (in network byte order) relative to |
| 2914 |
# 'base'. |
| 2915 |
"size": 42, # Size of the field in bytes. Valid values: 1-4. |
| 2916 |
}, |
| 2917 |
], |
| 2918 |
}</pre> |
| 2919 |
</div> |
| 2920 |
|
| 2921 |
<div class="method"> |
| 2922 |
<code class="details" id="getRule">getRule(project, securityPolicy, priority=None, x__xgafv=None)</code> |
| 2923 |
<pre>Gets a rule at the specified priority. |
| 2924 |
|
| 2925 |
Args: |
| 2926 |
project: string, Project ID for this request. (required) |
| 2927 |
securityPolicy: string, Name of the security policy to which the queried rule belongs. (required) |
| 2928 |
priority: integer, The priority of the rule to get from the security policy. |
| 2929 |
x__xgafv: string, V1 error format. |
| 2930 |
Allowed values |
| 2931 |
1 - v1 error format |
| 2932 |
2 - v2 error format |
| 2933 |
|
| 2934 |
Returns: |
| 2935 |
An object of the form: |
| 2936 |
|
| 2937 |
{ # Represents a rule that describes one or more match conditions along with |
| 2938 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 2939 |
"action": "A String", # The Action to perform when the rule is matched. |
| 2940 |
# The following are the valid actions: |
| 2941 |
# |
| 2942 |
# - allow: allow access to target. |
| 2943 |
# - deny(STATUS): deny access to target, returns the |
| 2944 |
# HTTP response code specified. Valid values for `STATUS` |
| 2945 |
# are 403, 404, and 502. |
| 2946 |
# - rate_based_ban: limit client traffic to the configured |
| 2947 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 2948 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 2949 |
# rate_limit_options to be set. |
| 2950 |
# - redirect: redirect to a different target. This can |
| 2951 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 2952 |
# redirect via a 302 response. Parameters for this action can be configured |
| 2953 |
# via redirectOptions. This action is only supported in Global Security |
| 2954 |
# Policies of type CLOUD_ARMOR. |
| 2955 |
# - throttle: limit |
| 2956 |
# client traffic to the configured threshold. Configure parameters for this |
| 2957 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 2958 |
# this. |
| 2959 |
# - fairshare (preview only): when traffic reaches the |
| 2960 |
# threshold limit, requests from the clients matching this rule begin to be |
| 2961 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 2962 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 2963 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 2964 |
# create the resource. |
| 2965 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 2966 |
# specified when versioned_expr is set to FIREWALL. |
| 2967 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 2968 |
# enabled, logs will be exported to the configured export destination in |
| 2969 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 2970 |
# cannot enable logging on "goto_next" rules. |
| 2971 |
# |
| 2972 |
# This field may only be specified when the versioned_expr is set to |
| 2973 |
# FIREWALL. |
| 2974 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 2975 |
# This field is only supported in Global Security Policies of type |
| 2976 |
# CLOUD_ARMOR. |
| 2977 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 2978 |
# present. |
| 2979 |
{ |
| 2980 |
"headerName": "A String", # The name of the header to set. |
| 2981 |
"headerValue": "A String", # The value to set the named header to. |
| 2982 |
}, |
| 2983 |
], |
| 2984 |
}, |
| 2985 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 2986 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 2987 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 2988 |
# Exactly one field must be specified. |
| 2989 |
"config": { # The configuration options available when specifying versioned_expr. |
| 2990 |
# This field must be specified if versioned_expr is specified and cannot |
| 2991 |
# be specified if versioned_expr is not specified. |
| 2992 |
"destIpRanges": [ # CIDR IP address range. |
| 2993 |
# |
| 2994 |
# This field may only be specified when versioned_expr is set to |
| 2995 |
# FIREWALL. |
| 2996 |
"A String", |
| 2997 |
], |
| 2998 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 2999 |
# |
| 3000 |
# This field may only be specified when versioned_expr is set to |
| 3001 |
# FIREWALL. |
| 3002 |
{ |
| 3003 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 3004 |
# required when creating a firewall rule. This value can either be |
| 3005 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 3006 |
# protocol number. |
| 3007 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 3008 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 3009 |
# an integer or a range. If not specified, this rule applies to |
| 3010 |
# connections through any port. |
| 3011 |
# |
| 3012 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 3013 |
# |
| 3014 |
# This field may only be specified when versioned_expr is set to |
| 3015 |
# FIREWALL. |
| 3016 |
"A String", |
| 3017 |
], |
| 3018 |
}, |
| 3019 |
], |
| 3020 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 3021 |
# |
| 3022 |
# This field may only be specified when versioned_expr is set to |
| 3023 |
# FIREWALL. |
| 3024 |
{ |
| 3025 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 3026 |
# required when creating a firewall rule. This value can either be |
| 3027 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 3028 |
# protocol number. |
| 3029 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 3030 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 3031 |
# an integer or a range. If not specified, this rule applies to |
| 3032 |
# connections through any port. |
| 3033 |
# |
| 3034 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 3035 |
# |
| 3036 |
# This field may only be specified when versioned_expr is set to |
| 3037 |
# FIREWALL. |
| 3038 |
"A String", |
| 3039 |
], |
| 3040 |
}, |
| 3041 |
], |
| 3042 |
"srcIpRanges": [ # CIDR IP address range. |
| 3043 |
# Maximum number of src_ip_ranges allowed is 10. |
| 3044 |
"A String", |
| 3045 |
], |
| 3046 |
}, |
| 3047 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 3048 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 3049 |
# source.region_code and contents in the request header. |
| 3050 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 3051 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 3052 |
# nor in Regional Policies. Expressions containing |
| 3053 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 3054 |
# Enterprise subscription and are only supported in Global Security |
| 3055 |
# Policies. |
| 3056 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 3057 |
# are documented at https://github.com/google/cel-spec. |
| 3058 |
# |
| 3059 |
# Example (Comparison): |
| 3060 |
# |
| 3061 |
# title: "Summary size limit" |
| 3062 |
# description: "Determines if a summary is less than 100 chars" |
| 3063 |
# expression: "document.summary.size() < 100" |
| 3064 |
# |
| 3065 |
# Example (Equality): |
| 3066 |
# |
| 3067 |
# title: "Requestor is owner" |
| 3068 |
# description: "Determines if requestor is the document owner" |
| 3069 |
# expression: "document.owner == request.auth.claims.email" |
| 3070 |
# |
| 3071 |
# Example (Logic): |
| 3072 |
# |
| 3073 |
# title: "Public documents" |
| 3074 |
# description: "Determine whether the document should be publicly visible" |
| 3075 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 3076 |
# |
| 3077 |
# Example (Data Manipulation): |
| 3078 |
# |
| 3079 |
# title: "Notification string" |
| 3080 |
# description: "Create a notification string with a timestamp." |
| 3081 |
# expression: "'New message received at ' + string(document.create_time)" |
| 3082 |
# |
| 3083 |
# The exact variables and functions that may be referenced within an expression |
| 3084 |
# are determined by the service that evaluates it. See the service |
| 3085 |
# documentation for additional information. |
| 3086 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 3087 |
# describes the expression, e.g. when hovered over it in a UI. |
| 3088 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 3089 |
# syntax. |
| 3090 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 3091 |
# reporting, e.g. a file name and a position in the file. |
| 3092 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 3093 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 3094 |
# expression. |
| 3095 |
}, |
| 3096 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 3097 |
# CEVAL expression (i.e., 'expr'). |
| 3098 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 3099 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 3100 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 3101 |
# action-tokens. The provided site keys need to be created from |
| 3102 |
# reCAPTCHA API under the same project where the security policy is |
| 3103 |
# created. |
| 3104 |
"A String", |
| 3105 |
], |
| 3106 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 3107 |
# session-tokens. The provided site keys need to be created from |
| 3108 |
# reCAPTCHA API under the same project where the security policy is |
| 3109 |
# created. |
| 3110 |
"A String", |
| 3111 |
], |
| 3112 |
}, |
| 3113 |
}, |
| 3114 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 3115 |
# If this field is specified, config must also be specified. |
| 3116 |
# Available preconfigured expressions along with their requirements are: |
| 3117 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 3118 |
# config. |
| 3119 |
}, |
| 3120 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 3121 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 3122 |
# 'action' is enforced. |
| 3123 |
# |
| 3124 |
# The match criteria for a rule consists of built-in match fields (like |
| 3125 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 3126 |
# ('userDefinedFields'). |
| 3127 |
# |
| 3128 |
# Field values may be extracted directly from the packet or derived from it |
| 3129 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 3130 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 3131 |
# header is found in the packet and the entire field is in bounds. |
| 3132 |
# |
| 3133 |
# Each match field may specify which values can match it, listing one or |
| 3134 |
# more ranges, prefixes, or exact values that are considered a match for |
| 3135 |
# the field. A field value must be present in order to match a specified |
| 3136 |
# match field. If no match values are specified for a match field, then any |
| 3137 |
# field value is considered to match it, and it's not required to be |
| 3138 |
# present. For strings specifying '*' is also equivalent to match all. |
| 3139 |
# |
| 3140 |
# For a packet to match a rule, all specified match fields must match the |
| 3141 |
# corresponding field values derived from the packet. |
| 3142 |
# |
| 3143 |
# Example: |
| 3144 |
# |
| 3145 |
# networkMatch: |
| 3146 |
# srcIpRanges: |
| 3147 |
# - "192.0.2.0/24" |
| 3148 |
# - "198.51.100.0/24" |
| 3149 |
# userDefinedFields: |
| 3150 |
# - name: "ipv4_fragment_offset" |
| 3151 |
# values: |
| 3152 |
# - "1-0x1fff" |
| 3153 |
# |
| 3154 |
# The above match condition matches packets with a source IP in |
| 3155 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 3156 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 3157 |
# against. |
| 3158 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 3159 |
# format. |
| 3160 |
"A String", |
| 3161 |
], |
| 3162 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 3163 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 3164 |
"A String", |
| 3165 |
], |
| 3166 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 3167 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 3168 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 3169 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 3170 |
"A String", |
| 3171 |
], |
| 3172 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 3173 |
42, |
| 3174 |
], |
| 3175 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 3176 |
"A String", |
| 3177 |
], |
| 3178 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 3179 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 3180 |
"A String", |
| 3181 |
], |
| 3182 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 3183 |
# IP address. |
| 3184 |
"A String", |
| 3185 |
], |
| 3186 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 3187 |
# matching values for that field. |
| 3188 |
{ |
| 3189 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 3190 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 3191 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 3192 |
# range (e.g. "0x400-0x7ff"). |
| 3193 |
"A String", |
| 3194 |
], |
| 3195 |
}, |
| 3196 |
], |
| 3197 |
}, |
| 3198 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 3199 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 3200 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 3201 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 3202 |
{ |
| 3203 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 3204 |
# preconfigured WAF evaluation. |
| 3205 |
{ |
| 3206 |
"op": "A String", # The match operator for the field. |
| 3207 |
"val": "A String", # The value of the field. |
| 3208 |
}, |
| 3209 |
], |
| 3210 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 3211 |
# inspection during preconfigured WAF evaluation. |
| 3212 |
{ |
| 3213 |
"op": "A String", # The match operator for the field. |
| 3214 |
"val": "A String", # The value of the field. |
| 3215 |
}, |
| 3216 |
], |
| 3217 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 3218 |
# inspection during preconfigured WAF evaluation. |
| 3219 |
{ |
| 3220 |
"op": "A String", # The match operator for the field. |
| 3221 |
"val": "A String", # The value of the field. |
| 3222 |
}, |
| 3223 |
], |
| 3224 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 3225 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 3226 |
# parameter can be in the query string or in the POST body. |
| 3227 |
{ |
| 3228 |
"op": "A String", # The match operator for the field. |
| 3229 |
"val": "A String", # The value of the field. |
| 3230 |
}, |
| 3231 |
], |
| 3232 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 3233 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 3234 |
# field, the query or fragment part should be excluded. |
| 3235 |
{ |
| 3236 |
"op": "A String", # The match operator for the field. |
| 3237 |
"val": "A String", # The value of the field. |
| 3238 |
}, |
| 3239 |
], |
| 3240 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 3241 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 3242 |
# IDs under the WAF rule set. |
| 3243 |
"A String", |
| 3244 |
], |
| 3245 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 3246 |
}, |
| 3247 |
], |
| 3248 |
}, |
| 3249 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 3250 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 3251 |
# must be a positive value between 0 and 2147483647. |
| 3252 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 3253 |
# highest priority and 2147483647 is the lowest priority. |
| 3254 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 3255 |
# "fairshare". Cannot be specified for any other actions. |
| 3256 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 3257 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 3258 |
# the traffic will continue to be banned by the rate limit after the |
| 3259 |
# rate falls below the threshold. |
| 3260 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 3261 |
# "rate_based_ban". If specified, the key will be banned for the |
| 3262 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 3263 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 3264 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 3265 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 3266 |
}, |
| 3267 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 3268 |
# threshold. Valid option is "allow" only. |
| 3269 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 3270 |
# values are: |
| 3271 |
# |
| 3272 |
# - ALL: A single rate limit threshold is applied to all |
| 3273 |
# the requests matching this rule. This is the default value if |
| 3274 |
# "enforceOnKey" is not configured. |
| 3275 |
# - IP: The source IP address of |
| 3276 |
# the request is the key. Each IP has this limit enforced |
| 3277 |
# separately. |
| 3278 |
# - HTTP_HEADER: The value of the HTTP |
| 3279 |
# header whose name is configured under "enforceOnKeyName". The key |
| 3280 |
# value is truncated to the first 128 bytes of the header value. If no |
| 3281 |
# such header is present in the request, the key type defaults toALL. |
| 3282 |
# - XFF_IP: The first IP address (i.e. the |
| 3283 |
# originating client IP address) specified in the list of IPs under |
| 3284 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 3285 |
# is not a valid IP, the key defaults to the source IP address of |
| 3286 |
# the request i.e. key type IP. |
| 3287 |
# - HTTP_COOKIE: The value of the HTTP |
| 3288 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 3289 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 3290 |
# such cookie is present in the request, the key type defaults toALL. |
| 3291 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 3292 |
# value is truncated to the first 128 bytes. |
| 3293 |
# - SNI: Server name indication in the TLS session of the |
| 3294 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 3295 |
# key type defaults to ALL on a HTTP session. |
| 3296 |
# - REGION_CODE: The country/region from which the request |
| 3297 |
# originates. |
| 3298 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 3299 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3300 |
# key type defaults to ALL. |
| 3301 |
# - USER_IP: The IP address of the originating client, |
| 3302 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 3303 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 3304 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 3305 |
# |
| 3306 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 3307 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3308 |
# key type defaults to ALL. |
| 3309 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 3310 |
# limit threshold is enforced for all the requests matching the rule. |
| 3311 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 3312 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 3313 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 3314 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 3315 |
# enforce_on_key must not be specified. |
| 3316 |
{ |
| 3317 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 3318 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 3319 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 3320 |
# taken as the key value. |
| 3321 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 3322 |
# values are: |
| 3323 |
# |
| 3324 |
# - ALL: A single rate limit threshold is applied to all |
| 3325 |
# the requests matching this rule. This is the default value if |
| 3326 |
# "enforceOnKeyConfigs" is not configured. |
| 3327 |
# - IP: The source IP address of |
| 3328 |
# the request is the key. Each IP has this limit enforced |
| 3329 |
# separately. |
| 3330 |
# - HTTP_HEADER: The value of the HTTP |
| 3331 |
# header whose name is configured under "enforceOnKeyName". The key |
| 3332 |
# value is truncated to the first 128 bytes of the header value. If no |
| 3333 |
# such header is present in the request, the key type defaults toALL. |
| 3334 |
# - XFF_IP: The first IP address (i.e. the |
| 3335 |
# originating client IP address) specified in the list of IPs under |
| 3336 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 3337 |
# value is not a valid IP, the key defaults to the source IP address of |
| 3338 |
# the request i.e. key type IP. |
| 3339 |
# - HTTP_COOKIE: The value of the HTTP |
| 3340 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 3341 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 3342 |
# such cookie is present in the request, the key type defaults toALL. |
| 3343 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 3344 |
# value is truncated to the first 128 bytes. |
| 3345 |
# - SNI: Server name indication in the TLS session of |
| 3346 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 3347 |
# The key type defaults to ALL on a HTTP session. |
| 3348 |
# - REGION_CODE: The country/region from which the |
| 3349 |
# request originates. |
| 3350 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 3351 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3352 |
# key type defaults to ALL. |
| 3353 |
# - USER_IP: The IP address of the originating client, |
| 3354 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 3355 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 3356 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 3357 |
# |
| 3358 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 3359 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3360 |
# key type defaults to ALL. |
| 3361 |
}, |
| 3362 |
], |
| 3363 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 3364 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 3365 |
# value. |
| 3366 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 3367 |
# value. |
| 3368 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 3369 |
# threshold, to either deny with a specified HTTP response code, or |
| 3370 |
# redirect to a different endpoint. |
| 3371 |
# Valid options are `deny(STATUS)`, where valid values for |
| 3372 |
# `STATUS` are 403, 404, 429, and 502, and |
| 3373 |
# `redirect`, where the redirect parameters come from |
| 3374 |
# `exceedRedirectOptions` below. |
| 3375 |
# The `redirect` action is only supported in Global Security Policies of |
| 3376 |
# type CLOUD_ARMOR. |
| 3377 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 3378 |
# above the configured rate limit threshold |
| 3379 |
"code": 42, # The status code, which should be an enum value of |
| 3380 |
# google.rpc.Code. |
| 3381 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 3382 |
}, |
| 3383 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 3384 |
# action. Cannot be specified if the exceed action is not redirect. |
| 3385 |
# This field is only supported in Global Security Policies of type |
| 3386 |
# CLOUD_ARMOR. |
| 3387 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 3388 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 3389 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 3390 |
# |
| 3391 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 3392 |
# challenge assessment. |
| 3393 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 3394 |
# response. |
| 3395 |
}, |
| 3396 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 3397 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 3398 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 3399 |
}, |
| 3400 |
}, |
| 3401 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 3402 |
# other actions. |
| 3403 |
# This field is only supported in Global Security Policies of type |
| 3404 |
# CLOUD_ARMOR. |
| 3405 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 3406 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 3407 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 3408 |
# |
| 3409 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 3410 |
# challenge assessment. |
| 3411 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 3412 |
# response. |
| 3413 |
}, |
| 3414 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 3415 |
# other actions. |
| 3416 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 3417 |
# rule. |
| 3418 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 3419 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 3420 |
# policy. This can only be set during rule creation, if rule number is not |
| 3421 |
# specified it will be generated by the server. |
| 3422 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 3423 |
# policy rule. |
| 3424 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 3425 |
# allows you to control which network's VMs get this rule. If this field |
| 3426 |
# is left blank, all VMs within the organization will receive the rule. |
| 3427 |
# |
| 3428 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 3429 |
"A String", |
| 3430 |
], |
| 3431 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 3432 |
# applied with this rule. |
| 3433 |
"A String", |
| 3434 |
], |
| 3435 |
}</pre> |
| 3436 |
</div> |
| 3437 |
|
| 3438 |
<div class="method"> |
| 3439 |
<code class="details" id="insert">insert(project, body=None, requestId=None, validateOnly=None, x__xgafv=None)</code> |
| 3440 |
<pre>Creates a new policy in the specified project using the data included in |
| 3441 |
the request. |
| 3442 |
|
| 3443 |
Args: |
| 3444 |
project: string, Project ID for this request. (required) |
| 3445 |
body: object, The request body. |
| 3446 |
The object takes the form of: |
| 3447 |
|
| 3448 |
{ # Represents a Google Cloud Armor security policy resource. |
| 3449 |
# |
| 3450 |
# Only external backend services that use load balancers can |
| 3451 |
# reference a security policy. For more information, see |
| 3452 |
# Google Cloud Armor security policy overview. |
| 3453 |
"adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). |
| 3454 |
"autoDeployConfig": { # Configuration options for Adaptive Protection auto-deploy feature. |
| 3455 |
"confidenceThreshold": 3.14, |
| 3456 |
"expirationSec": 42, |
| 3457 |
"impactedBaselineThreshold": 3.14, |
| 3458 |
"loadThreshold": 3.14, |
| 3459 |
}, |
| 3460 |
"layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. |
| 3461 |
# This field is only supported in Global Security Policies of type |
| 3462 |
# CLOUD_ARMOR. |
| 3463 |
"enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. |
| 3464 |
# This field is only supported in Global Security Policies of type |
| 3465 |
# CLOUD_ARMOR. |
| 3466 |
"ruleVisibility": "A String", # Rule visibility can be one of the following: |
| 3467 |
# STANDARD - opaque rules. (default) |
| 3468 |
# PREMIUM - transparent rules. |
| 3469 |
# This field is only supported in Global Security Policies of type |
| 3470 |
# CLOUD_ARMOR. |
| 3471 |
"thresholdConfigs": [ # Configuration options for layer7 adaptive protection for various |
| 3472 |
# customizable thresholds. |
| 3473 |
{ |
| 3474 |
"autoDeployConfidenceThreshold": 3.14, |
| 3475 |
"autoDeployExpirationSec": 42, |
| 3476 |
"autoDeployImpactedBaselineThreshold": 3.14, |
| 3477 |
"autoDeployLoadThreshold": 3.14, |
| 3478 |
"detectionAbsoluteQps": 3.14, |
| 3479 |
"detectionLoadThreshold": 3.14, |
| 3480 |
"detectionRelativeToBaselineQps": 3.14, |
| 3481 |
"name": "A String", # The name must be 1-63 characters long, and comply withRFC1035. |
| 3482 |
# The name must be unique within the security policy. |
| 3483 |
"trafficGranularityConfigs": [ # Configuration options for enabling Adaptive Protection to operate |
| 3484 |
# on specified granular traffic units. |
| 3485 |
{ # Configurations to specifc granular traffic units processed by |
| 3486 |
# Adaptive Protection. |
| 3487 |
"enableEachUniqueValue": True or False, # If enabled, traffic matching each unique value for the specified |
| 3488 |
# type constitutes a separate traffic unit. |
| 3489 |
# It can only be set to true if `value` is empty. |
| 3490 |
"type": "A String", # Type of this configuration. |
| 3491 |
"value": "A String", # Requests that match this value constitute a granular traffic unit. |
| 3492 |
}, |
| 3493 |
], |
| 3494 |
}, |
| 3495 |
], |
| 3496 |
}, |
| 3497 |
}, |
| 3498 |
"advancedOptionsConfig": { |
| 3499 |
"jsonCustomConfig": { # Custom configuration to apply the JSON parsing. Only applicable when |
| 3500 |
# json_parsing is set to STANDARD. |
| 3501 |
"contentTypes": [ # A list of custom Content-Type header values to apply the JSON parsing. |
| 3502 |
# |
| 3503 |
# As per RFC 1341, a Content-Type header value has the following format: |
| 3504 |
# |
| 3505 |
# Content-Type := type "/" subtype *[";" parameter] |
| 3506 |
# |
| 3507 |
# When configuring a custom Content-Type header value, only the |
| 3508 |
# type/subtype needs to be specified, and the parameters should be |
| 3509 |
# excluded. |
| 3510 |
"A String", |
| 3511 |
], |
| 3512 |
}, |
| 3513 |
"jsonParsing": "A String", |
| 3514 |
"logLevel": "A String", |
| 3515 |
"requestBodyInspectionSize": "A String", # The maximum request size chosen by the customer with Waf enabled. |
| 3516 |
# Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". |
| 3517 |
# Values are case insensitive. |
| 3518 |
"userIpRequestHeaders": [ # An optional list of case-insensitive request header names to use for |
| 3519 |
# resolving the callers client IP address. |
| 3520 |
"A String", |
| 3521 |
], |
| 3522 |
}, |
| 3523 |
"associations": [ # A list of associations that belong to this policy. |
| 3524 |
{ |
| 3525 |
"attachmentId": "A String", # The resource that the security policy is attached to. |
| 3526 |
"displayName": "A String", # Output only. [Output Only] The display name of the security policy of the association. |
| 3527 |
"excludedFolders": [ # A list of folders to exclude from the security policy. |
| 3528 |
"A String", |
| 3529 |
], |
| 3530 |
"excludedProjects": [ # A list of projects to exclude from the security policy. |
| 3531 |
"A String", |
| 3532 |
], |
| 3533 |
"name": "A String", # The name for an association. |
| 3534 |
"securityPolicyId": "A String", # Output only. [Output Only] The security policy ID of the association. |
| 3535 |
"shortName": "A String", # Output only. [Output Only] The short name of the security policy of the association. |
| 3536 |
}, |
| 3537 |
], |
| 3538 |
"cloudArmorConfig": { # Configuration options for Cloud Armor. |
| 3539 |
"enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. |
| 3540 |
}, |
| 3541 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 3542 |
# text format. |
| 3543 |
"ddosProtectionConfig": { |
| 3544 |
"ddosAdaptiveProtection": "A String", |
| 3545 |
"ddosImpactedBaselineThreshold": 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs) |
| 3546 |
# builds DDoS mitigations that minimize collateral damage. It quantifies |
| 3547 |
# this as the fraction of a non-abuse baseline that's inadvertently |
| 3548 |
# blocked. |
| 3549 |
# |
| 3550 |
# Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will |
| 3551 |
# not be deployed. Using a lower value will prioritize keeping collateral |
| 3552 |
# damage low, possibly at the cost of its effectiveness in rate limiting |
| 3553 |
# some or all of the attack. It should typically be unset, so Advanced DDoS |
| 3554 |
# (and Adaptive Protection) uses the best mitigation it can find. Setting |
| 3555 |
# the threshold is advised if there are logs for false positive detections |
| 3556 |
# with high collateral damage, and will cause Advanced DDoS to attempt to |
| 3557 |
# find a less aggressive rule that satisfies the constraint. If a suitable |
| 3558 |
# rule cannot be found, the system falls back to either no mitigation for |
| 3559 |
# smaller attacks or broader network throttles for larger ones. |
| 3560 |
"ddosProtection": "A String", |
| 3561 |
}, |
| 3562 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 3563 |
# create the resource. |
| 3564 |
"displayName": "A String", # User-provided name of the organization security policy. The name should be |
| 3565 |
# unique in the organization in which the security policy is created. This |
| 3566 |
# should only be used when SecurityPolicyType is FIREWALL. |
| 3567 |
# The name must be 1-63 characters long, and comply with |
| 3568 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 3569 |
# characters long and match the regular expression |
| 3570 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 3571 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 3572 |
# letter, or digit, except the last character, which cannot be a dash. |
| 3573 |
"fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of |
| 3574 |
# the metadata's contents and used for optimistic locking. The |
| 3575 |
# fingerprint is initially generated by Compute Engine and changes after |
| 3576 |
# every request to modify or update metadata. You must always provide an |
| 3577 |
# up-to-date fingerprint hash in order to update or change metadata, |
| 3578 |
# otherwise the request will fail with error412 conditionNotMet. |
| 3579 |
# |
| 3580 |
# To see the latest fingerprint, make get() request to the |
| 3581 |
# security policy. |
| 3582 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 3583 |
# defined by the server. |
| 3584 |
"kind": "compute#securityPolicy", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies |
| 3585 |
"labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which |
| 3586 |
# is essentially a hash of the labels set used for optimistic locking. The |
| 3587 |
# fingerprint is initially generated by Compute Engine and changes after |
| 3588 |
# every request to modify or update labels. You must always provide an |
| 3589 |
# up-to-date fingerprint hash in order to update or change labels. |
| 3590 |
# |
| 3591 |
# To see the latest fingerprint, make get() request to the |
| 3592 |
# security policy. |
| 3593 |
"labels": { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. |
| 3594 |
# Label values may be empty. |
| 3595 |
"a_key": "A String", |
| 3596 |
}, |
| 3597 |
"name": "A String", # Name of the resource. Provided by the client when the resource is created. |
| 3598 |
# The name must be 1-63 characters long, and comply withRFC1035. |
| 3599 |
# Specifically, the name must be 1-63 characters long and match the regular |
| 3600 |
# expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 3601 |
# character must be a lowercase letter, and all following characters must |
| 3602 |
# be a dash, lowercase letter, or digit, except the last character, which |
| 3603 |
# cannot be a dash. |
| 3604 |
"parent": "A String", # Output only. [Output Only] The parent of the security policy. |
| 3605 |
"recaptchaOptionsConfig": { |
| 3606 |
"redirectSiteKey": "A String", # An optional field to supply a reCAPTCHA site key to be used for all the |
| 3607 |
# rules using the redirect action with the type of GOOGLE_RECAPTCHA under |
| 3608 |
# the security policy. The specified site key needs to be created from the |
| 3609 |
# reCAPTCHA API. The user is responsible for the validity of the specified |
| 3610 |
# site key. If not specified, a Google-managed site key is used. |
| 3611 |
# This field is only supported in Global Security Policies of type |
| 3612 |
# CLOUD_ARMOR. |
| 3613 |
}, |
| 3614 |
"region": "A String", # Output only. [Output Only] URL of the region where the regional security policy |
| 3615 |
# resides. This field is not applicable to global security policies. |
| 3616 |
"ruleTupleCount": 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security |
| 3617 |
# policy can not exceed a set number of tuples. |
| 3618 |
"rules": [ # A list of rules that belong to this policy. |
| 3619 |
# There must always be a default rule which is a rule with priority |
| 3620 |
# 2147483647 and match all condition (for the match condition this means |
| 3621 |
# match "*" for srcIpRanges and for the networkMatch condition every field |
| 3622 |
# must be either match "*" or not set). If no rules are provided when |
| 3623 |
# creating a security policy, a default rule with action "allow" will be |
| 3624 |
# added. |
| 3625 |
{ # Represents a rule that describes one or more match conditions along with |
| 3626 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 3627 |
"action": "A String", # The Action to perform when the rule is matched. |
| 3628 |
# The following are the valid actions: |
| 3629 |
# |
| 3630 |
# - allow: allow access to target. |
| 3631 |
# - deny(STATUS): deny access to target, returns the |
| 3632 |
# HTTP response code specified. Valid values for `STATUS` |
| 3633 |
# are 403, 404, and 502. |
| 3634 |
# - rate_based_ban: limit client traffic to the configured |
| 3635 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 3636 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 3637 |
# rate_limit_options to be set. |
| 3638 |
# - redirect: redirect to a different target. This can |
| 3639 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 3640 |
# redirect via a 302 response. Parameters for this action can be configured |
| 3641 |
# via redirectOptions. This action is only supported in Global Security |
| 3642 |
# Policies of type CLOUD_ARMOR. |
| 3643 |
# - throttle: limit |
| 3644 |
# client traffic to the configured threshold. Configure parameters for this |
| 3645 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 3646 |
# this. |
| 3647 |
# - fairshare (preview only): when traffic reaches the |
| 3648 |
# threshold limit, requests from the clients matching this rule begin to be |
| 3649 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 3650 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 3651 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 3652 |
# create the resource. |
| 3653 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 3654 |
# specified when versioned_expr is set to FIREWALL. |
| 3655 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 3656 |
# enabled, logs will be exported to the configured export destination in |
| 3657 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 3658 |
# cannot enable logging on "goto_next" rules. |
| 3659 |
# |
| 3660 |
# This field may only be specified when the versioned_expr is set to |
| 3661 |
# FIREWALL. |
| 3662 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 3663 |
# This field is only supported in Global Security Policies of type |
| 3664 |
# CLOUD_ARMOR. |
| 3665 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 3666 |
# present. |
| 3667 |
{ |
| 3668 |
"headerName": "A String", # The name of the header to set. |
| 3669 |
"headerValue": "A String", # The value to set the named header to. |
| 3670 |
}, |
| 3671 |
], |
| 3672 |
}, |
| 3673 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 3674 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 3675 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 3676 |
# Exactly one field must be specified. |
| 3677 |
"config": { # The configuration options available when specifying versioned_expr. |
| 3678 |
# This field must be specified if versioned_expr is specified and cannot |
| 3679 |
# be specified if versioned_expr is not specified. |
| 3680 |
"destIpRanges": [ # CIDR IP address range. |
| 3681 |
# |
| 3682 |
# This field may only be specified when versioned_expr is set to |
| 3683 |
# FIREWALL. |
| 3684 |
"A String", |
| 3685 |
], |
| 3686 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 3687 |
# |
| 3688 |
# This field may only be specified when versioned_expr is set to |
| 3689 |
# FIREWALL. |
| 3690 |
{ |
| 3691 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 3692 |
# required when creating a firewall rule. This value can either be |
| 3693 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 3694 |
# protocol number. |
| 3695 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 3696 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 3697 |
# an integer or a range. If not specified, this rule applies to |
| 3698 |
# connections through any port. |
| 3699 |
# |
| 3700 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 3701 |
# |
| 3702 |
# This field may only be specified when versioned_expr is set to |
| 3703 |
# FIREWALL. |
| 3704 |
"A String", |
| 3705 |
], |
| 3706 |
}, |
| 3707 |
], |
| 3708 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 3709 |
# |
| 3710 |
# This field may only be specified when versioned_expr is set to |
| 3711 |
# FIREWALL. |
| 3712 |
{ |
| 3713 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 3714 |
# required when creating a firewall rule. This value can either be |
| 3715 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 3716 |
# protocol number. |
| 3717 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 3718 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 3719 |
# an integer or a range. If not specified, this rule applies to |
| 3720 |
# connections through any port. |
| 3721 |
# |
| 3722 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 3723 |
# |
| 3724 |
# This field may only be specified when versioned_expr is set to |
| 3725 |
# FIREWALL. |
| 3726 |
"A String", |
| 3727 |
], |
| 3728 |
}, |
| 3729 |
], |
| 3730 |
"srcIpRanges": [ # CIDR IP address range. |
| 3731 |
# Maximum number of src_ip_ranges allowed is 10. |
| 3732 |
"A String", |
| 3733 |
], |
| 3734 |
}, |
| 3735 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 3736 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 3737 |
# source.region_code and contents in the request header. |
| 3738 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 3739 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 3740 |
# nor in Regional Policies. Expressions containing |
| 3741 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 3742 |
# Enterprise subscription and are only supported in Global Security |
| 3743 |
# Policies. |
| 3744 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 3745 |
# are documented at https://github.com/google/cel-spec. |
| 3746 |
# |
| 3747 |
# Example (Comparison): |
| 3748 |
# |
| 3749 |
# title: "Summary size limit" |
| 3750 |
# description: "Determines if a summary is less than 100 chars" |
| 3751 |
# expression: "document.summary.size() < 100" |
| 3752 |
# |
| 3753 |
# Example (Equality): |
| 3754 |
# |
| 3755 |
# title: "Requestor is owner" |
| 3756 |
# description: "Determines if requestor is the document owner" |
| 3757 |
# expression: "document.owner == request.auth.claims.email" |
| 3758 |
# |
| 3759 |
# Example (Logic): |
| 3760 |
# |
| 3761 |
# title: "Public documents" |
| 3762 |
# description: "Determine whether the document should be publicly visible" |
| 3763 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 3764 |
# |
| 3765 |
# Example (Data Manipulation): |
| 3766 |
# |
| 3767 |
# title: "Notification string" |
| 3768 |
# description: "Create a notification string with a timestamp." |
| 3769 |
# expression: "'New message received at ' + string(document.create_time)" |
| 3770 |
# |
| 3771 |
# The exact variables and functions that may be referenced within an expression |
| 3772 |
# are determined by the service that evaluates it. See the service |
| 3773 |
# documentation for additional information. |
| 3774 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 3775 |
# describes the expression, e.g. when hovered over it in a UI. |
| 3776 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 3777 |
# syntax. |
| 3778 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 3779 |
# reporting, e.g. a file name and a position in the file. |
| 3780 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 3781 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 3782 |
# expression. |
| 3783 |
}, |
| 3784 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 3785 |
# CEVAL expression (i.e., 'expr'). |
| 3786 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 3787 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 3788 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 3789 |
# action-tokens. The provided site keys need to be created from |
| 3790 |
# reCAPTCHA API under the same project where the security policy is |
| 3791 |
# created. |
| 3792 |
"A String", |
| 3793 |
], |
| 3794 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 3795 |
# session-tokens. The provided site keys need to be created from |
| 3796 |
# reCAPTCHA API under the same project where the security policy is |
| 3797 |
# created. |
| 3798 |
"A String", |
| 3799 |
], |
| 3800 |
}, |
| 3801 |
}, |
| 3802 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 3803 |
# If this field is specified, config must also be specified. |
| 3804 |
# Available preconfigured expressions along with their requirements are: |
| 3805 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 3806 |
# config. |
| 3807 |
}, |
| 3808 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 3809 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 3810 |
# 'action' is enforced. |
| 3811 |
# |
| 3812 |
# The match criteria for a rule consists of built-in match fields (like |
| 3813 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 3814 |
# ('userDefinedFields'). |
| 3815 |
# |
| 3816 |
# Field values may be extracted directly from the packet or derived from it |
| 3817 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 3818 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 3819 |
# header is found in the packet and the entire field is in bounds. |
| 3820 |
# |
| 3821 |
# Each match field may specify which values can match it, listing one or |
| 3822 |
# more ranges, prefixes, or exact values that are considered a match for |
| 3823 |
# the field. A field value must be present in order to match a specified |
| 3824 |
# match field. If no match values are specified for a match field, then any |
| 3825 |
# field value is considered to match it, and it's not required to be |
| 3826 |
# present. For strings specifying '*' is also equivalent to match all. |
| 3827 |
# |
| 3828 |
# For a packet to match a rule, all specified match fields must match the |
| 3829 |
# corresponding field values derived from the packet. |
| 3830 |
# |
| 3831 |
# Example: |
| 3832 |
# |
| 3833 |
# networkMatch: |
| 3834 |
# srcIpRanges: |
| 3835 |
# - "192.0.2.0/24" |
| 3836 |
# - "198.51.100.0/24" |
| 3837 |
# userDefinedFields: |
| 3838 |
# - name: "ipv4_fragment_offset" |
| 3839 |
# values: |
| 3840 |
# - "1-0x1fff" |
| 3841 |
# |
| 3842 |
# The above match condition matches packets with a source IP in |
| 3843 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 3844 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 3845 |
# against. |
| 3846 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 3847 |
# format. |
| 3848 |
"A String", |
| 3849 |
], |
| 3850 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 3851 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 3852 |
"A String", |
| 3853 |
], |
| 3854 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 3855 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 3856 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 3857 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 3858 |
"A String", |
| 3859 |
], |
| 3860 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 3861 |
42, |
| 3862 |
], |
| 3863 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 3864 |
"A String", |
| 3865 |
], |
| 3866 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 3867 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 3868 |
"A String", |
| 3869 |
], |
| 3870 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 3871 |
# IP address. |
| 3872 |
"A String", |
| 3873 |
], |
| 3874 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 3875 |
# matching values for that field. |
| 3876 |
{ |
| 3877 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 3878 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 3879 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 3880 |
# range (e.g. "0x400-0x7ff"). |
| 3881 |
"A String", |
| 3882 |
], |
| 3883 |
}, |
| 3884 |
], |
| 3885 |
}, |
| 3886 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 3887 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 3888 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 3889 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 3890 |
{ |
| 3891 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 3892 |
# preconfigured WAF evaluation. |
| 3893 |
{ |
| 3894 |
"op": "A String", # The match operator for the field. |
| 3895 |
"val": "A String", # The value of the field. |
| 3896 |
}, |
| 3897 |
], |
| 3898 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 3899 |
# inspection during preconfigured WAF evaluation. |
| 3900 |
{ |
| 3901 |
"op": "A String", # The match operator for the field. |
| 3902 |
"val": "A String", # The value of the field. |
| 3903 |
}, |
| 3904 |
], |
| 3905 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 3906 |
# inspection during preconfigured WAF evaluation. |
| 3907 |
{ |
| 3908 |
"op": "A String", # The match operator for the field. |
| 3909 |
"val": "A String", # The value of the field. |
| 3910 |
}, |
| 3911 |
], |
| 3912 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 3913 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 3914 |
# parameter can be in the query string or in the POST body. |
| 3915 |
{ |
| 3916 |
"op": "A String", # The match operator for the field. |
| 3917 |
"val": "A String", # The value of the field. |
| 3918 |
}, |
| 3919 |
], |
| 3920 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 3921 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 3922 |
# field, the query or fragment part should be excluded. |
| 3923 |
{ |
| 3924 |
"op": "A String", # The match operator for the field. |
| 3925 |
"val": "A String", # The value of the field. |
| 3926 |
}, |
| 3927 |
], |
| 3928 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 3929 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 3930 |
# IDs under the WAF rule set. |
| 3931 |
"A String", |
| 3932 |
], |
| 3933 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 3934 |
}, |
| 3935 |
], |
| 3936 |
}, |
| 3937 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 3938 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 3939 |
# must be a positive value between 0 and 2147483647. |
| 3940 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 3941 |
# highest priority and 2147483647 is the lowest priority. |
| 3942 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 3943 |
# "fairshare". Cannot be specified for any other actions. |
| 3944 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 3945 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 3946 |
# the traffic will continue to be banned by the rate limit after the |
| 3947 |
# rate falls below the threshold. |
| 3948 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 3949 |
# "rate_based_ban". If specified, the key will be banned for the |
| 3950 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 3951 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 3952 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 3953 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 3954 |
}, |
| 3955 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 3956 |
# threshold. Valid option is "allow" only. |
| 3957 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 3958 |
# values are: |
| 3959 |
# |
| 3960 |
# - ALL: A single rate limit threshold is applied to all |
| 3961 |
# the requests matching this rule. This is the default value if |
| 3962 |
# "enforceOnKey" is not configured. |
| 3963 |
# - IP: The source IP address of |
| 3964 |
# the request is the key. Each IP has this limit enforced |
| 3965 |
# separately. |
| 3966 |
# - HTTP_HEADER: The value of the HTTP |
| 3967 |
# header whose name is configured under "enforceOnKeyName". The key |
| 3968 |
# value is truncated to the first 128 bytes of the header value. If no |
| 3969 |
# such header is present in the request, the key type defaults toALL. |
| 3970 |
# - XFF_IP: The first IP address (i.e. the |
| 3971 |
# originating client IP address) specified in the list of IPs under |
| 3972 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 3973 |
# is not a valid IP, the key defaults to the source IP address of |
| 3974 |
# the request i.e. key type IP. |
| 3975 |
# - HTTP_COOKIE: The value of the HTTP |
| 3976 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 3977 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 3978 |
# such cookie is present in the request, the key type defaults toALL. |
| 3979 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 3980 |
# value is truncated to the first 128 bytes. |
| 3981 |
# - SNI: Server name indication in the TLS session of the |
| 3982 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 3983 |
# key type defaults to ALL on a HTTP session. |
| 3984 |
# - REGION_CODE: The country/region from which the request |
| 3985 |
# originates. |
| 3986 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 3987 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3988 |
# key type defaults to ALL. |
| 3989 |
# - USER_IP: The IP address of the originating client, |
| 3990 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 3991 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 3992 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 3993 |
# |
| 3994 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 3995 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 3996 |
# key type defaults to ALL. |
| 3997 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 3998 |
# limit threshold is enforced for all the requests matching the rule. |
| 3999 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 4000 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 4001 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 4002 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 4003 |
# enforce_on_key must not be specified. |
| 4004 |
{ |
| 4005 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 4006 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 4007 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 4008 |
# taken as the key value. |
| 4009 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 4010 |
# values are: |
| 4011 |
# |
| 4012 |
# - ALL: A single rate limit threshold is applied to all |
| 4013 |
# the requests matching this rule. This is the default value if |
| 4014 |
# "enforceOnKeyConfigs" is not configured. |
| 4015 |
# - IP: The source IP address of |
| 4016 |
# the request is the key. Each IP has this limit enforced |
| 4017 |
# separately. |
| 4018 |
# - HTTP_HEADER: The value of the HTTP |
| 4019 |
# header whose name is configured under "enforceOnKeyName". The key |
| 4020 |
# value is truncated to the first 128 bytes of the header value. If no |
| 4021 |
# such header is present in the request, the key type defaults toALL. |
| 4022 |
# - XFF_IP: The first IP address (i.e. the |
| 4023 |
# originating client IP address) specified in the list of IPs under |
| 4024 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 4025 |
# value is not a valid IP, the key defaults to the source IP address of |
| 4026 |
# the request i.e. key type IP. |
| 4027 |
# - HTTP_COOKIE: The value of the HTTP |
| 4028 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 4029 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 4030 |
# such cookie is present in the request, the key type defaults toALL. |
| 4031 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 4032 |
# value is truncated to the first 128 bytes. |
| 4033 |
# - SNI: Server name indication in the TLS session of |
| 4034 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 4035 |
# The key type defaults to ALL on a HTTP session. |
| 4036 |
# - REGION_CODE: The country/region from which the |
| 4037 |
# request originates. |
| 4038 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 4039 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 4040 |
# key type defaults to ALL. |
| 4041 |
# - USER_IP: The IP address of the originating client, |
| 4042 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 4043 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 4044 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 4045 |
# |
| 4046 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 4047 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 4048 |
# key type defaults to ALL. |
| 4049 |
}, |
| 4050 |
], |
| 4051 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 4052 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 4053 |
# value. |
| 4054 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 4055 |
# value. |
| 4056 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 4057 |
# threshold, to either deny with a specified HTTP response code, or |
| 4058 |
# redirect to a different endpoint. |
| 4059 |
# Valid options are `deny(STATUS)`, where valid values for |
| 4060 |
# `STATUS` are 403, 404, 429, and 502, and |
| 4061 |
# `redirect`, where the redirect parameters come from |
| 4062 |
# `exceedRedirectOptions` below. |
| 4063 |
# The `redirect` action is only supported in Global Security Policies of |
| 4064 |
# type CLOUD_ARMOR. |
| 4065 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 4066 |
# above the configured rate limit threshold |
| 4067 |
"code": 42, # The status code, which should be an enum value of |
| 4068 |
# google.rpc.Code. |
| 4069 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 4070 |
}, |
| 4071 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 4072 |
# action. Cannot be specified if the exceed action is not redirect. |
| 4073 |
# This field is only supported in Global Security Policies of type |
| 4074 |
# CLOUD_ARMOR. |
| 4075 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 4076 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 4077 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 4078 |
# |
| 4079 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 4080 |
# challenge assessment. |
| 4081 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 4082 |
# response. |
| 4083 |
}, |
| 4084 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 4085 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 4086 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 4087 |
}, |
| 4088 |
}, |
| 4089 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 4090 |
# other actions. |
| 4091 |
# This field is only supported in Global Security Policies of type |
| 4092 |
# CLOUD_ARMOR. |
| 4093 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 4094 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 4095 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 4096 |
# |
| 4097 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 4098 |
# challenge assessment. |
| 4099 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 4100 |
# response. |
| 4101 |
}, |
| 4102 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 4103 |
# other actions. |
| 4104 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 4105 |
# rule. |
| 4106 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 4107 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 4108 |
# policy. This can only be set during rule creation, if rule number is not |
| 4109 |
# specified it will be generated by the server. |
| 4110 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 4111 |
# policy rule. |
| 4112 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 4113 |
# allows you to control which network's VMs get this rule. If this field |
| 4114 |
# is left blank, all VMs within the organization will receive the rule. |
| 4115 |
# |
| 4116 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 4117 |
"A String", |
| 4118 |
], |
| 4119 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 4120 |
# applied with this rule. |
| 4121 |
"A String", |
| 4122 |
], |
| 4123 |
}, |
| 4124 |
], |
| 4125 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 4126 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 4127 |
"shortName": "A String", # User-provided name of the organization security policy. The name should be |
| 4128 |
# unique in the organization in which the security policy is created. This |
| 4129 |
# should only be used when SecurityPolicyType is CLOUD_ARMOR. |
| 4130 |
# The name must be 1-63 characters long, and comply with |
| 4131 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 4132 |
# characters long and match the regular expression |
| 4133 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 4134 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 4135 |
# letter, or digit, except the last character, which cannot be a dash. |
| 4136 |
"type": "A String", # The type indicates the intended use of the security policy. |
| 4137 |
# |
| 4138 |
# - CLOUD_ARMOR: Cloud Armor backend security policies can |
| 4139 |
# be configured to filter incoming HTTP requests targeting backend services. |
| 4140 |
# They filter requests before they hit the origin servers. |
| 4141 |
# - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can |
| 4142 |
# be configured to filter incoming HTTP requests targeting backend services |
| 4143 |
# (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). |
| 4144 |
# They filter requests before the request is served from Google's cache. |
| 4145 |
# - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor |
| 4146 |
# internal service policies can be configured to filter HTTP requests |
| 4147 |
# targeting services managed by Traffic Director in a service mesh. They |
| 4148 |
# filter requests before the request is served from the application. |
| 4149 |
# |
| 4150 |
# - CLOUD_ARMOR_NETWORK: Cloud Armor network policies |
| 4151 |
# can be configured to filter packets targeting network load balancing |
| 4152 |
# resources such as backend services, target pools, target instances, and |
| 4153 |
# instances with external IPs. They filter requests before the request is |
| 4154 |
# served from the application. |
| 4155 |
# |
| 4156 |
# |
| 4157 |
# This field can be set only at resource creation time. |
| 4158 |
"userDefinedFields": [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A |
| 4159 |
# user-defined field consists of up to 4 bytes extracted from a fixed offset |
| 4160 |
# in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an |
| 4161 |
# optional mask to select certain bits. Rules may then specify matching |
| 4162 |
# values for these fields. |
| 4163 |
# |
| 4164 |
# Example: |
| 4165 |
# |
| 4166 |
# userDefinedFields: |
| 4167 |
# - name: "ipv4_fragment_offset" |
| 4168 |
# base: IPV4 |
| 4169 |
# offset: 6 |
| 4170 |
# size: 2 |
| 4171 |
# mask: "0x1fff" |
| 4172 |
{ |
| 4173 |
"base": "A String", # The base relative to which 'offset' is measured. Possible values are: |
| 4174 |
# |
| 4175 |
# - IPV4: Points to the beginning of the IPv4 header. |
| 4176 |
# - IPV6: Points to the beginning of the IPv6 header. |
| 4177 |
# - TCP: Points to the beginning of the TCP header, skipping |
| 4178 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 4179 |
# non-first fragments. |
| 4180 |
# - UDP: Points to the beginning of the UDP header, skipping |
| 4181 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 4182 |
# non-first fragments. |
| 4183 |
# |
| 4184 |
# |
| 4185 |
# required |
| 4186 |
"mask": "A String", # If specified, apply this mask (bitwise AND) to the field to ignore bits |
| 4187 |
# before matching. Encoded as a hexadecimal number (starting with "0x"). |
| 4188 |
# The last byte of the field (in network byte order) corresponds to the |
| 4189 |
# least significant byte of the mask. |
| 4190 |
"name": "A String", # The name of this field. Must be unique within the policy. |
| 4191 |
"offset": 42, # Offset of the first byte of the field (in network byte order) relative to |
| 4192 |
# 'base'. |
| 4193 |
"size": 42, # Size of the field in bytes. Valid values: 1-4. |
| 4194 |
}, |
| 4195 |
], |
| 4196 |
} |
| 4197 |
|
| 4198 |
requestId: string, An optional request ID to identify requests. Specify a unique request ID so |
| 4199 |
that if you must retry your request, the server will know to ignore the |
| 4200 |
request if it has already been completed. |
| 4201 |
|
| 4202 |
For example, consider a situation where you make an initial request and |
| 4203 |
the request times out. If you make the request again with the same |
| 4204 |
request ID, the server can check if original operation with the same |
| 4205 |
request ID was received, and if so, will ignore the second request. This |
| 4206 |
prevents clients from accidentally creating duplicate commitments. |
| 4207 |
|
| 4208 |
The request ID must be |
| 4209 |
a valid UUID with the exception that zero UUID is not supported |
| 4210 |
(00000000-0000-0000-0000-000000000000). |
| 4211 |
validateOnly: boolean, If true, the request will not be committed. |
| 4212 |
x__xgafv: string, V1 error format. |
| 4213 |
Allowed values |
| 4214 |
1 - v1 error format |
| 4215 |
2 - v2 error format |
| 4216 |
|
| 4217 |
Returns: |
| 4218 |
An object of the form: |
| 4219 |
|
| 4220 |
{ # Represents an Operation resource. |
| 4221 |
# |
| 4222 |
# Google Compute Engine has three Operation resources: |
| 4223 |
# |
| 4224 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 4225 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 4226 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 4227 |
# |
| 4228 |
# You can use an operation resource to manage asynchronous API requests. |
| 4229 |
# For more information, readHandling |
| 4230 |
# API responses. |
| 4231 |
# |
| 4232 |
# Operations can be global, regional or zonal. |
| 4233 |
# |
| 4234 |
# - For global operations, use the `globalOperations` |
| 4235 |
# resource. |
| 4236 |
# - For regional operations, use the |
| 4237 |
# `regionOperations` resource. |
| 4238 |
# - For zonal operations, use |
| 4239 |
# the `zoneOperations` resource. |
| 4240 |
# |
| 4241 |
# |
| 4242 |
# |
| 4243 |
# For more information, read |
| 4244 |
# Global, Regional, and Zonal Resources. |
| 4245 |
# |
| 4246 |
# Note that completed Operation resources have a limited |
| 4247 |
# retention period. |
| 4248 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 4249 |
# Not present otherwise. |
| 4250 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 4251 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 4252 |
# set when the operation is created. |
| 4253 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 4254 |
# text format. |
| 4255 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 4256 |
# this field will be populated. |
| 4257 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 4258 |
# operation. |
| 4259 |
{ |
| 4260 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 4261 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 4262 |
# details. There is a set of defined message types to use for providing |
| 4263 |
# details.The syntax depends on the error code. For example, |
| 4264 |
# QuotaExceededInfo will have details when the error code is |
| 4265 |
# QUOTA_EXCEEDED. |
| 4266 |
{ |
| 4267 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 4268 |
# |
| 4269 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 4270 |
# is not enabled: |
| 4271 |
# |
| 4272 |
# { "reason": "API_DISABLED" |
| 4273 |
# "domain": "googleapis.com" |
| 4274 |
# "metadata": { |
| 4275 |
# "resource": "projects/123", |
| 4276 |
# "service": "pubsub.googleapis.com" |
| 4277 |
# } |
| 4278 |
# } |
| 4279 |
# |
| 4280 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 4281 |
# |
| 4282 |
# Example of an error that is returned when attempting to create a Spanner |
| 4283 |
# instance in a region that is out of stock: |
| 4284 |
# |
| 4285 |
# { "reason": "STOCKOUT" |
| 4286 |
# "domain": "spanner.googleapis.com", |
| 4287 |
# "metadata": { |
| 4288 |
# "availableRegions": "us-central1,us-east2" |
| 4289 |
# } |
| 4290 |
# } |
| 4291 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 4292 |
# is typically the registered service name of the tool or product that |
| 4293 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 4294 |
# generated by some common infrastructure, the error domain must be a |
| 4295 |
# globally unique value that identifies the infrastructure. For Google API |
| 4296 |
# infrastructure, the error domain is "googleapis.com". |
| 4297 |
"metadatas": { # Additional structured details about this error. |
| 4298 |
# |
| 4299 |
# Keys must match a regular expression of `a-z+` but should |
| 4300 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 4301 |
# length. When identifying the current value of an exceeded limit, the units |
| 4302 |
# should be contained in the key, not the value. For example, rather than |
| 4303 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 4304 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 4305 |
# instances that can be created in a single (batch) request. |
| 4306 |
"a_key": "A String", |
| 4307 |
}, |
| 4308 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 4309 |
# proximate cause of the error. Error reasons are unique within a particular |
| 4310 |
# domain of errors. This should be at most 63 characters and match a |
| 4311 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 4312 |
# UPPER_SNAKE_CASE. |
| 4313 |
}, |
| 4314 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 4315 |
# |
| 4316 |
# For example, if a quota check failed with an error indicating the calling |
| 4317 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 4318 |
# directly to the right place in the developer console to flip the bit. |
| 4319 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 4320 |
{ # Describes a URL link. |
| 4321 |
"description": "A String", # Describes what the link offers. |
| 4322 |
"url": "A String", # The URL of the link. |
| 4323 |
}, |
| 4324 |
], |
| 4325 |
}, |
| 4326 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 4327 |
# which can be attached to an RPC error. |
| 4328 |
"locale": "A String", # The locale used following the specification defined at |
| 4329 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 4330 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 4331 |
"message": "A String", # The localized error message in the above locale. |
| 4332 |
}, |
| 4333 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 4334 |
"dimensions": { # The map holding related quota dimensions. |
| 4335 |
"a_key": "A String", |
| 4336 |
}, |
| 4337 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 4338 |
# type or metric. |
| 4339 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 4340 |
# or metric. |
| 4341 |
"limitName": "A String", # The name of the quota limit. |
| 4342 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 4343 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 4344 |
}, |
| 4345 |
}, |
| 4346 |
], |
| 4347 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 4348 |
# This property is optional. |
| 4349 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 4350 |
}, |
| 4351 |
], |
| 4352 |
}, |
| 4353 |
"getVersionOperationMetadata": { |
| 4354 |
"inlineSbomInfo": { |
| 4355 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 4356 |
# appropriate identifiers. |
| 4357 |
"a_key": "A String", |
| 4358 |
}, |
| 4359 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 4360 |
# identifiers. |
| 4361 |
"a_key": "A String", |
| 4362 |
}, |
| 4363 |
}, |
| 4364 |
}, |
| 4365 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 4366 |
# message that was returned, such as `NOT FOUND`. |
| 4367 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 4368 |
# status code that was returned. For example, a `404` means the |
| 4369 |
# resource was not found. |
| 4370 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 4371 |
# defined by the server. |
| 4372 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 4373 |
# This value is inRFC3339 |
| 4374 |
# text format. |
| 4375 |
"instancesBulkInsertOperationMetadata": { |
| 4376 |
"perLocationStatus": { # Status information per location (location name is key). |
| 4377 |
# Example key: zones/us-central1-a |
| 4378 |
"a_key": { |
| 4379 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 4380 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 4381 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 4382 |
# error. |
| 4383 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 4384 |
# if the flow is rolling forward or rolling back. |
| 4385 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 4386 |
}, |
| 4387 |
}, |
| 4388 |
}, |
| 4389 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 4390 |
# Operation resources. |
| 4391 |
"name": "A String", # [Output Only] Name of the operation. |
| 4392 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 4393 |
# group of operations results from a `bulkInsert` API request. |
| 4394 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 4395 |
# `update`, or `delete`, and so on. |
| 4396 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 4397 |
# There is no requirement that this be linear or support any granularity of |
| 4398 |
# operations. This should not be used to guess when the operation will be |
| 4399 |
# complete. This number should monotonically increase as the operation |
| 4400 |
# progresses. |
| 4401 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 4402 |
# applicable when performing regional operations. |
| 4403 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 4404 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 4405 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 4406 |
# this field will contain information on all underlying zonal actions and |
| 4407 |
# their state. |
| 4408 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 4409 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 4410 |
# Example key: zones/us-central1-a |
| 4411 |
"a_key": { |
| 4412 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 4413 |
# populated. |
| 4414 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 4415 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 4416 |
# three pieces of data: error code, error message, and error details. |
| 4417 |
# |
| 4418 |
# You can find out more about this error model and how to work with it in the |
| 4419 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 4420 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 4421 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 4422 |
# message types for APIs to use. |
| 4423 |
{ |
| 4424 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 4425 |
}, |
| 4426 |
], |
| 4427 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 4428 |
# user-facing error message should be localized and sent in the |
| 4429 |
# google.rpc.Status.details field, or localized by the client. |
| 4430 |
}, |
| 4431 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 4432 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 4433 |
}, |
| 4434 |
}, |
| 4435 |
}, |
| 4436 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 4437 |
# This value is inRFC3339 |
| 4438 |
# text format. |
| 4439 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 4440 |
# following: |
| 4441 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 4442 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 4443 |
# operation. |
| 4444 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 4445 |
# of the target resource. |
| 4446 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 4447 |
# operations related to creating a snapshot, this points to the disk |
| 4448 |
# that the snapshot was created from. |
| 4449 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 4450 |
# `[email protected]` or |
| 4451 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 4452 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 4453 |
# operation, this field will be populated. |
| 4454 |
{ |
| 4455 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 4456 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 4457 |
# are no results in the response. |
| 4458 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 4459 |
# value format. For example: |
| 4460 |
# |
| 4461 |
# "data": [ |
| 4462 |
# { |
| 4463 |
# "key": "scope", |
| 4464 |
# "value": "zones/us-east1-d" |
| 4465 |
# } |
| 4466 |
{ |
| 4467 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 4468 |
# returned. For example, for warnings where there are no results in a list |
| 4469 |
# request for a particular zone, this key might be scope and |
| 4470 |
# the key value might be the zone name. Other examples might be a key |
| 4471 |
# indicating a deprecated resource and a suggested replacement, or a |
| 4472 |
# warning about invalid network settings (for example, if an instance |
| 4473 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 4474 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 4475 |
}, |
| 4476 |
], |
| 4477 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 4478 |
}, |
| 4479 |
], |
| 4480 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 4481 |
# applicable when performing per-zone operations. |
| 4482 |
}</pre> |
| 4483 |
</div> |
| 4484 |
|
| 4485 |
<div class="method"> |
| 4486 |
<code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> |
| 4487 |
<pre>List all the policies that have been configured for the specified project. |
| 4488 |
|
| 4489 |
Args: |
| 4490 |
project: string, Project ID for this request. (required) |
| 4491 |
filter: string, A filter expression that filters resources listed in the response. Most |
| 4492 |
Compute resources support two types of filter expressions: |
| 4493 |
expressions that support regular expressions and expressions that follow |
| 4494 |
API improvement proposal AIP-160. |
| 4495 |
These two types of filter expressions cannot be mixed in one request. |
| 4496 |
|
| 4497 |
If you want to use AIP-160, your expression must specify the field name, an |
| 4498 |
operator, and the value that you want to use for filtering. The value |
| 4499 |
must be a string, a number, or a boolean. The operator |
| 4500 |
must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| 4501 |
|
| 4502 |
For example, if you are filtering Compute Engine instances, you can |
| 4503 |
exclude instances named `example-instance` by specifying |
| 4504 |
`name != example-instance`. |
| 4505 |
|
| 4506 |
The `:*` comparison can be used to test whether a key has been defined. |
| 4507 |
For example, to find all objects with `owner` label use: |
| 4508 |
``` |
| 4509 |
labels.owner:* |
| 4510 |
``` |
| 4511 |
|
| 4512 |
You can also filter nested fields. For example, you could specify |
| 4513 |
`scheduling.automaticRestart = false` to include instances only |
| 4514 |
if they are not scheduled for automatic restarts. You can use filtering |
| 4515 |
on nested fields to filter based onresource labels. |
| 4516 |
|
| 4517 |
To filter on multiple expressions, provide each separate expression within |
| 4518 |
parentheses. For example: |
| 4519 |
``` |
| 4520 |
(scheduling.automaticRestart = true) |
| 4521 |
(cpuPlatform = "Intel Skylake") |
| 4522 |
``` |
| 4523 |
By default, each expression is an `AND` expression. However, you |
| 4524 |
can include `AND` and `OR` expressions explicitly. |
| 4525 |
For example: |
| 4526 |
``` |
| 4527 |
(cpuPlatform = "Intel Skylake") OR |
| 4528 |
(cpuPlatform = "Intel Broadwell") AND |
| 4529 |
(scheduling.automaticRestart = true) |
| 4530 |
``` |
| 4531 |
|
| 4532 |
If you want to use a regular expression, use the `eq` (equal) or `ne` |
| 4533 |
(not equal) operator against a single un-parenthesized expression with or |
| 4534 |
without quotes or against multiple parenthesized expressions. Examples: |
| 4535 |
|
| 4536 |
`fieldname eq unquoted literal` |
| 4537 |
`fieldname eq 'single quoted literal'` |
| 4538 |
`fieldname eq "double quoted literal"` |
| 4539 |
`(fieldname1 eq literal) (fieldname2 ne "literal")` |
| 4540 |
|
| 4541 |
The literal value is interpreted as a regular expression using GoogleRE2 library syntax. |
| 4542 |
The literal value must match the entire field. |
| 4543 |
|
| 4544 |
For example, to filter for instances that do not end with name "instance", |
| 4545 |
you would use `name ne .*instance`. |
| 4546 |
|
| 4547 |
You cannot combine constraints on multiple fields using regular |
| 4548 |
expressions. |
| 4549 |
maxResults: integer, The maximum number of results per page that should be returned. |
| 4550 |
If the number of available results is larger than `maxResults`, |
| 4551 |
Compute Engine returns a `nextPageToken` that can be used to get |
| 4552 |
the next page of results in subsequent list requests. Acceptable values are |
| 4553 |
`0` to `500`, inclusive. (Default: `500`) |
| 4554 |
orderBy: string, Sorts list results by a certain order. By default, results |
| 4555 |
are returned in alphanumerical order based on the resource name. |
| 4556 |
|
| 4557 |
You can also sort results in descending order based on the creation |
| 4558 |
timestamp using `orderBy="creationTimestamp desc"`. This sorts |
| 4559 |
results based on the `creationTimestamp` field in |
| 4560 |
reverse chronological order (newest result first). Use this to sort |
| 4561 |
resources like operations so that the newest operation is returned first. |
| 4562 |
|
| 4563 |
Currently, only sorting by `name` or |
| 4564 |
`creationTimestamp desc` is supported. |
| 4565 |
pageToken: string, Specifies a page token to use. Set `pageToken` to the |
| 4566 |
`nextPageToken` returned by a previous list request to get |
| 4567 |
the next page of results. |
| 4568 |
returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case |
| 4569 |
of failure. The default value is false. |
| 4570 |
|
| 4571 |
For example, when partial success behavior is enabled, aggregatedList for a |
| 4572 |
single zone scope either returns all resources in the zone or no resources, |
| 4573 |
with an error code. |
| 4574 |
x__xgafv: string, V1 error format. |
| 4575 |
Allowed values |
| 4576 |
1 - v1 error format |
| 4577 |
2 - v2 error format |
| 4578 |
|
| 4579 |
Returns: |
| 4580 |
An object of the form: |
| 4581 |
|
| 4582 |
{ |
| 4583 |
"etag": "A String", |
| 4584 |
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. |
| 4585 |
"items": [ # A list of SecurityPolicy resources. |
| 4586 |
{ # Represents a Google Cloud Armor security policy resource. |
| 4587 |
# |
| 4588 |
# Only external backend services that use load balancers can |
| 4589 |
# reference a security policy. For more information, see |
| 4590 |
# Google Cloud Armor security policy overview. |
| 4591 |
"adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). |
| 4592 |
"autoDeployConfig": { # Configuration options for Adaptive Protection auto-deploy feature. |
| 4593 |
"confidenceThreshold": 3.14, |
| 4594 |
"expirationSec": 42, |
| 4595 |
"impactedBaselineThreshold": 3.14, |
| 4596 |
"loadThreshold": 3.14, |
| 4597 |
}, |
| 4598 |
"layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. |
| 4599 |
# This field is only supported in Global Security Policies of type |
| 4600 |
# CLOUD_ARMOR. |
| 4601 |
"enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. |
| 4602 |
# This field is only supported in Global Security Policies of type |
| 4603 |
# CLOUD_ARMOR. |
| 4604 |
"ruleVisibility": "A String", # Rule visibility can be one of the following: |
| 4605 |
# STANDARD - opaque rules. (default) |
| 4606 |
# PREMIUM - transparent rules. |
| 4607 |
# This field is only supported in Global Security Policies of type |
| 4608 |
# CLOUD_ARMOR. |
| 4609 |
"thresholdConfigs": [ # Configuration options for layer7 adaptive protection for various |
| 4610 |
# customizable thresholds. |
| 4611 |
{ |
| 4612 |
"autoDeployConfidenceThreshold": 3.14, |
| 4613 |
"autoDeployExpirationSec": 42, |
| 4614 |
"autoDeployImpactedBaselineThreshold": 3.14, |
| 4615 |
"autoDeployLoadThreshold": 3.14, |
| 4616 |
"detectionAbsoluteQps": 3.14, |
| 4617 |
"detectionLoadThreshold": 3.14, |
| 4618 |
"detectionRelativeToBaselineQps": 3.14, |
| 4619 |
"name": "A String", # The name must be 1-63 characters long, and comply withRFC1035. |
| 4620 |
# The name must be unique within the security policy. |
| 4621 |
"trafficGranularityConfigs": [ # Configuration options for enabling Adaptive Protection to operate |
| 4622 |
# on specified granular traffic units. |
| 4623 |
{ # Configurations to specifc granular traffic units processed by |
| 4624 |
# Adaptive Protection. |
| 4625 |
"enableEachUniqueValue": True or False, # If enabled, traffic matching each unique value for the specified |
| 4626 |
# type constitutes a separate traffic unit. |
| 4627 |
# It can only be set to true if `value` is empty. |
| 4628 |
"type": "A String", # Type of this configuration. |
| 4629 |
"value": "A String", # Requests that match this value constitute a granular traffic unit. |
| 4630 |
}, |
| 4631 |
], |
| 4632 |
}, |
| 4633 |
], |
| 4634 |
}, |
| 4635 |
}, |
| 4636 |
"advancedOptionsConfig": { |
| 4637 |
"jsonCustomConfig": { # Custom configuration to apply the JSON parsing. Only applicable when |
| 4638 |
# json_parsing is set to STANDARD. |
| 4639 |
"contentTypes": [ # A list of custom Content-Type header values to apply the JSON parsing. |
| 4640 |
# |
| 4641 |
# As per RFC 1341, a Content-Type header value has the following format: |
| 4642 |
# |
| 4643 |
# Content-Type := type "/" subtype *[";" parameter] |
| 4644 |
# |
| 4645 |
# When configuring a custom Content-Type header value, only the |
| 4646 |
# type/subtype needs to be specified, and the parameters should be |
| 4647 |
# excluded. |
| 4648 |
"A String", |
| 4649 |
], |
| 4650 |
}, |
| 4651 |
"jsonParsing": "A String", |
| 4652 |
"logLevel": "A String", |
| 4653 |
"requestBodyInspectionSize": "A String", # The maximum request size chosen by the customer with Waf enabled. |
| 4654 |
# Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". |
| 4655 |
# Values are case insensitive. |
| 4656 |
"userIpRequestHeaders": [ # An optional list of case-insensitive request header names to use for |
| 4657 |
# resolving the callers client IP address. |
| 4658 |
"A String", |
| 4659 |
], |
| 4660 |
}, |
| 4661 |
"associations": [ # A list of associations that belong to this policy. |
| 4662 |
{ |
| 4663 |
"attachmentId": "A String", # The resource that the security policy is attached to. |
| 4664 |
"displayName": "A String", # Output only. [Output Only] The display name of the security policy of the association. |
| 4665 |
"excludedFolders": [ # A list of folders to exclude from the security policy. |
| 4666 |
"A String", |
| 4667 |
], |
| 4668 |
"excludedProjects": [ # A list of projects to exclude from the security policy. |
| 4669 |
"A String", |
| 4670 |
], |
| 4671 |
"name": "A String", # The name for an association. |
| 4672 |
"securityPolicyId": "A String", # Output only. [Output Only] The security policy ID of the association. |
| 4673 |
"shortName": "A String", # Output only. [Output Only] The short name of the security policy of the association. |
| 4674 |
}, |
| 4675 |
], |
| 4676 |
"cloudArmorConfig": { # Configuration options for Cloud Armor. |
| 4677 |
"enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. |
| 4678 |
}, |
| 4679 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 4680 |
# text format. |
| 4681 |
"ddosProtectionConfig": { |
| 4682 |
"ddosAdaptiveProtection": "A String", |
| 4683 |
"ddosImpactedBaselineThreshold": 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs) |
| 4684 |
# builds DDoS mitigations that minimize collateral damage. It quantifies |
| 4685 |
# this as the fraction of a non-abuse baseline that's inadvertently |
| 4686 |
# blocked. |
| 4687 |
# |
| 4688 |
# Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will |
| 4689 |
# not be deployed. Using a lower value will prioritize keeping collateral |
| 4690 |
# damage low, possibly at the cost of its effectiveness in rate limiting |
| 4691 |
# some or all of the attack. It should typically be unset, so Advanced DDoS |
| 4692 |
# (and Adaptive Protection) uses the best mitigation it can find. Setting |
| 4693 |
# the threshold is advised if there are logs for false positive detections |
| 4694 |
# with high collateral damage, and will cause Advanced DDoS to attempt to |
| 4695 |
# find a less aggressive rule that satisfies the constraint. If a suitable |
| 4696 |
# rule cannot be found, the system falls back to either no mitigation for |
| 4697 |
# smaller attacks or broader network throttles for larger ones. |
| 4698 |
"ddosProtection": "A String", |
| 4699 |
}, |
| 4700 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 4701 |
# create the resource. |
| 4702 |
"displayName": "A String", # User-provided name of the organization security policy. The name should be |
| 4703 |
# unique in the organization in which the security policy is created. This |
| 4704 |
# should only be used when SecurityPolicyType is FIREWALL. |
| 4705 |
# The name must be 1-63 characters long, and comply with |
| 4706 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 4707 |
# characters long and match the regular expression |
| 4708 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 4709 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 4710 |
# letter, or digit, except the last character, which cannot be a dash. |
| 4711 |
"fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of |
| 4712 |
# the metadata's contents and used for optimistic locking. The |
| 4713 |
# fingerprint is initially generated by Compute Engine and changes after |
| 4714 |
# every request to modify or update metadata. You must always provide an |
| 4715 |
# up-to-date fingerprint hash in order to update or change metadata, |
| 4716 |
# otherwise the request will fail with error412 conditionNotMet. |
| 4717 |
# |
| 4718 |
# To see the latest fingerprint, make get() request to the |
| 4719 |
# security policy. |
| 4720 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 4721 |
# defined by the server. |
| 4722 |
"kind": "compute#securityPolicy", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies |
| 4723 |
"labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which |
| 4724 |
# is essentially a hash of the labels set used for optimistic locking. The |
| 4725 |
# fingerprint is initially generated by Compute Engine and changes after |
| 4726 |
# every request to modify or update labels. You must always provide an |
| 4727 |
# up-to-date fingerprint hash in order to update or change labels. |
| 4728 |
# |
| 4729 |
# To see the latest fingerprint, make get() request to the |
| 4730 |
# security policy. |
| 4731 |
"labels": { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. |
| 4732 |
# Label values may be empty. |
| 4733 |
"a_key": "A String", |
| 4734 |
}, |
| 4735 |
"name": "A String", # Name of the resource. Provided by the client when the resource is created. |
| 4736 |
# The name must be 1-63 characters long, and comply withRFC1035. |
| 4737 |
# Specifically, the name must be 1-63 characters long and match the regular |
| 4738 |
# expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 4739 |
# character must be a lowercase letter, and all following characters must |
| 4740 |
# be a dash, lowercase letter, or digit, except the last character, which |
| 4741 |
# cannot be a dash. |
| 4742 |
"parent": "A String", # Output only. [Output Only] The parent of the security policy. |
| 4743 |
"recaptchaOptionsConfig": { |
| 4744 |
"redirectSiteKey": "A String", # An optional field to supply a reCAPTCHA site key to be used for all the |
| 4745 |
# rules using the redirect action with the type of GOOGLE_RECAPTCHA under |
| 4746 |
# the security policy. The specified site key needs to be created from the |
| 4747 |
# reCAPTCHA API. The user is responsible for the validity of the specified |
| 4748 |
# site key. If not specified, a Google-managed site key is used. |
| 4749 |
# This field is only supported in Global Security Policies of type |
| 4750 |
# CLOUD_ARMOR. |
| 4751 |
}, |
| 4752 |
"region": "A String", # Output only. [Output Only] URL of the region where the regional security policy |
| 4753 |
# resides. This field is not applicable to global security policies. |
| 4754 |
"ruleTupleCount": 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security |
| 4755 |
# policy can not exceed a set number of tuples. |
| 4756 |
"rules": [ # A list of rules that belong to this policy. |
| 4757 |
# There must always be a default rule which is a rule with priority |
| 4758 |
# 2147483647 and match all condition (for the match condition this means |
| 4759 |
# match "*" for srcIpRanges and for the networkMatch condition every field |
| 4760 |
# must be either match "*" or not set). If no rules are provided when |
| 4761 |
# creating a security policy, a default rule with action "allow" will be |
| 4762 |
# added. |
| 4763 |
{ # Represents a rule that describes one or more match conditions along with |
| 4764 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 4765 |
"action": "A String", # The Action to perform when the rule is matched. |
| 4766 |
# The following are the valid actions: |
| 4767 |
# |
| 4768 |
# - allow: allow access to target. |
| 4769 |
# - deny(STATUS): deny access to target, returns the |
| 4770 |
# HTTP response code specified. Valid values for `STATUS` |
| 4771 |
# are 403, 404, and 502. |
| 4772 |
# - rate_based_ban: limit client traffic to the configured |
| 4773 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 4774 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 4775 |
# rate_limit_options to be set. |
| 4776 |
# - redirect: redirect to a different target. This can |
| 4777 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 4778 |
# redirect via a 302 response. Parameters for this action can be configured |
| 4779 |
# via redirectOptions. This action is only supported in Global Security |
| 4780 |
# Policies of type CLOUD_ARMOR. |
| 4781 |
# - throttle: limit |
| 4782 |
# client traffic to the configured threshold. Configure parameters for this |
| 4783 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 4784 |
# this. |
| 4785 |
# - fairshare (preview only): when traffic reaches the |
| 4786 |
# threshold limit, requests from the clients matching this rule begin to be |
| 4787 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 4788 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 4789 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 4790 |
# create the resource. |
| 4791 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 4792 |
# specified when versioned_expr is set to FIREWALL. |
| 4793 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 4794 |
# enabled, logs will be exported to the configured export destination in |
| 4795 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 4796 |
# cannot enable logging on "goto_next" rules. |
| 4797 |
# |
| 4798 |
# This field may only be specified when the versioned_expr is set to |
| 4799 |
# FIREWALL. |
| 4800 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 4801 |
# This field is only supported in Global Security Policies of type |
| 4802 |
# CLOUD_ARMOR. |
| 4803 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 4804 |
# present. |
| 4805 |
{ |
| 4806 |
"headerName": "A String", # The name of the header to set. |
| 4807 |
"headerValue": "A String", # The value to set the named header to. |
| 4808 |
}, |
| 4809 |
], |
| 4810 |
}, |
| 4811 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 4812 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 4813 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 4814 |
# Exactly one field must be specified. |
| 4815 |
"config": { # The configuration options available when specifying versioned_expr. |
| 4816 |
# This field must be specified if versioned_expr is specified and cannot |
| 4817 |
# be specified if versioned_expr is not specified. |
| 4818 |
"destIpRanges": [ # CIDR IP address range. |
| 4819 |
# |
| 4820 |
# This field may only be specified when versioned_expr is set to |
| 4821 |
# FIREWALL. |
| 4822 |
"A String", |
| 4823 |
], |
| 4824 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 4825 |
# |
| 4826 |
# This field may only be specified when versioned_expr is set to |
| 4827 |
# FIREWALL. |
| 4828 |
{ |
| 4829 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 4830 |
# required when creating a firewall rule. This value can either be |
| 4831 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 4832 |
# protocol number. |
| 4833 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 4834 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 4835 |
# an integer or a range. If not specified, this rule applies to |
| 4836 |
# connections through any port. |
| 4837 |
# |
| 4838 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 4839 |
# |
| 4840 |
# This field may only be specified when versioned_expr is set to |
| 4841 |
# FIREWALL. |
| 4842 |
"A String", |
| 4843 |
], |
| 4844 |
}, |
| 4845 |
], |
| 4846 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 4847 |
# |
| 4848 |
# This field may only be specified when versioned_expr is set to |
| 4849 |
# FIREWALL. |
| 4850 |
{ |
| 4851 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 4852 |
# required when creating a firewall rule. This value can either be |
| 4853 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 4854 |
# protocol number. |
| 4855 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 4856 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 4857 |
# an integer or a range. If not specified, this rule applies to |
| 4858 |
# connections through any port. |
| 4859 |
# |
| 4860 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 4861 |
# |
| 4862 |
# This field may only be specified when versioned_expr is set to |
| 4863 |
# FIREWALL. |
| 4864 |
"A String", |
| 4865 |
], |
| 4866 |
}, |
| 4867 |
], |
| 4868 |
"srcIpRanges": [ # CIDR IP address range. |
| 4869 |
# Maximum number of src_ip_ranges allowed is 10. |
| 4870 |
"A String", |
| 4871 |
], |
| 4872 |
}, |
| 4873 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 4874 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 4875 |
# source.region_code and contents in the request header. |
| 4876 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 4877 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 4878 |
# nor in Regional Policies. Expressions containing |
| 4879 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 4880 |
# Enterprise subscription and are only supported in Global Security |
| 4881 |
# Policies. |
| 4882 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 4883 |
# are documented at https://github.com/google/cel-spec. |
| 4884 |
# |
| 4885 |
# Example (Comparison): |
| 4886 |
# |
| 4887 |
# title: "Summary size limit" |
| 4888 |
# description: "Determines if a summary is less than 100 chars" |
| 4889 |
# expression: "document.summary.size() < 100" |
| 4890 |
# |
| 4891 |
# Example (Equality): |
| 4892 |
# |
| 4893 |
# title: "Requestor is owner" |
| 4894 |
# description: "Determines if requestor is the document owner" |
| 4895 |
# expression: "document.owner == request.auth.claims.email" |
| 4896 |
# |
| 4897 |
# Example (Logic): |
| 4898 |
# |
| 4899 |
# title: "Public documents" |
| 4900 |
# description: "Determine whether the document should be publicly visible" |
| 4901 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 4902 |
# |
| 4903 |
# Example (Data Manipulation): |
| 4904 |
# |
| 4905 |
# title: "Notification string" |
| 4906 |
# description: "Create a notification string with a timestamp." |
| 4907 |
# expression: "'New message received at ' + string(document.create_time)" |
| 4908 |
# |
| 4909 |
# The exact variables and functions that may be referenced within an expression |
| 4910 |
# are determined by the service that evaluates it. See the service |
| 4911 |
# documentation for additional information. |
| 4912 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 4913 |
# describes the expression, e.g. when hovered over it in a UI. |
| 4914 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 4915 |
# syntax. |
| 4916 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 4917 |
# reporting, e.g. a file name and a position in the file. |
| 4918 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 4919 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 4920 |
# expression. |
| 4921 |
}, |
| 4922 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 4923 |
# CEVAL expression (i.e., 'expr'). |
| 4924 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 4925 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 4926 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 4927 |
# action-tokens. The provided site keys need to be created from |
| 4928 |
# reCAPTCHA API under the same project where the security policy is |
| 4929 |
# created. |
| 4930 |
"A String", |
| 4931 |
], |
| 4932 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 4933 |
# session-tokens. The provided site keys need to be created from |
| 4934 |
# reCAPTCHA API under the same project where the security policy is |
| 4935 |
# created. |
| 4936 |
"A String", |
| 4937 |
], |
| 4938 |
}, |
| 4939 |
}, |
| 4940 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 4941 |
# If this field is specified, config must also be specified. |
| 4942 |
# Available preconfigured expressions along with their requirements are: |
| 4943 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 4944 |
# config. |
| 4945 |
}, |
| 4946 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 4947 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 4948 |
# 'action' is enforced. |
| 4949 |
# |
| 4950 |
# The match criteria for a rule consists of built-in match fields (like |
| 4951 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 4952 |
# ('userDefinedFields'). |
| 4953 |
# |
| 4954 |
# Field values may be extracted directly from the packet or derived from it |
| 4955 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 4956 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 4957 |
# header is found in the packet and the entire field is in bounds. |
| 4958 |
# |
| 4959 |
# Each match field may specify which values can match it, listing one or |
| 4960 |
# more ranges, prefixes, or exact values that are considered a match for |
| 4961 |
# the field. A field value must be present in order to match a specified |
| 4962 |
# match field. If no match values are specified for a match field, then any |
| 4963 |
# field value is considered to match it, and it's not required to be |
| 4964 |
# present. For strings specifying '*' is also equivalent to match all. |
| 4965 |
# |
| 4966 |
# For a packet to match a rule, all specified match fields must match the |
| 4967 |
# corresponding field values derived from the packet. |
| 4968 |
# |
| 4969 |
# Example: |
| 4970 |
# |
| 4971 |
# networkMatch: |
| 4972 |
# srcIpRanges: |
| 4973 |
# - "192.0.2.0/24" |
| 4974 |
# - "198.51.100.0/24" |
| 4975 |
# userDefinedFields: |
| 4976 |
# - name: "ipv4_fragment_offset" |
| 4977 |
# values: |
| 4978 |
# - "1-0x1fff" |
| 4979 |
# |
| 4980 |
# The above match condition matches packets with a source IP in |
| 4981 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 4982 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 4983 |
# against. |
| 4984 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 4985 |
# format. |
| 4986 |
"A String", |
| 4987 |
], |
| 4988 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 4989 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 4990 |
"A String", |
| 4991 |
], |
| 4992 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 4993 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 4994 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 4995 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 4996 |
"A String", |
| 4997 |
], |
| 4998 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 4999 |
42, |
| 5000 |
], |
| 5001 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 5002 |
"A String", |
| 5003 |
], |
| 5004 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 5005 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 5006 |
"A String", |
| 5007 |
], |
| 5008 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 5009 |
# IP address. |
| 5010 |
"A String", |
| 5011 |
], |
| 5012 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 5013 |
# matching values for that field. |
| 5014 |
{ |
| 5015 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 5016 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 5017 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 5018 |
# range (e.g. "0x400-0x7ff"). |
| 5019 |
"A String", |
| 5020 |
], |
| 5021 |
}, |
| 5022 |
], |
| 5023 |
}, |
| 5024 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 5025 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 5026 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 5027 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 5028 |
{ |
| 5029 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 5030 |
# preconfigured WAF evaluation. |
| 5031 |
{ |
| 5032 |
"op": "A String", # The match operator for the field. |
| 5033 |
"val": "A String", # The value of the field. |
| 5034 |
}, |
| 5035 |
], |
| 5036 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 5037 |
# inspection during preconfigured WAF evaluation. |
| 5038 |
{ |
| 5039 |
"op": "A String", # The match operator for the field. |
| 5040 |
"val": "A String", # The value of the field. |
| 5041 |
}, |
| 5042 |
], |
| 5043 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 5044 |
# inspection during preconfigured WAF evaluation. |
| 5045 |
{ |
| 5046 |
"op": "A String", # The match operator for the field. |
| 5047 |
"val": "A String", # The value of the field. |
| 5048 |
}, |
| 5049 |
], |
| 5050 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 5051 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 5052 |
# parameter can be in the query string or in the POST body. |
| 5053 |
{ |
| 5054 |
"op": "A String", # The match operator for the field. |
| 5055 |
"val": "A String", # The value of the field. |
| 5056 |
}, |
| 5057 |
], |
| 5058 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 5059 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 5060 |
# field, the query or fragment part should be excluded. |
| 5061 |
{ |
| 5062 |
"op": "A String", # The match operator for the field. |
| 5063 |
"val": "A String", # The value of the field. |
| 5064 |
}, |
| 5065 |
], |
| 5066 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 5067 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 5068 |
# IDs under the WAF rule set. |
| 5069 |
"A String", |
| 5070 |
], |
| 5071 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 5072 |
}, |
| 5073 |
], |
| 5074 |
}, |
| 5075 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 5076 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 5077 |
# must be a positive value between 0 and 2147483647. |
| 5078 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 5079 |
# highest priority and 2147483647 is the lowest priority. |
| 5080 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 5081 |
# "fairshare". Cannot be specified for any other actions. |
| 5082 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 5083 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 5084 |
# the traffic will continue to be banned by the rate limit after the |
| 5085 |
# rate falls below the threshold. |
| 5086 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 5087 |
# "rate_based_ban". If specified, the key will be banned for the |
| 5088 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 5089 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 5090 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 5091 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 5092 |
}, |
| 5093 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 5094 |
# threshold. Valid option is "allow" only. |
| 5095 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 5096 |
# values are: |
| 5097 |
# |
| 5098 |
# - ALL: A single rate limit threshold is applied to all |
| 5099 |
# the requests matching this rule. This is the default value if |
| 5100 |
# "enforceOnKey" is not configured. |
| 5101 |
# - IP: The source IP address of |
| 5102 |
# the request is the key. Each IP has this limit enforced |
| 5103 |
# separately. |
| 5104 |
# - HTTP_HEADER: The value of the HTTP |
| 5105 |
# header whose name is configured under "enforceOnKeyName". The key |
| 5106 |
# value is truncated to the first 128 bytes of the header value. If no |
| 5107 |
# such header is present in the request, the key type defaults toALL. |
| 5108 |
# - XFF_IP: The first IP address (i.e. the |
| 5109 |
# originating client IP address) specified in the list of IPs under |
| 5110 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 5111 |
# is not a valid IP, the key defaults to the source IP address of |
| 5112 |
# the request i.e. key type IP. |
| 5113 |
# - HTTP_COOKIE: The value of the HTTP |
| 5114 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 5115 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 5116 |
# such cookie is present in the request, the key type defaults toALL. |
| 5117 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 5118 |
# value is truncated to the first 128 bytes. |
| 5119 |
# - SNI: Server name indication in the TLS session of the |
| 5120 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 5121 |
# key type defaults to ALL on a HTTP session. |
| 5122 |
# - REGION_CODE: The country/region from which the request |
| 5123 |
# originates. |
| 5124 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 5125 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 5126 |
# key type defaults to ALL. |
| 5127 |
# - USER_IP: The IP address of the originating client, |
| 5128 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 5129 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 5130 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 5131 |
# |
| 5132 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 5133 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 5134 |
# key type defaults to ALL. |
| 5135 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 5136 |
# limit threshold is enforced for all the requests matching the rule. |
| 5137 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 5138 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 5139 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 5140 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 5141 |
# enforce_on_key must not be specified. |
| 5142 |
{ |
| 5143 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 5144 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 5145 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 5146 |
# taken as the key value. |
| 5147 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 5148 |
# values are: |
| 5149 |
# |
| 5150 |
# - ALL: A single rate limit threshold is applied to all |
| 5151 |
# the requests matching this rule. This is the default value if |
| 5152 |
# "enforceOnKeyConfigs" is not configured. |
| 5153 |
# - IP: The source IP address of |
| 5154 |
# the request is the key. Each IP has this limit enforced |
| 5155 |
# separately. |
| 5156 |
# - HTTP_HEADER: The value of the HTTP |
| 5157 |
# header whose name is configured under "enforceOnKeyName". The key |
| 5158 |
# value is truncated to the first 128 bytes of the header value. If no |
| 5159 |
# such header is present in the request, the key type defaults toALL. |
| 5160 |
# - XFF_IP: The first IP address (i.e. the |
| 5161 |
# originating client IP address) specified in the list of IPs under |
| 5162 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 5163 |
# value is not a valid IP, the key defaults to the source IP address of |
| 5164 |
# the request i.e. key type IP. |
| 5165 |
# - HTTP_COOKIE: The value of the HTTP |
| 5166 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 5167 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 5168 |
# such cookie is present in the request, the key type defaults toALL. |
| 5169 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 5170 |
# value is truncated to the first 128 bytes. |
| 5171 |
# - SNI: Server name indication in the TLS session of |
| 5172 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 5173 |
# The key type defaults to ALL on a HTTP session. |
| 5174 |
# - REGION_CODE: The country/region from which the |
| 5175 |
# request originates. |
| 5176 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 5177 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 5178 |
# key type defaults to ALL. |
| 5179 |
# - USER_IP: The IP address of the originating client, |
| 5180 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 5181 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 5182 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 5183 |
# |
| 5184 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 5185 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 5186 |
# key type defaults to ALL. |
| 5187 |
}, |
| 5188 |
], |
| 5189 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 5190 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 5191 |
# value. |
| 5192 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 5193 |
# value. |
| 5194 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 5195 |
# threshold, to either deny with a specified HTTP response code, or |
| 5196 |
# redirect to a different endpoint. |
| 5197 |
# Valid options are `deny(STATUS)`, where valid values for |
| 5198 |
# `STATUS` are 403, 404, 429, and 502, and |
| 5199 |
# `redirect`, where the redirect parameters come from |
| 5200 |
# `exceedRedirectOptions` below. |
| 5201 |
# The `redirect` action is only supported in Global Security Policies of |
| 5202 |
# type CLOUD_ARMOR. |
| 5203 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 5204 |
# above the configured rate limit threshold |
| 5205 |
"code": 42, # The status code, which should be an enum value of |
| 5206 |
# google.rpc.Code. |
| 5207 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 5208 |
}, |
| 5209 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 5210 |
# action. Cannot be specified if the exceed action is not redirect. |
| 5211 |
# This field is only supported in Global Security Policies of type |
| 5212 |
# CLOUD_ARMOR. |
| 5213 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 5214 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 5215 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 5216 |
# |
| 5217 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 5218 |
# challenge assessment. |
| 5219 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 5220 |
# response. |
| 5221 |
}, |
| 5222 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 5223 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 5224 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 5225 |
}, |
| 5226 |
}, |
| 5227 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 5228 |
# other actions. |
| 5229 |
# This field is only supported in Global Security Policies of type |
| 5230 |
# CLOUD_ARMOR. |
| 5231 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 5232 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 5233 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 5234 |
# |
| 5235 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 5236 |
# challenge assessment. |
| 5237 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 5238 |
# response. |
| 5239 |
}, |
| 5240 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 5241 |
# other actions. |
| 5242 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 5243 |
# rule. |
| 5244 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 5245 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 5246 |
# policy. This can only be set during rule creation, if rule number is not |
| 5247 |
# specified it will be generated by the server. |
| 5248 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 5249 |
# policy rule. |
| 5250 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 5251 |
# allows you to control which network's VMs get this rule. If this field |
| 5252 |
# is left blank, all VMs within the organization will receive the rule. |
| 5253 |
# |
| 5254 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 5255 |
"A String", |
| 5256 |
], |
| 5257 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 5258 |
# applied with this rule. |
| 5259 |
"A String", |
| 5260 |
], |
| 5261 |
}, |
| 5262 |
], |
| 5263 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 5264 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 5265 |
"shortName": "A String", # User-provided name of the organization security policy. The name should be |
| 5266 |
# unique in the organization in which the security policy is created. This |
| 5267 |
# should only be used when SecurityPolicyType is CLOUD_ARMOR. |
| 5268 |
# The name must be 1-63 characters long, and comply with |
| 5269 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 5270 |
# characters long and match the regular expression |
| 5271 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 5272 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 5273 |
# letter, or digit, except the last character, which cannot be a dash. |
| 5274 |
"type": "A String", # The type indicates the intended use of the security policy. |
| 5275 |
# |
| 5276 |
# - CLOUD_ARMOR: Cloud Armor backend security policies can |
| 5277 |
# be configured to filter incoming HTTP requests targeting backend services. |
| 5278 |
# They filter requests before they hit the origin servers. |
| 5279 |
# - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can |
| 5280 |
# be configured to filter incoming HTTP requests targeting backend services |
| 5281 |
# (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). |
| 5282 |
# They filter requests before the request is served from Google's cache. |
| 5283 |
# - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor |
| 5284 |
# internal service policies can be configured to filter HTTP requests |
| 5285 |
# targeting services managed by Traffic Director in a service mesh. They |
| 5286 |
# filter requests before the request is served from the application. |
| 5287 |
# |
| 5288 |
# - CLOUD_ARMOR_NETWORK: Cloud Armor network policies |
| 5289 |
# can be configured to filter packets targeting network load balancing |
| 5290 |
# resources such as backend services, target pools, target instances, and |
| 5291 |
# instances with external IPs. They filter requests before the request is |
| 5292 |
# served from the application. |
| 5293 |
# |
| 5294 |
# |
| 5295 |
# This field can be set only at resource creation time. |
| 5296 |
"userDefinedFields": [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A |
| 5297 |
# user-defined field consists of up to 4 bytes extracted from a fixed offset |
| 5298 |
# in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an |
| 5299 |
# optional mask to select certain bits. Rules may then specify matching |
| 5300 |
# values for these fields. |
| 5301 |
# |
| 5302 |
# Example: |
| 5303 |
# |
| 5304 |
# userDefinedFields: |
| 5305 |
# - name: "ipv4_fragment_offset" |
| 5306 |
# base: IPV4 |
| 5307 |
# offset: 6 |
| 5308 |
# size: 2 |
| 5309 |
# mask: "0x1fff" |
| 5310 |
{ |
| 5311 |
"base": "A String", # The base relative to which 'offset' is measured. Possible values are: |
| 5312 |
# |
| 5313 |
# - IPV4: Points to the beginning of the IPv4 header. |
| 5314 |
# - IPV6: Points to the beginning of the IPv6 header. |
| 5315 |
# - TCP: Points to the beginning of the TCP header, skipping |
| 5316 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 5317 |
# non-first fragments. |
| 5318 |
# - UDP: Points to the beginning of the UDP header, skipping |
| 5319 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 5320 |
# non-first fragments. |
| 5321 |
# |
| 5322 |
# |
| 5323 |
# required |
| 5324 |
"mask": "A String", # If specified, apply this mask (bitwise AND) to the field to ignore bits |
| 5325 |
# before matching. Encoded as a hexadecimal number (starting with "0x"). |
| 5326 |
# The last byte of the field (in network byte order) corresponds to the |
| 5327 |
# least significant byte of the mask. |
| 5328 |
"name": "A String", # The name of this field. Must be unique within the policy. |
| 5329 |
"offset": 42, # Offset of the first byte of the field (in network byte order) relative to |
| 5330 |
# 'base'. |
| 5331 |
"size": 42, # Size of the field in bytes. Valid values: 1-4. |
| 5332 |
}, |
| 5333 |
], |
| 5334 |
}, |
| 5335 |
], |
| 5336 |
"kind": "compute#securityPolicyList", # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies |
| 5337 |
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for |
| 5338 |
# list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for |
| 5339 |
# the query parameter pageToken in the next list request. |
| 5340 |
# Subsequent list requests will have their own nextPageToken to |
| 5341 |
# continue paging through the results. |
| 5342 |
"unreachables": [ # Output only. [Output Only] Unreachable resources. |
| 5343 |
"A String", |
| 5344 |
], |
| 5345 |
"warning": { # [Output Only] Informational warning message. |
| 5346 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 5347 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 5348 |
# are no results in the response. |
| 5349 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 5350 |
# value format. For example: |
| 5351 |
# |
| 5352 |
# "data": [ |
| 5353 |
# { |
| 5354 |
# "key": "scope", |
| 5355 |
# "value": "zones/us-east1-d" |
| 5356 |
# } |
| 5357 |
{ |
| 5358 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 5359 |
# returned. For example, for warnings where there are no results in a list |
| 5360 |
# request for a particular zone, this key might be scope and |
| 5361 |
# the key value might be the zone name. Other examples might be a key |
| 5362 |
# indicating a deprecated resource and a suggested replacement, or a |
| 5363 |
# warning about invalid network settings (for example, if an instance |
| 5364 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 5365 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 5366 |
}, |
| 5367 |
], |
| 5368 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 5369 |
}, |
| 5370 |
}</pre> |
| 5371 |
</div> |
| 5372 |
|
| 5373 |
<div class="method"> |
| 5374 |
<code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> |
| 5375 |
<pre>Gets the current list of preconfigured Web Application Firewall (WAF) |
| 5376 |
expressions. |
| 5377 |
|
| 5378 |
Args: |
| 5379 |
project: string, Project ID for this request. (required) |
| 5380 |
filter: string, A filter expression that filters resources listed in the response. Most |
| 5381 |
Compute resources support two types of filter expressions: |
| 5382 |
expressions that support regular expressions and expressions that follow |
| 5383 |
API improvement proposal AIP-160. |
| 5384 |
These two types of filter expressions cannot be mixed in one request. |
| 5385 |
|
| 5386 |
If you want to use AIP-160, your expression must specify the field name, an |
| 5387 |
operator, and the value that you want to use for filtering. The value |
| 5388 |
must be a string, a number, or a boolean. The operator |
| 5389 |
must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| 5390 |
|
| 5391 |
For example, if you are filtering Compute Engine instances, you can |
| 5392 |
exclude instances named `example-instance` by specifying |
| 5393 |
`name != example-instance`. |
| 5394 |
|
| 5395 |
The `:*` comparison can be used to test whether a key has been defined. |
| 5396 |
For example, to find all objects with `owner` label use: |
| 5397 |
``` |
| 5398 |
labels.owner:* |
| 5399 |
``` |
| 5400 |
|
| 5401 |
You can also filter nested fields. For example, you could specify |
| 5402 |
`scheduling.automaticRestart = false` to include instances only |
| 5403 |
if they are not scheduled for automatic restarts. You can use filtering |
| 5404 |
on nested fields to filter based onresource labels. |
| 5405 |
|
| 5406 |
To filter on multiple expressions, provide each separate expression within |
| 5407 |
parentheses. For example: |
| 5408 |
``` |
| 5409 |
(scheduling.automaticRestart = true) |
| 5410 |
(cpuPlatform = "Intel Skylake") |
| 5411 |
``` |
| 5412 |
By default, each expression is an `AND` expression. However, you |
| 5413 |
can include `AND` and `OR` expressions explicitly. |
| 5414 |
For example: |
| 5415 |
``` |
| 5416 |
(cpuPlatform = "Intel Skylake") OR |
| 5417 |
(cpuPlatform = "Intel Broadwell") AND |
| 5418 |
(scheduling.automaticRestart = true) |
| 5419 |
``` |
| 5420 |
|
| 5421 |
If you want to use a regular expression, use the `eq` (equal) or `ne` |
| 5422 |
(not equal) operator against a single un-parenthesized expression with or |
| 5423 |
without quotes or against multiple parenthesized expressions. Examples: |
| 5424 |
|
| 5425 |
`fieldname eq unquoted literal` |
| 5426 |
`fieldname eq 'single quoted literal'` |
| 5427 |
`fieldname eq "double quoted literal"` |
| 5428 |
`(fieldname1 eq literal) (fieldname2 ne "literal")` |
| 5429 |
|
| 5430 |
The literal value is interpreted as a regular expression using GoogleRE2 library syntax. |
| 5431 |
The literal value must match the entire field. |
| 5432 |
|
| 5433 |
For example, to filter for instances that do not end with name "instance", |
| 5434 |
you would use `name ne .*instance`. |
| 5435 |
|
| 5436 |
You cannot combine constraints on multiple fields using regular |
| 5437 |
expressions. |
| 5438 |
maxResults: integer, The maximum number of results per page that should be returned. |
| 5439 |
If the number of available results is larger than `maxResults`, |
| 5440 |
Compute Engine returns a `nextPageToken` that can be used to get |
| 5441 |
the next page of results in subsequent list requests. Acceptable values are |
| 5442 |
`0` to `500`, inclusive. (Default: `500`) |
| 5443 |
orderBy: string, Sorts list results by a certain order. By default, results |
| 5444 |
are returned in alphanumerical order based on the resource name. |
| 5445 |
|
| 5446 |
You can also sort results in descending order based on the creation |
| 5447 |
timestamp using `orderBy="creationTimestamp desc"`. This sorts |
| 5448 |
results based on the `creationTimestamp` field in |
| 5449 |
reverse chronological order (newest result first). Use this to sort |
| 5450 |
resources like operations so that the newest operation is returned first. |
| 5451 |
|
| 5452 |
Currently, only sorting by `name` or |
| 5453 |
`creationTimestamp desc` is supported. |
| 5454 |
pageToken: string, Specifies a page token to use. Set `pageToken` to the |
| 5455 |
`nextPageToken` returned by a previous list request to get |
| 5456 |
the next page of results. |
| 5457 |
returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case |
| 5458 |
of failure. The default value is false. |
| 5459 |
|
| 5460 |
For example, when partial success behavior is enabled, aggregatedList for a |
| 5461 |
single zone scope either returns all resources in the zone or no resources, |
| 5462 |
with an error code. |
| 5463 |
x__xgafv: string, V1 error format. |
| 5464 |
Allowed values |
| 5465 |
1 - v1 error format |
| 5466 |
2 - v2 error format |
| 5467 |
|
| 5468 |
Returns: |
| 5469 |
An object of the form: |
| 5470 |
|
| 5471 |
{ |
| 5472 |
"preconfiguredExpressionSets": { |
| 5473 |
"wafRules": { |
| 5474 |
"expressionSets": [ # List of entities that are currently supported for WAF rules. |
| 5475 |
{ |
| 5476 |
"aliases": [ # A list of alternate IDs. The format should be: |
| 5477 |
# - E.g. XSS-stable |
| 5478 |
# Generic suffix like "stable" is particularly useful if a policy |
| 5479 |
# likes to avail newer set of expressions without having to change |
| 5480 |
# the policy. |
| 5481 |
# A given alias name can't be used for more than one entity set. |
| 5482 |
"A String", |
| 5483 |
], |
| 5484 |
"expressions": [ # List of available expressions. |
| 5485 |
{ |
| 5486 |
"id": "A String", # Expression ID should uniquely identify the origin of the expression. |
| 5487 |
# E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set |
| 5488 |
# version 2.9.1 rule id 973337. |
| 5489 |
# The ID could be used to determine the individual attack definition |
| 5490 |
# that has been detected. It could also be used to exclude it from |
| 5491 |
# the policy in case of false positive. |
| 5492 |
# required |
| 5493 |
"sensitivity": 42, # The sensitivity value associated with the WAF rule ID. This corresponds |
| 5494 |
# to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for |
| 5495 |
# opt-in only rules. |
| 5496 |
}, |
| 5497 |
], |
| 5498 |
"id": "A String", # Google specified expression set ID. The format should be: |
| 5499 |
# - E.g. XSS-20170329 |
| 5500 |
# required |
| 5501 |
}, |
| 5502 |
], |
| 5503 |
}, |
| 5504 |
}, |
| 5505 |
}</pre> |
| 5506 |
</div> |
| 5507 |
|
| 5508 |
<div class="method"> |
| 5509 |
<code class="details" id="list_next">list_next()</code> |
| 5510 |
<pre>Retrieves the next page of results. |
| 5511 |
|
| 5512 |
Args: |
| 5513 |
previous_request: The request for the previous page. (required) |
| 5514 |
previous_response: The response from the request for the previous page. (required) |
| 5515 |
|
| 5516 |
Returns: |
| 5517 |
A request object that you can call 'execute()' on to request the next |
| 5518 |
page. Returns None if there are no more items in the collection. |
| 5519 |
</pre> |
| 5520 |
</div> |
| 5521 |
|
| 5522 |
<div class="method"> |
| 5523 |
<code class="details" id="patch">patch(project, securityPolicy, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</code> |
| 5524 |
<pre>Patches the specified policy with the data included in the request. To |
| 5525 |
clear fields in the policy, leave the fields empty and specify them in the |
| 5526 |
updateMask. This cannot be used to be update the rules in the policy. |
| 5527 |
Please use the per rule methods like addRule, patchRule, and removeRule |
| 5528 |
instead. |
| 5529 |
|
| 5530 |
Args: |
| 5531 |
project: string, Project ID for this request. (required) |
| 5532 |
securityPolicy: string, Name of the security policy to update. (required) |
| 5533 |
body: object, The request body. |
| 5534 |
The object takes the form of: |
| 5535 |
|
| 5536 |
{ # Represents a Google Cloud Armor security policy resource. |
| 5537 |
# |
| 5538 |
# Only external backend services that use load balancers can |
| 5539 |
# reference a security policy. For more information, see |
| 5540 |
# Google Cloud Armor security policy overview. |
| 5541 |
"adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). |
| 5542 |
"autoDeployConfig": { # Configuration options for Adaptive Protection auto-deploy feature. |
| 5543 |
"confidenceThreshold": 3.14, |
| 5544 |
"expirationSec": 42, |
| 5545 |
"impactedBaselineThreshold": 3.14, |
| 5546 |
"loadThreshold": 3.14, |
| 5547 |
}, |
| 5548 |
"layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. |
| 5549 |
# This field is only supported in Global Security Policies of type |
| 5550 |
# CLOUD_ARMOR. |
| 5551 |
"enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. |
| 5552 |
# This field is only supported in Global Security Policies of type |
| 5553 |
# CLOUD_ARMOR. |
| 5554 |
"ruleVisibility": "A String", # Rule visibility can be one of the following: |
| 5555 |
# STANDARD - opaque rules. (default) |
| 5556 |
# PREMIUM - transparent rules. |
| 5557 |
# This field is only supported in Global Security Policies of type |
| 5558 |
# CLOUD_ARMOR. |
| 5559 |
"thresholdConfigs": [ # Configuration options for layer7 adaptive protection for various |
| 5560 |
# customizable thresholds. |
| 5561 |
{ |
| 5562 |
"autoDeployConfidenceThreshold": 3.14, |
| 5563 |
"autoDeployExpirationSec": 42, |
| 5564 |
"autoDeployImpactedBaselineThreshold": 3.14, |
| 5565 |
"autoDeployLoadThreshold": 3.14, |
| 5566 |
"detectionAbsoluteQps": 3.14, |
| 5567 |
"detectionLoadThreshold": 3.14, |
| 5568 |
"detectionRelativeToBaselineQps": 3.14, |
| 5569 |
"name": "A String", # The name must be 1-63 characters long, and comply withRFC1035. |
| 5570 |
# The name must be unique within the security policy. |
| 5571 |
"trafficGranularityConfigs": [ # Configuration options for enabling Adaptive Protection to operate |
| 5572 |
# on specified granular traffic units. |
| 5573 |
{ # Configurations to specifc granular traffic units processed by |
| 5574 |
# Adaptive Protection. |
| 5575 |
"enableEachUniqueValue": True or False, # If enabled, traffic matching each unique value for the specified |
| 5576 |
# type constitutes a separate traffic unit. |
| 5577 |
# It can only be set to true if `value` is empty. |
| 5578 |
"type": "A String", # Type of this configuration. |
| 5579 |
"value": "A String", # Requests that match this value constitute a granular traffic unit. |
| 5580 |
}, |
| 5581 |
], |
| 5582 |
}, |
| 5583 |
], |
| 5584 |
}, |
| 5585 |
}, |
| 5586 |
"advancedOptionsConfig": { |
| 5587 |
"jsonCustomConfig": { # Custom configuration to apply the JSON parsing. Only applicable when |
| 5588 |
# json_parsing is set to STANDARD. |
| 5589 |
"contentTypes": [ # A list of custom Content-Type header values to apply the JSON parsing. |
| 5590 |
# |
| 5591 |
# As per RFC 1341, a Content-Type header value has the following format: |
| 5592 |
# |
| 5593 |
# Content-Type := type "/" subtype *[";" parameter] |
| 5594 |
# |
| 5595 |
# When configuring a custom Content-Type header value, only the |
| 5596 |
# type/subtype needs to be specified, and the parameters should be |
| 5597 |
# excluded. |
| 5598 |
"A String", |
| 5599 |
], |
| 5600 |
}, |
| 5601 |
"jsonParsing": "A String", |
| 5602 |
"logLevel": "A String", |
| 5603 |
"requestBodyInspectionSize": "A String", # The maximum request size chosen by the customer with Waf enabled. |
| 5604 |
# Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". |
| 5605 |
# Values are case insensitive. |
| 5606 |
"userIpRequestHeaders": [ # An optional list of case-insensitive request header names to use for |
| 5607 |
# resolving the callers client IP address. |
| 5608 |
"A String", |
| 5609 |
], |
| 5610 |
}, |
| 5611 |
"associations": [ # A list of associations that belong to this policy. |
| 5612 |
{ |
| 5613 |
"attachmentId": "A String", # The resource that the security policy is attached to. |
| 5614 |
"displayName": "A String", # Output only. [Output Only] The display name of the security policy of the association. |
| 5615 |
"excludedFolders": [ # A list of folders to exclude from the security policy. |
| 5616 |
"A String", |
| 5617 |
], |
| 5618 |
"excludedProjects": [ # A list of projects to exclude from the security policy. |
| 5619 |
"A String", |
| 5620 |
], |
| 5621 |
"name": "A String", # The name for an association. |
| 5622 |
"securityPolicyId": "A String", # Output only. [Output Only] The security policy ID of the association. |
| 5623 |
"shortName": "A String", # Output only. [Output Only] The short name of the security policy of the association. |
| 5624 |
}, |
| 5625 |
], |
| 5626 |
"cloudArmorConfig": { # Configuration options for Cloud Armor. |
| 5627 |
"enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. |
| 5628 |
}, |
| 5629 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 5630 |
# text format. |
| 5631 |
"ddosProtectionConfig": { |
| 5632 |
"ddosAdaptiveProtection": "A String", |
| 5633 |
"ddosImpactedBaselineThreshold": 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs) |
| 5634 |
# builds DDoS mitigations that minimize collateral damage. It quantifies |
| 5635 |
# this as the fraction of a non-abuse baseline that's inadvertently |
| 5636 |
# blocked. |
| 5637 |
# |
| 5638 |
# Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will |
| 5639 |
# not be deployed. Using a lower value will prioritize keeping collateral |
| 5640 |
# damage low, possibly at the cost of its effectiveness in rate limiting |
| 5641 |
# some or all of the attack. It should typically be unset, so Advanced DDoS |
| 5642 |
# (and Adaptive Protection) uses the best mitigation it can find. Setting |
| 5643 |
# the threshold is advised if there are logs for false positive detections |
| 5644 |
# with high collateral damage, and will cause Advanced DDoS to attempt to |
| 5645 |
# find a less aggressive rule that satisfies the constraint. If a suitable |
| 5646 |
# rule cannot be found, the system falls back to either no mitigation for |
| 5647 |
# smaller attacks or broader network throttles for larger ones. |
| 5648 |
"ddosProtection": "A String", |
| 5649 |
}, |
| 5650 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 5651 |
# create the resource. |
| 5652 |
"displayName": "A String", # User-provided name of the organization security policy. The name should be |
| 5653 |
# unique in the organization in which the security policy is created. This |
| 5654 |
# should only be used when SecurityPolicyType is FIREWALL. |
| 5655 |
# The name must be 1-63 characters long, and comply with |
| 5656 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 5657 |
# characters long and match the regular expression |
| 5658 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 5659 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 5660 |
# letter, or digit, except the last character, which cannot be a dash. |
| 5661 |
"fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of |
| 5662 |
# the metadata's contents and used for optimistic locking. The |
| 5663 |
# fingerprint is initially generated by Compute Engine and changes after |
| 5664 |
# every request to modify or update metadata. You must always provide an |
| 5665 |
# up-to-date fingerprint hash in order to update or change metadata, |
| 5666 |
# otherwise the request will fail with error412 conditionNotMet. |
| 5667 |
# |
| 5668 |
# To see the latest fingerprint, make get() request to the |
| 5669 |
# security policy. |
| 5670 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 5671 |
# defined by the server. |
| 5672 |
"kind": "compute#securityPolicy", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies |
| 5673 |
"labelFingerprint": "A String", # A fingerprint for the labels being applied to this security policy, which |
| 5674 |
# is essentially a hash of the labels set used for optimistic locking. The |
| 5675 |
# fingerprint is initially generated by Compute Engine and changes after |
| 5676 |
# every request to modify or update labels. You must always provide an |
| 5677 |
# up-to-date fingerprint hash in order to update or change labels. |
| 5678 |
# |
| 5679 |
# To see the latest fingerprint, make get() request to the |
| 5680 |
# security policy. |
| 5681 |
"labels": { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. |
| 5682 |
# Label values may be empty. |
| 5683 |
"a_key": "A String", |
| 5684 |
}, |
| 5685 |
"name": "A String", # Name of the resource. Provided by the client when the resource is created. |
| 5686 |
# The name must be 1-63 characters long, and comply withRFC1035. |
| 5687 |
# Specifically, the name must be 1-63 characters long and match the regular |
| 5688 |
# expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 5689 |
# character must be a lowercase letter, and all following characters must |
| 5690 |
# be a dash, lowercase letter, or digit, except the last character, which |
| 5691 |
# cannot be a dash. |
| 5692 |
"parent": "A String", # Output only. [Output Only] The parent of the security policy. |
| 5693 |
"recaptchaOptionsConfig": { |
| 5694 |
"redirectSiteKey": "A String", # An optional field to supply a reCAPTCHA site key to be used for all the |
| 5695 |
# rules using the redirect action with the type of GOOGLE_RECAPTCHA under |
| 5696 |
# the security policy. The specified site key needs to be created from the |
| 5697 |
# reCAPTCHA API. The user is responsible for the validity of the specified |
| 5698 |
# site key. If not specified, a Google-managed site key is used. |
| 5699 |
# This field is only supported in Global Security Policies of type |
| 5700 |
# CLOUD_ARMOR. |
| 5701 |
}, |
| 5702 |
"region": "A String", # Output only. [Output Only] URL of the region where the regional security policy |
| 5703 |
# resides. This field is not applicable to global security policies. |
| 5704 |
"ruleTupleCount": 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security |
| 5705 |
# policy can not exceed a set number of tuples. |
| 5706 |
"rules": [ # A list of rules that belong to this policy. |
| 5707 |
# There must always be a default rule which is a rule with priority |
| 5708 |
# 2147483647 and match all condition (for the match condition this means |
| 5709 |
# match "*" for srcIpRanges and for the networkMatch condition every field |
| 5710 |
# must be either match "*" or not set). If no rules are provided when |
| 5711 |
# creating a security policy, a default rule with action "allow" will be |
| 5712 |
# added. |
| 5713 |
{ # Represents a rule that describes one or more match conditions along with |
| 5714 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 5715 |
"action": "A String", # The Action to perform when the rule is matched. |
| 5716 |
# The following are the valid actions: |
| 5717 |
# |
| 5718 |
# - allow: allow access to target. |
| 5719 |
# - deny(STATUS): deny access to target, returns the |
| 5720 |
# HTTP response code specified. Valid values for `STATUS` |
| 5721 |
# are 403, 404, and 502. |
| 5722 |
# - rate_based_ban: limit client traffic to the configured |
| 5723 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 5724 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 5725 |
# rate_limit_options to be set. |
| 5726 |
# - redirect: redirect to a different target. This can |
| 5727 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 5728 |
# redirect via a 302 response. Parameters for this action can be configured |
| 5729 |
# via redirectOptions. This action is only supported in Global Security |
| 5730 |
# Policies of type CLOUD_ARMOR. |
| 5731 |
# - throttle: limit |
| 5732 |
# client traffic to the configured threshold. Configure parameters for this |
| 5733 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 5734 |
# this. |
| 5735 |
# - fairshare (preview only): when traffic reaches the |
| 5736 |
# threshold limit, requests from the clients matching this rule begin to be |
| 5737 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 5738 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 5739 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 5740 |
# create the resource. |
| 5741 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 5742 |
# specified when versioned_expr is set to FIREWALL. |
| 5743 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 5744 |
# enabled, logs will be exported to the configured export destination in |
| 5745 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 5746 |
# cannot enable logging on "goto_next" rules. |
| 5747 |
# |
| 5748 |
# This field may only be specified when the versioned_expr is set to |
| 5749 |
# FIREWALL. |
| 5750 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 5751 |
# This field is only supported in Global Security Policies of type |
| 5752 |
# CLOUD_ARMOR. |
| 5753 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 5754 |
# present. |
| 5755 |
{ |
| 5756 |
"headerName": "A String", # The name of the header to set. |
| 5757 |
"headerValue": "A String", # The value to set the named header to. |
| 5758 |
}, |
| 5759 |
], |
| 5760 |
}, |
| 5761 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 5762 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 5763 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 5764 |
# Exactly one field must be specified. |
| 5765 |
"config": { # The configuration options available when specifying versioned_expr. |
| 5766 |
# This field must be specified if versioned_expr is specified and cannot |
| 5767 |
# be specified if versioned_expr is not specified. |
| 5768 |
"destIpRanges": [ # CIDR IP address range. |
| 5769 |
# |
| 5770 |
# This field may only be specified when versioned_expr is set to |
| 5771 |
# FIREWALL. |
| 5772 |
"A String", |
| 5773 |
], |
| 5774 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 5775 |
# |
| 5776 |
# This field may only be specified when versioned_expr is set to |
| 5777 |
# FIREWALL. |
| 5778 |
{ |
| 5779 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 5780 |
# required when creating a firewall rule. This value can either be |
| 5781 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 5782 |
# protocol number. |
| 5783 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 5784 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 5785 |
# an integer or a range. If not specified, this rule applies to |
| 5786 |
# connections through any port. |
| 5787 |
# |
| 5788 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 5789 |
# |
| 5790 |
# This field may only be specified when versioned_expr is set to |
| 5791 |
# FIREWALL. |
| 5792 |
"A String", |
| 5793 |
], |
| 5794 |
}, |
| 5795 |
], |
| 5796 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 5797 |
# |
| 5798 |
# This field may only be specified when versioned_expr is set to |
| 5799 |
# FIREWALL. |
| 5800 |
{ |
| 5801 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 5802 |
# required when creating a firewall rule. This value can either be |
| 5803 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 5804 |
# protocol number. |
| 5805 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 5806 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 5807 |
# an integer or a range. If not specified, this rule applies to |
| 5808 |
# connections through any port. |
| 5809 |
# |
| 5810 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 5811 |
# |
| 5812 |
# This field may only be specified when versioned_expr is set to |
| 5813 |
# FIREWALL. |
| 5814 |
"A String", |
| 5815 |
], |
| 5816 |
}, |
| 5817 |
], |
| 5818 |
"srcIpRanges": [ # CIDR IP address range. |
| 5819 |
# Maximum number of src_ip_ranges allowed is 10. |
| 5820 |
"A String", |
| 5821 |
], |
| 5822 |
}, |
| 5823 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 5824 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 5825 |
# source.region_code and contents in the request header. |
| 5826 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 5827 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 5828 |
# nor in Regional Policies. Expressions containing |
| 5829 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 5830 |
# Enterprise subscription and are only supported in Global Security |
| 5831 |
# Policies. |
| 5832 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 5833 |
# are documented at https://github.com/google/cel-spec. |
| 5834 |
# |
| 5835 |
# Example (Comparison): |
| 5836 |
# |
| 5837 |
# title: "Summary size limit" |
| 5838 |
# description: "Determines if a summary is less than 100 chars" |
| 5839 |
# expression: "document.summary.size() < 100" |
| 5840 |
# |
| 5841 |
# Example (Equality): |
| 5842 |
# |
| 5843 |
# title: "Requestor is owner" |
| 5844 |
# description: "Determines if requestor is the document owner" |
| 5845 |
# expression: "document.owner == request.auth.claims.email" |
| 5846 |
# |
| 5847 |
# Example (Logic): |
| 5848 |
# |
| 5849 |
# title: "Public documents" |
| 5850 |
# description: "Determine whether the document should be publicly visible" |
| 5851 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 5852 |
# |
| 5853 |
# Example (Data Manipulation): |
| 5854 |
# |
| 5855 |
# title: "Notification string" |
| 5856 |
# description: "Create a notification string with a timestamp." |
| 5857 |
# expression: "'New message received at ' + string(document.create_time)" |
| 5858 |
# |
| 5859 |
# The exact variables and functions that may be referenced within an expression |
| 5860 |
# are determined by the service that evaluates it. See the service |
| 5861 |
# documentation for additional information. |
| 5862 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 5863 |
# describes the expression, e.g. when hovered over it in a UI. |
| 5864 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 5865 |
# syntax. |
| 5866 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 5867 |
# reporting, e.g. a file name and a position in the file. |
| 5868 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 5869 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 5870 |
# expression. |
| 5871 |
}, |
| 5872 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 5873 |
# CEVAL expression (i.e., 'expr'). |
| 5874 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 5875 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 5876 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 5877 |
# action-tokens. The provided site keys need to be created from |
| 5878 |
# reCAPTCHA API under the same project where the security policy is |
| 5879 |
# created. |
| 5880 |
"A String", |
| 5881 |
], |
| 5882 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 5883 |
# session-tokens. The provided site keys need to be created from |
| 5884 |
# reCAPTCHA API under the same project where the security policy is |
| 5885 |
# created. |
| 5886 |
"A String", |
| 5887 |
], |
| 5888 |
}, |
| 5889 |
}, |
| 5890 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 5891 |
# If this field is specified, config must also be specified. |
| 5892 |
# Available preconfigured expressions along with their requirements are: |
| 5893 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 5894 |
# config. |
| 5895 |
}, |
| 5896 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 5897 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 5898 |
# 'action' is enforced. |
| 5899 |
# |
| 5900 |
# The match criteria for a rule consists of built-in match fields (like |
| 5901 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 5902 |
# ('userDefinedFields'). |
| 5903 |
# |
| 5904 |
# Field values may be extracted directly from the packet or derived from it |
| 5905 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 5906 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 5907 |
# header is found in the packet and the entire field is in bounds. |
| 5908 |
# |
| 5909 |
# Each match field may specify which values can match it, listing one or |
| 5910 |
# more ranges, prefixes, or exact values that are considered a match for |
| 5911 |
# the field. A field value must be present in order to match a specified |
| 5912 |
# match field. If no match values are specified for a match field, then any |
| 5913 |
# field value is considered to match it, and it's not required to be |
| 5914 |
# present. For strings specifying '*' is also equivalent to match all. |
| 5915 |
# |
| 5916 |
# For a packet to match a rule, all specified match fields must match the |
| 5917 |
# corresponding field values derived from the packet. |
| 5918 |
# |
| 5919 |
# Example: |
| 5920 |
# |
| 5921 |
# networkMatch: |
| 5922 |
# srcIpRanges: |
| 5923 |
# - "192.0.2.0/24" |
| 5924 |
# - "198.51.100.0/24" |
| 5925 |
# userDefinedFields: |
| 5926 |
# - name: "ipv4_fragment_offset" |
| 5927 |
# values: |
| 5928 |
# - "1-0x1fff" |
| 5929 |
# |
| 5930 |
# The above match condition matches packets with a source IP in |
| 5931 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 5932 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 5933 |
# against. |
| 5934 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 5935 |
# format. |
| 5936 |
"A String", |
| 5937 |
], |
| 5938 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 5939 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 5940 |
"A String", |
| 5941 |
], |
| 5942 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 5943 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 5944 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 5945 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 5946 |
"A String", |
| 5947 |
], |
| 5948 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 5949 |
42, |
| 5950 |
], |
| 5951 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 5952 |
"A String", |
| 5953 |
], |
| 5954 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 5955 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 5956 |
"A String", |
| 5957 |
], |
| 5958 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 5959 |
# IP address. |
| 5960 |
"A String", |
| 5961 |
], |
| 5962 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 5963 |
# matching values for that field. |
| 5964 |
{ |
| 5965 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 5966 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 5967 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 5968 |
# range (e.g. "0x400-0x7ff"). |
| 5969 |
"A String", |
| 5970 |
], |
| 5971 |
}, |
| 5972 |
], |
| 5973 |
}, |
| 5974 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 5975 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 5976 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 5977 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 5978 |
{ |
| 5979 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 5980 |
# preconfigured WAF evaluation. |
| 5981 |
{ |
| 5982 |
"op": "A String", # The match operator for the field. |
| 5983 |
"val": "A String", # The value of the field. |
| 5984 |
}, |
| 5985 |
], |
| 5986 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 5987 |
# inspection during preconfigured WAF evaluation. |
| 5988 |
{ |
| 5989 |
"op": "A String", # The match operator for the field. |
| 5990 |
"val": "A String", # The value of the field. |
| 5991 |
}, |
| 5992 |
], |
| 5993 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 5994 |
# inspection during preconfigured WAF evaluation. |
| 5995 |
{ |
| 5996 |
"op": "A String", # The match operator for the field. |
| 5997 |
"val": "A String", # The value of the field. |
| 5998 |
}, |
| 5999 |
], |
| 6000 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 6001 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 6002 |
# parameter can be in the query string or in the POST body. |
| 6003 |
{ |
| 6004 |
"op": "A String", # The match operator for the field. |
| 6005 |
"val": "A String", # The value of the field. |
| 6006 |
}, |
| 6007 |
], |
| 6008 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 6009 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 6010 |
# field, the query or fragment part should be excluded. |
| 6011 |
{ |
| 6012 |
"op": "A String", # The match operator for the field. |
| 6013 |
"val": "A String", # The value of the field. |
| 6014 |
}, |
| 6015 |
], |
| 6016 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 6017 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 6018 |
# IDs under the WAF rule set. |
| 6019 |
"A String", |
| 6020 |
], |
| 6021 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 6022 |
}, |
| 6023 |
], |
| 6024 |
}, |
| 6025 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 6026 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 6027 |
# must be a positive value between 0 and 2147483647. |
| 6028 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 6029 |
# highest priority and 2147483647 is the lowest priority. |
| 6030 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 6031 |
# "fairshare". Cannot be specified for any other actions. |
| 6032 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 6033 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 6034 |
# the traffic will continue to be banned by the rate limit after the |
| 6035 |
# rate falls below the threshold. |
| 6036 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 6037 |
# "rate_based_ban". If specified, the key will be banned for the |
| 6038 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 6039 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 6040 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 6041 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 6042 |
}, |
| 6043 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 6044 |
# threshold. Valid option is "allow" only. |
| 6045 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 6046 |
# values are: |
| 6047 |
# |
| 6048 |
# - ALL: A single rate limit threshold is applied to all |
| 6049 |
# the requests matching this rule. This is the default value if |
| 6050 |
# "enforceOnKey" is not configured. |
| 6051 |
# - IP: The source IP address of |
| 6052 |
# the request is the key. Each IP has this limit enforced |
| 6053 |
# separately. |
| 6054 |
# - HTTP_HEADER: The value of the HTTP |
| 6055 |
# header whose name is configured under "enforceOnKeyName". The key |
| 6056 |
# value is truncated to the first 128 bytes of the header value. If no |
| 6057 |
# such header is present in the request, the key type defaults toALL. |
| 6058 |
# - XFF_IP: The first IP address (i.e. the |
| 6059 |
# originating client IP address) specified in the list of IPs under |
| 6060 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 6061 |
# is not a valid IP, the key defaults to the source IP address of |
| 6062 |
# the request i.e. key type IP. |
| 6063 |
# - HTTP_COOKIE: The value of the HTTP |
| 6064 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 6065 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 6066 |
# such cookie is present in the request, the key type defaults toALL. |
| 6067 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 6068 |
# value is truncated to the first 128 bytes. |
| 6069 |
# - SNI: Server name indication in the TLS session of the |
| 6070 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 6071 |
# key type defaults to ALL on a HTTP session. |
| 6072 |
# - REGION_CODE: The country/region from which the request |
| 6073 |
# originates. |
| 6074 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 6075 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6076 |
# key type defaults to ALL. |
| 6077 |
# - USER_IP: The IP address of the originating client, |
| 6078 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 6079 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 6080 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 6081 |
# |
| 6082 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 6083 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6084 |
# key type defaults to ALL. |
| 6085 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 6086 |
# limit threshold is enforced for all the requests matching the rule. |
| 6087 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 6088 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 6089 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 6090 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 6091 |
# enforce_on_key must not be specified. |
| 6092 |
{ |
| 6093 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 6094 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 6095 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 6096 |
# taken as the key value. |
| 6097 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 6098 |
# values are: |
| 6099 |
# |
| 6100 |
# - ALL: A single rate limit threshold is applied to all |
| 6101 |
# the requests matching this rule. This is the default value if |
| 6102 |
# "enforceOnKeyConfigs" is not configured. |
| 6103 |
# - IP: The source IP address of |
| 6104 |
# the request is the key. Each IP has this limit enforced |
| 6105 |
# separately. |
| 6106 |
# - HTTP_HEADER: The value of the HTTP |
| 6107 |
# header whose name is configured under "enforceOnKeyName". The key |
| 6108 |
# value is truncated to the first 128 bytes of the header value. If no |
| 6109 |
# such header is present in the request, the key type defaults toALL. |
| 6110 |
# - XFF_IP: The first IP address (i.e. the |
| 6111 |
# originating client IP address) specified in the list of IPs under |
| 6112 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 6113 |
# value is not a valid IP, the key defaults to the source IP address of |
| 6114 |
# the request i.e. key type IP. |
| 6115 |
# - HTTP_COOKIE: The value of the HTTP |
| 6116 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 6117 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 6118 |
# such cookie is present in the request, the key type defaults toALL. |
| 6119 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 6120 |
# value is truncated to the first 128 bytes. |
| 6121 |
# - SNI: Server name indication in the TLS session of |
| 6122 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 6123 |
# The key type defaults to ALL on a HTTP session. |
| 6124 |
# - REGION_CODE: The country/region from which the |
| 6125 |
# request originates. |
| 6126 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 6127 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6128 |
# key type defaults to ALL. |
| 6129 |
# - USER_IP: The IP address of the originating client, |
| 6130 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 6131 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 6132 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 6133 |
# |
| 6134 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 6135 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6136 |
# key type defaults to ALL. |
| 6137 |
}, |
| 6138 |
], |
| 6139 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 6140 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 6141 |
# value. |
| 6142 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 6143 |
# value. |
| 6144 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 6145 |
# threshold, to either deny with a specified HTTP response code, or |
| 6146 |
# redirect to a different endpoint. |
| 6147 |
# Valid options are `deny(STATUS)`, where valid values for |
| 6148 |
# `STATUS` are 403, 404, 429, and 502, and |
| 6149 |
# `redirect`, where the redirect parameters come from |
| 6150 |
# `exceedRedirectOptions` below. |
| 6151 |
# The `redirect` action is only supported in Global Security Policies of |
| 6152 |
# type CLOUD_ARMOR. |
| 6153 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 6154 |
# above the configured rate limit threshold |
| 6155 |
"code": 42, # The status code, which should be an enum value of |
| 6156 |
# google.rpc.Code. |
| 6157 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 6158 |
}, |
| 6159 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 6160 |
# action. Cannot be specified if the exceed action is not redirect. |
| 6161 |
# This field is only supported in Global Security Policies of type |
| 6162 |
# CLOUD_ARMOR. |
| 6163 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 6164 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 6165 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 6166 |
# |
| 6167 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 6168 |
# challenge assessment. |
| 6169 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 6170 |
# response. |
| 6171 |
}, |
| 6172 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 6173 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 6174 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 6175 |
}, |
| 6176 |
}, |
| 6177 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 6178 |
# other actions. |
| 6179 |
# This field is only supported in Global Security Policies of type |
| 6180 |
# CLOUD_ARMOR. |
| 6181 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 6182 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 6183 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 6184 |
# |
| 6185 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 6186 |
# challenge assessment. |
| 6187 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 6188 |
# response. |
| 6189 |
}, |
| 6190 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 6191 |
# other actions. |
| 6192 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 6193 |
# rule. |
| 6194 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 6195 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 6196 |
# policy. This can only be set during rule creation, if rule number is not |
| 6197 |
# specified it will be generated by the server. |
| 6198 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 6199 |
# policy rule. |
| 6200 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 6201 |
# allows you to control which network's VMs get this rule. If this field |
| 6202 |
# is left blank, all VMs within the organization will receive the rule. |
| 6203 |
# |
| 6204 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 6205 |
"A String", |
| 6206 |
], |
| 6207 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 6208 |
# applied with this rule. |
| 6209 |
"A String", |
| 6210 |
], |
| 6211 |
}, |
| 6212 |
], |
| 6213 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 6214 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 6215 |
"shortName": "A String", # User-provided name of the organization security policy. The name should be |
| 6216 |
# unique in the organization in which the security policy is created. This |
| 6217 |
# should only be used when SecurityPolicyType is CLOUD_ARMOR. |
| 6218 |
# The name must be 1-63 characters long, and comply with |
| 6219 |
# https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 |
| 6220 |
# characters long and match the regular expression |
| 6221 |
# `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a |
| 6222 |
# lowercase letter, and all following characters must be a dash, lowercase |
| 6223 |
# letter, or digit, except the last character, which cannot be a dash. |
| 6224 |
"type": "A String", # The type indicates the intended use of the security policy. |
| 6225 |
# |
| 6226 |
# - CLOUD_ARMOR: Cloud Armor backend security policies can |
| 6227 |
# be configured to filter incoming HTTP requests targeting backend services. |
| 6228 |
# They filter requests before they hit the origin servers. |
| 6229 |
# - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can |
| 6230 |
# be configured to filter incoming HTTP requests targeting backend services |
| 6231 |
# (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). |
| 6232 |
# They filter requests before the request is served from Google's cache. |
| 6233 |
# - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor |
| 6234 |
# internal service policies can be configured to filter HTTP requests |
| 6235 |
# targeting services managed by Traffic Director in a service mesh. They |
| 6236 |
# filter requests before the request is served from the application. |
| 6237 |
# |
| 6238 |
# - CLOUD_ARMOR_NETWORK: Cloud Armor network policies |
| 6239 |
# can be configured to filter packets targeting network load balancing |
| 6240 |
# resources such as backend services, target pools, target instances, and |
| 6241 |
# instances with external IPs. They filter requests before the request is |
| 6242 |
# served from the application. |
| 6243 |
# |
| 6244 |
# |
| 6245 |
# This field can be set only at resource creation time. |
| 6246 |
"userDefinedFields": [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A |
| 6247 |
# user-defined field consists of up to 4 bytes extracted from a fixed offset |
| 6248 |
# in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an |
| 6249 |
# optional mask to select certain bits. Rules may then specify matching |
| 6250 |
# values for these fields. |
| 6251 |
# |
| 6252 |
# Example: |
| 6253 |
# |
| 6254 |
# userDefinedFields: |
| 6255 |
# - name: "ipv4_fragment_offset" |
| 6256 |
# base: IPV4 |
| 6257 |
# offset: 6 |
| 6258 |
# size: 2 |
| 6259 |
# mask: "0x1fff" |
| 6260 |
{ |
| 6261 |
"base": "A String", # The base relative to which 'offset' is measured. Possible values are: |
| 6262 |
# |
| 6263 |
# - IPV4: Points to the beginning of the IPv4 header. |
| 6264 |
# - IPV6: Points to the beginning of the IPv6 header. |
| 6265 |
# - TCP: Points to the beginning of the TCP header, skipping |
| 6266 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 6267 |
# non-first fragments. |
| 6268 |
# - UDP: Points to the beginning of the UDP header, skipping |
| 6269 |
# over any IPv4 options or IPv6 extension headers. Not present for |
| 6270 |
# non-first fragments. |
| 6271 |
# |
| 6272 |
# |
| 6273 |
# required |
| 6274 |
"mask": "A String", # If specified, apply this mask (bitwise AND) to the field to ignore bits |
| 6275 |
# before matching. Encoded as a hexadecimal number (starting with "0x"). |
| 6276 |
# The last byte of the field (in network byte order) corresponds to the |
| 6277 |
# least significant byte of the mask. |
| 6278 |
"name": "A String", # The name of this field. Must be unique within the policy. |
| 6279 |
"offset": 42, # Offset of the first byte of the field (in network byte order) relative to |
| 6280 |
# 'base'. |
| 6281 |
"size": 42, # Size of the field in bytes. Valid values: 1-4. |
| 6282 |
}, |
| 6283 |
], |
| 6284 |
} |
| 6285 |
|
| 6286 |
paths: string, A parameter (repeated) |
| 6287 |
requestId: string, An optional request ID to identify requests. Specify a unique request ID so |
| 6288 |
that if you must retry your request, the server will know to ignore the |
| 6289 |
request if it has already been completed. |
| 6290 |
|
| 6291 |
For example, consider a situation where you make an initial request and |
| 6292 |
the request times out. If you make the request again with the same |
| 6293 |
request ID, the server can check if original operation with the same |
| 6294 |
request ID was received, and if so, will ignore the second request. This |
| 6295 |
prevents clients from accidentally creating duplicate commitments. |
| 6296 |
|
| 6297 |
The request ID must be |
| 6298 |
a valid UUID with the exception that zero UUID is not supported |
| 6299 |
(00000000-0000-0000-0000-000000000000). |
| 6300 |
updateMask: string, Indicates fields to be cleared as part of this request. |
| 6301 |
x__xgafv: string, V1 error format. |
| 6302 |
Allowed values |
| 6303 |
1 - v1 error format |
| 6304 |
2 - v2 error format |
| 6305 |
|
| 6306 |
Returns: |
| 6307 |
An object of the form: |
| 6308 |
|
| 6309 |
{ # Represents an Operation resource. |
| 6310 |
# |
| 6311 |
# Google Compute Engine has three Operation resources: |
| 6312 |
# |
| 6313 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 6314 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 6315 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 6316 |
# |
| 6317 |
# You can use an operation resource to manage asynchronous API requests. |
| 6318 |
# For more information, readHandling |
| 6319 |
# API responses. |
| 6320 |
# |
| 6321 |
# Operations can be global, regional or zonal. |
| 6322 |
# |
| 6323 |
# - For global operations, use the `globalOperations` |
| 6324 |
# resource. |
| 6325 |
# - For regional operations, use the |
| 6326 |
# `regionOperations` resource. |
| 6327 |
# - For zonal operations, use |
| 6328 |
# the `zoneOperations` resource. |
| 6329 |
# |
| 6330 |
# |
| 6331 |
# |
| 6332 |
# For more information, read |
| 6333 |
# Global, Regional, and Zonal Resources. |
| 6334 |
# |
| 6335 |
# Note that completed Operation resources have a limited |
| 6336 |
# retention period. |
| 6337 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 6338 |
# Not present otherwise. |
| 6339 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 6340 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 6341 |
# set when the operation is created. |
| 6342 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 6343 |
# text format. |
| 6344 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 6345 |
# this field will be populated. |
| 6346 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 6347 |
# operation. |
| 6348 |
{ |
| 6349 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 6350 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 6351 |
# details. There is a set of defined message types to use for providing |
| 6352 |
# details.The syntax depends on the error code. For example, |
| 6353 |
# QuotaExceededInfo will have details when the error code is |
| 6354 |
# QUOTA_EXCEEDED. |
| 6355 |
{ |
| 6356 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 6357 |
# |
| 6358 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 6359 |
# is not enabled: |
| 6360 |
# |
| 6361 |
# { "reason": "API_DISABLED" |
| 6362 |
# "domain": "googleapis.com" |
| 6363 |
# "metadata": { |
| 6364 |
# "resource": "projects/123", |
| 6365 |
# "service": "pubsub.googleapis.com" |
| 6366 |
# } |
| 6367 |
# } |
| 6368 |
# |
| 6369 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 6370 |
# |
| 6371 |
# Example of an error that is returned when attempting to create a Spanner |
| 6372 |
# instance in a region that is out of stock: |
| 6373 |
# |
| 6374 |
# { "reason": "STOCKOUT" |
| 6375 |
# "domain": "spanner.googleapis.com", |
| 6376 |
# "metadata": { |
| 6377 |
# "availableRegions": "us-central1,us-east2" |
| 6378 |
# } |
| 6379 |
# } |
| 6380 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 6381 |
# is typically the registered service name of the tool or product that |
| 6382 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 6383 |
# generated by some common infrastructure, the error domain must be a |
| 6384 |
# globally unique value that identifies the infrastructure. For Google API |
| 6385 |
# infrastructure, the error domain is "googleapis.com". |
| 6386 |
"metadatas": { # Additional structured details about this error. |
| 6387 |
# |
| 6388 |
# Keys must match a regular expression of `a-z+` but should |
| 6389 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 6390 |
# length. When identifying the current value of an exceeded limit, the units |
| 6391 |
# should be contained in the key, not the value. For example, rather than |
| 6392 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 6393 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 6394 |
# instances that can be created in a single (batch) request. |
| 6395 |
"a_key": "A String", |
| 6396 |
}, |
| 6397 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 6398 |
# proximate cause of the error. Error reasons are unique within a particular |
| 6399 |
# domain of errors. This should be at most 63 characters and match a |
| 6400 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 6401 |
# UPPER_SNAKE_CASE. |
| 6402 |
}, |
| 6403 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 6404 |
# |
| 6405 |
# For example, if a quota check failed with an error indicating the calling |
| 6406 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 6407 |
# directly to the right place in the developer console to flip the bit. |
| 6408 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 6409 |
{ # Describes a URL link. |
| 6410 |
"description": "A String", # Describes what the link offers. |
| 6411 |
"url": "A String", # The URL of the link. |
| 6412 |
}, |
| 6413 |
], |
| 6414 |
}, |
| 6415 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 6416 |
# which can be attached to an RPC error. |
| 6417 |
"locale": "A String", # The locale used following the specification defined at |
| 6418 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 6419 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 6420 |
"message": "A String", # The localized error message in the above locale. |
| 6421 |
}, |
| 6422 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 6423 |
"dimensions": { # The map holding related quota dimensions. |
| 6424 |
"a_key": "A String", |
| 6425 |
}, |
| 6426 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 6427 |
# type or metric. |
| 6428 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 6429 |
# or metric. |
| 6430 |
"limitName": "A String", # The name of the quota limit. |
| 6431 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 6432 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 6433 |
}, |
| 6434 |
}, |
| 6435 |
], |
| 6436 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 6437 |
# This property is optional. |
| 6438 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 6439 |
}, |
| 6440 |
], |
| 6441 |
}, |
| 6442 |
"getVersionOperationMetadata": { |
| 6443 |
"inlineSbomInfo": { |
| 6444 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 6445 |
# appropriate identifiers. |
| 6446 |
"a_key": "A String", |
| 6447 |
}, |
| 6448 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 6449 |
# identifiers. |
| 6450 |
"a_key": "A String", |
| 6451 |
}, |
| 6452 |
}, |
| 6453 |
}, |
| 6454 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 6455 |
# message that was returned, such as `NOT FOUND`. |
| 6456 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 6457 |
# status code that was returned. For example, a `404` means the |
| 6458 |
# resource was not found. |
| 6459 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 6460 |
# defined by the server. |
| 6461 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 6462 |
# This value is inRFC3339 |
| 6463 |
# text format. |
| 6464 |
"instancesBulkInsertOperationMetadata": { |
| 6465 |
"perLocationStatus": { # Status information per location (location name is key). |
| 6466 |
# Example key: zones/us-central1-a |
| 6467 |
"a_key": { |
| 6468 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 6469 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 6470 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 6471 |
# error. |
| 6472 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 6473 |
# if the flow is rolling forward or rolling back. |
| 6474 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 6475 |
}, |
| 6476 |
}, |
| 6477 |
}, |
| 6478 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 6479 |
# Operation resources. |
| 6480 |
"name": "A String", # [Output Only] Name of the operation. |
| 6481 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 6482 |
# group of operations results from a `bulkInsert` API request. |
| 6483 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 6484 |
# `update`, or `delete`, and so on. |
| 6485 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 6486 |
# There is no requirement that this be linear or support any granularity of |
| 6487 |
# operations. This should not be used to guess when the operation will be |
| 6488 |
# complete. This number should monotonically increase as the operation |
| 6489 |
# progresses. |
| 6490 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 6491 |
# applicable when performing regional operations. |
| 6492 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 6493 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 6494 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 6495 |
# this field will contain information on all underlying zonal actions and |
| 6496 |
# their state. |
| 6497 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 6498 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 6499 |
# Example key: zones/us-central1-a |
| 6500 |
"a_key": { |
| 6501 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 6502 |
# populated. |
| 6503 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 6504 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 6505 |
# three pieces of data: error code, error message, and error details. |
| 6506 |
# |
| 6507 |
# You can find out more about this error model and how to work with it in the |
| 6508 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 6509 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 6510 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 6511 |
# message types for APIs to use. |
| 6512 |
{ |
| 6513 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 6514 |
}, |
| 6515 |
], |
| 6516 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 6517 |
# user-facing error message should be localized and sent in the |
| 6518 |
# google.rpc.Status.details field, or localized by the client. |
| 6519 |
}, |
| 6520 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 6521 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 6522 |
}, |
| 6523 |
}, |
| 6524 |
}, |
| 6525 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 6526 |
# This value is inRFC3339 |
| 6527 |
# text format. |
| 6528 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 6529 |
# following: |
| 6530 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 6531 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 6532 |
# operation. |
| 6533 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 6534 |
# of the target resource. |
| 6535 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 6536 |
# operations related to creating a snapshot, this points to the disk |
| 6537 |
# that the snapshot was created from. |
| 6538 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 6539 |
# `[email protected]` or |
| 6540 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 6541 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 6542 |
# operation, this field will be populated. |
| 6543 |
{ |
| 6544 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 6545 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 6546 |
# are no results in the response. |
| 6547 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 6548 |
# value format. For example: |
| 6549 |
# |
| 6550 |
# "data": [ |
| 6551 |
# { |
| 6552 |
# "key": "scope", |
| 6553 |
# "value": "zones/us-east1-d" |
| 6554 |
# } |
| 6555 |
{ |
| 6556 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 6557 |
# returned. For example, for warnings where there are no results in a list |
| 6558 |
# request for a particular zone, this key might be scope and |
| 6559 |
# the key value might be the zone name. Other examples might be a key |
| 6560 |
# indicating a deprecated resource and a suggested replacement, or a |
| 6561 |
# warning about invalid network settings (for example, if an instance |
| 6562 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 6563 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 6564 |
}, |
| 6565 |
], |
| 6566 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 6567 |
}, |
| 6568 |
], |
| 6569 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 6570 |
# applicable when performing per-zone operations. |
| 6571 |
}</pre> |
| 6572 |
</div> |
| 6573 |
|
| 6574 |
<div class="method"> |
| 6575 |
<code class="details" id="patchRule">patchRule(project, securityPolicy, body=None, priority=None, updateMask=None, validateOnly=None, x__xgafv=None)</code> |
| 6576 |
<pre>Patches a rule at the specified priority. To clear fields in the rule, |
| 6577 |
leave the fields empty and specify them in the updateMask. |
| 6578 |
|
| 6579 |
Args: |
| 6580 |
project: string, Project ID for this request. (required) |
| 6581 |
securityPolicy: string, Name of the security policy to update. (required) |
| 6582 |
body: object, The request body. |
| 6583 |
The object takes the form of: |
| 6584 |
|
| 6585 |
{ # Represents a rule that describes one or more match conditions along with |
| 6586 |
# the action to be taken when traffic matches this condition (allow or deny). |
| 6587 |
"action": "A String", # The Action to perform when the rule is matched. |
| 6588 |
# The following are the valid actions: |
| 6589 |
# |
| 6590 |
# - allow: allow access to target. |
| 6591 |
# - deny(STATUS): deny access to target, returns the |
| 6592 |
# HTTP response code specified. Valid values for `STATUS` |
| 6593 |
# are 403, 404, and 502. |
| 6594 |
# - rate_based_ban: limit client traffic to the configured |
| 6595 |
# threshold and ban the client if the traffic exceeds the threshold. |
| 6596 |
# Configure parameters for this action in RateLimitOptions. Requires |
| 6597 |
# rate_limit_options to be set. |
| 6598 |
# - redirect: redirect to a different target. This can |
| 6599 |
# either be an internal reCAPTCHA redirect, or an external URL-based |
| 6600 |
# redirect via a 302 response. Parameters for this action can be configured |
| 6601 |
# via redirectOptions. This action is only supported in Global Security |
| 6602 |
# Policies of type CLOUD_ARMOR. |
| 6603 |
# - throttle: limit |
| 6604 |
# client traffic to the configured threshold. Configure parameters for this |
| 6605 |
# action in rateLimitOptions. Requires rate_limit_options to be set for |
| 6606 |
# this. |
| 6607 |
# - fairshare (preview only): when traffic reaches the |
| 6608 |
# threshold limit, requests from the clients matching this rule begin to be |
| 6609 |
# rate-limited using the Fair Share algorithm. This action is only allowed |
| 6610 |
# in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. |
| 6611 |
"description": "A String", # An optional description of this resource. Provide this property when you |
| 6612 |
# create the resource. |
| 6613 |
"direction": "A String", # The direction in which this rule applies. This field may only be |
| 6614 |
# specified when versioned_expr is set to FIREWALL. |
| 6615 |
"enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is |
| 6616 |
# enabled, logs will be exported to the configured export destination in |
| 6617 |
# Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you |
| 6618 |
# cannot enable logging on "goto_next" rules. |
| 6619 |
# |
| 6620 |
# This field may only be specified when the versioned_expr is set to |
| 6621 |
# FIREWALL. |
| 6622 |
"headerAction": { # Optional, additional actions that are performed on headers. |
| 6623 |
# This field is only supported in Global Security Policies of type |
| 6624 |
# CLOUD_ARMOR. |
| 6625 |
"requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already |
| 6626 |
# present. |
| 6627 |
{ |
| 6628 |
"headerName": "A String", # The name of the header to set. |
| 6629 |
"headerValue": "A String", # The value to set the named header to. |
| 6630 |
}, |
| 6631 |
], |
| 6632 |
}, |
| 6633 |
"kind": "compute#securityPolicyRule", # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules |
| 6634 |
"match": { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against. |
| 6635 |
# If it evaluates to true, the corresponding 'action' is enforced. |
| 6636 |
# Exactly one field must be specified. |
| 6637 |
"config": { # The configuration options available when specifying versioned_expr. |
| 6638 |
# This field must be specified if versioned_expr is specified and cannot |
| 6639 |
# be specified if versioned_expr is not specified. |
| 6640 |
"destIpRanges": [ # CIDR IP address range. |
| 6641 |
# |
| 6642 |
# This field may only be specified when versioned_expr is set to |
| 6643 |
# FIREWALL. |
| 6644 |
"A String", |
| 6645 |
], |
| 6646 |
"destPorts": [ # Pairs of IP protocols and ports that the rule should match. |
| 6647 |
# |
| 6648 |
# This field may only be specified when versioned_expr is set to |
| 6649 |
# FIREWALL. |
| 6650 |
{ |
| 6651 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 6652 |
# required when creating a firewall rule. This value can either be |
| 6653 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 6654 |
# protocol number. |
| 6655 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 6656 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 6657 |
# an integer or a range. If not specified, this rule applies to |
| 6658 |
# connections through any port. |
| 6659 |
# |
| 6660 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 6661 |
# |
| 6662 |
# This field may only be specified when versioned_expr is set to |
| 6663 |
# FIREWALL. |
| 6664 |
"A String", |
| 6665 |
], |
| 6666 |
}, |
| 6667 |
], |
| 6668 |
"layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. |
| 6669 |
# |
| 6670 |
# This field may only be specified when versioned_expr is set to |
| 6671 |
# FIREWALL. |
| 6672 |
{ |
| 6673 |
"ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is |
| 6674 |
# required when creating a firewall rule. This value can either be |
| 6675 |
# one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP |
| 6676 |
# protocol number. |
| 6677 |
"ports": [ # An optional list of ports to which this rule applies. This field is |
| 6678 |
# only applicable for UDP or TCP protocol. Each entry must be either |
| 6679 |
# an integer or a range. If not specified, this rule applies to |
| 6680 |
# connections through any port. |
| 6681 |
# |
| 6682 |
# Example inputs include: ["22"],["80","443"], and ["12345-12349"]. |
| 6683 |
# |
| 6684 |
# This field may only be specified when versioned_expr is set to |
| 6685 |
# FIREWALL. |
| 6686 |
"A String", |
| 6687 |
], |
| 6688 |
}, |
| 6689 |
], |
| 6690 |
"srcIpRanges": [ # CIDR IP address range. |
| 6691 |
# Maximum number of src_ip_ranges allowed is 10. |
| 6692 |
"A String", |
| 6693 |
], |
| 6694 |
}, |
| 6695 |
"expr": { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression. |
| 6696 |
# A CEVAL expression is used to specify match criteria such as origin.ip, |
| 6697 |
# source.region_code and contents in the request header. |
| 6698 |
# Expressions containing `evaluateThreatIntelligence` require a Cloud |
| 6699 |
# Armor Enterprise subscription and are not supported in Edge Policies |
| 6700 |
# nor in Regional Policies. Expressions containing |
| 6701 |
# `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor |
| 6702 |
# Enterprise subscription and are only supported in Global Security |
| 6703 |
# Policies. |
| 6704 |
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 6705 |
# are documented at https://github.com/google/cel-spec. |
| 6706 |
# |
| 6707 |
# Example (Comparison): |
| 6708 |
# |
| 6709 |
# title: "Summary size limit" |
| 6710 |
# description: "Determines if a summary is less than 100 chars" |
| 6711 |
# expression: "document.summary.size() < 100" |
| 6712 |
# |
| 6713 |
# Example (Equality): |
| 6714 |
# |
| 6715 |
# title: "Requestor is owner" |
| 6716 |
# description: "Determines if requestor is the document owner" |
| 6717 |
# expression: "document.owner == request.auth.claims.email" |
| 6718 |
# |
| 6719 |
# Example (Logic): |
| 6720 |
# |
| 6721 |
# title: "Public documents" |
| 6722 |
# description: "Determine whether the document should be publicly visible" |
| 6723 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 6724 |
# |
| 6725 |
# Example (Data Manipulation): |
| 6726 |
# |
| 6727 |
# title: "Notification string" |
| 6728 |
# description: "Create a notification string with a timestamp." |
| 6729 |
# expression: "'New message received at ' + string(document.create_time)" |
| 6730 |
# |
| 6731 |
# The exact variables and functions that may be referenced within an expression |
| 6732 |
# are determined by the service that evaluates it. See the service |
| 6733 |
# documentation for additional information. |
| 6734 |
"description": "A String", # Optional. Description of the expression. This is a longer text which |
| 6735 |
# describes the expression, e.g. when hovered over it in a UI. |
| 6736 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 6737 |
# syntax. |
| 6738 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 6739 |
# reporting, e.g. a file name and a position in the file. |
| 6740 |
"title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 6741 |
# its purpose. This can be used e.g. in UIs which allow to enter the |
| 6742 |
# expression. |
| 6743 |
}, |
| 6744 |
"exprOptions": { # The configuration options available when specifying a user defined |
| 6745 |
# CEVAL expression (i.e., 'expr'). |
| 6746 |
"recaptchaOptions": { # reCAPTCHA configuration options to be applied for the rule. If the |
| 6747 |
# rule does not evaluate reCAPTCHA tokens, this field has no effect. |
| 6748 |
"actionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 6749 |
# action-tokens. The provided site keys need to be created from |
| 6750 |
# reCAPTCHA API under the same project where the security policy is |
| 6751 |
# created. |
| 6752 |
"A String", |
| 6753 |
], |
| 6754 |
"sessionTokenSiteKeys": [ # A list of site keys to be used during the validation of reCAPTCHA |
| 6755 |
# session-tokens. The provided site keys need to be created from |
| 6756 |
# reCAPTCHA API under the same project where the security policy is |
| 6757 |
# created. |
| 6758 |
"A String", |
| 6759 |
], |
| 6760 |
}, |
| 6761 |
}, |
| 6762 |
"versionedExpr": "A String", # Preconfigured versioned expression. |
| 6763 |
# If this field is specified, config must also be specified. |
| 6764 |
# Available preconfigured expressions along with their requirements are: |
| 6765 |
# SRC_IPS_V1 - must specify the corresponding src_ip_range field in |
| 6766 |
# config. |
| 6767 |
}, |
| 6768 |
"networkMatch": { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for |
| 6769 |
# CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding |
| 6770 |
# 'action' is enforced. |
| 6771 |
# |
| 6772 |
# The match criteria for a rule consists of built-in match fields (like |
| 6773 |
# 'srcIpRanges') and potentially multiple user-defined match fields |
| 6774 |
# ('userDefinedFields'). |
| 6775 |
# |
| 6776 |
# Field values may be extracted directly from the packet or derived from it |
| 6777 |
# (e.g. 'srcRegionCodes'). Some fields may not be present in every packet |
| 6778 |
# (e.g. 'srcPorts'). A user-defined field is only present if the base |
| 6779 |
# header is found in the packet and the entire field is in bounds. |
| 6780 |
# |
| 6781 |
# Each match field may specify which values can match it, listing one or |
| 6782 |
# more ranges, prefixes, or exact values that are considered a match for |
| 6783 |
# the field. A field value must be present in order to match a specified |
| 6784 |
# match field. If no match values are specified for a match field, then any |
| 6785 |
# field value is considered to match it, and it's not required to be |
| 6786 |
# present. For strings specifying '*' is also equivalent to match all. |
| 6787 |
# |
| 6788 |
# For a packet to match a rule, all specified match fields must match the |
| 6789 |
# corresponding field values derived from the packet. |
| 6790 |
# |
| 6791 |
# Example: |
| 6792 |
# |
| 6793 |
# networkMatch: |
| 6794 |
# srcIpRanges: |
| 6795 |
# - "192.0.2.0/24" |
| 6796 |
# - "198.51.100.0/24" |
| 6797 |
# userDefinedFields: |
| 6798 |
# - name: "ipv4_fragment_offset" |
| 6799 |
# values: |
| 6800 |
# - "1-0x1fff" |
| 6801 |
# |
| 6802 |
# The above match condition matches packets with a source IP in |
| 6803 |
# 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named |
| 6804 |
# "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. |
| 6805 |
# against. |
| 6806 |
"destIpRanges": [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text |
| 6807 |
# format. |
| 6808 |
"A String", |
| 6809 |
], |
| 6810 |
"destPorts": [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 6811 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 6812 |
"A String", |
| 6813 |
], |
| 6814 |
"ipProtocols": [ # IPv4 protocol / IPv6 next header (after extension headers). Each |
| 6815 |
# element can be an 8-bit unsigned decimal number (e.g. "6"), range (e.g. |
| 6816 |
# "253-254"), or one of the following protocol names: "tcp", "udp", |
| 6817 |
# "icmp", "esp", "ah", "ipip", or "sctp". |
| 6818 |
"A String", |
| 6819 |
], |
| 6820 |
"srcAsns": [ # BGP Autonomous System Number associated with the source IP address. |
| 6821 |
42, |
| 6822 |
], |
| 6823 |
"srcIpRanges": [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format. |
| 6824 |
"A String", |
| 6825 |
], |
| 6826 |
"srcPorts": [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit |
| 6827 |
# unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). |
| 6828 |
"A String", |
| 6829 |
], |
| 6830 |
"srcRegionCodes": [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source |
| 6831 |
# IP address. |
| 6832 |
"A String", |
| 6833 |
], |
| 6834 |
"userDefinedFields": [ # User-defined fields. Each element names a defined field and lists the |
| 6835 |
# matching values for that field. |
| 6836 |
{ |
| 6837 |
"name": "A String", # Name of the user-defined field, as given in the definition. |
| 6838 |
"values": [ # Matching values of the field. Each element can be a 32-bit unsigned |
| 6839 |
# decimal or hexadecimal (starting with "0x") number (e.g. "64") or |
| 6840 |
# range (e.g. "0x400-0x7ff"). |
| 6841 |
"A String", |
| 6842 |
], |
| 6843 |
}, |
| 6844 |
], |
| 6845 |
}, |
| 6846 |
"preconfiguredWafConfig": { # Preconfigured WAF configuration to be applied for the rule. If the rule |
| 6847 |
# does not evaluate preconfigured WAF rules, i.e., if |
| 6848 |
# evaluatePreconfiguredWaf() is not used, this field will have no effect. |
| 6849 |
"exclusions": [ # A list of exclusions to apply during preconfigured WAF evaluation. |
| 6850 |
{ |
| 6851 |
"requestBodiesToExclude": [ # A list of request body fields to be excluded from inspection during |
| 6852 |
# preconfigured WAF evaluation. |
| 6853 |
{ |
| 6854 |
"op": "A String", # The match operator for the field. |
| 6855 |
"val": "A String", # The value of the field. |
| 6856 |
}, |
| 6857 |
], |
| 6858 |
"requestCookiesToExclude": [ # A list of request cookie names whose value will be excluded from |
| 6859 |
# inspection during preconfigured WAF evaluation. |
| 6860 |
{ |
| 6861 |
"op": "A String", # The match operator for the field. |
| 6862 |
"val": "A String", # The value of the field. |
| 6863 |
}, |
| 6864 |
], |
| 6865 |
"requestHeadersToExclude": [ # A list of request header names whose value will be excluded from |
| 6866 |
# inspection during preconfigured WAF evaluation. |
| 6867 |
{ |
| 6868 |
"op": "A String", # The match operator for the field. |
| 6869 |
"val": "A String", # The value of the field. |
| 6870 |
}, |
| 6871 |
], |
| 6872 |
"requestQueryParamsToExclude": [ # A list of request query parameter names whose value will be excluded |
| 6873 |
# from inspection during preconfigured WAF evaluation. Note that the |
| 6874 |
# parameter can be in the query string or in the POST body. |
| 6875 |
{ |
| 6876 |
"op": "A String", # The match operator for the field. |
| 6877 |
"val": "A String", # The value of the field. |
| 6878 |
}, |
| 6879 |
], |
| 6880 |
"requestUrisToExclude": [ # A list of request URIs from the request line to be excluded from |
| 6881 |
# inspection during preconfigured WAF evaluation. When specifying this |
| 6882 |
# field, the query or fragment part should be excluded. |
| 6883 |
{ |
| 6884 |
"op": "A String", # The match operator for the field. |
| 6885 |
"val": "A String", # The value of the field. |
| 6886 |
}, |
| 6887 |
], |
| 6888 |
"targetRuleIds": [ # A list of target rule IDs under the WAF rule set to apply the |
| 6889 |
# preconfigured WAF exclusion. If omitted, it refers to all the rule |
| 6890 |
# IDs under the WAF rule set. |
| 6891 |
"A String", |
| 6892 |
], |
| 6893 |
"targetRuleSet": "A String", # Target WAF rule set to apply the preconfigured WAF exclusion. |
| 6894 |
}, |
| 6895 |
], |
| 6896 |
}, |
| 6897 |
"preview": True or False, # If set to true, the specified action is not enforced. |
| 6898 |
"priority": 42, # An integer indicating the priority of a rule in the list. The priority |
| 6899 |
# must be a positive value between 0 and 2147483647. |
| 6900 |
# Rules are evaluated from highest to lowest priority where 0 is the |
| 6901 |
# highest priority and 2147483647 is the lowest priority. |
| 6902 |
"rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle" or |
| 6903 |
# "fairshare". Cannot be specified for any other actions. |
| 6904 |
"banDurationSec": 42, # Can only be specified if the action for the rule is |
| 6905 |
# "rate_based_ban". If specified, determines the time (in seconds) |
| 6906 |
# the traffic will continue to be banned by the rate limit after the |
| 6907 |
# rate falls below the threshold. |
| 6908 |
"banThreshold": { # Can only be specified if the action for the rule is |
| 6909 |
# "rate_based_ban". If specified, the key will be banned for the |
| 6910 |
# configured 'ban_duration_sec' when the number of requests that exceed |
| 6911 |
# the 'rate_limit_threshold' also exceed this 'ban_threshold'. |
| 6912 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 6913 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 6914 |
}, |
| 6915 |
"conformAction": "A String", # Action to take for requests that are under the configured rate limit |
| 6916 |
# threshold. Valid option is "allow" only. |
| 6917 |
"enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 6918 |
# values are: |
| 6919 |
# |
| 6920 |
# - ALL: A single rate limit threshold is applied to all |
| 6921 |
# the requests matching this rule. This is the default value if |
| 6922 |
# "enforceOnKey" is not configured. |
| 6923 |
# - IP: The source IP address of |
| 6924 |
# the request is the key. Each IP has this limit enforced |
| 6925 |
# separately. |
| 6926 |
# - HTTP_HEADER: The value of the HTTP |
| 6927 |
# header whose name is configured under "enforceOnKeyName". The key |
| 6928 |
# value is truncated to the first 128 bytes of the header value. If no |
| 6929 |
# such header is present in the request, the key type defaults toALL. |
| 6930 |
# - XFF_IP: The first IP address (i.e. the |
| 6931 |
# originating client IP address) specified in the list of IPs under |
| 6932 |
# X-Forwarded-For HTTP header. If no such header is present or the value |
| 6933 |
# is not a valid IP, the key defaults to the source IP address of |
| 6934 |
# the request i.e. key type IP. |
| 6935 |
# - HTTP_COOKIE: The value of the HTTP |
| 6936 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 6937 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 6938 |
# such cookie is present in the request, the key type defaults toALL. |
| 6939 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 6940 |
# value is truncated to the first 128 bytes. |
| 6941 |
# - SNI: Server name indication in the TLS session of the |
| 6942 |
# HTTPS request. The key value is truncated to the first 128 bytes. The |
| 6943 |
# key type defaults to ALL on a HTTP session. |
| 6944 |
# - REGION_CODE: The country/region from which the request |
| 6945 |
# originates. |
| 6946 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 6947 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6948 |
# key type defaults to ALL. |
| 6949 |
# - USER_IP: The IP address of the originating client, |
| 6950 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 6951 |
# security policy. If there is no "userIpRequestHeaders" configuration or |
| 6952 |
# an IP address cannot be resolved from it, the key type defaults toIP. |
| 6953 |
# |
| 6954 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 6955 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 6956 |
# key type defaults to ALL. |
| 6957 |
# For "fairshare" action, this value is limited to ALL i.e. a single rate |
| 6958 |
# limit threshold is enforced for all the requests matching the rule. |
| 6959 |
"enforceOnKeyConfigs": [ # If specified, any combination of values of |
| 6960 |
# enforce_on_key_type/enforce_on_key_name is treated as the key on which |
| 6961 |
# ratelimit threshold/action is enforced. You can specify up to 3 |
| 6962 |
# enforce_on_key_configs. If enforce_on_key_configs is specified, |
| 6963 |
# enforce_on_key must not be specified. |
| 6964 |
{ |
| 6965 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 6966 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the |
| 6967 |
# key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is |
| 6968 |
# taken as the key value. |
| 6969 |
"enforceOnKeyType": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible |
| 6970 |
# values are: |
| 6971 |
# |
| 6972 |
# - ALL: A single rate limit threshold is applied to all |
| 6973 |
# the requests matching this rule. This is the default value if |
| 6974 |
# "enforceOnKeyConfigs" is not configured. |
| 6975 |
# - IP: The source IP address of |
| 6976 |
# the request is the key. Each IP has this limit enforced |
| 6977 |
# separately. |
| 6978 |
# - HTTP_HEADER: The value of the HTTP |
| 6979 |
# header whose name is configured under "enforceOnKeyName". The key |
| 6980 |
# value is truncated to the first 128 bytes of the header value. If no |
| 6981 |
# such header is present in the request, the key type defaults toALL. |
| 6982 |
# - XFF_IP: The first IP address (i.e. the |
| 6983 |
# originating client IP address) specified in the list of IPs under |
| 6984 |
# X-Forwarded-For HTTP header. If no such header is present or the |
| 6985 |
# value is not a valid IP, the key defaults to the source IP address of |
| 6986 |
# the request i.e. key type IP. |
| 6987 |
# - HTTP_COOKIE: The value of the HTTP |
| 6988 |
# cookie whose name is configured under "enforceOnKeyName". The key |
| 6989 |
# value is truncated to the first 128 bytes of the cookie value. If no |
| 6990 |
# such cookie is present in the request, the key type defaults toALL. |
| 6991 |
# - HTTP_PATH: The URL path of the HTTP request. The key |
| 6992 |
# value is truncated to the first 128 bytes. |
| 6993 |
# - SNI: Server name indication in the TLS session of |
| 6994 |
# the HTTPS request. The key value is truncated to the first 128 bytes. |
| 6995 |
# The key type defaults to ALL on a HTTP session. |
| 6996 |
# - REGION_CODE: The country/region from which the |
| 6997 |
# request originates. |
| 6998 |
# - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the |
| 6999 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 7000 |
# key type defaults to ALL. |
| 7001 |
# - USER_IP: The IP address of the originating client, |
| 7002 |
# which is resolved based on "userIpRequestHeaders" configured with the |
| 7003 |
# security policy. If there is no "userIpRequestHeaders" configuration |
| 7004 |
# or an IP address cannot be resolved from it, the key type defaults toIP. |
| 7005 |
# |
| 7006 |
# - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the |
| 7007 |
# client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the |
| 7008 |
# key type defaults to ALL. |
| 7009 |
}, |
| 7010 |
], |
| 7011 |
"enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: |
| 7012 |
# HTTP_HEADER -- Name of the HTTP header whose value is taken as the key |
| 7013 |
# value. |
| 7014 |
# HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key |
| 7015 |
# value. |
| 7016 |
"exceedAction": "A String", # Action to take for requests that are above the configured rate limit |
| 7017 |
# threshold, to either deny with a specified HTTP response code, or |
| 7018 |
# redirect to a different endpoint. |
| 7019 |
# Valid options are `deny(STATUS)`, where valid values for |
| 7020 |
# `STATUS` are 403, 404, 429, and 502, and |
| 7021 |
# `redirect`, where the redirect parameters come from |
| 7022 |
# `exceedRedirectOptions` below. |
| 7023 |
# The `redirect` action is only supported in Global Security Policies of |
| 7024 |
# type CLOUD_ARMOR. |
| 7025 |
"exceedActionRpcStatus": { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are |
| 7026 |
# above the configured rate limit threshold |
| 7027 |
"code": 42, # The status code, which should be an enum value of |
| 7028 |
# google.rpc.Code. |
| 7029 |
"message": "A String", # A developer-facing error message, which should be in English. |
| 7030 |
}, |
| 7031 |
"exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed |
| 7032 |
# action. Cannot be specified if the exceed action is not redirect. |
| 7033 |
# This field is only supported in Global Security Policies of type |
| 7034 |
# CLOUD_ARMOR. |
| 7035 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 7036 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 7037 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 7038 |
# |
| 7039 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 7040 |
# challenge assessment. |
| 7041 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 7042 |
# response. |
| 7043 |
}, |
| 7044 |
"rateLimitThreshold": { # Threshold at which to begin ratelimiting. |
| 7045 |
"count": 42, # Number of HTTP(S) requests for calculating the threshold. |
| 7046 |
"intervalSec": 42, # Interval over which the threshold is computed. |
| 7047 |
}, |
| 7048 |
}, |
| 7049 |
"redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any |
| 7050 |
# other actions. |
| 7051 |
# This field is only supported in Global Security Policies of type |
| 7052 |
# CLOUD_ARMOR. |
| 7053 |
"target": "A String", # Target for the redirect action. This is required if the type is |
| 7054 |
# EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. |
| 7055 |
"type": "A String", # Type of the redirect action. Possible values are: |
| 7056 |
# |
| 7057 |
# - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual |
| 7058 |
# challenge assessment. |
| 7059 |
# - EXTERNAL_302: redirect to a different URL via a 302 |
| 7060 |
# response. |
| 7061 |
}, |
| 7062 |
"redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any |
| 7063 |
# other actions. |
| 7064 |
"ruleManagedProtectionTier": "A String", # Output only. [Output Only] The minimum Cloud Armor subscription required for this |
| 7065 |
# rule. |
| 7066 |
# [Deprecated] Use requiredManagedProtectionTiers instead. |
| 7067 |
"ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security |
| 7068 |
# policy. This can only be set during rule creation, if rule number is not |
| 7069 |
# specified it will be generated by the server. |
| 7070 |
"ruleTupleCount": 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security |
| 7071 |
# policy rule. |
| 7072 |
"targetResources": [ # A list of network resource URLs to which this rule applies. This field |
| 7073 |
# allows you to control which network's VMs get this rule. If this field |
| 7074 |
# is left blank, all VMs within the organization will receive the rule. |
| 7075 |
# |
| 7076 |
# This field may only be specified when versioned_expr is set to FIREWALL. |
| 7077 |
"A String", |
| 7078 |
], |
| 7079 |
"targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are |
| 7080 |
# applied with this rule. |
| 7081 |
"A String", |
| 7082 |
], |
| 7083 |
} |
| 7084 |
|
| 7085 |
priority: integer, The priority of the rule to patch. |
| 7086 |
updateMask: string, Indicates fields to be cleared as part of this request. |
| 7087 |
validateOnly: boolean, If true, the request will not be committed. |
| 7088 |
x__xgafv: string, V1 error format. |
| 7089 |
Allowed values |
| 7090 |
1 - v1 error format |
| 7091 |
2 - v2 error format |
| 7092 |
|
| 7093 |
Returns: |
| 7094 |
An object of the form: |
| 7095 |
|
| 7096 |
{ # Represents an Operation resource. |
| 7097 |
# |
| 7098 |
# Google Compute Engine has three Operation resources: |
| 7099 |
# |
| 7100 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 7101 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 7102 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 7103 |
# |
| 7104 |
# You can use an operation resource to manage asynchronous API requests. |
| 7105 |
# For more information, readHandling |
| 7106 |
# API responses. |
| 7107 |
# |
| 7108 |
# Operations can be global, regional or zonal. |
| 7109 |
# |
| 7110 |
# - For global operations, use the `globalOperations` |
| 7111 |
# resource. |
| 7112 |
# - For regional operations, use the |
| 7113 |
# `regionOperations` resource. |
| 7114 |
# - For zonal operations, use |
| 7115 |
# the `zoneOperations` resource. |
| 7116 |
# |
| 7117 |
# |
| 7118 |
# |
| 7119 |
# For more information, read |
| 7120 |
# Global, Regional, and Zonal Resources. |
| 7121 |
# |
| 7122 |
# Note that completed Operation resources have a limited |
| 7123 |
# retention period. |
| 7124 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 7125 |
# Not present otherwise. |
| 7126 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 7127 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 7128 |
# set when the operation is created. |
| 7129 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 7130 |
# text format. |
| 7131 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 7132 |
# this field will be populated. |
| 7133 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 7134 |
# operation. |
| 7135 |
{ |
| 7136 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 7137 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 7138 |
# details. There is a set of defined message types to use for providing |
| 7139 |
# details.The syntax depends on the error code. For example, |
| 7140 |
# QuotaExceededInfo will have details when the error code is |
| 7141 |
# QUOTA_EXCEEDED. |
| 7142 |
{ |
| 7143 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 7144 |
# |
| 7145 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 7146 |
# is not enabled: |
| 7147 |
# |
| 7148 |
# { "reason": "API_DISABLED" |
| 7149 |
# "domain": "googleapis.com" |
| 7150 |
# "metadata": { |
| 7151 |
# "resource": "projects/123", |
| 7152 |
# "service": "pubsub.googleapis.com" |
| 7153 |
# } |
| 7154 |
# } |
| 7155 |
# |
| 7156 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 7157 |
# |
| 7158 |
# Example of an error that is returned when attempting to create a Spanner |
| 7159 |
# instance in a region that is out of stock: |
| 7160 |
# |
| 7161 |
# { "reason": "STOCKOUT" |
| 7162 |
# "domain": "spanner.googleapis.com", |
| 7163 |
# "metadata": { |
| 7164 |
# "availableRegions": "us-central1,us-east2" |
| 7165 |
# } |
| 7166 |
# } |
| 7167 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 7168 |
# is typically the registered service name of the tool or product that |
| 7169 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 7170 |
# generated by some common infrastructure, the error domain must be a |
| 7171 |
# globally unique value that identifies the infrastructure. For Google API |
| 7172 |
# infrastructure, the error domain is "googleapis.com". |
| 7173 |
"metadatas": { # Additional structured details about this error. |
| 7174 |
# |
| 7175 |
# Keys must match a regular expression of `a-z+` but should |
| 7176 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 7177 |
# length. When identifying the current value of an exceeded limit, the units |
| 7178 |
# should be contained in the key, not the value. For example, rather than |
| 7179 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 7180 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 7181 |
# instances that can be created in a single (batch) request. |
| 7182 |
"a_key": "A String", |
| 7183 |
}, |
| 7184 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 7185 |
# proximate cause of the error. Error reasons are unique within a particular |
| 7186 |
# domain of errors. This should be at most 63 characters and match a |
| 7187 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 7188 |
# UPPER_SNAKE_CASE. |
| 7189 |
}, |
| 7190 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 7191 |
# |
| 7192 |
# For example, if a quota check failed with an error indicating the calling |
| 7193 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 7194 |
# directly to the right place in the developer console to flip the bit. |
| 7195 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 7196 |
{ # Describes a URL link. |
| 7197 |
"description": "A String", # Describes what the link offers. |
| 7198 |
"url": "A String", # The URL of the link. |
| 7199 |
}, |
| 7200 |
], |
| 7201 |
}, |
| 7202 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 7203 |
# which can be attached to an RPC error. |
| 7204 |
"locale": "A String", # The locale used following the specification defined at |
| 7205 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 7206 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 7207 |
"message": "A String", # The localized error message in the above locale. |
| 7208 |
}, |
| 7209 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 7210 |
"dimensions": { # The map holding related quota dimensions. |
| 7211 |
"a_key": "A String", |
| 7212 |
}, |
| 7213 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 7214 |
# type or metric. |
| 7215 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 7216 |
# or metric. |
| 7217 |
"limitName": "A String", # The name of the quota limit. |
| 7218 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 7219 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 7220 |
}, |
| 7221 |
}, |
| 7222 |
], |
| 7223 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 7224 |
# This property is optional. |
| 7225 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 7226 |
}, |
| 7227 |
], |
| 7228 |
}, |
| 7229 |
"getVersionOperationMetadata": { |
| 7230 |
"inlineSbomInfo": { |
| 7231 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 7232 |
# appropriate identifiers. |
| 7233 |
"a_key": "A String", |
| 7234 |
}, |
| 7235 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 7236 |
# identifiers. |
| 7237 |
"a_key": "A String", |
| 7238 |
}, |
| 7239 |
}, |
| 7240 |
}, |
| 7241 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 7242 |
# message that was returned, such as `NOT FOUND`. |
| 7243 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 7244 |
# status code that was returned. For example, a `404` means the |
| 7245 |
# resource was not found. |
| 7246 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 7247 |
# defined by the server. |
| 7248 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 7249 |
# This value is inRFC3339 |
| 7250 |
# text format. |
| 7251 |
"instancesBulkInsertOperationMetadata": { |
| 7252 |
"perLocationStatus": { # Status information per location (location name is key). |
| 7253 |
# Example key: zones/us-central1-a |
| 7254 |
"a_key": { |
| 7255 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 7256 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 7257 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 7258 |
# error. |
| 7259 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 7260 |
# if the flow is rolling forward or rolling back. |
| 7261 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 7262 |
}, |
| 7263 |
}, |
| 7264 |
}, |
| 7265 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 7266 |
# Operation resources. |
| 7267 |
"name": "A String", # [Output Only] Name of the operation. |
| 7268 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 7269 |
# group of operations results from a `bulkInsert` API request. |
| 7270 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 7271 |
# `update`, or `delete`, and so on. |
| 7272 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 7273 |
# There is no requirement that this be linear or support any granularity of |
| 7274 |
# operations. This should not be used to guess when the operation will be |
| 7275 |
# complete. This number should monotonically increase as the operation |
| 7276 |
# progresses. |
| 7277 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 7278 |
# applicable when performing regional operations. |
| 7279 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 7280 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 7281 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 7282 |
# this field will contain information on all underlying zonal actions and |
| 7283 |
# their state. |
| 7284 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 7285 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 7286 |
# Example key: zones/us-central1-a |
| 7287 |
"a_key": { |
| 7288 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 7289 |
# populated. |
| 7290 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 7291 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 7292 |
# three pieces of data: error code, error message, and error details. |
| 7293 |
# |
| 7294 |
# You can find out more about this error model and how to work with it in the |
| 7295 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 7296 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 7297 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 7298 |
# message types for APIs to use. |
| 7299 |
{ |
| 7300 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 7301 |
}, |
| 7302 |
], |
| 7303 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 7304 |
# user-facing error message should be localized and sent in the |
| 7305 |
# google.rpc.Status.details field, or localized by the client. |
| 7306 |
}, |
| 7307 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 7308 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 7309 |
}, |
| 7310 |
}, |
| 7311 |
}, |
| 7312 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 7313 |
# This value is inRFC3339 |
| 7314 |
# text format. |
| 7315 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 7316 |
# following: |
| 7317 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 7318 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 7319 |
# operation. |
| 7320 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 7321 |
# of the target resource. |
| 7322 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 7323 |
# operations related to creating a snapshot, this points to the disk |
| 7324 |
# that the snapshot was created from. |
| 7325 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 7326 |
# `[email protected]` or |
| 7327 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 7328 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 7329 |
# operation, this field will be populated. |
| 7330 |
{ |
| 7331 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 7332 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 7333 |
# are no results in the response. |
| 7334 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 7335 |
# value format. For example: |
| 7336 |
# |
| 7337 |
# "data": [ |
| 7338 |
# { |
| 7339 |
# "key": "scope", |
| 7340 |
# "value": "zones/us-east1-d" |
| 7341 |
# } |
| 7342 |
{ |
| 7343 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 7344 |
# returned. For example, for warnings where there are no results in a list |
| 7345 |
# request for a particular zone, this key might be scope and |
| 7346 |
# the key value might be the zone name. Other examples might be a key |
| 7347 |
# indicating a deprecated resource and a suggested replacement, or a |
| 7348 |
# warning about invalid network settings (for example, if an instance |
| 7349 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 7350 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 7351 |
}, |
| 7352 |
], |
| 7353 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 7354 |
}, |
| 7355 |
], |
| 7356 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 7357 |
# applicable when performing per-zone operations. |
| 7358 |
}</pre> |
| 7359 |
</div> |
| 7360 |
|
| 7361 |
<div class="method"> |
| 7362 |
<code class="details" id="removeRule">removeRule(project, securityPolicy, priority=None, x__xgafv=None)</code> |
| 7363 |
<pre>Deletes a rule at the specified priority. |
| 7364 |
|
| 7365 |
Args: |
| 7366 |
project: string, Project ID for this request. (required) |
| 7367 |
securityPolicy: string, Name of the security policy to update. (required) |
| 7368 |
priority: integer, The priority of the rule to remove from the security policy. |
| 7369 |
x__xgafv: string, V1 error format. |
| 7370 |
Allowed values |
| 7371 |
1 - v1 error format |
| 7372 |
2 - v2 error format |
| 7373 |
|
| 7374 |
Returns: |
| 7375 |
An object of the form: |
| 7376 |
|
| 7377 |
{ # Represents an Operation resource. |
| 7378 |
# |
| 7379 |
# Google Compute Engine has three Operation resources: |
| 7380 |
# |
| 7381 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 7382 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 7383 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 7384 |
# |
| 7385 |
# You can use an operation resource to manage asynchronous API requests. |
| 7386 |
# For more information, readHandling |
| 7387 |
# API responses. |
| 7388 |
# |
| 7389 |
# Operations can be global, regional or zonal. |
| 7390 |
# |
| 7391 |
# - For global operations, use the `globalOperations` |
| 7392 |
# resource. |
| 7393 |
# - For regional operations, use the |
| 7394 |
# `regionOperations` resource. |
| 7395 |
# - For zonal operations, use |
| 7396 |
# the `zoneOperations` resource. |
| 7397 |
# |
| 7398 |
# |
| 7399 |
# |
| 7400 |
# For more information, read |
| 7401 |
# Global, Regional, and Zonal Resources. |
| 7402 |
# |
| 7403 |
# Note that completed Operation resources have a limited |
| 7404 |
# retention period. |
| 7405 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 7406 |
# Not present otherwise. |
| 7407 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 7408 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 7409 |
# set when the operation is created. |
| 7410 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 7411 |
# text format. |
| 7412 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 7413 |
# this field will be populated. |
| 7414 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 7415 |
# operation. |
| 7416 |
{ |
| 7417 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 7418 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 7419 |
# details. There is a set of defined message types to use for providing |
| 7420 |
# details.The syntax depends on the error code. For example, |
| 7421 |
# QuotaExceededInfo will have details when the error code is |
| 7422 |
# QUOTA_EXCEEDED. |
| 7423 |
{ |
| 7424 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 7425 |
# |
| 7426 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 7427 |
# is not enabled: |
| 7428 |
# |
| 7429 |
# { "reason": "API_DISABLED" |
| 7430 |
# "domain": "googleapis.com" |
| 7431 |
# "metadata": { |
| 7432 |
# "resource": "projects/123", |
| 7433 |
# "service": "pubsub.googleapis.com" |
| 7434 |
# } |
| 7435 |
# } |
| 7436 |
# |
| 7437 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 7438 |
# |
| 7439 |
# Example of an error that is returned when attempting to create a Spanner |
| 7440 |
# instance in a region that is out of stock: |
| 7441 |
# |
| 7442 |
# { "reason": "STOCKOUT" |
| 7443 |
# "domain": "spanner.googleapis.com", |
| 7444 |
# "metadata": { |
| 7445 |
# "availableRegions": "us-central1,us-east2" |
| 7446 |
# } |
| 7447 |
# } |
| 7448 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 7449 |
# is typically the registered service name of the tool or product that |
| 7450 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 7451 |
# generated by some common infrastructure, the error domain must be a |
| 7452 |
# globally unique value that identifies the infrastructure. For Google API |
| 7453 |
# infrastructure, the error domain is "googleapis.com". |
| 7454 |
"metadatas": { # Additional structured details about this error. |
| 7455 |
# |
| 7456 |
# Keys must match a regular expression of `a-z+` but should |
| 7457 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 7458 |
# length. When identifying the current value of an exceeded limit, the units |
| 7459 |
# should be contained in the key, not the value. For example, rather than |
| 7460 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 7461 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 7462 |
# instances that can be created in a single (batch) request. |
| 7463 |
"a_key": "A String", |
| 7464 |
}, |
| 7465 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 7466 |
# proximate cause of the error. Error reasons are unique within a particular |
| 7467 |
# domain of errors. This should be at most 63 characters and match a |
| 7468 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 7469 |
# UPPER_SNAKE_CASE. |
| 7470 |
}, |
| 7471 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 7472 |
# |
| 7473 |
# For example, if a quota check failed with an error indicating the calling |
| 7474 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 7475 |
# directly to the right place in the developer console to flip the bit. |
| 7476 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 7477 |
{ # Describes a URL link. |
| 7478 |
"description": "A String", # Describes what the link offers. |
| 7479 |
"url": "A String", # The URL of the link. |
| 7480 |
}, |
| 7481 |
], |
| 7482 |
}, |
| 7483 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 7484 |
# which can be attached to an RPC error. |
| 7485 |
"locale": "A String", # The locale used following the specification defined at |
| 7486 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 7487 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 7488 |
"message": "A String", # The localized error message in the above locale. |
| 7489 |
}, |
| 7490 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 7491 |
"dimensions": { # The map holding related quota dimensions. |
| 7492 |
"a_key": "A String", |
| 7493 |
}, |
| 7494 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 7495 |
# type or metric. |
| 7496 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 7497 |
# or metric. |
| 7498 |
"limitName": "A String", # The name of the quota limit. |
| 7499 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 7500 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 7501 |
}, |
| 7502 |
}, |
| 7503 |
], |
| 7504 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 7505 |
# This property is optional. |
| 7506 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 7507 |
}, |
| 7508 |
], |
| 7509 |
}, |
| 7510 |
"getVersionOperationMetadata": { |
| 7511 |
"inlineSbomInfo": { |
| 7512 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 7513 |
# appropriate identifiers. |
| 7514 |
"a_key": "A String", |
| 7515 |
}, |
| 7516 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 7517 |
# identifiers. |
| 7518 |
"a_key": "A String", |
| 7519 |
}, |
| 7520 |
}, |
| 7521 |
}, |
| 7522 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 7523 |
# message that was returned, such as `NOT FOUND`. |
| 7524 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 7525 |
# status code that was returned. For example, a `404` means the |
| 7526 |
# resource was not found. |
| 7527 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 7528 |
# defined by the server. |
| 7529 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 7530 |
# This value is inRFC3339 |
| 7531 |
# text format. |
| 7532 |
"instancesBulkInsertOperationMetadata": { |
| 7533 |
"perLocationStatus": { # Status information per location (location name is key). |
| 7534 |
# Example key: zones/us-central1-a |
| 7535 |
"a_key": { |
| 7536 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 7537 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 7538 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 7539 |
# error. |
| 7540 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 7541 |
# if the flow is rolling forward or rolling back. |
| 7542 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 7543 |
}, |
| 7544 |
}, |
| 7545 |
}, |
| 7546 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 7547 |
# Operation resources. |
| 7548 |
"name": "A String", # [Output Only] Name of the operation. |
| 7549 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 7550 |
# group of operations results from a `bulkInsert` API request. |
| 7551 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 7552 |
# `update`, or `delete`, and so on. |
| 7553 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 7554 |
# There is no requirement that this be linear or support any granularity of |
| 7555 |
# operations. This should not be used to guess when the operation will be |
| 7556 |
# complete. This number should monotonically increase as the operation |
| 7557 |
# progresses. |
| 7558 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 7559 |
# applicable when performing regional operations. |
| 7560 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 7561 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 7562 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 7563 |
# this field will contain information on all underlying zonal actions and |
| 7564 |
# their state. |
| 7565 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 7566 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 7567 |
# Example key: zones/us-central1-a |
| 7568 |
"a_key": { |
| 7569 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 7570 |
# populated. |
| 7571 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 7572 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 7573 |
# three pieces of data: error code, error message, and error details. |
| 7574 |
# |
| 7575 |
# You can find out more about this error model and how to work with it in the |
| 7576 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 7577 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 7578 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 7579 |
# message types for APIs to use. |
| 7580 |
{ |
| 7581 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 7582 |
}, |
| 7583 |
], |
| 7584 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 7585 |
# user-facing error message should be localized and sent in the |
| 7586 |
# google.rpc.Status.details field, or localized by the client. |
| 7587 |
}, |
| 7588 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 7589 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 7590 |
}, |
| 7591 |
}, |
| 7592 |
}, |
| 7593 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 7594 |
# This value is inRFC3339 |
| 7595 |
# text format. |
| 7596 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 7597 |
# following: |
| 7598 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 7599 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 7600 |
# operation. |
| 7601 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 7602 |
# of the target resource. |
| 7603 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 7604 |
# operations related to creating a snapshot, this points to the disk |
| 7605 |
# that the snapshot was created from. |
| 7606 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 7607 |
# `[email protected]` or |
| 7608 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 7609 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 7610 |
# operation, this field will be populated. |
| 7611 |
{ |
| 7612 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 7613 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 7614 |
# are no results in the response. |
| 7615 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 7616 |
# value format. For example: |
| 7617 |
# |
| 7618 |
# "data": [ |
| 7619 |
# { |
| 7620 |
# "key": "scope", |
| 7621 |
# "value": "zones/us-east1-d" |
| 7622 |
# } |
| 7623 |
{ |
| 7624 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 7625 |
# returned. For example, for warnings where there are no results in a list |
| 7626 |
# request for a particular zone, this key might be scope and |
| 7627 |
# the key value might be the zone name. Other examples might be a key |
| 7628 |
# indicating a deprecated resource and a suggested replacement, or a |
| 7629 |
# warning about invalid network settings (for example, if an instance |
| 7630 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 7631 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 7632 |
}, |
| 7633 |
], |
| 7634 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 7635 |
}, |
| 7636 |
], |
| 7637 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 7638 |
# applicable when performing per-zone operations. |
| 7639 |
}</pre> |
| 7640 |
</div> |
| 7641 |
|
| 7642 |
<div class="method"> |
| 7643 |
<code class="details" id="setLabels">setLabels(project, resource, body=None, x__xgafv=None)</code> |
| 7644 |
<pre>Sets the labels on a security policy. To learn more about labels, |
| 7645 |
read the Labeling Resources |
| 7646 |
documentation. |
| 7647 |
|
| 7648 |
Args: |
| 7649 |
project: string, Project ID for this request. (required) |
| 7650 |
resource: string, Name or id of the resource for this request. (required) |
| 7651 |
body: object, The request body. |
| 7652 |
The object takes the form of: |
| 7653 |
|
| 7654 |
{ |
| 7655 |
"labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, |
| 7656 |
# used to detect conflicts. The fingerprint is initially generated by Compute |
| 7657 |
# Engine and changes after every request to modify or update labels. You must |
| 7658 |
# always provide an up-to-date fingerprint hash when updating or changing |
| 7659 |
# labels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the |
| 7660 |
# resource to get the latest fingerprint. |
| 7661 |
"labels": { # A list of labels to apply for this resource. Each label must comply with |
| 7662 |
# the |
| 7663 |
# requirements for labels. For example,"webserver-frontend": "images". A label value can also be |
| 7664 |
# empty (e.g. "my-label": ""). |
| 7665 |
"a_key": "A String", |
| 7666 |
}, |
| 7667 |
} |
| 7668 |
|
| 7669 |
x__xgafv: string, V1 error format. |
| 7670 |
Allowed values |
| 7671 |
1 - v1 error format |
| 7672 |
2 - v2 error format |
| 7673 |
|
| 7674 |
Returns: |
| 7675 |
An object of the form: |
| 7676 |
|
| 7677 |
{ # Represents an Operation resource. |
| 7678 |
# |
| 7679 |
# Google Compute Engine has three Operation resources: |
| 7680 |
# |
| 7681 |
# * [Global](/compute/docs/reference/rest/alpha/globalOperations) |
| 7682 |
# * [Regional](/compute/docs/reference/rest/alpha/regionOperations) |
| 7683 |
# * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations) |
| 7684 |
# |
| 7685 |
# You can use an operation resource to manage asynchronous API requests. |
| 7686 |
# For more information, readHandling |
| 7687 |
# API responses. |
| 7688 |
# |
| 7689 |
# Operations can be global, regional or zonal. |
| 7690 |
# |
| 7691 |
# - For global operations, use the `globalOperations` |
| 7692 |
# resource. |
| 7693 |
# - For regional operations, use the |
| 7694 |
# `regionOperations` resource. |
| 7695 |
# - For zonal operations, use |
| 7696 |
# the `zoneOperations` resource. |
| 7697 |
# |
| 7698 |
# |
| 7699 |
# |
| 7700 |
# For more information, read |
| 7701 |
# Global, Regional, and Zonal Resources. |
| 7702 |
# |
| 7703 |
# Note that completed Operation resources have a limited |
| 7704 |
# retention period. |
| 7705 |
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. |
| 7706 |
# Not present otherwise. |
| 7707 |
"creationTimestamp": "A String", # [Deprecated] This field is deprecated. |
| 7708 |
"description": "A String", # [Output Only] A textual description of the operation, which is |
| 7709 |
# set when the operation is created. |
| 7710 |
"endTime": "A String", # [Output Only] The time that this operation was completed. This value is inRFC3339 |
| 7711 |
# text format. |
| 7712 |
"error": { # [Output Only] If errors are generated during processing of the operation, |
| 7713 |
# this field will be populated. |
| 7714 |
"errors": [ # [Output Only] The array of errors encountered while processing this |
| 7715 |
# operation. |
| 7716 |
{ |
| 7717 |
"code": "A String", # [Output Only] The error type identifier for this error. |
| 7718 |
"errorDetails": [ # [Output Only] An optional list of messages that contain the error |
| 7719 |
# details. There is a set of defined message types to use for providing |
| 7720 |
# details.The syntax depends on the error code. For example, |
| 7721 |
# QuotaExceededInfo will have details when the error code is |
| 7722 |
# QUOTA_EXCEEDED. |
| 7723 |
{ |
| 7724 |
"errorInfo": { # Describes the cause of the error with structured details. |
| 7725 |
# |
| 7726 |
# Example of an error when contacting the "pubsub.googleapis.com" API when it |
| 7727 |
# is not enabled: |
| 7728 |
# |
| 7729 |
# { "reason": "API_DISABLED" |
| 7730 |
# "domain": "googleapis.com" |
| 7731 |
# "metadata": { |
| 7732 |
# "resource": "projects/123", |
| 7733 |
# "service": "pubsub.googleapis.com" |
| 7734 |
# } |
| 7735 |
# } |
| 7736 |
# |
| 7737 |
# This response indicates that the pubsub.googleapis.com API is not enabled. |
| 7738 |
# |
| 7739 |
# Example of an error that is returned when attempting to create a Spanner |
| 7740 |
# instance in a region that is out of stock: |
| 7741 |
# |
| 7742 |
# { "reason": "STOCKOUT" |
| 7743 |
# "domain": "spanner.googleapis.com", |
| 7744 |
# "metadata": { |
| 7745 |
# "availableRegions": "us-central1,us-east2" |
| 7746 |
# } |
| 7747 |
# } |
| 7748 |
"domain": "A String", # The logical grouping to which the "reason" belongs. The error domain |
| 7749 |
# is typically the registered service name of the tool or product that |
| 7750 |
# generates the error. Example: "pubsub.googleapis.com". If the error is |
| 7751 |
# generated by some common infrastructure, the error domain must be a |
| 7752 |
# globally unique value that identifies the infrastructure. For Google API |
| 7753 |
# infrastructure, the error domain is "googleapis.com". |
| 7754 |
"metadatas": { # Additional structured details about this error. |
| 7755 |
# |
| 7756 |
# Keys must match a regular expression of `a-z+` but should |
| 7757 |
# ideally be lowerCamelCase. Also, they must be limited to 64 characters in |
| 7758 |
# length. When identifying the current value of an exceeded limit, the units |
| 7759 |
# should be contained in the key, not the value. For example, rather than |
| 7760 |
# `{"instanceLimit": "100/request"}`, should be returned as, |
| 7761 |
# `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of |
| 7762 |
# instances that can be created in a single (batch) request. |
| 7763 |
"a_key": "A String", |
| 7764 |
}, |
| 7765 |
"reason": "A String", # The reason of the error. This is a constant value that identifies the |
| 7766 |
# proximate cause of the error. Error reasons are unique within a particular |
| 7767 |
# domain of errors. This should be at most 63 characters and match a |
| 7768 |
# regular expression of `A-Z+[A-Z0-9]`, which represents |
| 7769 |
# UPPER_SNAKE_CASE. |
| 7770 |
}, |
| 7771 |
"help": { # Provides links to documentation or for performing an out of band action. |
| 7772 |
# |
| 7773 |
# For example, if a quota check failed with an error indicating the calling |
| 7774 |
# project hasn't enabled the accessed service, this can contain a URL pointing |
| 7775 |
# directly to the right place in the developer console to flip the bit. |
| 7776 |
"links": [ # URL(s) pointing to additional information on handling the current error. |
| 7777 |
{ # Describes a URL link. |
| 7778 |
"description": "A String", # Describes what the link offers. |
| 7779 |
"url": "A String", # The URL of the link. |
| 7780 |
}, |
| 7781 |
], |
| 7782 |
}, |
| 7783 |
"localizedMessage": { # Provides a localized error message that is safe to return to the user |
| 7784 |
# which can be attached to an RPC error. |
| 7785 |
"locale": "A String", # The locale used following the specification defined at |
| 7786 |
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt. |
| 7787 |
# Examples are: "en-US", "fr-CH", "es-MX" |
| 7788 |
"message": "A String", # The localized error message in the above locale. |
| 7789 |
}, |
| 7790 |
"quotaInfo": { # Additional details for quota exceeded error for resource quota. |
| 7791 |
"dimensions": { # The map holding related quota dimensions. |
| 7792 |
"a_key": "A String", |
| 7793 |
}, |
| 7794 |
"futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota |
| 7795 |
# type or metric. |
| 7796 |
"limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type |
| 7797 |
# or metric. |
| 7798 |
"limitName": "A String", # The name of the quota limit. |
| 7799 |
"metricName": "A String", # The Compute Engine quota metric name. |
| 7800 |
"rolloutStatus": "A String", # Rollout status of the future quota limit. |
| 7801 |
}, |
| 7802 |
}, |
| 7803 |
], |
| 7804 |
"location": "A String", # [Output Only] Indicates the field in the request that caused the error. |
| 7805 |
# This property is optional. |
| 7806 |
"message": "A String", # [Output Only] An optional, human-readable error message. |
| 7807 |
}, |
| 7808 |
], |
| 7809 |
}, |
| 7810 |
"getVersionOperationMetadata": { |
| 7811 |
"inlineSbomInfo": { |
| 7812 |
"currentComponentVersions": { # A mapping of components to their currently-applied versions or other |
| 7813 |
# appropriate identifiers. |
| 7814 |
"a_key": "A String", |
| 7815 |
}, |
| 7816 |
"targetComponentVersions": { # A mapping of components to their target versions or other appropriate |
| 7817 |
# identifiers. |
| 7818 |
"a_key": "A String", |
| 7819 |
}, |
| 7820 |
}, |
| 7821 |
}, |
| 7822 |
"httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error |
| 7823 |
# message that was returned, such as `NOT FOUND`. |
| 7824 |
"httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error |
| 7825 |
# status code that was returned. For example, a `404` means the |
| 7826 |
# resource was not found. |
| 7827 |
"id": "A String", # [Output Only] The unique identifier for the operation. This identifier is |
| 7828 |
# defined by the server. |
| 7829 |
"insertTime": "A String", # [Output Only] The time that this operation was requested. |
| 7830 |
# This value is inRFC3339 |
| 7831 |
# text format. |
| 7832 |
"instancesBulkInsertOperationMetadata": { |
| 7833 |
"perLocationStatus": { # Status information per location (location name is key). |
| 7834 |
# Example key: zones/us-central1-a |
| 7835 |
"a_key": { |
| 7836 |
"createdVmCount": 42, # [Output Only] Count of VMs successfully created so far. |
| 7837 |
"deletedVmCount": 42, # [Output Only] Count of VMs that got deleted during rollback. |
| 7838 |
"failedToCreateVmCount": 42, # [Output Only] Count of VMs that started creating but encountered an |
| 7839 |
# error. |
| 7840 |
"status": "A String", # [Output Only] Creation status of BulkInsert operation - information |
| 7841 |
# if the flow is rolling forward or rolling back. |
| 7842 |
"targetVmCount": 42, # [Output Only] Count of VMs originally planned to be created. |
| 7843 |
}, |
| 7844 |
}, |
| 7845 |
}, |
| 7846 |
"kind": "compute#operation", # Output only. [Output Only] Type of the resource. Always `compute#operation` for |
| 7847 |
# Operation resources. |
| 7848 |
"name": "A String", # [Output Only] Name of the operation. |
| 7849 |
"operationGroupId": "A String", # Output only. [Output Only] An ID that represents a group of operations, such as when a |
| 7850 |
# group of operations results from a `bulkInsert` API request. |
| 7851 |
"operationType": "A String", # [Output Only] The type of operation, such as `insert`, |
| 7852 |
# `update`, or `delete`, and so on. |
| 7853 |
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 7854 |
# There is no requirement that this be linear or support any granularity of |
| 7855 |
# operations. This should not be used to guess when the operation will be |
| 7856 |
# complete. This number should monotonically increase as the operation |
| 7857 |
# progresses. |
| 7858 |
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only |
| 7859 |
# applicable when performing regional operations. |
| 7860 |
"selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 7861 |
"selfLinkWithId": "A String", # Output only. [Output Only] Server-defined URL for this resource with the resource id. |
| 7862 |
"setCommonInstanceMetadataOperationMetadata": { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, |
| 7863 |
# this field will contain information on all underlying zonal actions and |
| 7864 |
# their state. |
| 7865 |
"clientOperationId": "A String", # [Output Only] The client operation id. |
| 7866 |
"perLocationOperations": { # [Output Only] Status information per location (location name is key). |
| 7867 |
# Example key: zones/us-central1-a |
| 7868 |
"a_key": { |
| 7869 |
"error": { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is |
| 7870 |
# populated. |
| 7871 |
# different programming environments, including REST APIs and RPC APIs. It is |
| 7872 |
# used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 7873 |
# three pieces of data: error code, error message, and error details. |
| 7874 |
# |
| 7875 |
# You can find out more about this error model and how to work with it in the |
| 7876 |
# [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 7877 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 7878 |
"details": [ # A list of messages that carry the error details. There is a common set of |
| 7879 |
# message types for APIs to use. |
| 7880 |
{ |
| 7881 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 7882 |
}, |
| 7883 |
], |
| 7884 |
"message": "A String", # A developer-facing error message, which should be in English. Any |
| 7885 |
# user-facing error message should be localized and sent in the |
| 7886 |
# google.rpc.Status.details field, or localized by the client. |
| 7887 |
}, |
| 7888 |
"state": "A String", # [Output Only] Status of the action, which can be one of the following: |
| 7889 |
# `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. |
| 7890 |
}, |
| 7891 |
}, |
| 7892 |
}, |
| 7893 |
"startTime": "A String", # [Output Only] The time that this operation was started by the server. |
| 7894 |
# This value is inRFC3339 |
| 7895 |
# text format. |
| 7896 |
"status": "A String", # [Output Only] The status of the operation, which can be one of the |
| 7897 |
# following: |
| 7898 |
# `PENDING`, `RUNNING`, or `DONE`. |
| 7899 |
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the |
| 7900 |
# operation. |
| 7901 |
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation |
| 7902 |
# of the target resource. |
| 7903 |
"targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For |
| 7904 |
# operations related to creating a snapshot, this points to the disk |
| 7905 |
# that the snapshot was created from. |
| 7906 |
"user": "A String", # [Output Only] User who requested the operation, for example: |
| 7907 |
# `[email protected]` or |
| 7908 |
# `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| 7909 |
"warnings": [ # [Output Only] If warning messages are generated during processing of the |
| 7910 |
# operation, this field will be populated. |
| 7911 |
{ |
| 7912 |
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute |
| 7913 |
# Engine returns NO_RESULTS_ON_PAGE if there |
| 7914 |
# are no results in the response. |
| 7915 |
"data": [ # [Output Only] Metadata about this warning in key: |
| 7916 |
# value format. For example: |
| 7917 |
# |
| 7918 |
# "data": [ |
| 7919 |
# { |
| 7920 |
# "key": "scope", |
| 7921 |
# "value": "zones/us-east1-d" |
| 7922 |
# } |
| 7923 |
{ |
| 7924 |
"key": "A String", # [Output Only] A key that provides more detail on the warning being |
| 7925 |
# returned. For example, for warnings where there are no results in a list |
| 7926 |
# request for a particular zone, this key might be scope and |
| 7927 |
# the key value might be the zone name. Other examples might be a key |
| 7928 |
# indicating a deprecated resource and a suggested replacement, or a |
| 7929 |
# warning about invalid network settings (for example, if an instance |
| 7930 |
# attempts to perform IP forwarding but is not enabled for IP forwarding). |
| 7931 |
"value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 7932 |
}, |
| 7933 |
], |
| 7934 |
"message": "A String", # [Output Only] A human-readable description of the warning code. |
| 7935 |
}, |
| 7936 |
], |
| 7937 |
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only |
| 7938 |
# applicable when performing per-zone operations. |
| 7939 |
}</pre> |
| 7940 |
</div> |
| 7941 |
|
| 7942 |
<div class="method"> |
| 7943 |
<code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code> |
| 7944 |
<pre>Returns permissions that a caller has on the specified resource. |
| 7945 |
|
| 7946 |
Args: |
| 7947 |
project: string, Project ID for this request. (required) |
| 7948 |
resource: string, Name or id of the resource for this request. (required) |
| 7949 |
body: object, The request body. |
| 7950 |
The object takes the form of: |
| 7951 |
|
| 7952 |
{ |
| 7953 |
"permissions": [ # The set of permissions to check for the 'resource'. Permissions with |
| 7954 |
# wildcards (such as '*' or 'storage.*') are not allowed. |
| 7955 |
"A String", |
| 7956 |
], |
| 7957 |
} |
| 7958 |
|
| 7959 |
x__xgafv: string, V1 error format. |
| 7960 |
Allowed values |
| 7961 |
1 - v1 error format |
| 7962 |
2 - v2 error format |
| 7963 |
|
| 7964 |
Returns: |
| 7965 |
An object of the form: |
| 7966 |
|
| 7967 |
{ |
| 7968 |
"permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 7969 |
# allowed. |
| 7970 |
"A String", |
| 7971 |
], |
| 7972 |
}</pre> |
| 7973 |
</div> |
| 7974 |
|
| 7975 |
</body></html> |