aws-sdk-wafv2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 34f70a9e4ebd3bc20232744440a79e98d1bcade5
4
+ data.tar.gz: 3e96aa739bc36d7034208bc8cdec4098d8910dea
5
+ SHA512:
6
+ metadata.gz: 326a09fc429063d157d49763eb1d74f7f859424cdebb6bebb0f5ff103af89d6a448d0b6177ea9543274c4c1948e0da6eb645510636012fb6393228f97f4f727e
7
+ data.tar.gz: 2d0d6917a7da1af169033ccf201f4dfa37fcf6b20ed150861d37b9c33b1b8a0ad1e2d2cbae286ba19c2ec0c9dcb632623100ae2934a112d9798b70f9a266849d
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-wafv2/types'
12
+ require_relative 'aws-sdk-wafv2/client_api'
13
+ require_relative 'aws-sdk-wafv2/client'
14
+ require_relative 'aws-sdk-wafv2/errors'
15
+ require_relative 'aws-sdk-wafv2/resource'
16
+ require_relative 'aws-sdk-wafv2/customizations'
17
+
18
+ # This module provides support for AWS WAFV2. This module is available in the
19
+ # `aws-sdk-wafv2` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS WAFV2 all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::WAFV2::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::WAFV2
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,4123 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/signature_v4.rb'
28
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:wafv2)
31
+
32
+ module Aws::WAFV2
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :wafv2
38
+
39
+ set_api(ClientApi::API)
40
+
41
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
42
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
43
+ add_plugin(Aws::Plugins::Logging)
44
+ add_plugin(Aws::Plugins::ParamConverter)
45
+ add_plugin(Aws::Plugins::ParamValidator)
46
+ add_plugin(Aws::Plugins::UserAgent)
47
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
48
+ add_plugin(Aws::Plugins::RetryErrors)
49
+ add_plugin(Aws::Plugins::GlobalConfiguration)
50
+ add_plugin(Aws::Plugins::RegionalEndpoint)
51
+ add_plugin(Aws::Plugins::EndpointDiscovery)
52
+ add_plugin(Aws::Plugins::EndpointPattern)
53
+ add_plugin(Aws::Plugins::ResponsePaging)
54
+ add_plugin(Aws::Plugins::StubResponses)
55
+ add_plugin(Aws::Plugins::IdempotencyToken)
56
+ add_plugin(Aws::Plugins::JsonvalueConverter)
57
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
60
+ add_plugin(Aws::Plugins::SignatureV4)
61
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
62
+
63
+ # @overload initialize(options)
64
+ # @param [Hash] options
65
+ # @option options [required, Aws::CredentialProvider] :credentials
66
+ # Your AWS credentials. This can be an instance of any one of the
67
+ # following classes:
68
+ #
69
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
+ # credentials.
71
+ #
72
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
+ # from an EC2 IMDS on an EC2 instance.
74
+ #
75
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
76
+ # shared file, such as `~/.aws/config`.
77
+ #
78
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
79
+ #
80
+ # When `:credentials` are not configured directly, the following
81
+ # locations will be searched for credentials:
82
+ #
83
+ # * `Aws.config[:credentials]`
84
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
85
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
+ # * `~/.aws/credentials`
87
+ # * `~/.aws/config`
88
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
89
+ # very aggressive. Construct and pass an instance of
90
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
91
+ # timeouts.
92
+ #
93
+ # @option options [required, String] :region
94
+ # The AWS region to connect to. The configured `:region` is
95
+ # used to determine the service `:endpoint`. When not passed,
96
+ # a default `:region` is search for in the following locations:
97
+ #
98
+ # * `Aws.config[:region]`
99
+ # * `ENV['AWS_REGION']`
100
+ # * `ENV['AMAZON_REGION']`
101
+ # * `ENV['AWS_DEFAULT_REGION']`
102
+ # * `~/.aws/credentials`
103
+ # * `~/.aws/config`
104
+ #
105
+ # @option options [String] :access_key_id
106
+ #
107
+ # @option options [Boolean] :active_endpoint_cache (false)
108
+ # When set to `true`, a thread polling for endpoints will be running in
109
+ # the background every 60 secs (default). Defaults to `false`.
110
+ #
111
+ # @option options [Boolean] :client_side_monitoring (false)
112
+ # When `true`, client-side metrics will be collected for all API requests from
113
+ # this client.
114
+ #
115
+ # @option options [String] :client_side_monitoring_client_id ("")
116
+ # Allows you to provide an identifier for this client which will be attached to
117
+ # all generated client side metrics. Defaults to an empty string.
118
+ #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Integer] :client_side_monitoring_port (31000)
124
+ # Required for publishing client metrics. The port that the client side monitoring
125
+ # agent is running on, where client metrics will be published via UDP.
126
+ #
127
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
128
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
129
+ # will use the Client Side Monitoring Agent Publisher.
130
+ #
131
+ # @option options [Boolean] :convert_params (true)
132
+ # When `true`, an attempt is made to coerce request parameters into
133
+ # the required types.
134
+ #
135
+ # @option options [Boolean] :disable_host_prefix_injection (false)
136
+ # Set to true to disable SDK automatically adding host prefix
137
+ # to default service endpoint when available.
138
+ #
139
+ # @option options [String] :endpoint
140
+ # The client endpoint is normally constructed from the `:region`
141
+ # option. You should only configure an `:endpoint` when connecting
142
+ # to test endpoints. This should be avalid HTTP(S) URI.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
145
+ # Used for the maximum size limit of the LRU cache storing endpoints data
146
+ # for endpoint discovery enabled operations. Defaults to 1000.
147
+ #
148
+ # @option options [Integer] :endpoint_cache_max_threads (10)
149
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
150
+ #
151
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
152
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
153
+ # Use this option to config the time interval in seconds for making
154
+ # requests fetching endpoints information. Defaults to 60 sec.
155
+ #
156
+ # @option options [Boolean] :endpoint_discovery (false)
157
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
158
+ #
159
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
+ # The log formatter.
161
+ #
162
+ # @option options [Symbol] :log_level (:info)
163
+ # The log level to send messages to the `:logger` at.
164
+ #
165
+ # @option options [Logger] :logger
166
+ # The Logger instance to send log messages to. If this option
167
+ # is not set, logging will be disabled.
168
+ #
169
+ # @option options [String] :profile ("default")
170
+ # Used when loading credentials from the shared credentials file
171
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
172
+ #
173
+ # @option options [Float] :retry_base_delay (0.3)
174
+ # The base delay in seconds used by the default backoff function.
175
+ #
176
+ # @option options [Symbol] :retry_jitter (:none)
177
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
178
+ #
179
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
+ #
181
+ # @option options [Integer] :retry_limit (3)
182
+ # The maximum number of times to retry failed requests. Only
183
+ # ~ 500 level server errors and certain ~ 400 level client errors
184
+ # are retried. Generally, these are throttling errors, data
185
+ # checksum errors, networking errors, timeout errors and auth
186
+ # errors from expired credentials.
187
+ #
188
+ # @option options [Integer] :retry_max_delay (0)
189
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
190
+ #
191
+ # @option options [String] :secret_access_key
192
+ #
193
+ # @option options [String] :session_token
194
+ #
195
+ # @option options [Boolean] :simple_json (false)
196
+ # Disables request parameter conversion, validation, and formatting.
197
+ # Also disable response data type conversions. This option is useful
198
+ # when you want to ensure the highest level of performance by
199
+ # avoiding overhead of walking request parameters and response data
200
+ # structures.
201
+ #
202
+ # When `:simple_json` is enabled, the request parameters hash must
203
+ # be formatted exactly as the DynamoDB API expects.
204
+ #
205
+ # @option options [Boolean] :stub_responses (false)
206
+ # Causes the client to return stubbed responses. By default
207
+ # fake responses are generated and returned. You can specify
208
+ # the response data to return or errors to raise by calling
209
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
210
+ #
211
+ # ** Please note ** When response stubbing is enabled, no HTTP
212
+ # requests are made, and retries are disabled.
213
+ #
214
+ # @option options [Boolean] :validate_params (true)
215
+ # When `true`, request parameters are validated before
216
+ # sending the request.
217
+ #
218
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
219
+ # requests through. Formatted like 'http://proxy.com:123'.
220
+ #
221
+ # @option options [Float] :http_open_timeout (15) The number of
222
+ # seconds to wait when opening a HTTP session before rasing a
223
+ # `Timeout::Error`.
224
+ #
225
+ # @option options [Integer] :http_read_timeout (60) The default
226
+ # number of seconds to wait for response data. This value can
227
+ # safely be set
228
+ # per-request on the session yeidled by {#session_for}.
229
+ #
230
+ # @option options [Float] :http_idle_timeout (5) The number of
231
+ # seconds a connection is allowed to sit idble before it is
232
+ # considered stale. Stale connections are closed and removed
233
+ # from the pool before making a request.
234
+ #
235
+ # @option options [Float] :http_continue_timeout (1) The number of
236
+ # seconds to wait for a 100-continue response before sending the
237
+ # request body. This option has no effect unless the request has
238
+ # "Expect" header set to "100-continue". Defaults to `nil` which
239
+ # disables this behaviour. This value can safely be set per
240
+ # request on the session yeidled by {#session_for}.
241
+ #
242
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
243
+ # HTTP debug output will be sent to the `:logger`.
244
+ #
245
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
246
+ # SSL peer certificates are verified when establishing a
247
+ # connection.
248
+ #
249
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
250
+ # certificate authority bundle file that should be used when
251
+ # verifying peer certificates. If you do not pass
252
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
253
+ # will be used if available.
254
+ #
255
+ # @option options [String] :ssl_ca_directory Full path of the
256
+ # directory that contains the unbundled SSL certificate
257
+ # authority files for verifying peer certificates. If you do
258
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
259
+ # system default will be used if available.
260
+ #
261
+ def initialize(*args)
262
+ super
263
+ end
264
+
265
+ # @!group API Operations
266
+
267
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
268
+ # in November, 2019. For information, including how to migrate your AWS
269
+ # WAF resources from the prior release, see the [AWS WAF Developer
270
+ # Guide][1].
271
+ #
272
+ # </note>
273
+ #
274
+ # Associates a Web ACL with a regional application resource, to protect
275
+ # the resource. A regional application can be an Application Load
276
+ # Balancer (ALB) or an API Gateway stage.
277
+ #
278
+ # For AWS CloudFront, you can associate the Web ACL by providing the
279
+ # `Id` of the WebACL to the CloudFront API call `UpdateDistribution`.
280
+ # For information, see [UpdateDistribution][2].
281
+ #
282
+ #
283
+ #
284
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
285
+ # [2]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html
286
+ #
287
+ # @option params [required, String] :web_acl_arn
288
+ # The Amazon Resource Name (ARN) of the Web ACL that you want to
289
+ # associate with the resource.
290
+ #
291
+ # @option params [required, String] :resource_arn
292
+ # The Amazon Resource Name (ARN) of the resource to associate with the
293
+ # web ACL.
294
+ #
295
+ # The ARN must be in one of the following formats:
296
+ #
297
+ # * For a CloudFront distribution:
298
+ # `arn:aws:cloudfront::account-id:distribution/distribution-id `
299
+ #
300
+ # * For an Application Load Balancer: `arn:aws:elasticloadbalancing:
301
+ # region:account-id:loadbalancer/app/load-balancer-name
302
+ # /load-balancer-id `
303
+ #
304
+ # * For an Amazon API Gateway stage: `arn:aws:apigateway:region
305
+ # ::/restapis/api-id/stages/stage-name `
306
+ #
307
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
308
+ #
309
+ # @example Request syntax with placeholder values
310
+ #
311
+ # resp = client.associate_web_acl({
312
+ # web_acl_arn: "ResourceArn", # required
313
+ # resource_arn: "ResourceArn", # required
314
+ # })
315
+ #
316
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL AWS API Documentation
317
+ #
318
+ # @overload associate_web_acl(params = {})
319
+ # @param [Hash] params ({})
320
+ def associate_web_acl(params = {}, options = {})
321
+ req = build_request(:associate_web_acl, params)
322
+ req.send_request(options)
323
+ end
324
+
325
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
326
+ # in November, 2019. For information, including how to migrate your AWS
327
+ # WAF resources from the prior release, see the [AWS WAF Developer
328
+ # Guide][1].
329
+ #
330
+ # </note>
331
+ #
332
+ # Returns the web ACL capacity unit (WCU) requirements for a specified
333
+ # scope and set of rules. You can use this to check the capacity
334
+ # requirements for the rules you want to use in a RuleGroup or WebACL.
335
+ #
336
+ # AWS WAF uses WCUs to calculate and control the operating resources
337
+ # that are used to run your rules, rule groups, and web ACLs. AWS WAF
338
+ # calculates capacity differently for each rule type, to reflect the
339
+ # relative cost of each rule. Simple rules that cost little to run use
340
+ # fewer WCUs than more complex rules that use more processing power.
341
+ # Rule group capacity is fixed at creation, which helps users plan their
342
+ # web ACL WCU usage when they use a rule group. The WCU limit for web
343
+ # ACLs is 1,500.
344
+ #
345
+ #
346
+ #
347
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
348
+ #
349
+ # @option params [required, String] :scope
350
+ # Specifies whether this is for an AWS CloudFront distribution or for a
351
+ # regional application. A regional application can be an Application
352
+ # Load Balancer (ALB) or an API Gateway stage.
353
+ #
354
+ # To work with CloudFront, you must also specify the Region US East (N.
355
+ # Virginia) as follows:
356
+ #
357
+ # * CLI - Specify the region when you use the CloudFront scope:
358
+ # `--scope=CLOUDFRONT --region=us-east-1`.
359
+ #
360
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
361
+ #
362
+ # @option params [required, Array<Types::Rule>] :rules
363
+ # An array of Rule that you're configuring to use in a rule group or
364
+ # web ACL.
365
+ #
366
+ # @return [Types::CheckCapacityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
367
+ #
368
+ # * {Types::CheckCapacityResponse#capacity #capacity} => Integer
369
+ #
370
+ # @example Request syntax with placeholder values
371
+ #
372
+ # resp = client.check_capacity({
373
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
374
+ # rules: [ # required
375
+ # {
376
+ # name: "EntityName", # required
377
+ # priority: 1, # required
378
+ # statement: { # required
379
+ # byte_match_statement: {
380
+ # search_string: "data", # required
381
+ # field_to_match: { # required
382
+ # single_header: {
383
+ # name: "FieldToMatchData", # required
384
+ # },
385
+ # single_query_argument: {
386
+ # name: "FieldToMatchData", # required
387
+ # },
388
+ # all_query_arguments: {
389
+ # },
390
+ # uri_path: {
391
+ # },
392
+ # query_string: {
393
+ # },
394
+ # body: {
395
+ # },
396
+ # method: {
397
+ # },
398
+ # },
399
+ # text_transformations: [ # required
400
+ # {
401
+ # priority: 1, # required
402
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
403
+ # },
404
+ # ],
405
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
406
+ # },
407
+ # sqli_match_statement: {
408
+ # field_to_match: { # required
409
+ # single_header: {
410
+ # name: "FieldToMatchData", # required
411
+ # },
412
+ # single_query_argument: {
413
+ # name: "FieldToMatchData", # required
414
+ # },
415
+ # all_query_arguments: {
416
+ # },
417
+ # uri_path: {
418
+ # },
419
+ # query_string: {
420
+ # },
421
+ # body: {
422
+ # },
423
+ # method: {
424
+ # },
425
+ # },
426
+ # text_transformations: [ # required
427
+ # {
428
+ # priority: 1, # required
429
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
430
+ # },
431
+ # ],
432
+ # },
433
+ # xss_match_statement: {
434
+ # field_to_match: { # required
435
+ # single_header: {
436
+ # name: "FieldToMatchData", # required
437
+ # },
438
+ # single_query_argument: {
439
+ # name: "FieldToMatchData", # required
440
+ # },
441
+ # all_query_arguments: {
442
+ # },
443
+ # uri_path: {
444
+ # },
445
+ # query_string: {
446
+ # },
447
+ # body: {
448
+ # },
449
+ # method: {
450
+ # },
451
+ # },
452
+ # text_transformations: [ # required
453
+ # {
454
+ # priority: 1, # required
455
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
456
+ # },
457
+ # ],
458
+ # },
459
+ # size_constraint_statement: {
460
+ # field_to_match: { # required
461
+ # single_header: {
462
+ # name: "FieldToMatchData", # required
463
+ # },
464
+ # single_query_argument: {
465
+ # name: "FieldToMatchData", # required
466
+ # },
467
+ # all_query_arguments: {
468
+ # },
469
+ # uri_path: {
470
+ # },
471
+ # query_string: {
472
+ # },
473
+ # body: {
474
+ # },
475
+ # method: {
476
+ # },
477
+ # },
478
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
479
+ # size: 1, # required
480
+ # text_transformations: [ # required
481
+ # {
482
+ # priority: 1, # required
483
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
484
+ # },
485
+ # ],
486
+ # },
487
+ # geo_match_statement: {
488
+ # country_codes: ["AF"], # accepts AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
489
+ # },
490
+ # rule_group_reference_statement: {
491
+ # arn: "ResourceArn", # required
492
+ # excluded_rules: [
493
+ # {
494
+ # name: "EntityName", # required
495
+ # },
496
+ # ],
497
+ # },
498
+ # ip_set_reference_statement: {
499
+ # arn: "ResourceArn", # required
500
+ # },
501
+ # regex_pattern_set_reference_statement: {
502
+ # arn: "ResourceArn", # required
503
+ # field_to_match: { # required
504
+ # single_header: {
505
+ # name: "FieldToMatchData", # required
506
+ # },
507
+ # single_query_argument: {
508
+ # name: "FieldToMatchData", # required
509
+ # },
510
+ # all_query_arguments: {
511
+ # },
512
+ # uri_path: {
513
+ # },
514
+ # query_string: {
515
+ # },
516
+ # body: {
517
+ # },
518
+ # method: {
519
+ # },
520
+ # },
521
+ # text_transformations: [ # required
522
+ # {
523
+ # priority: 1, # required
524
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
525
+ # },
526
+ # ],
527
+ # },
528
+ # rate_based_statement: {
529
+ # limit: 1, # required
530
+ # aggregate_key_type: "IP", # required, accepts IP
531
+ # scope_down_statement: {
532
+ # # recursive Statement
533
+ # },
534
+ # },
535
+ # and_statement: {
536
+ # statements: [ # required
537
+ # {
538
+ # # recursive Statement
539
+ # },
540
+ # ],
541
+ # },
542
+ # or_statement: {
543
+ # statements: [ # required
544
+ # {
545
+ # # recursive Statement
546
+ # },
547
+ # ],
548
+ # },
549
+ # not_statement: {
550
+ # statement: { # required
551
+ # # recursive Statement
552
+ # },
553
+ # },
554
+ # managed_rule_group_statement: {
555
+ # vendor_name: "VendorName", # required
556
+ # name: "EntityName", # required
557
+ # excluded_rules: [
558
+ # {
559
+ # name: "EntityName", # required
560
+ # },
561
+ # ],
562
+ # },
563
+ # },
564
+ # action: {
565
+ # block: {
566
+ # },
567
+ # allow: {
568
+ # },
569
+ # count: {
570
+ # },
571
+ # },
572
+ # override_action: {
573
+ # count: {
574
+ # },
575
+ # none: {
576
+ # },
577
+ # },
578
+ # visibility_config: { # required
579
+ # sampled_requests_enabled: false, # required
580
+ # cloud_watch_metrics_enabled: false, # required
581
+ # metric_name: "MetricName", # required
582
+ # },
583
+ # },
584
+ # ],
585
+ # })
586
+ #
587
+ # @example Response structure
588
+ #
589
+ # resp.capacity #=> Integer
590
+ #
591
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity AWS API Documentation
592
+ #
593
+ # @overload check_capacity(params = {})
594
+ # @param [Hash] params ({})
595
+ def check_capacity(params = {}, options = {})
596
+ req = build_request(:check_capacity, params)
597
+ req.send_request(options)
598
+ end
599
+
600
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
601
+ # in November, 2019. For information, including how to migrate your AWS
602
+ # WAF resources from the prior release, see the [AWS WAF Developer
603
+ # Guide][1].
604
+ #
605
+ # </note>
606
+ #
607
+ # Creates an IPSet, which you use to identify web requests that
608
+ # originate from specific IP addresses or ranges of IP addresses. For
609
+ # example, if you're receiving a lot of requests from a ranges of IP
610
+ # addresses, you can configure AWS WAF to block them using an IPSet that
611
+ # lists those IP addresses.
612
+ #
613
+ #
614
+ #
615
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
616
+ #
617
+ # @option params [required, String] :name
618
+ # A friendly name of the IP set. You cannot change the name of an
619
+ # `IPSet` after you create it.
620
+ #
621
+ # @option params [required, String] :scope
622
+ # Specifies whether this is for an AWS CloudFront distribution or for a
623
+ # regional application. A regional application can be an Application
624
+ # Load Balancer (ALB) or an API Gateway stage.
625
+ #
626
+ # To work with CloudFront, you must also specify the Region US East (N.
627
+ # Virginia) as follows:
628
+ #
629
+ # * CLI - Specify the region when you use the CloudFront scope:
630
+ # `--scope=CLOUDFRONT --region=us-east-1`.
631
+ #
632
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
633
+ #
634
+ # @option params [String] :description
635
+ # A friendly description of the IP set. You cannot change the
636
+ # description of an IP set after you create it.
637
+ #
638
+ # @option params [required, String] :ip_address_version
639
+ # Specify IPV4 or IPV6.
640
+ #
641
+ # @option params [required, Array<String>] :addresses
642
+ # Contains an array of strings that specify one or more IP addresses or
643
+ # blocks of IP addresses in Classless Inter-Domain Routing (CIDR)
644
+ # notation. AWS WAF supports all address ranges for IP versions IPv4 and
645
+ # IPv6.
646
+ #
647
+ # Examples:
648
+ #
649
+ # * To configure AWS WAF to allow, block, or count requests that
650
+ # originated from the IP address 192.0.2.44, specify `192.0.2.44/32`.
651
+ #
652
+ # * To configure AWS WAF to allow, block, or count requests that
653
+ # originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify
654
+ # `192.0.2.0/24`.
655
+ #
656
+ # * To configure AWS WAF to allow, block, or count requests that
657
+ # originated from the IP address
658
+ # 1111:0000:0000:0000:0000:0000:0000:0111, specify
659
+ # `1111:0000:0000:0000:0000:0000:0000:0111/128`.
660
+ #
661
+ # * To configure AWS WAF to allow, block, or count requests that
662
+ # originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000
663
+ # to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
664
+ # `1111:0000:0000:0000:0000:0000:0000:0000/64`.
665
+ #
666
+ # For more information about CIDR notation, see the Wikipedia entry
667
+ # [Classless Inter-Domain Routing][1].
668
+ #
669
+ #
670
+ #
671
+ # [1]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
672
+ #
673
+ # @option params [Array<Types::Tag>] :tags
674
+ # An array of key:value pairs to associate with the resource.
675
+ #
676
+ # @return [Types::CreateIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
677
+ #
678
+ # * {Types::CreateIPSetResponse#summary #summary} => Types::IPSetSummary
679
+ #
680
+ # @example Request syntax with placeholder values
681
+ #
682
+ # resp = client.create_ip_set({
683
+ # name: "EntityName", # required
684
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
685
+ # description: "EntityDescription",
686
+ # ip_address_version: "IPV4", # required, accepts IPV4, IPV6
687
+ # addresses: ["IPAddress"], # required
688
+ # tags: [
689
+ # {
690
+ # key: "TagKey", # required
691
+ # value: "TagValue", # required
692
+ # },
693
+ # ],
694
+ # })
695
+ #
696
+ # @example Response structure
697
+ #
698
+ # resp.summary.name #=> String
699
+ # resp.summary.id #=> String
700
+ # resp.summary.description #=> String
701
+ # resp.summary.lock_token #=> String
702
+ # resp.summary.arn #=> String
703
+ #
704
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet AWS API Documentation
705
+ #
706
+ # @overload create_ip_set(params = {})
707
+ # @param [Hash] params ({})
708
+ def create_ip_set(params = {}, options = {})
709
+ req = build_request(:create_ip_set, params)
710
+ req.send_request(options)
711
+ end
712
+
713
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
714
+ # in November, 2019. For information, including how to migrate your AWS
715
+ # WAF resources from the prior release, see the [AWS WAF Developer
716
+ # Guide][1].
717
+ #
718
+ # </note>
719
+ #
720
+ # Creates a RegexPatternSet per the specifications provided.
721
+ #
722
+ #
723
+ #
724
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
725
+ #
726
+ # @option params [required, String] :name
727
+ # A friendly name of the set. You cannot change the name after you
728
+ # create the set.
729
+ #
730
+ # @option params [required, String] :scope
731
+ # Specifies whether this is for an AWS CloudFront distribution or for a
732
+ # regional application. A regional application can be an Application
733
+ # Load Balancer (ALB) or an API Gateway stage.
734
+ #
735
+ # To work with CloudFront, you must also specify the Region US East (N.
736
+ # Virginia) as follows:
737
+ #
738
+ # * CLI - Specify the region when you use the CloudFront scope:
739
+ # `--scope=CLOUDFRONT --region=us-east-1`.
740
+ #
741
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
742
+ #
743
+ # @option params [String] :description
744
+ # A friendly description of the set. You cannot change the description
745
+ # of a set after you create it.
746
+ #
747
+ # @option params [required, Array<Types::Regex>] :regular_expression_list
748
+ # Array of regular expression strings.
749
+ #
750
+ # @option params [Array<Types::Tag>] :tags
751
+ # An array of key:value pairs to associate with the resource.
752
+ #
753
+ # @return [Types::CreateRegexPatternSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
754
+ #
755
+ # * {Types::CreateRegexPatternSetResponse#summary #summary} => Types::RegexPatternSetSummary
756
+ #
757
+ # @example Request syntax with placeholder values
758
+ #
759
+ # resp = client.create_regex_pattern_set({
760
+ # name: "EntityName", # required
761
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
762
+ # description: "EntityDescription",
763
+ # regular_expression_list: [ # required
764
+ # {
765
+ # regex_string: "RegexPatternString",
766
+ # },
767
+ # ],
768
+ # tags: [
769
+ # {
770
+ # key: "TagKey", # required
771
+ # value: "TagValue", # required
772
+ # },
773
+ # ],
774
+ # })
775
+ #
776
+ # @example Response structure
777
+ #
778
+ # resp.summary.name #=> String
779
+ # resp.summary.id #=> String
780
+ # resp.summary.description #=> String
781
+ # resp.summary.lock_token #=> String
782
+ # resp.summary.arn #=> String
783
+ #
784
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet AWS API Documentation
785
+ #
786
+ # @overload create_regex_pattern_set(params = {})
787
+ # @param [Hash] params ({})
788
+ def create_regex_pattern_set(params = {}, options = {})
789
+ req = build_request(:create_regex_pattern_set, params)
790
+ req.send_request(options)
791
+ end
792
+
793
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
794
+ # in November, 2019. For information, including how to migrate your AWS
795
+ # WAF resources from the prior release, see the [AWS WAF Developer
796
+ # Guide][1].
797
+ #
798
+ # </note>
799
+ #
800
+ # Creates a RuleGroup per the specifications provided.
801
+ #
802
+ # A rule group defines a collection of rules to inspect and control web
803
+ # requests that you can use in a WebACL. When you create a rule group,
804
+ # you define an immutable capacity limit. If you update a rule group,
805
+ # you must stay within the capacity. This allows others to reuse the
806
+ # rule group with confidence in its capacity requirements.
807
+ #
808
+ #
809
+ #
810
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
811
+ #
812
+ # @option params [required, String] :name
813
+ # A friendly name of the rule group. You cannot change the name of a
814
+ # rule group after you create it.
815
+ #
816
+ # @option params [required, String] :scope
817
+ # Specifies whether this is for an AWS CloudFront distribution or for a
818
+ # regional application. A regional application can be an Application
819
+ # Load Balancer (ALB) or an API Gateway stage.
820
+ #
821
+ # To work with CloudFront, you must also specify the Region US East (N.
822
+ # Virginia) as follows:
823
+ #
824
+ # * CLI - Specify the region when you use the CloudFront scope:
825
+ # `--scope=CLOUDFRONT --region=us-east-1`.
826
+ #
827
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
828
+ #
829
+ # @option params [required, Integer] :capacity
830
+ # The web ACL capacity units (WCUs) required for this rule group.
831
+ #
832
+ # When you create your own rule group, you define this, and you cannot
833
+ # change it after creation. When you add or modify the rules in a rule
834
+ # group, AWS WAF enforces this limit. You can check the capacity for a
835
+ # set of rules using CheckCapacity.
836
+ #
837
+ # AWS WAF uses WCUs to calculate and control the operating resources
838
+ # that are used to run your rules, rule groups, and web ACLs. AWS WAF
839
+ # calculates capacity differently for each rule type, to reflect the
840
+ # relative cost of each rule. Simple rules that cost little to run use
841
+ # fewer WCUs than more complex rules that use more processing power.
842
+ # Rule group capacity is fixed at creation, which helps users plan their
843
+ # web ACL WCU usage when they use a rule group. The WCU limit for web
844
+ # ACLs is 1,500.
845
+ #
846
+ # @option params [String] :description
847
+ # A friendly description of the rule group. You cannot change the
848
+ # description of a rule group after you create it.
849
+ #
850
+ # @option params [Array<Types::Rule>] :rules
851
+ # The Rule statements used to identify the web requests that you want to
852
+ # allow, block, or count. Each rule includes one top-level statement
853
+ # that AWS WAF uses to identify matching web requests, and parameters
854
+ # that govern how AWS WAF handles them.
855
+ #
856
+ # @option params [required, Types::VisibilityConfig] :visibility_config
857
+ # Defines and enables Amazon CloudWatch metrics and web request sample
858
+ # collection.
859
+ #
860
+ # @option params [Array<Types::Tag>] :tags
861
+ # An array of key:value pairs to associate with the resource.
862
+ #
863
+ # @return [Types::CreateRuleGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
864
+ #
865
+ # * {Types::CreateRuleGroupResponse#summary #summary} => Types::RuleGroupSummary
866
+ #
867
+ # @example Request syntax with placeholder values
868
+ #
869
+ # resp = client.create_rule_group({
870
+ # name: "EntityName", # required
871
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
872
+ # capacity: 1, # required
873
+ # description: "EntityDescription",
874
+ # rules: [
875
+ # {
876
+ # name: "EntityName", # required
877
+ # priority: 1, # required
878
+ # statement: { # required
879
+ # byte_match_statement: {
880
+ # search_string: "data", # required
881
+ # field_to_match: { # required
882
+ # single_header: {
883
+ # name: "FieldToMatchData", # required
884
+ # },
885
+ # single_query_argument: {
886
+ # name: "FieldToMatchData", # required
887
+ # },
888
+ # all_query_arguments: {
889
+ # },
890
+ # uri_path: {
891
+ # },
892
+ # query_string: {
893
+ # },
894
+ # body: {
895
+ # },
896
+ # method: {
897
+ # },
898
+ # },
899
+ # text_transformations: [ # required
900
+ # {
901
+ # priority: 1, # required
902
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
903
+ # },
904
+ # ],
905
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
906
+ # },
907
+ # sqli_match_statement: {
908
+ # field_to_match: { # required
909
+ # single_header: {
910
+ # name: "FieldToMatchData", # required
911
+ # },
912
+ # single_query_argument: {
913
+ # name: "FieldToMatchData", # required
914
+ # },
915
+ # all_query_arguments: {
916
+ # },
917
+ # uri_path: {
918
+ # },
919
+ # query_string: {
920
+ # },
921
+ # body: {
922
+ # },
923
+ # method: {
924
+ # },
925
+ # },
926
+ # text_transformations: [ # required
927
+ # {
928
+ # priority: 1, # required
929
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
930
+ # },
931
+ # ],
932
+ # },
933
+ # xss_match_statement: {
934
+ # field_to_match: { # required
935
+ # single_header: {
936
+ # name: "FieldToMatchData", # required
937
+ # },
938
+ # single_query_argument: {
939
+ # name: "FieldToMatchData", # required
940
+ # },
941
+ # all_query_arguments: {
942
+ # },
943
+ # uri_path: {
944
+ # },
945
+ # query_string: {
946
+ # },
947
+ # body: {
948
+ # },
949
+ # method: {
950
+ # },
951
+ # },
952
+ # text_transformations: [ # required
953
+ # {
954
+ # priority: 1, # required
955
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
956
+ # },
957
+ # ],
958
+ # },
959
+ # size_constraint_statement: {
960
+ # field_to_match: { # required
961
+ # single_header: {
962
+ # name: "FieldToMatchData", # required
963
+ # },
964
+ # single_query_argument: {
965
+ # name: "FieldToMatchData", # required
966
+ # },
967
+ # all_query_arguments: {
968
+ # },
969
+ # uri_path: {
970
+ # },
971
+ # query_string: {
972
+ # },
973
+ # body: {
974
+ # },
975
+ # method: {
976
+ # },
977
+ # },
978
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
979
+ # size: 1, # required
980
+ # text_transformations: [ # required
981
+ # {
982
+ # priority: 1, # required
983
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
984
+ # },
985
+ # ],
986
+ # },
987
+ # geo_match_statement: {
988
+ # country_codes: ["AF"], # accepts AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
989
+ # },
990
+ # rule_group_reference_statement: {
991
+ # arn: "ResourceArn", # required
992
+ # excluded_rules: [
993
+ # {
994
+ # name: "EntityName", # required
995
+ # },
996
+ # ],
997
+ # },
998
+ # ip_set_reference_statement: {
999
+ # arn: "ResourceArn", # required
1000
+ # },
1001
+ # regex_pattern_set_reference_statement: {
1002
+ # arn: "ResourceArn", # required
1003
+ # field_to_match: { # required
1004
+ # single_header: {
1005
+ # name: "FieldToMatchData", # required
1006
+ # },
1007
+ # single_query_argument: {
1008
+ # name: "FieldToMatchData", # required
1009
+ # },
1010
+ # all_query_arguments: {
1011
+ # },
1012
+ # uri_path: {
1013
+ # },
1014
+ # query_string: {
1015
+ # },
1016
+ # body: {
1017
+ # },
1018
+ # method: {
1019
+ # },
1020
+ # },
1021
+ # text_transformations: [ # required
1022
+ # {
1023
+ # priority: 1, # required
1024
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1025
+ # },
1026
+ # ],
1027
+ # },
1028
+ # rate_based_statement: {
1029
+ # limit: 1, # required
1030
+ # aggregate_key_type: "IP", # required, accepts IP
1031
+ # scope_down_statement: {
1032
+ # # recursive Statement
1033
+ # },
1034
+ # },
1035
+ # and_statement: {
1036
+ # statements: [ # required
1037
+ # {
1038
+ # # recursive Statement
1039
+ # },
1040
+ # ],
1041
+ # },
1042
+ # or_statement: {
1043
+ # statements: [ # required
1044
+ # {
1045
+ # # recursive Statement
1046
+ # },
1047
+ # ],
1048
+ # },
1049
+ # not_statement: {
1050
+ # statement: { # required
1051
+ # # recursive Statement
1052
+ # },
1053
+ # },
1054
+ # managed_rule_group_statement: {
1055
+ # vendor_name: "VendorName", # required
1056
+ # name: "EntityName", # required
1057
+ # excluded_rules: [
1058
+ # {
1059
+ # name: "EntityName", # required
1060
+ # },
1061
+ # ],
1062
+ # },
1063
+ # },
1064
+ # action: {
1065
+ # block: {
1066
+ # },
1067
+ # allow: {
1068
+ # },
1069
+ # count: {
1070
+ # },
1071
+ # },
1072
+ # override_action: {
1073
+ # count: {
1074
+ # },
1075
+ # none: {
1076
+ # },
1077
+ # },
1078
+ # visibility_config: { # required
1079
+ # sampled_requests_enabled: false, # required
1080
+ # cloud_watch_metrics_enabled: false, # required
1081
+ # metric_name: "MetricName", # required
1082
+ # },
1083
+ # },
1084
+ # ],
1085
+ # visibility_config: { # required
1086
+ # sampled_requests_enabled: false, # required
1087
+ # cloud_watch_metrics_enabled: false, # required
1088
+ # metric_name: "MetricName", # required
1089
+ # },
1090
+ # tags: [
1091
+ # {
1092
+ # key: "TagKey", # required
1093
+ # value: "TagValue", # required
1094
+ # },
1095
+ # ],
1096
+ # })
1097
+ #
1098
+ # @example Response structure
1099
+ #
1100
+ # resp.summary.name #=> String
1101
+ # resp.summary.id #=> String
1102
+ # resp.summary.description #=> String
1103
+ # resp.summary.lock_token #=> String
1104
+ # resp.summary.arn #=> String
1105
+ #
1106
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup AWS API Documentation
1107
+ #
1108
+ # @overload create_rule_group(params = {})
1109
+ # @param [Hash] params ({})
1110
+ def create_rule_group(params = {}, options = {})
1111
+ req = build_request(:create_rule_group, params)
1112
+ req.send_request(options)
1113
+ end
1114
+
1115
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1116
+ # in November, 2019. For information, including how to migrate your AWS
1117
+ # WAF resources from the prior release, see the [AWS WAF Developer
1118
+ # Guide][1].
1119
+ #
1120
+ # </note>
1121
+ #
1122
+ # Creates a WebACL per the specifications provided.
1123
+ #
1124
+ # A Web ACL defines a collection of rules to use to inspect and control
1125
+ # web requests. Each rule has an action defined (allow, block, or count)
1126
+ # for requests that match the statement of the rule. In the Web ACL, you
1127
+ # assign a default action to take (allow, block) for any request that
1128
+ # does not match any of the rules. The rules in a Web ACL can be a
1129
+ # combination of the types Rule, RuleGroup, and managed rule group. You
1130
+ # can associate a Web ACL with one or more AWS resources to protect. The
1131
+ # resources can be Amazon CloudFront, an Amazon API Gateway API, or an
1132
+ # Application Load Balancer.
1133
+ #
1134
+ #
1135
+ #
1136
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1137
+ #
1138
+ # @option params [required, String] :name
1139
+ # A friendly name of the Web ACL. You cannot change the name of a Web
1140
+ # ACL after you create it.
1141
+ #
1142
+ # @option params [required, String] :scope
1143
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1144
+ # regional application. A regional application can be an Application
1145
+ # Load Balancer (ALB) or an API Gateway stage.
1146
+ #
1147
+ # To work with CloudFront, you must also specify the Region US East (N.
1148
+ # Virginia) as follows:
1149
+ #
1150
+ # * CLI - Specify the region when you use the CloudFront scope:
1151
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1152
+ #
1153
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1154
+ #
1155
+ # @option params [required, Types::DefaultAction] :default_action
1156
+ # The action to perform if none of the `Rules` contained in the `WebACL`
1157
+ # match.
1158
+ #
1159
+ # @option params [String] :description
1160
+ # A friendly description of the Web ACL. You cannot change the
1161
+ # description of a Web ACL after you create it.
1162
+ #
1163
+ # @option params [Array<Types::Rule>] :rules
1164
+ # The Rule statements used to identify the web requests that you want to
1165
+ # allow, block, or count. Each rule includes one top-level statement
1166
+ # that AWS WAF uses to identify matching web requests, and parameters
1167
+ # that govern how AWS WAF handles them.
1168
+ #
1169
+ # @option params [required, Types::VisibilityConfig] :visibility_config
1170
+ # Defines and enables Amazon CloudWatch metrics and web request sample
1171
+ # collection.
1172
+ #
1173
+ # @option params [Array<Types::Tag>] :tags
1174
+ # An array of key:value pairs to associate with the resource.
1175
+ #
1176
+ # @return [Types::CreateWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1177
+ #
1178
+ # * {Types::CreateWebACLResponse#summary #summary} => Types::WebACLSummary
1179
+ #
1180
+ # @example Request syntax with placeholder values
1181
+ #
1182
+ # resp = client.create_web_acl({
1183
+ # name: "EntityName", # required
1184
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1185
+ # default_action: { # required
1186
+ # block: {
1187
+ # },
1188
+ # allow: {
1189
+ # },
1190
+ # },
1191
+ # description: "EntityDescription",
1192
+ # rules: [
1193
+ # {
1194
+ # name: "EntityName", # required
1195
+ # priority: 1, # required
1196
+ # statement: { # required
1197
+ # byte_match_statement: {
1198
+ # search_string: "data", # required
1199
+ # field_to_match: { # required
1200
+ # single_header: {
1201
+ # name: "FieldToMatchData", # required
1202
+ # },
1203
+ # single_query_argument: {
1204
+ # name: "FieldToMatchData", # required
1205
+ # },
1206
+ # all_query_arguments: {
1207
+ # },
1208
+ # uri_path: {
1209
+ # },
1210
+ # query_string: {
1211
+ # },
1212
+ # body: {
1213
+ # },
1214
+ # method: {
1215
+ # },
1216
+ # },
1217
+ # text_transformations: [ # required
1218
+ # {
1219
+ # priority: 1, # required
1220
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1221
+ # },
1222
+ # ],
1223
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
1224
+ # },
1225
+ # sqli_match_statement: {
1226
+ # field_to_match: { # required
1227
+ # single_header: {
1228
+ # name: "FieldToMatchData", # required
1229
+ # },
1230
+ # single_query_argument: {
1231
+ # name: "FieldToMatchData", # required
1232
+ # },
1233
+ # all_query_arguments: {
1234
+ # },
1235
+ # uri_path: {
1236
+ # },
1237
+ # query_string: {
1238
+ # },
1239
+ # body: {
1240
+ # },
1241
+ # method: {
1242
+ # },
1243
+ # },
1244
+ # text_transformations: [ # required
1245
+ # {
1246
+ # priority: 1, # required
1247
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1248
+ # },
1249
+ # ],
1250
+ # },
1251
+ # xss_match_statement: {
1252
+ # field_to_match: { # required
1253
+ # single_header: {
1254
+ # name: "FieldToMatchData", # required
1255
+ # },
1256
+ # single_query_argument: {
1257
+ # name: "FieldToMatchData", # required
1258
+ # },
1259
+ # all_query_arguments: {
1260
+ # },
1261
+ # uri_path: {
1262
+ # },
1263
+ # query_string: {
1264
+ # },
1265
+ # body: {
1266
+ # },
1267
+ # method: {
1268
+ # },
1269
+ # },
1270
+ # text_transformations: [ # required
1271
+ # {
1272
+ # priority: 1, # required
1273
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1274
+ # },
1275
+ # ],
1276
+ # },
1277
+ # size_constraint_statement: {
1278
+ # field_to_match: { # required
1279
+ # single_header: {
1280
+ # name: "FieldToMatchData", # required
1281
+ # },
1282
+ # single_query_argument: {
1283
+ # name: "FieldToMatchData", # required
1284
+ # },
1285
+ # all_query_arguments: {
1286
+ # },
1287
+ # uri_path: {
1288
+ # },
1289
+ # query_string: {
1290
+ # },
1291
+ # body: {
1292
+ # },
1293
+ # method: {
1294
+ # },
1295
+ # },
1296
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
1297
+ # size: 1, # required
1298
+ # text_transformations: [ # required
1299
+ # {
1300
+ # priority: 1, # required
1301
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1302
+ # },
1303
+ # ],
1304
+ # },
1305
+ # geo_match_statement: {
1306
+ # country_codes: ["AF"], # accepts AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
1307
+ # },
1308
+ # rule_group_reference_statement: {
1309
+ # arn: "ResourceArn", # required
1310
+ # excluded_rules: [
1311
+ # {
1312
+ # name: "EntityName", # required
1313
+ # },
1314
+ # ],
1315
+ # },
1316
+ # ip_set_reference_statement: {
1317
+ # arn: "ResourceArn", # required
1318
+ # },
1319
+ # regex_pattern_set_reference_statement: {
1320
+ # arn: "ResourceArn", # required
1321
+ # field_to_match: { # required
1322
+ # single_header: {
1323
+ # name: "FieldToMatchData", # required
1324
+ # },
1325
+ # single_query_argument: {
1326
+ # name: "FieldToMatchData", # required
1327
+ # },
1328
+ # all_query_arguments: {
1329
+ # },
1330
+ # uri_path: {
1331
+ # },
1332
+ # query_string: {
1333
+ # },
1334
+ # body: {
1335
+ # },
1336
+ # method: {
1337
+ # },
1338
+ # },
1339
+ # text_transformations: [ # required
1340
+ # {
1341
+ # priority: 1, # required
1342
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1343
+ # },
1344
+ # ],
1345
+ # },
1346
+ # rate_based_statement: {
1347
+ # limit: 1, # required
1348
+ # aggregate_key_type: "IP", # required, accepts IP
1349
+ # scope_down_statement: {
1350
+ # # recursive Statement
1351
+ # },
1352
+ # },
1353
+ # and_statement: {
1354
+ # statements: [ # required
1355
+ # {
1356
+ # # recursive Statement
1357
+ # },
1358
+ # ],
1359
+ # },
1360
+ # or_statement: {
1361
+ # statements: [ # required
1362
+ # {
1363
+ # # recursive Statement
1364
+ # },
1365
+ # ],
1366
+ # },
1367
+ # not_statement: {
1368
+ # statement: { # required
1369
+ # # recursive Statement
1370
+ # },
1371
+ # },
1372
+ # managed_rule_group_statement: {
1373
+ # vendor_name: "VendorName", # required
1374
+ # name: "EntityName", # required
1375
+ # excluded_rules: [
1376
+ # {
1377
+ # name: "EntityName", # required
1378
+ # },
1379
+ # ],
1380
+ # },
1381
+ # },
1382
+ # action: {
1383
+ # block: {
1384
+ # },
1385
+ # allow: {
1386
+ # },
1387
+ # count: {
1388
+ # },
1389
+ # },
1390
+ # override_action: {
1391
+ # count: {
1392
+ # },
1393
+ # none: {
1394
+ # },
1395
+ # },
1396
+ # visibility_config: { # required
1397
+ # sampled_requests_enabled: false, # required
1398
+ # cloud_watch_metrics_enabled: false, # required
1399
+ # metric_name: "MetricName", # required
1400
+ # },
1401
+ # },
1402
+ # ],
1403
+ # visibility_config: { # required
1404
+ # sampled_requests_enabled: false, # required
1405
+ # cloud_watch_metrics_enabled: false, # required
1406
+ # metric_name: "MetricName", # required
1407
+ # },
1408
+ # tags: [
1409
+ # {
1410
+ # key: "TagKey", # required
1411
+ # value: "TagValue", # required
1412
+ # },
1413
+ # ],
1414
+ # })
1415
+ #
1416
+ # @example Response structure
1417
+ #
1418
+ # resp.summary.name #=> String
1419
+ # resp.summary.id #=> String
1420
+ # resp.summary.description #=> String
1421
+ # resp.summary.lock_token #=> String
1422
+ # resp.summary.arn #=> String
1423
+ #
1424
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL AWS API Documentation
1425
+ #
1426
+ # @overload create_web_acl(params = {})
1427
+ # @param [Hash] params ({})
1428
+ def create_web_acl(params = {}, options = {})
1429
+ req = build_request(:create_web_acl, params)
1430
+ req.send_request(options)
1431
+ end
1432
+
1433
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1434
+ # in November, 2019. For information, including how to migrate your AWS
1435
+ # WAF resources from the prior release, see the [AWS WAF Developer
1436
+ # Guide][1].
1437
+ #
1438
+ # </note>
1439
+ #
1440
+ # Deletes the specified IPSet.
1441
+ #
1442
+ #
1443
+ #
1444
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1445
+ #
1446
+ # @option params [required, String] :name
1447
+ # A friendly name of the IP set. You cannot change the name of an
1448
+ # `IPSet` after you create it.
1449
+ #
1450
+ # @option params [required, String] :scope
1451
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1452
+ # regional application. A regional application can be an Application
1453
+ # Load Balancer (ALB) or an API Gateway stage.
1454
+ #
1455
+ # To work with CloudFront, you must also specify the Region US East (N.
1456
+ # Virginia) as follows:
1457
+ #
1458
+ # * CLI - Specify the region when you use the CloudFront scope:
1459
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1460
+ #
1461
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1462
+ #
1463
+ # @option params [required, String] :id
1464
+ # A unique identifier for the set. This ID is returned in the responses
1465
+ # to create and list commands. You provide it to operations like update
1466
+ # and delete.
1467
+ #
1468
+ # @option params [required, String] :lock_token
1469
+ # A token used for optimistic locking. AWS WAF returns a token to your
1470
+ # get and list requests, to mark the state of the entity at the time of
1471
+ # the request. To make changes to the entity associated with the token,
1472
+ # you provide the token to operations like update and delete. AWS WAF
1473
+ # uses the token to ensure that no changes have been made to the entity
1474
+ # since you last retrieved it. If a change has been made, the update
1475
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
1476
+ # another get, and use the new token returned by that operation.
1477
+ #
1478
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1479
+ #
1480
+ # @example Request syntax with placeholder values
1481
+ #
1482
+ # resp = client.delete_ip_set({
1483
+ # name: "EntityName", # required
1484
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1485
+ # id: "EntityId", # required
1486
+ # lock_token: "LockToken", # required
1487
+ # })
1488
+ #
1489
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet AWS API Documentation
1490
+ #
1491
+ # @overload delete_ip_set(params = {})
1492
+ # @param [Hash] params ({})
1493
+ def delete_ip_set(params = {}, options = {})
1494
+ req = build_request(:delete_ip_set, params)
1495
+ req.send_request(options)
1496
+ end
1497
+
1498
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1499
+ # in November, 2019. For information, including how to migrate your AWS
1500
+ # WAF resources from the prior release, see the [AWS WAF Developer
1501
+ # Guide][1].
1502
+ #
1503
+ # </note>
1504
+ #
1505
+ # Deletes the LoggingConfiguration from the specified web ACL.
1506
+ #
1507
+ #
1508
+ #
1509
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1510
+ #
1511
+ # @option params [required, String] :resource_arn
1512
+ # The Amazon Resource Name (ARN) of the web ACL from which you want to
1513
+ # delete the LoggingConfiguration.
1514
+ #
1515
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1516
+ #
1517
+ # @example Request syntax with placeholder values
1518
+ #
1519
+ # resp = client.delete_logging_configuration({
1520
+ # resource_arn: "ResourceArn", # required
1521
+ # })
1522
+ #
1523
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration AWS API Documentation
1524
+ #
1525
+ # @overload delete_logging_configuration(params = {})
1526
+ # @param [Hash] params ({})
1527
+ def delete_logging_configuration(params = {}, options = {})
1528
+ req = build_request(:delete_logging_configuration, params)
1529
+ req.send_request(options)
1530
+ end
1531
+
1532
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1533
+ # in November, 2019. For information, including how to migrate your AWS
1534
+ # WAF resources from the prior release, see the [AWS WAF Developer
1535
+ # Guide][1].
1536
+ #
1537
+ # </note>
1538
+ #
1539
+ # Deletes the specified RegexPatternSet.
1540
+ #
1541
+ #
1542
+ #
1543
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1544
+ #
1545
+ # @option params [required, String] :name
1546
+ # A friendly name of the set. You cannot change the name after you
1547
+ # create the set.
1548
+ #
1549
+ # @option params [required, String] :scope
1550
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1551
+ # regional application. A regional application can be an Application
1552
+ # Load Balancer (ALB) or an API Gateway stage.
1553
+ #
1554
+ # To work with CloudFront, you must also specify the Region US East (N.
1555
+ # Virginia) as follows:
1556
+ #
1557
+ # * CLI - Specify the region when you use the CloudFront scope:
1558
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1559
+ #
1560
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1561
+ #
1562
+ # @option params [required, String] :id
1563
+ # A unique identifier for the set. This ID is returned in the responses
1564
+ # to create and list commands. You provide it to operations like update
1565
+ # and delete.
1566
+ #
1567
+ # @option params [required, String] :lock_token
1568
+ # A token used for optimistic locking. AWS WAF returns a token to your
1569
+ # get and list requests, to mark the state of the entity at the time of
1570
+ # the request. To make changes to the entity associated with the token,
1571
+ # you provide the token to operations like update and delete. AWS WAF
1572
+ # uses the token to ensure that no changes have been made to the entity
1573
+ # since you last retrieved it. If a change has been made, the update
1574
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
1575
+ # another get, and use the new token returned by that operation.
1576
+ #
1577
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1578
+ #
1579
+ # @example Request syntax with placeholder values
1580
+ #
1581
+ # resp = client.delete_regex_pattern_set({
1582
+ # name: "EntityName", # required
1583
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1584
+ # id: "EntityId", # required
1585
+ # lock_token: "LockToken", # required
1586
+ # })
1587
+ #
1588
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet AWS API Documentation
1589
+ #
1590
+ # @overload delete_regex_pattern_set(params = {})
1591
+ # @param [Hash] params ({})
1592
+ def delete_regex_pattern_set(params = {}, options = {})
1593
+ req = build_request(:delete_regex_pattern_set, params)
1594
+ req.send_request(options)
1595
+ end
1596
+
1597
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1598
+ # in November, 2019. For information, including how to migrate your AWS
1599
+ # WAF resources from the prior release, see the [AWS WAF Developer
1600
+ # Guide][1].
1601
+ #
1602
+ # </note>
1603
+ #
1604
+ # Deletes the specified RuleGroup.
1605
+ #
1606
+ #
1607
+ #
1608
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1609
+ #
1610
+ # @option params [required, String] :name
1611
+ # A friendly name of the rule group. You cannot change the name of a
1612
+ # rule group after you create it.
1613
+ #
1614
+ # @option params [required, String] :scope
1615
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1616
+ # regional application. A regional application can be an Application
1617
+ # Load Balancer (ALB) or an API Gateway stage.
1618
+ #
1619
+ # To work with CloudFront, you must also specify the Region US East (N.
1620
+ # Virginia) as follows:
1621
+ #
1622
+ # * CLI - Specify the region when you use the CloudFront scope:
1623
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1624
+ #
1625
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1626
+ #
1627
+ # @option params [required, String] :id
1628
+ # A unique identifier for the rule group. This ID is returned in the
1629
+ # responses to create and list commands. You provide it to operations
1630
+ # like update and delete.
1631
+ #
1632
+ # @option params [required, String] :lock_token
1633
+ # A token used for optimistic locking. AWS WAF returns a token to your
1634
+ # get and list requests, to mark the state of the entity at the time of
1635
+ # the request. To make changes to the entity associated with the token,
1636
+ # you provide the token to operations like update and delete. AWS WAF
1637
+ # uses the token to ensure that no changes have been made to the entity
1638
+ # since you last retrieved it. If a change has been made, the update
1639
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
1640
+ # another get, and use the new token returned by that operation.
1641
+ #
1642
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1643
+ #
1644
+ # @example Request syntax with placeholder values
1645
+ #
1646
+ # resp = client.delete_rule_group({
1647
+ # name: "EntityName", # required
1648
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1649
+ # id: "EntityId", # required
1650
+ # lock_token: "LockToken", # required
1651
+ # })
1652
+ #
1653
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup AWS API Documentation
1654
+ #
1655
+ # @overload delete_rule_group(params = {})
1656
+ # @param [Hash] params ({})
1657
+ def delete_rule_group(params = {}, options = {})
1658
+ req = build_request(:delete_rule_group, params)
1659
+ req.send_request(options)
1660
+ end
1661
+
1662
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1663
+ # in November, 2019. For information, including how to migrate your AWS
1664
+ # WAF resources from the prior release, see the [AWS WAF Developer
1665
+ # Guide][1].
1666
+ #
1667
+ # </note>
1668
+ #
1669
+ # Deletes the specified WebACL.
1670
+ #
1671
+ #
1672
+ #
1673
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1674
+ #
1675
+ # @option params [required, String] :name
1676
+ # A friendly name of the Web ACL. You cannot change the name of a Web
1677
+ # ACL after you create it.
1678
+ #
1679
+ # @option params [required, String] :scope
1680
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1681
+ # regional application. A regional application can be an Application
1682
+ # Load Balancer (ALB) or an API Gateway stage.
1683
+ #
1684
+ # To work with CloudFront, you must also specify the Region US East (N.
1685
+ # Virginia) as follows:
1686
+ #
1687
+ # * CLI - Specify the region when you use the CloudFront scope:
1688
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1689
+ #
1690
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1691
+ #
1692
+ # @option params [required, String] :id
1693
+ # The unique identifier for the Web ACL. This ID is returned in the
1694
+ # responses to create and list commands. You provide it to operations
1695
+ # like update and delete.
1696
+ #
1697
+ # @option params [required, String] :lock_token
1698
+ # A token used for optimistic locking. AWS WAF returns a token to your
1699
+ # get and list requests, to mark the state of the entity at the time of
1700
+ # the request. To make changes to the entity associated with the token,
1701
+ # you provide the token to operations like update and delete. AWS WAF
1702
+ # uses the token to ensure that no changes have been made to the entity
1703
+ # since you last retrieved it. If a change has been made, the update
1704
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
1705
+ # another get, and use the new token returned by that operation.
1706
+ #
1707
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1708
+ #
1709
+ # @example Request syntax with placeholder values
1710
+ #
1711
+ # resp = client.delete_web_acl({
1712
+ # name: "EntityName", # required
1713
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1714
+ # id: "EntityId", # required
1715
+ # lock_token: "LockToken", # required
1716
+ # })
1717
+ #
1718
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL AWS API Documentation
1719
+ #
1720
+ # @overload delete_web_acl(params = {})
1721
+ # @param [Hash] params ({})
1722
+ def delete_web_acl(params = {}, options = {})
1723
+ req = build_request(:delete_web_acl, params)
1724
+ req.send_request(options)
1725
+ end
1726
+
1727
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1728
+ # in November, 2019. For information, including how to migrate your AWS
1729
+ # WAF resources from the prior release, see the [AWS WAF Developer
1730
+ # Guide][1].
1731
+ #
1732
+ # </note>
1733
+ #
1734
+ # Provides high-level information for a managed rule group, including
1735
+ # descriptions of the rules.
1736
+ #
1737
+ #
1738
+ #
1739
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1740
+ #
1741
+ # @option params [required, String] :vendor_name
1742
+ # The name of the managed rule group vendor. You use this, along with
1743
+ # the rule group name, to identify the rule group.
1744
+ #
1745
+ # @option params [required, String] :name
1746
+ # The name of the managed rule group. You use this, along with the
1747
+ # vendor name, to identify the rule group.
1748
+ #
1749
+ # @option params [required, String] :scope
1750
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1751
+ # regional application. A regional application can be an Application
1752
+ # Load Balancer (ALB) or an API Gateway stage.
1753
+ #
1754
+ # To work with CloudFront, you must also specify the Region US East (N.
1755
+ # Virginia) as follows:
1756
+ #
1757
+ # * CLI - Specify the region when you use the CloudFront scope:
1758
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1759
+ #
1760
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1761
+ #
1762
+ # @return [Types::DescribeManagedRuleGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1763
+ #
1764
+ # * {Types::DescribeManagedRuleGroupResponse#capacity #capacity} => Integer
1765
+ # * {Types::DescribeManagedRuleGroupResponse#rules #rules} => Array&lt;Types::RuleSummary&gt;
1766
+ #
1767
+ # @example Request syntax with placeholder values
1768
+ #
1769
+ # resp = client.describe_managed_rule_group({
1770
+ # vendor_name: "VendorName", # required
1771
+ # name: "EntityName", # required
1772
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1773
+ # })
1774
+ #
1775
+ # @example Response structure
1776
+ #
1777
+ # resp.capacity #=> Integer
1778
+ # resp.rules #=> Array
1779
+ # resp.rules[0].name #=> String
1780
+ #
1781
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup AWS API Documentation
1782
+ #
1783
+ # @overload describe_managed_rule_group(params = {})
1784
+ # @param [Hash] params ({})
1785
+ def describe_managed_rule_group(params = {}, options = {})
1786
+ req = build_request(:describe_managed_rule_group, params)
1787
+ req.send_request(options)
1788
+ end
1789
+
1790
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1791
+ # in November, 2019. For information, including how to migrate your AWS
1792
+ # WAF resources from the prior release, see the [AWS WAF Developer
1793
+ # Guide][1].
1794
+ #
1795
+ # </note>
1796
+ #
1797
+ # Disassociates a Web ACL from a regional application resource. A
1798
+ # regional application can be an Application Load Balancer (ALB) or an
1799
+ # API Gateway stage.
1800
+ #
1801
+ # For AWS CloudFront, you can disassociate the Web ACL by providing an
1802
+ # empty `WebACLId` in the CloudFront API call `UpdateDistribution`. For
1803
+ # information, see [UpdateDistribution][2].
1804
+ #
1805
+ #
1806
+ #
1807
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1808
+ # [2]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html
1809
+ #
1810
+ # @option params [required, String] :resource_arn
1811
+ # The Amazon Resource Name (ARN) of the resource to disassociate from
1812
+ # the web ACL.
1813
+ #
1814
+ # The ARN must be in one of the following formats:
1815
+ #
1816
+ # * For a CloudFront distribution:
1817
+ # `arn:aws:cloudfront::account-id:distribution/distribution-id `
1818
+ #
1819
+ # * For an Application Load Balancer: `arn:aws:elasticloadbalancing:
1820
+ # region:account-id:loadbalancer/app/load-balancer-name
1821
+ # /load-balancer-id `
1822
+ #
1823
+ # * For an Amazon API Gateway stage: `arn:aws:apigateway:region
1824
+ # ::/restapis/api-id/stages/stage-name `
1825
+ #
1826
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1827
+ #
1828
+ # @example Request syntax with placeholder values
1829
+ #
1830
+ # resp = client.disassociate_web_acl({
1831
+ # resource_arn: "ResourceArn", # required
1832
+ # })
1833
+ #
1834
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL AWS API Documentation
1835
+ #
1836
+ # @overload disassociate_web_acl(params = {})
1837
+ # @param [Hash] params ({})
1838
+ def disassociate_web_acl(params = {}, options = {})
1839
+ req = build_request(:disassociate_web_acl, params)
1840
+ req.send_request(options)
1841
+ end
1842
+
1843
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1844
+ # in November, 2019. For information, including how to migrate your AWS
1845
+ # WAF resources from the prior release, see the [AWS WAF Developer
1846
+ # Guide][1].
1847
+ #
1848
+ # </note>
1849
+ #
1850
+ # Retrieves the specified IPSet.
1851
+ #
1852
+ #
1853
+ #
1854
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1855
+ #
1856
+ # @option params [required, String] :name
1857
+ # A friendly name of the IP set. You cannot change the name of an
1858
+ # `IPSet` after you create it.
1859
+ #
1860
+ # @option params [required, String] :scope
1861
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1862
+ # regional application. A regional application can be an Application
1863
+ # Load Balancer (ALB) or an API Gateway stage.
1864
+ #
1865
+ # To work with CloudFront, you must also specify the Region US East (N.
1866
+ # Virginia) as follows:
1867
+ #
1868
+ # * CLI - Specify the region when you use the CloudFront scope:
1869
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1870
+ #
1871
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1872
+ #
1873
+ # @option params [required, String] :id
1874
+ # A unique identifier for the set. This ID is returned in the responses
1875
+ # to create and list commands. You provide it to operations like update
1876
+ # and delete.
1877
+ #
1878
+ # @return [Types::GetIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1879
+ #
1880
+ # * {Types::GetIPSetResponse#ip_set #ip_set} => Types::IPSet
1881
+ # * {Types::GetIPSetResponse#lock_token #lock_token} => String
1882
+ #
1883
+ # @example Request syntax with placeholder values
1884
+ #
1885
+ # resp = client.get_ip_set({
1886
+ # name: "EntityName", # required
1887
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
1888
+ # id: "EntityId", # required
1889
+ # })
1890
+ #
1891
+ # @example Response structure
1892
+ #
1893
+ # resp.ip_set.name #=> String
1894
+ # resp.ip_set.id #=> String
1895
+ # resp.ip_set.arn #=> String
1896
+ # resp.ip_set.description #=> String
1897
+ # resp.ip_set.ip_address_version #=> String, one of "IPV4", "IPV6"
1898
+ # resp.ip_set.addresses #=> Array
1899
+ # resp.ip_set.addresses[0] #=> String
1900
+ # resp.lock_token #=> String
1901
+ #
1902
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet AWS API Documentation
1903
+ #
1904
+ # @overload get_ip_set(params = {})
1905
+ # @param [Hash] params ({})
1906
+ def get_ip_set(params = {}, options = {})
1907
+ req = build_request(:get_ip_set, params)
1908
+ req.send_request(options)
1909
+ end
1910
+
1911
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1912
+ # in November, 2019. For information, including how to migrate your AWS
1913
+ # WAF resources from the prior release, see the [AWS WAF Developer
1914
+ # Guide][1].
1915
+ #
1916
+ # </note>
1917
+ #
1918
+ # Returns the LoggingConfiguration for the specified web ACL.
1919
+ #
1920
+ #
1921
+ #
1922
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1923
+ #
1924
+ # @option params [required, String] :resource_arn
1925
+ # The Amazon Resource Name (ARN) of the web ACL for which you want to
1926
+ # get the LoggingConfiguration.
1927
+ #
1928
+ # @return [Types::GetLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1929
+ #
1930
+ # * {Types::GetLoggingConfigurationResponse#logging_configuration #logging_configuration} => Types::LoggingConfiguration
1931
+ #
1932
+ # @example Request syntax with placeholder values
1933
+ #
1934
+ # resp = client.get_logging_configuration({
1935
+ # resource_arn: "ResourceArn", # required
1936
+ # })
1937
+ #
1938
+ # @example Response structure
1939
+ #
1940
+ # resp.logging_configuration.resource_arn #=> String
1941
+ # resp.logging_configuration.log_destination_configs #=> Array
1942
+ # resp.logging_configuration.log_destination_configs[0] #=> String
1943
+ # resp.logging_configuration.redacted_fields #=> Array
1944
+ # resp.logging_configuration.redacted_fields[0].single_header.name #=> String
1945
+ # resp.logging_configuration.redacted_fields[0].single_query_argument.name #=> String
1946
+ #
1947
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration AWS API Documentation
1948
+ #
1949
+ # @overload get_logging_configuration(params = {})
1950
+ # @param [Hash] params ({})
1951
+ def get_logging_configuration(params = {}, options = {})
1952
+ req = build_request(:get_logging_configuration, params)
1953
+ req.send_request(options)
1954
+ end
1955
+
1956
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
1957
+ # in November, 2019. For information, including how to migrate your AWS
1958
+ # WAF resources from the prior release, see the [AWS WAF Developer
1959
+ # Guide][1].
1960
+ #
1961
+ # </note>
1962
+ #
1963
+ # Retrieves the keys that are currently blocked by a rate-based rule.
1964
+ # The maximum number of managed keys that can be blocked for a single
1965
+ # rate-based rule is 10,000. If more than 10,000 addresses exceed the
1966
+ # rate limit, those with the highest rates are blocked.
1967
+ #
1968
+ #
1969
+ #
1970
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
1971
+ #
1972
+ # @option params [required, String] :scope
1973
+ # Specifies whether this is for an AWS CloudFront distribution or for a
1974
+ # regional application. A regional application can be an Application
1975
+ # Load Balancer (ALB) or an API Gateway stage.
1976
+ #
1977
+ # To work with CloudFront, you must also specify the Region US East (N.
1978
+ # Virginia) as follows:
1979
+ #
1980
+ # * CLI - Specify the region when you use the CloudFront scope:
1981
+ # `--scope=CLOUDFRONT --region=us-east-1`.
1982
+ #
1983
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
1984
+ #
1985
+ # @option params [required, String] :web_acl_name
1986
+ # A friendly name of the Web ACL. You cannot change the name of a Web
1987
+ # ACL after you create it.
1988
+ #
1989
+ # @option params [required, String] :web_acl_id
1990
+ # The unique identifier for the Web ACL. This ID is returned in the
1991
+ # responses to create and list commands. You provide it to operations
1992
+ # like update and delete.
1993
+ #
1994
+ # @option params [required, String] :rule_name
1995
+ # The name of the rate-based rule to get the keys for.
1996
+ #
1997
+ # @return [Types::GetRateBasedStatementManagedKeysResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1998
+ #
1999
+ # * {Types::GetRateBasedStatementManagedKeysResponse#managed_keys_ipv4 #managed_keys_ipv4} => Types::RateBasedStatementManagedKeysIPSet
2000
+ # * {Types::GetRateBasedStatementManagedKeysResponse#managed_keys_ipv6 #managed_keys_ipv6} => Types::RateBasedStatementManagedKeysIPSet
2001
+ #
2002
+ # @example Request syntax with placeholder values
2003
+ #
2004
+ # resp = client.get_rate_based_statement_managed_keys({
2005
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2006
+ # web_acl_name: "EntityName", # required
2007
+ # web_acl_id: "EntityId", # required
2008
+ # rule_name: "EntityName", # required
2009
+ # })
2010
+ #
2011
+ # @example Response structure
2012
+ #
2013
+ # resp.managed_keys_ipv4.ip_address_version #=> String, one of "IPV4", "IPV6"
2014
+ # resp.managed_keys_ipv4.addresses #=> Array
2015
+ # resp.managed_keys_ipv4.addresses[0] #=> String
2016
+ # resp.managed_keys_ipv6.ip_address_version #=> String, one of "IPV4", "IPV6"
2017
+ # resp.managed_keys_ipv6.addresses #=> Array
2018
+ # resp.managed_keys_ipv6.addresses[0] #=> String
2019
+ #
2020
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys AWS API Documentation
2021
+ #
2022
+ # @overload get_rate_based_statement_managed_keys(params = {})
2023
+ # @param [Hash] params ({})
2024
+ def get_rate_based_statement_managed_keys(params = {}, options = {})
2025
+ req = build_request(:get_rate_based_statement_managed_keys, params)
2026
+ req.send_request(options)
2027
+ end
2028
+
2029
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2030
+ # in November, 2019. For information, including how to migrate your AWS
2031
+ # WAF resources from the prior release, see the [AWS WAF Developer
2032
+ # Guide][1].
2033
+ #
2034
+ # </note>
2035
+ #
2036
+ # Retrieves the specified RegexPatternSet.
2037
+ #
2038
+ #
2039
+ #
2040
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2041
+ #
2042
+ # @option params [required, String] :name
2043
+ # A friendly name of the set. You cannot change the name after you
2044
+ # create the set.
2045
+ #
2046
+ # @option params [required, String] :scope
2047
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2048
+ # regional application. A regional application can be an Application
2049
+ # Load Balancer (ALB) or an API Gateway stage.
2050
+ #
2051
+ # To work with CloudFront, you must also specify the Region US East (N.
2052
+ # Virginia) as follows:
2053
+ #
2054
+ # * CLI - Specify the region when you use the CloudFront scope:
2055
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2056
+ #
2057
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2058
+ #
2059
+ # @option params [required, String] :id
2060
+ # A unique identifier for the set. This ID is returned in the responses
2061
+ # to create and list commands. You provide it to operations like update
2062
+ # and delete.
2063
+ #
2064
+ # @return [Types::GetRegexPatternSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2065
+ #
2066
+ # * {Types::GetRegexPatternSetResponse#regex_pattern_set #regex_pattern_set} => Types::RegexPatternSet
2067
+ # * {Types::GetRegexPatternSetResponse#lock_token #lock_token} => String
2068
+ #
2069
+ # @example Request syntax with placeholder values
2070
+ #
2071
+ # resp = client.get_regex_pattern_set({
2072
+ # name: "EntityName", # required
2073
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2074
+ # id: "EntityId", # required
2075
+ # })
2076
+ #
2077
+ # @example Response structure
2078
+ #
2079
+ # resp.regex_pattern_set.name #=> String
2080
+ # resp.regex_pattern_set.id #=> String
2081
+ # resp.regex_pattern_set.arn #=> String
2082
+ # resp.regex_pattern_set.description #=> String
2083
+ # resp.regex_pattern_set.regular_expression_list #=> Array
2084
+ # resp.regex_pattern_set.regular_expression_list[0].regex_string #=> String
2085
+ # resp.lock_token #=> String
2086
+ #
2087
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet AWS API Documentation
2088
+ #
2089
+ # @overload get_regex_pattern_set(params = {})
2090
+ # @param [Hash] params ({})
2091
+ def get_regex_pattern_set(params = {}, options = {})
2092
+ req = build_request(:get_regex_pattern_set, params)
2093
+ req.send_request(options)
2094
+ end
2095
+
2096
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2097
+ # in November, 2019. For information, including how to migrate your AWS
2098
+ # WAF resources from the prior release, see the [AWS WAF Developer
2099
+ # Guide][1].
2100
+ #
2101
+ # </note>
2102
+ #
2103
+ # Retrieves the specified RuleGroup.
2104
+ #
2105
+ #
2106
+ #
2107
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2108
+ #
2109
+ # @option params [required, String] :name
2110
+ # A friendly name of the rule group. You cannot change the name of a
2111
+ # rule group after you create it.
2112
+ #
2113
+ # @option params [required, String] :scope
2114
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2115
+ # regional application. A regional application can be an Application
2116
+ # Load Balancer (ALB) or an API Gateway stage.
2117
+ #
2118
+ # To work with CloudFront, you must also specify the Region US East (N.
2119
+ # Virginia) as follows:
2120
+ #
2121
+ # * CLI - Specify the region when you use the CloudFront scope:
2122
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2123
+ #
2124
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2125
+ #
2126
+ # @option params [required, String] :id
2127
+ # A unique identifier for the rule group. This ID is returned in the
2128
+ # responses to create and list commands. You provide it to operations
2129
+ # like update and delete.
2130
+ #
2131
+ # @return [Types::GetRuleGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2132
+ #
2133
+ # * {Types::GetRuleGroupResponse#rule_group #rule_group} => Types::RuleGroup
2134
+ # * {Types::GetRuleGroupResponse#lock_token #lock_token} => String
2135
+ #
2136
+ # @example Request syntax with placeholder values
2137
+ #
2138
+ # resp = client.get_rule_group({
2139
+ # name: "EntityName", # required
2140
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2141
+ # id: "EntityId", # required
2142
+ # })
2143
+ #
2144
+ # @example Response structure
2145
+ #
2146
+ # resp.rule_group.name #=> String
2147
+ # resp.rule_group.id #=> String
2148
+ # resp.rule_group.capacity #=> Integer
2149
+ # resp.rule_group.arn #=> String
2150
+ # resp.rule_group.description #=> String
2151
+ # resp.rule_group.rules #=> Array
2152
+ # resp.rule_group.rules[0].name #=> String
2153
+ # resp.rule_group.rules[0].priority #=> Integer
2154
+ # resp.rule_group.rules[0].statement.byte_match_statement.search_string #=> String
2155
+ # resp.rule_group.rules[0].statement.byte_match_statement.field_to_match.single_header.name #=> String
2156
+ # resp.rule_group.rules[0].statement.byte_match_statement.field_to_match.single_query_argument.name #=> String
2157
+ # resp.rule_group.rules[0].statement.byte_match_statement.text_transformations #=> Array
2158
+ # resp.rule_group.rules[0].statement.byte_match_statement.text_transformations[0].priority #=> Integer
2159
+ # resp.rule_group.rules[0].statement.byte_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2160
+ # resp.rule_group.rules[0].statement.byte_match_statement.positional_constraint #=> String, one of "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD"
2161
+ # resp.rule_group.rules[0].statement.sqli_match_statement.field_to_match.single_header.name #=> String
2162
+ # resp.rule_group.rules[0].statement.sqli_match_statement.field_to_match.single_query_argument.name #=> String
2163
+ # resp.rule_group.rules[0].statement.sqli_match_statement.text_transformations #=> Array
2164
+ # resp.rule_group.rules[0].statement.sqli_match_statement.text_transformations[0].priority #=> Integer
2165
+ # resp.rule_group.rules[0].statement.sqli_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2166
+ # resp.rule_group.rules[0].statement.xss_match_statement.field_to_match.single_header.name #=> String
2167
+ # resp.rule_group.rules[0].statement.xss_match_statement.field_to_match.single_query_argument.name #=> String
2168
+ # resp.rule_group.rules[0].statement.xss_match_statement.text_transformations #=> Array
2169
+ # resp.rule_group.rules[0].statement.xss_match_statement.text_transformations[0].priority #=> Integer
2170
+ # resp.rule_group.rules[0].statement.xss_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2171
+ # resp.rule_group.rules[0].statement.size_constraint_statement.field_to_match.single_header.name #=> String
2172
+ # resp.rule_group.rules[0].statement.size_constraint_statement.field_to_match.single_query_argument.name #=> String
2173
+ # resp.rule_group.rules[0].statement.size_constraint_statement.comparison_operator #=> String, one of "EQ", "NE", "LE", "LT", "GE", "GT"
2174
+ # resp.rule_group.rules[0].statement.size_constraint_statement.size #=> Integer
2175
+ # resp.rule_group.rules[0].statement.size_constraint_statement.text_transformations #=> Array
2176
+ # resp.rule_group.rules[0].statement.size_constraint_statement.text_transformations[0].priority #=> Integer
2177
+ # resp.rule_group.rules[0].statement.size_constraint_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2178
+ # resp.rule_group.rules[0].statement.geo_match_statement.country_codes #=> Array
2179
+ # resp.rule_group.rules[0].statement.geo_match_statement.country_codes[0] #=> String, one of "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"
2180
+ # resp.rule_group.rules[0].statement.rule_group_reference_statement.arn #=> String
2181
+ # resp.rule_group.rules[0].statement.rule_group_reference_statement.excluded_rules #=> Array
2182
+ # resp.rule_group.rules[0].statement.rule_group_reference_statement.excluded_rules[0].name #=> String
2183
+ # resp.rule_group.rules[0].statement.ip_set_reference_statement.arn #=> String
2184
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.arn #=> String
2185
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_header.name #=> String
2186
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_query_argument.name #=> String
2187
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.text_transformations #=> Array
2188
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].priority #=> Integer
2189
+ # resp.rule_group.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2190
+ # resp.rule_group.rules[0].statement.rate_based_statement.limit #=> Integer
2191
+ # resp.rule_group.rules[0].statement.rate_based_statement.aggregate_key_type #=> String, one of "IP"
2192
+ # resp.rule_group.rules[0].statement.rate_based_statement.scope_down_statement #=> Types::Statement
2193
+ # resp.rule_group.rules[0].statement.and_statement.statements #=> Array
2194
+ # resp.rule_group.rules[0].statement.and_statement.statements[0] #=> Types::Statement
2195
+ # resp.rule_group.rules[0].statement.or_statement.statements #=> Array
2196
+ # resp.rule_group.rules[0].statement.or_statement.statements[0] #=> Types::Statement
2197
+ # resp.rule_group.rules[0].statement.not_statement.statement #=> Types::Statement
2198
+ # resp.rule_group.rules[0].statement.managed_rule_group_statement.vendor_name #=> String
2199
+ # resp.rule_group.rules[0].statement.managed_rule_group_statement.name #=> String
2200
+ # resp.rule_group.rules[0].statement.managed_rule_group_statement.excluded_rules #=> Array
2201
+ # resp.rule_group.rules[0].statement.managed_rule_group_statement.excluded_rules[0].name #=> String
2202
+ # resp.rule_group.rules[0].visibility_config.sampled_requests_enabled #=> Boolean
2203
+ # resp.rule_group.rules[0].visibility_config.cloud_watch_metrics_enabled #=> Boolean
2204
+ # resp.rule_group.rules[0].visibility_config.metric_name #=> String
2205
+ # resp.rule_group.visibility_config.sampled_requests_enabled #=> Boolean
2206
+ # resp.rule_group.visibility_config.cloud_watch_metrics_enabled #=> Boolean
2207
+ # resp.rule_group.visibility_config.metric_name #=> String
2208
+ # resp.lock_token #=> String
2209
+ #
2210
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup AWS API Documentation
2211
+ #
2212
+ # @overload get_rule_group(params = {})
2213
+ # @param [Hash] params ({})
2214
+ def get_rule_group(params = {}, options = {})
2215
+ req = build_request(:get_rule_group, params)
2216
+ req.send_request(options)
2217
+ end
2218
+
2219
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2220
+ # in November, 2019. For information, including how to migrate your AWS
2221
+ # WAF resources from the prior release, see the [AWS WAF Developer
2222
+ # Guide][1].
2223
+ #
2224
+ # </note>
2225
+ #
2226
+ # Gets detailed information about a specified number of requests--a
2227
+ # sample--that AWS WAF randomly selects from among the first 5,000
2228
+ # requests that your AWS resource received during a time range that you
2229
+ # choose. You can specify a sample size of up to 500 requests, and you
2230
+ # can specify any time range in the previous three hours.
2231
+ #
2232
+ # `GetSampledRequests` returns a time range, which is usually the time
2233
+ # range that you specified. However, if your resource (such as a
2234
+ # CloudFront distribution) received 5,000 requests before the specified
2235
+ # time range elapsed, `GetSampledRequests` returns an updated time
2236
+ # range. This new time range indicates the actual period during which
2237
+ # AWS WAF selected the requests in the sample.
2238
+ #
2239
+ #
2240
+ #
2241
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2242
+ #
2243
+ # @option params [required, String] :web_acl_arn
2244
+ # The Amazon resource name (ARN) of the `WebACL` for which you want a
2245
+ # sample of requests.
2246
+ #
2247
+ # @option params [required, String] :rule_metric_name
2248
+ # The metric name assigned to the `Rule` or `RuleGroup` for which you
2249
+ # want a sample of requests.
2250
+ #
2251
+ # @option params [required, String] :scope
2252
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2253
+ # regional application. A regional application can be an Application
2254
+ # Load Balancer (ALB) or an API Gateway stage.
2255
+ #
2256
+ # To work with CloudFront, you must also specify the Region US East (N.
2257
+ # Virginia) as follows:
2258
+ #
2259
+ # * CLI - Specify the region when you use the CloudFront scope:
2260
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2261
+ #
2262
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2263
+ #
2264
+ # @option params [required, Types::TimeWindow] :time_window
2265
+ # The start date and time and the end date and time of the range for
2266
+ # which you want `GetSampledRequests` to return a sample of requests.
2267
+ # Specify the date and time in the following format:
2268
+ # `"2016-09-27T14:50Z"`. You can specify any time range in the previous
2269
+ # three hours.
2270
+ #
2271
+ # @option params [required, Integer] :max_items
2272
+ # The number of requests that you want AWS WAF to return from among the
2273
+ # first 5,000 requests that your AWS resource received during the time
2274
+ # range. If your resource received fewer requests than the value of
2275
+ # `MaxItems`, `GetSampledRequests` returns information about all of
2276
+ # them.
2277
+ #
2278
+ # @return [Types::GetSampledRequestsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2279
+ #
2280
+ # * {Types::GetSampledRequestsResponse#sampled_requests #sampled_requests} => Array&lt;Types::SampledHTTPRequest&gt;
2281
+ # * {Types::GetSampledRequestsResponse#population_size #population_size} => Integer
2282
+ # * {Types::GetSampledRequestsResponse#time_window #time_window} => Types::TimeWindow
2283
+ #
2284
+ # @example Request syntax with placeholder values
2285
+ #
2286
+ # resp = client.get_sampled_requests({
2287
+ # web_acl_arn: "ResourceArn", # required
2288
+ # rule_metric_name: "MetricName", # required
2289
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2290
+ # time_window: { # required
2291
+ # start_time: Time.now, # required
2292
+ # end_time: Time.now, # required
2293
+ # },
2294
+ # max_items: 1, # required
2295
+ # })
2296
+ #
2297
+ # @example Response structure
2298
+ #
2299
+ # resp.sampled_requests #=> Array
2300
+ # resp.sampled_requests[0].request.client_ip #=> String
2301
+ # resp.sampled_requests[0].request.country #=> String
2302
+ # resp.sampled_requests[0].request.uri #=> String
2303
+ # resp.sampled_requests[0].request.method #=> String
2304
+ # resp.sampled_requests[0].request.http_version #=> String
2305
+ # resp.sampled_requests[0].request.headers #=> Array
2306
+ # resp.sampled_requests[0].request.headers[0].name #=> String
2307
+ # resp.sampled_requests[0].request.headers[0].value #=> String
2308
+ # resp.sampled_requests[0].weight #=> Integer
2309
+ # resp.sampled_requests[0].timestamp #=> Time
2310
+ # resp.sampled_requests[0].action #=> String
2311
+ # resp.sampled_requests[0].rule_name_within_rule_group #=> String
2312
+ # resp.population_size #=> Integer
2313
+ # resp.time_window.start_time #=> Time
2314
+ # resp.time_window.end_time #=> Time
2315
+ #
2316
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests AWS API Documentation
2317
+ #
2318
+ # @overload get_sampled_requests(params = {})
2319
+ # @param [Hash] params ({})
2320
+ def get_sampled_requests(params = {}, options = {})
2321
+ req = build_request(:get_sampled_requests, params)
2322
+ req.send_request(options)
2323
+ end
2324
+
2325
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2326
+ # in November, 2019. For information, including how to migrate your AWS
2327
+ # WAF resources from the prior release, see the [AWS WAF Developer
2328
+ # Guide][1].
2329
+ #
2330
+ # </note>
2331
+ #
2332
+ # Retrieves the specified WebACL.
2333
+ #
2334
+ #
2335
+ #
2336
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2337
+ #
2338
+ # @option params [required, String] :name
2339
+ # A friendly name of the Web ACL. You cannot change the name of a Web
2340
+ # ACL after you create it.
2341
+ #
2342
+ # @option params [required, String] :scope
2343
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2344
+ # regional application. A regional application can be an Application
2345
+ # Load Balancer (ALB) or an API Gateway stage.
2346
+ #
2347
+ # To work with CloudFront, you must also specify the Region US East (N.
2348
+ # Virginia) as follows:
2349
+ #
2350
+ # * CLI - Specify the region when you use the CloudFront scope:
2351
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2352
+ #
2353
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2354
+ #
2355
+ # @option params [required, String] :id
2356
+ # The unique identifier for the Web ACL. This ID is returned in the
2357
+ # responses to create and list commands. You provide it to operations
2358
+ # like update and delete.
2359
+ #
2360
+ # @return [Types::GetWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2361
+ #
2362
+ # * {Types::GetWebACLResponse#web_acl #web_acl} => Types::WebACL
2363
+ # * {Types::GetWebACLResponse#lock_token #lock_token} => String
2364
+ #
2365
+ # @example Request syntax with placeholder values
2366
+ #
2367
+ # resp = client.get_web_acl({
2368
+ # name: "EntityName", # required
2369
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2370
+ # id: "EntityId", # required
2371
+ # })
2372
+ #
2373
+ # @example Response structure
2374
+ #
2375
+ # resp.web_acl.name #=> String
2376
+ # resp.web_acl.id #=> String
2377
+ # resp.web_acl.arn #=> String
2378
+ # resp.web_acl.description #=> String
2379
+ # resp.web_acl.rules #=> Array
2380
+ # resp.web_acl.rules[0].name #=> String
2381
+ # resp.web_acl.rules[0].priority #=> Integer
2382
+ # resp.web_acl.rules[0].statement.byte_match_statement.search_string #=> String
2383
+ # resp.web_acl.rules[0].statement.byte_match_statement.field_to_match.single_header.name #=> String
2384
+ # resp.web_acl.rules[0].statement.byte_match_statement.field_to_match.single_query_argument.name #=> String
2385
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations #=> Array
2386
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations[0].priority #=> Integer
2387
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2388
+ # resp.web_acl.rules[0].statement.byte_match_statement.positional_constraint #=> String, one of "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD"
2389
+ # resp.web_acl.rules[0].statement.sqli_match_statement.field_to_match.single_header.name #=> String
2390
+ # resp.web_acl.rules[0].statement.sqli_match_statement.field_to_match.single_query_argument.name #=> String
2391
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations #=> Array
2392
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations[0].priority #=> Integer
2393
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2394
+ # resp.web_acl.rules[0].statement.xss_match_statement.field_to_match.single_header.name #=> String
2395
+ # resp.web_acl.rules[0].statement.xss_match_statement.field_to_match.single_query_argument.name #=> String
2396
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations #=> Array
2397
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations[0].priority #=> Integer
2398
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2399
+ # resp.web_acl.rules[0].statement.size_constraint_statement.field_to_match.single_header.name #=> String
2400
+ # resp.web_acl.rules[0].statement.size_constraint_statement.field_to_match.single_query_argument.name #=> String
2401
+ # resp.web_acl.rules[0].statement.size_constraint_statement.comparison_operator #=> String, one of "EQ", "NE", "LE", "LT", "GE", "GT"
2402
+ # resp.web_acl.rules[0].statement.size_constraint_statement.size #=> Integer
2403
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations #=> Array
2404
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations[0].priority #=> Integer
2405
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2406
+ # resp.web_acl.rules[0].statement.geo_match_statement.country_codes #=> Array
2407
+ # resp.web_acl.rules[0].statement.geo_match_statement.country_codes[0] #=> String, one of "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"
2408
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.arn #=> String
2409
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.excluded_rules #=> Array
2410
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.excluded_rules[0].name #=> String
2411
+ # resp.web_acl.rules[0].statement.ip_set_reference_statement.arn #=> String
2412
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.arn #=> String
2413
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_header.name #=> String
2414
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_query_argument.name #=> String
2415
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations #=> Array
2416
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].priority #=> Integer
2417
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2418
+ # resp.web_acl.rules[0].statement.rate_based_statement.limit #=> Integer
2419
+ # resp.web_acl.rules[0].statement.rate_based_statement.aggregate_key_type #=> String, one of "IP"
2420
+ # resp.web_acl.rules[0].statement.rate_based_statement.scope_down_statement #=> Types::Statement
2421
+ # resp.web_acl.rules[0].statement.and_statement.statements #=> Array
2422
+ # resp.web_acl.rules[0].statement.and_statement.statements[0] #=> Types::Statement
2423
+ # resp.web_acl.rules[0].statement.or_statement.statements #=> Array
2424
+ # resp.web_acl.rules[0].statement.or_statement.statements[0] #=> Types::Statement
2425
+ # resp.web_acl.rules[0].statement.not_statement.statement #=> Types::Statement
2426
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.vendor_name #=> String
2427
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.name #=> String
2428
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.excluded_rules #=> Array
2429
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.excluded_rules[0].name #=> String
2430
+ # resp.web_acl.rules[0].visibility_config.sampled_requests_enabled #=> Boolean
2431
+ # resp.web_acl.rules[0].visibility_config.cloud_watch_metrics_enabled #=> Boolean
2432
+ # resp.web_acl.rules[0].visibility_config.metric_name #=> String
2433
+ # resp.web_acl.visibility_config.sampled_requests_enabled #=> Boolean
2434
+ # resp.web_acl.visibility_config.cloud_watch_metrics_enabled #=> Boolean
2435
+ # resp.web_acl.visibility_config.metric_name #=> String
2436
+ # resp.web_acl.capacity #=> Integer
2437
+ # resp.lock_token #=> String
2438
+ #
2439
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL AWS API Documentation
2440
+ #
2441
+ # @overload get_web_acl(params = {})
2442
+ # @param [Hash] params ({})
2443
+ def get_web_acl(params = {}, options = {})
2444
+ req = build_request(:get_web_acl, params)
2445
+ req.send_request(options)
2446
+ end
2447
+
2448
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2449
+ # in November, 2019. For information, including how to migrate your AWS
2450
+ # WAF resources from the prior release, see the [AWS WAF Developer
2451
+ # Guide][1].
2452
+ #
2453
+ # </note>
2454
+ #
2455
+ # Retrieves the WebACL for the specified resource.
2456
+ #
2457
+ #
2458
+ #
2459
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2460
+ #
2461
+ # @option params [required, String] :resource_arn
2462
+ # The ARN (Amazon Resource Name) of the resource.
2463
+ #
2464
+ # @return [Types::GetWebACLForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2465
+ #
2466
+ # * {Types::GetWebACLForResourceResponse#web_acl #web_acl} => Types::WebACL
2467
+ #
2468
+ # @example Request syntax with placeholder values
2469
+ #
2470
+ # resp = client.get_web_acl_for_resource({
2471
+ # resource_arn: "ResourceArn", # required
2472
+ # })
2473
+ #
2474
+ # @example Response structure
2475
+ #
2476
+ # resp.web_acl.name #=> String
2477
+ # resp.web_acl.id #=> String
2478
+ # resp.web_acl.arn #=> String
2479
+ # resp.web_acl.description #=> String
2480
+ # resp.web_acl.rules #=> Array
2481
+ # resp.web_acl.rules[0].name #=> String
2482
+ # resp.web_acl.rules[0].priority #=> Integer
2483
+ # resp.web_acl.rules[0].statement.byte_match_statement.search_string #=> String
2484
+ # resp.web_acl.rules[0].statement.byte_match_statement.field_to_match.single_header.name #=> String
2485
+ # resp.web_acl.rules[0].statement.byte_match_statement.field_to_match.single_query_argument.name #=> String
2486
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations #=> Array
2487
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations[0].priority #=> Integer
2488
+ # resp.web_acl.rules[0].statement.byte_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2489
+ # resp.web_acl.rules[0].statement.byte_match_statement.positional_constraint #=> String, one of "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD"
2490
+ # resp.web_acl.rules[0].statement.sqli_match_statement.field_to_match.single_header.name #=> String
2491
+ # resp.web_acl.rules[0].statement.sqli_match_statement.field_to_match.single_query_argument.name #=> String
2492
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations #=> Array
2493
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations[0].priority #=> Integer
2494
+ # resp.web_acl.rules[0].statement.sqli_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2495
+ # resp.web_acl.rules[0].statement.xss_match_statement.field_to_match.single_header.name #=> String
2496
+ # resp.web_acl.rules[0].statement.xss_match_statement.field_to_match.single_query_argument.name #=> String
2497
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations #=> Array
2498
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations[0].priority #=> Integer
2499
+ # resp.web_acl.rules[0].statement.xss_match_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2500
+ # resp.web_acl.rules[0].statement.size_constraint_statement.field_to_match.single_header.name #=> String
2501
+ # resp.web_acl.rules[0].statement.size_constraint_statement.field_to_match.single_query_argument.name #=> String
2502
+ # resp.web_acl.rules[0].statement.size_constraint_statement.comparison_operator #=> String, one of "EQ", "NE", "LE", "LT", "GE", "GT"
2503
+ # resp.web_acl.rules[0].statement.size_constraint_statement.size #=> Integer
2504
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations #=> Array
2505
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations[0].priority #=> Integer
2506
+ # resp.web_acl.rules[0].statement.size_constraint_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2507
+ # resp.web_acl.rules[0].statement.geo_match_statement.country_codes #=> Array
2508
+ # resp.web_acl.rules[0].statement.geo_match_statement.country_codes[0] #=> String, one of "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"
2509
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.arn #=> String
2510
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.excluded_rules #=> Array
2511
+ # resp.web_acl.rules[0].statement.rule_group_reference_statement.excluded_rules[0].name #=> String
2512
+ # resp.web_acl.rules[0].statement.ip_set_reference_statement.arn #=> String
2513
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.arn #=> String
2514
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_header.name #=> String
2515
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.field_to_match.single_query_argument.name #=> String
2516
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations #=> Array
2517
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].priority #=> Integer
2518
+ # resp.web_acl.rules[0].statement.regex_pattern_set_reference_statement.text_transformations[0].type #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
2519
+ # resp.web_acl.rules[0].statement.rate_based_statement.limit #=> Integer
2520
+ # resp.web_acl.rules[0].statement.rate_based_statement.aggregate_key_type #=> String, one of "IP"
2521
+ # resp.web_acl.rules[0].statement.rate_based_statement.scope_down_statement #=> Types::Statement
2522
+ # resp.web_acl.rules[0].statement.and_statement.statements #=> Array
2523
+ # resp.web_acl.rules[0].statement.and_statement.statements[0] #=> Types::Statement
2524
+ # resp.web_acl.rules[0].statement.or_statement.statements #=> Array
2525
+ # resp.web_acl.rules[0].statement.or_statement.statements[0] #=> Types::Statement
2526
+ # resp.web_acl.rules[0].statement.not_statement.statement #=> Types::Statement
2527
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.vendor_name #=> String
2528
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.name #=> String
2529
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.excluded_rules #=> Array
2530
+ # resp.web_acl.rules[0].statement.managed_rule_group_statement.excluded_rules[0].name #=> String
2531
+ # resp.web_acl.rules[0].visibility_config.sampled_requests_enabled #=> Boolean
2532
+ # resp.web_acl.rules[0].visibility_config.cloud_watch_metrics_enabled #=> Boolean
2533
+ # resp.web_acl.rules[0].visibility_config.metric_name #=> String
2534
+ # resp.web_acl.visibility_config.sampled_requests_enabled #=> Boolean
2535
+ # resp.web_acl.visibility_config.cloud_watch_metrics_enabled #=> Boolean
2536
+ # resp.web_acl.visibility_config.metric_name #=> String
2537
+ # resp.web_acl.capacity #=> Integer
2538
+ #
2539
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource AWS API Documentation
2540
+ #
2541
+ # @overload get_web_acl_for_resource(params = {})
2542
+ # @param [Hash] params ({})
2543
+ def get_web_acl_for_resource(params = {}, options = {})
2544
+ req = build_request(:get_web_acl_for_resource, params)
2545
+ req.send_request(options)
2546
+ end
2547
+
2548
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2549
+ # in November, 2019. For information, including how to migrate your AWS
2550
+ # WAF resources from the prior release, see the [AWS WAF Developer
2551
+ # Guide][1].
2552
+ #
2553
+ # </note>
2554
+ #
2555
+ # Retrieves an array of managed rule groups that are available for you
2556
+ # to use. This list includes all AWS managed rule groups and the AWS
2557
+ # Marketplace managed rule groups that you're subscribed to.
2558
+ #
2559
+ #
2560
+ #
2561
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2562
+ #
2563
+ # @option params [required, String] :scope
2564
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2565
+ # regional application. A regional application can be an Application
2566
+ # Load Balancer (ALB) or an API Gateway stage.
2567
+ #
2568
+ # To work with CloudFront, you must also specify the Region US East (N.
2569
+ # Virginia) as follows:
2570
+ #
2571
+ # * CLI - Specify the region when you use the CloudFront scope:
2572
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2573
+ #
2574
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2575
+ #
2576
+ # @option params [String] :next_marker
2577
+ # When you request a list of objects with a `Limit` setting, if the
2578
+ # number of objects that are still available for retrieval exceeds the
2579
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2580
+ # retrieve the next batch of objects, provide the marker from the prior
2581
+ # call in your next request.
2582
+ #
2583
+ # @option params [Integer] :limit
2584
+ # The maximum number of objects that you want AWS WAF to return for this
2585
+ # request. If more objects are available, in the response, AWS WAF
2586
+ # provides a `NextMarker` value that you can use in a subsequent call to
2587
+ # get the next batch of objects.
2588
+ #
2589
+ # @return [Types::ListAvailableManagedRuleGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2590
+ #
2591
+ # * {Types::ListAvailableManagedRuleGroupsResponse#next_marker #next_marker} => String
2592
+ # * {Types::ListAvailableManagedRuleGroupsResponse#managed_rule_groups #managed_rule_groups} => Array&lt;Types::ManagedRuleGroupSummary&gt;
2593
+ #
2594
+ # @example Request syntax with placeholder values
2595
+ #
2596
+ # resp = client.list_available_managed_rule_groups({
2597
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2598
+ # next_marker: "NextMarker",
2599
+ # limit: 1,
2600
+ # })
2601
+ #
2602
+ # @example Response structure
2603
+ #
2604
+ # resp.next_marker #=> String
2605
+ # resp.managed_rule_groups #=> Array
2606
+ # resp.managed_rule_groups[0].vendor_name #=> String
2607
+ # resp.managed_rule_groups[0].name #=> String
2608
+ # resp.managed_rule_groups[0].description #=> String
2609
+ #
2610
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups AWS API Documentation
2611
+ #
2612
+ # @overload list_available_managed_rule_groups(params = {})
2613
+ # @param [Hash] params ({})
2614
+ def list_available_managed_rule_groups(params = {}, options = {})
2615
+ req = build_request(:list_available_managed_rule_groups, params)
2616
+ req.send_request(options)
2617
+ end
2618
+
2619
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2620
+ # in November, 2019. For information, including how to migrate your AWS
2621
+ # WAF resources from the prior release, see the [AWS WAF Developer
2622
+ # Guide][1].
2623
+ #
2624
+ # </note>
2625
+ #
2626
+ # Retrieves an array of IPSetSummary objects for the IP sets that you
2627
+ # manage.
2628
+ #
2629
+ #
2630
+ #
2631
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2632
+ #
2633
+ # @option params [required, String] :scope
2634
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2635
+ # regional application. A regional application can be an Application
2636
+ # Load Balancer (ALB) or an API Gateway stage.
2637
+ #
2638
+ # To work with CloudFront, you must also specify the Region US East (N.
2639
+ # Virginia) as follows:
2640
+ #
2641
+ # * CLI - Specify the region when you use the CloudFront scope:
2642
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2643
+ #
2644
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2645
+ #
2646
+ # @option params [String] :next_marker
2647
+ # When you request a list of objects with a `Limit` setting, if the
2648
+ # number of objects that are still available for retrieval exceeds the
2649
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2650
+ # retrieve the next batch of objects, provide the marker from the prior
2651
+ # call in your next request.
2652
+ #
2653
+ # @option params [Integer] :limit
2654
+ # The maximum number of objects that you want AWS WAF to return for this
2655
+ # request. If more objects are available, in the response, AWS WAF
2656
+ # provides a `NextMarker` value that you can use in a subsequent call to
2657
+ # get the next batch of objects.
2658
+ #
2659
+ # @return [Types::ListIPSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2660
+ #
2661
+ # * {Types::ListIPSetsResponse#next_marker #next_marker} => String
2662
+ # * {Types::ListIPSetsResponse#ip_sets #ip_sets} => Array&lt;Types::IPSetSummary&gt;
2663
+ #
2664
+ # @example Request syntax with placeholder values
2665
+ #
2666
+ # resp = client.list_ip_sets({
2667
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2668
+ # next_marker: "NextMarker",
2669
+ # limit: 1,
2670
+ # })
2671
+ #
2672
+ # @example Response structure
2673
+ #
2674
+ # resp.next_marker #=> String
2675
+ # resp.ip_sets #=> Array
2676
+ # resp.ip_sets[0].name #=> String
2677
+ # resp.ip_sets[0].id #=> String
2678
+ # resp.ip_sets[0].description #=> String
2679
+ # resp.ip_sets[0].lock_token #=> String
2680
+ # resp.ip_sets[0].arn #=> String
2681
+ #
2682
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets AWS API Documentation
2683
+ #
2684
+ # @overload list_ip_sets(params = {})
2685
+ # @param [Hash] params ({})
2686
+ def list_ip_sets(params = {}, options = {})
2687
+ req = build_request(:list_ip_sets, params)
2688
+ req.send_request(options)
2689
+ end
2690
+
2691
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2692
+ # in November, 2019. For information, including how to migrate your AWS
2693
+ # WAF resources from the prior release, see the [AWS WAF Developer
2694
+ # Guide][1].
2695
+ #
2696
+ # </note>
2697
+ #
2698
+ # Retrieves an array of your LoggingConfiguration objects.
2699
+ #
2700
+ #
2701
+ #
2702
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2703
+ #
2704
+ # @option params [String] :scope
2705
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2706
+ # regional application. A regional application can be an Application
2707
+ # Load Balancer (ALB) or an API Gateway stage.
2708
+ #
2709
+ # To work with CloudFront, you must also specify the Region US East (N.
2710
+ # Virginia) as follows:
2711
+ #
2712
+ # * CLI - Specify the region when you use the CloudFront scope:
2713
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2714
+ #
2715
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2716
+ #
2717
+ # @option params [String] :next_marker
2718
+ # When you request a list of objects with a `Limit` setting, if the
2719
+ # number of objects that are still available for retrieval exceeds the
2720
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2721
+ # retrieve the next batch of objects, provide the marker from the prior
2722
+ # call in your next request.
2723
+ #
2724
+ # @option params [Integer] :limit
2725
+ # The maximum number of objects that you want AWS WAF to return for this
2726
+ # request. If more objects are available, in the response, AWS WAF
2727
+ # provides a `NextMarker` value that you can use in a subsequent call to
2728
+ # get the next batch of objects.
2729
+ #
2730
+ # @return [Types::ListLoggingConfigurationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2731
+ #
2732
+ # * {Types::ListLoggingConfigurationsResponse#logging_configurations #logging_configurations} => Array&lt;Types::LoggingConfiguration&gt;
2733
+ # * {Types::ListLoggingConfigurationsResponse#next_marker #next_marker} => String
2734
+ #
2735
+ # @example Request syntax with placeholder values
2736
+ #
2737
+ # resp = client.list_logging_configurations({
2738
+ # scope: "CLOUDFRONT", # accepts CLOUDFRONT, REGIONAL
2739
+ # next_marker: "NextMarker",
2740
+ # limit: 1,
2741
+ # })
2742
+ #
2743
+ # @example Response structure
2744
+ #
2745
+ # resp.logging_configurations #=> Array
2746
+ # resp.logging_configurations[0].resource_arn #=> String
2747
+ # resp.logging_configurations[0].log_destination_configs #=> Array
2748
+ # resp.logging_configurations[0].log_destination_configs[0] #=> String
2749
+ # resp.logging_configurations[0].redacted_fields #=> Array
2750
+ # resp.logging_configurations[0].redacted_fields[0].single_header.name #=> String
2751
+ # resp.logging_configurations[0].redacted_fields[0].single_query_argument.name #=> String
2752
+ # resp.next_marker #=> String
2753
+ #
2754
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations AWS API Documentation
2755
+ #
2756
+ # @overload list_logging_configurations(params = {})
2757
+ # @param [Hash] params ({})
2758
+ def list_logging_configurations(params = {}, options = {})
2759
+ req = build_request(:list_logging_configurations, params)
2760
+ req.send_request(options)
2761
+ end
2762
+
2763
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2764
+ # in November, 2019. For information, including how to migrate your AWS
2765
+ # WAF resources from the prior release, see the [AWS WAF Developer
2766
+ # Guide][1].
2767
+ #
2768
+ # </note>
2769
+ #
2770
+ # Retrieves an array of RegexPatternSetSummary objects for the regex
2771
+ # pattern sets that you manage.
2772
+ #
2773
+ #
2774
+ #
2775
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2776
+ #
2777
+ # @option params [required, String] :scope
2778
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2779
+ # regional application. A regional application can be an Application
2780
+ # Load Balancer (ALB) or an API Gateway stage.
2781
+ #
2782
+ # To work with CloudFront, you must also specify the Region US East (N.
2783
+ # Virginia) as follows:
2784
+ #
2785
+ # * CLI - Specify the region when you use the CloudFront scope:
2786
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2787
+ #
2788
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2789
+ #
2790
+ # @option params [String] :next_marker
2791
+ # When you request a list of objects with a `Limit` setting, if the
2792
+ # number of objects that are still available for retrieval exceeds the
2793
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2794
+ # retrieve the next batch of objects, provide the marker from the prior
2795
+ # call in your next request.
2796
+ #
2797
+ # @option params [Integer] :limit
2798
+ # The maximum number of objects that you want AWS WAF to return for this
2799
+ # request. If more objects are available, in the response, AWS WAF
2800
+ # provides a `NextMarker` value that you can use in a subsequent call to
2801
+ # get the next batch of objects.
2802
+ #
2803
+ # @return [Types::ListRegexPatternSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2804
+ #
2805
+ # * {Types::ListRegexPatternSetsResponse#next_marker #next_marker} => String
2806
+ # * {Types::ListRegexPatternSetsResponse#regex_pattern_sets #regex_pattern_sets} => Array&lt;Types::RegexPatternSetSummary&gt;
2807
+ #
2808
+ # @example Request syntax with placeholder values
2809
+ #
2810
+ # resp = client.list_regex_pattern_sets({
2811
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2812
+ # next_marker: "NextMarker",
2813
+ # limit: 1,
2814
+ # })
2815
+ #
2816
+ # @example Response structure
2817
+ #
2818
+ # resp.next_marker #=> String
2819
+ # resp.regex_pattern_sets #=> Array
2820
+ # resp.regex_pattern_sets[0].name #=> String
2821
+ # resp.regex_pattern_sets[0].id #=> String
2822
+ # resp.regex_pattern_sets[0].description #=> String
2823
+ # resp.regex_pattern_sets[0].lock_token #=> String
2824
+ # resp.regex_pattern_sets[0].arn #=> String
2825
+ #
2826
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets AWS API Documentation
2827
+ #
2828
+ # @overload list_regex_pattern_sets(params = {})
2829
+ # @param [Hash] params ({})
2830
+ def list_regex_pattern_sets(params = {}, options = {})
2831
+ req = build_request(:list_regex_pattern_sets, params)
2832
+ req.send_request(options)
2833
+ end
2834
+
2835
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2836
+ # in November, 2019. For information, including how to migrate your AWS
2837
+ # WAF resources from the prior release, see the [AWS WAF Developer
2838
+ # Guide][1].
2839
+ #
2840
+ # </note>
2841
+ #
2842
+ # Retrieves an array of the Amazon Resource Names (ARNs) for the
2843
+ # regional resources that are associated with the specified web ACL. If
2844
+ # you want the list of AWS CloudFront resources, use the AWS CloudFront
2845
+ # call `ListDistributionsByWebACLId`.
2846
+ #
2847
+ #
2848
+ #
2849
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2850
+ #
2851
+ # @option params [required, String] :web_acl_arn
2852
+ # The Amazon Resource Name (ARN) of the Web ACL.
2853
+ #
2854
+ # @option params [String] :resource_type
2855
+ # Used for web ACLs that are scoped for regional applications. A
2856
+ # regional application can be an Application Load Balancer (ALB) or an
2857
+ # API Gateway stage.
2858
+ #
2859
+ # @return [Types::ListResourcesForWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2860
+ #
2861
+ # * {Types::ListResourcesForWebACLResponse#resource_arns #resource_arns} => Array&lt;String&gt;
2862
+ #
2863
+ # @example Request syntax with placeholder values
2864
+ #
2865
+ # resp = client.list_resources_for_web_acl({
2866
+ # web_acl_arn: "ResourceArn", # required
2867
+ # resource_type: "APPLICATION_LOAD_BALANCER", # accepts APPLICATION_LOAD_BALANCER, API_GATEWAY
2868
+ # })
2869
+ #
2870
+ # @example Response structure
2871
+ #
2872
+ # resp.resource_arns #=> Array
2873
+ # resp.resource_arns[0] #=> String
2874
+ #
2875
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL AWS API Documentation
2876
+ #
2877
+ # @overload list_resources_for_web_acl(params = {})
2878
+ # @param [Hash] params ({})
2879
+ def list_resources_for_web_acl(params = {}, options = {})
2880
+ req = build_request(:list_resources_for_web_acl, params)
2881
+ req.send_request(options)
2882
+ end
2883
+
2884
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2885
+ # in November, 2019. For information, including how to migrate your AWS
2886
+ # WAF resources from the prior release, see the [AWS WAF Developer
2887
+ # Guide][1].
2888
+ #
2889
+ # </note>
2890
+ #
2891
+ # Retrieves an array of RuleGroupSummary objects for the rule groups
2892
+ # that you manage.
2893
+ #
2894
+ #
2895
+ #
2896
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2897
+ #
2898
+ # @option params [required, String] :scope
2899
+ # Specifies whether this is for an AWS CloudFront distribution or for a
2900
+ # regional application. A regional application can be an Application
2901
+ # Load Balancer (ALB) or an API Gateway stage.
2902
+ #
2903
+ # To work with CloudFront, you must also specify the Region US East (N.
2904
+ # Virginia) as follows:
2905
+ #
2906
+ # * CLI - Specify the region when you use the CloudFront scope:
2907
+ # `--scope=CLOUDFRONT --region=us-east-1`.
2908
+ #
2909
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
2910
+ #
2911
+ # @option params [String] :next_marker
2912
+ # When you request a list of objects with a `Limit` setting, if the
2913
+ # number of objects that are still available for retrieval exceeds the
2914
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2915
+ # retrieve the next batch of objects, provide the marker from the prior
2916
+ # call in your next request.
2917
+ #
2918
+ # @option params [Integer] :limit
2919
+ # The maximum number of objects that you want AWS WAF to return for this
2920
+ # request. If more objects are available, in the response, AWS WAF
2921
+ # provides a `NextMarker` value that you can use in a subsequent call to
2922
+ # get the next batch of objects.
2923
+ #
2924
+ # @return [Types::ListRuleGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2925
+ #
2926
+ # * {Types::ListRuleGroupsResponse#next_marker #next_marker} => String
2927
+ # * {Types::ListRuleGroupsResponse#rule_groups #rule_groups} => Array&lt;Types::RuleGroupSummary&gt;
2928
+ #
2929
+ # @example Request syntax with placeholder values
2930
+ #
2931
+ # resp = client.list_rule_groups({
2932
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
2933
+ # next_marker: "NextMarker",
2934
+ # limit: 1,
2935
+ # })
2936
+ #
2937
+ # @example Response structure
2938
+ #
2939
+ # resp.next_marker #=> String
2940
+ # resp.rule_groups #=> Array
2941
+ # resp.rule_groups[0].name #=> String
2942
+ # resp.rule_groups[0].id #=> String
2943
+ # resp.rule_groups[0].description #=> String
2944
+ # resp.rule_groups[0].lock_token #=> String
2945
+ # resp.rule_groups[0].arn #=> String
2946
+ #
2947
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups AWS API Documentation
2948
+ #
2949
+ # @overload list_rule_groups(params = {})
2950
+ # @param [Hash] params ({})
2951
+ def list_rule_groups(params = {}, options = {})
2952
+ req = build_request(:list_rule_groups, params)
2953
+ req.send_request(options)
2954
+ end
2955
+
2956
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
2957
+ # in November, 2019. For information, including how to migrate your AWS
2958
+ # WAF resources from the prior release, see the [AWS WAF Developer
2959
+ # Guide][1].
2960
+ #
2961
+ # </note>
2962
+ #
2963
+ # Retrieves the TagInfoForResource for the specified resource.
2964
+ #
2965
+ #
2966
+ #
2967
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
2968
+ #
2969
+ # @option params [String] :next_marker
2970
+ # When you request a list of objects with a `Limit` setting, if the
2971
+ # number of objects that are still available for retrieval exceeds the
2972
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
2973
+ # retrieve the next batch of objects, provide the marker from the prior
2974
+ # call in your next request.
2975
+ #
2976
+ # @option params [Integer] :limit
2977
+ # The maximum number of objects that you want AWS WAF to return for this
2978
+ # request. If more objects are available, in the response, AWS WAF
2979
+ # provides a `NextMarker` value that you can use in a subsequent call to
2980
+ # get the next batch of objects.
2981
+ #
2982
+ # @option params [required, String] :resource_arn
2983
+ # The Amazon Resource Name (ARN) of the resource.
2984
+ #
2985
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2986
+ #
2987
+ # * {Types::ListTagsForResourceResponse#next_marker #next_marker} => String
2988
+ # * {Types::ListTagsForResourceResponse#tag_info_for_resource #tag_info_for_resource} => Types::TagInfoForResource
2989
+ #
2990
+ # @example Request syntax with placeholder values
2991
+ #
2992
+ # resp = client.list_tags_for_resource({
2993
+ # next_marker: "NextMarker",
2994
+ # limit: 1,
2995
+ # resource_arn: "ResourceArn", # required
2996
+ # })
2997
+ #
2998
+ # @example Response structure
2999
+ #
3000
+ # resp.next_marker #=> String
3001
+ # resp.tag_info_for_resource.resource_arn #=> String
3002
+ # resp.tag_info_for_resource.tag_list #=> Array
3003
+ # resp.tag_info_for_resource.tag_list[0].key #=> String
3004
+ # resp.tag_info_for_resource.tag_list[0].value #=> String
3005
+ #
3006
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource AWS API Documentation
3007
+ #
3008
+ # @overload list_tags_for_resource(params = {})
3009
+ # @param [Hash] params ({})
3010
+ def list_tags_for_resource(params = {}, options = {})
3011
+ req = build_request(:list_tags_for_resource, params)
3012
+ req.send_request(options)
3013
+ end
3014
+
3015
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3016
+ # in November, 2019. For information, including how to migrate your AWS
3017
+ # WAF resources from the prior release, see the [AWS WAF Developer
3018
+ # Guide][1].
3019
+ #
3020
+ # </note>
3021
+ #
3022
+ # Retrieves an array of WebACLSummary objects for the web ACLs that you
3023
+ # manage.
3024
+ #
3025
+ #
3026
+ #
3027
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3028
+ #
3029
+ # @option params [required, String] :scope
3030
+ # Specifies whether this is for an AWS CloudFront distribution or for a
3031
+ # regional application. A regional application can be an Application
3032
+ # Load Balancer (ALB) or an API Gateway stage.
3033
+ #
3034
+ # To work with CloudFront, you must also specify the Region US East (N.
3035
+ # Virginia) as follows:
3036
+ #
3037
+ # * CLI - Specify the region when you use the CloudFront scope:
3038
+ # `--scope=CLOUDFRONT --region=us-east-1`.
3039
+ #
3040
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
3041
+ #
3042
+ # @option params [String] :next_marker
3043
+ # When you request a list of objects with a `Limit` setting, if the
3044
+ # number of objects that are still available for retrieval exceeds the
3045
+ # limit, AWS WAF returns a `NextMarker` value in the response. To
3046
+ # retrieve the next batch of objects, provide the marker from the prior
3047
+ # call in your next request.
3048
+ #
3049
+ # @option params [Integer] :limit
3050
+ # The maximum number of objects that you want AWS WAF to return for this
3051
+ # request. If more objects are available, in the response, AWS WAF
3052
+ # provides a `NextMarker` value that you can use in a subsequent call to
3053
+ # get the next batch of objects.
3054
+ #
3055
+ # @return [Types::ListWebACLsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3056
+ #
3057
+ # * {Types::ListWebACLsResponse#next_marker #next_marker} => String
3058
+ # * {Types::ListWebACLsResponse#web_acls #web_acls} => Array&lt;Types::WebACLSummary&gt;
3059
+ #
3060
+ # @example Request syntax with placeholder values
3061
+ #
3062
+ # resp = client.list_web_acls({
3063
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
3064
+ # next_marker: "NextMarker",
3065
+ # limit: 1,
3066
+ # })
3067
+ #
3068
+ # @example Response structure
3069
+ #
3070
+ # resp.next_marker #=> String
3071
+ # resp.web_acls #=> Array
3072
+ # resp.web_acls[0].name #=> String
3073
+ # resp.web_acls[0].id #=> String
3074
+ # resp.web_acls[0].description #=> String
3075
+ # resp.web_acls[0].lock_token #=> String
3076
+ # resp.web_acls[0].arn #=> String
3077
+ #
3078
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs AWS API Documentation
3079
+ #
3080
+ # @overload list_web_acls(params = {})
3081
+ # @param [Hash] params ({})
3082
+ def list_web_acls(params = {}, options = {})
3083
+ req = build_request(:list_web_acls, params)
3084
+ req.send_request(options)
3085
+ end
3086
+
3087
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3088
+ # in November, 2019. For information, including how to migrate your AWS
3089
+ # WAF resources from the prior release, see the [AWS WAF Developer
3090
+ # Guide][1].
3091
+ #
3092
+ # </note>
3093
+ #
3094
+ # Enables the specified LoggingConfiguration, to start logging from a
3095
+ # web ACL, according to the configuration provided.
3096
+ #
3097
+ # You can access information about all traffic that AWS WAF inspects
3098
+ # using the following steps:
3099
+ #
3100
+ # 1. Create an Amazon Kinesis Data Firehose.
3101
+ #
3102
+ # Create the data firehose with a PUT source and in the region that
3103
+ # you are operating. If you are capturing logs for Amazon
3104
+ # CloudFront, always create the firehose in US East (N. Virginia).
3105
+ #
3106
+ # <note markdown="1"> Do not create the data firehose using a `Kinesis stream` as your
3107
+ # source.
3108
+ #
3109
+ # </note>
3110
+ #
3111
+ # 2. Associate that firehose to your web ACL using a
3112
+ # `PutLoggingConfiguration` request.
3113
+ #
3114
+ # When you successfully enable logging using a `PutLoggingConfiguration`
3115
+ # request, AWS WAF will create a service linked role with the necessary
3116
+ # permissions to write logs to the Amazon Kinesis Data Firehose. For
3117
+ # more information, see [Logging Web ACL Traffic Information][2] in the
3118
+ # *AWS WAF Developer Guide*.
3119
+ #
3120
+ #
3121
+ #
3122
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3123
+ # [2]: https://docs.aws.amazon.com/waf/latest/developerguide/logging.html
3124
+ #
3125
+ # @option params [required, Types::LoggingConfiguration] :logging_configuration
3126
+ #
3127
+ # @return [Types::PutLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3128
+ #
3129
+ # * {Types::PutLoggingConfigurationResponse#logging_configuration #logging_configuration} => Types::LoggingConfiguration
3130
+ #
3131
+ # @example Request syntax with placeholder values
3132
+ #
3133
+ # resp = client.put_logging_configuration({
3134
+ # logging_configuration: { # required
3135
+ # resource_arn: "ResourceArn", # required
3136
+ # log_destination_configs: ["ResourceArn"], # required
3137
+ # redacted_fields: [
3138
+ # {
3139
+ # single_header: {
3140
+ # name: "FieldToMatchData", # required
3141
+ # },
3142
+ # single_query_argument: {
3143
+ # name: "FieldToMatchData", # required
3144
+ # },
3145
+ # all_query_arguments: {
3146
+ # },
3147
+ # uri_path: {
3148
+ # },
3149
+ # query_string: {
3150
+ # },
3151
+ # body: {
3152
+ # },
3153
+ # method: {
3154
+ # },
3155
+ # },
3156
+ # ],
3157
+ # },
3158
+ # })
3159
+ #
3160
+ # @example Response structure
3161
+ #
3162
+ # resp.logging_configuration.resource_arn #=> String
3163
+ # resp.logging_configuration.log_destination_configs #=> Array
3164
+ # resp.logging_configuration.log_destination_configs[0] #=> String
3165
+ # resp.logging_configuration.redacted_fields #=> Array
3166
+ # resp.logging_configuration.redacted_fields[0].single_header.name #=> String
3167
+ # resp.logging_configuration.redacted_fields[0].single_query_argument.name #=> String
3168
+ #
3169
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration AWS API Documentation
3170
+ #
3171
+ # @overload put_logging_configuration(params = {})
3172
+ # @param [Hash] params ({})
3173
+ def put_logging_configuration(params = {}, options = {})
3174
+ req = build_request(:put_logging_configuration, params)
3175
+ req.send_request(options)
3176
+ end
3177
+
3178
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3179
+ # in November, 2019. For information, including how to migrate your AWS
3180
+ # WAF resources from the prior release, see the [AWS WAF Developer
3181
+ # Guide][1].
3182
+ #
3183
+ # </note>
3184
+ #
3185
+ # Associates tags with the specified AWS resource. Tags are key:value
3186
+ # pairs that you can associate with AWS resources. For example, the tag
3187
+ # key might be "customer" and the tag value might be "companyA." You
3188
+ # can specify one or more tags to add to each container. You can add up
3189
+ # to 50 tags to each AWS resource.
3190
+ #
3191
+ #
3192
+ #
3193
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3194
+ #
3195
+ # @option params [required, String] :resource_arn
3196
+ # The Amazon Resource Name (ARN) of the resource.
3197
+ #
3198
+ # @option params [required, Array<Types::Tag>] :tags
3199
+ # An array of key:value pairs to associate with the resource.
3200
+ #
3201
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3202
+ #
3203
+ # @example Request syntax with placeholder values
3204
+ #
3205
+ # resp = client.tag_resource({
3206
+ # resource_arn: "ResourceArn", # required
3207
+ # tags: [ # required
3208
+ # {
3209
+ # key: "TagKey", # required
3210
+ # value: "TagValue", # required
3211
+ # },
3212
+ # ],
3213
+ # })
3214
+ #
3215
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource AWS API Documentation
3216
+ #
3217
+ # @overload tag_resource(params = {})
3218
+ # @param [Hash] params ({})
3219
+ def tag_resource(params = {}, options = {})
3220
+ req = build_request(:tag_resource, params)
3221
+ req.send_request(options)
3222
+ end
3223
+
3224
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3225
+ # in November, 2019. For information, including how to migrate your AWS
3226
+ # WAF resources from the prior release, see the [AWS WAF Developer
3227
+ # Guide][1].
3228
+ #
3229
+ # </note>
3230
+ #
3231
+ # Disassociates tags from an AWS resource. Tags are key:value pairs that
3232
+ # you can associate with AWS resources. For example, the tag key might
3233
+ # be "customer" and the tag value might be "companyA." You can
3234
+ # specify one or more tags to add to each container. You can add up to
3235
+ # 50 tags to each AWS resource.
3236
+ #
3237
+ #
3238
+ #
3239
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3240
+ #
3241
+ # @option params [required, String] :resource_arn
3242
+ # The Amazon Resource Name (ARN) of the resource.
3243
+ #
3244
+ # @option params [required, Array<String>] :tag_keys
3245
+ # An array of keys identifying the tags to disassociate from the
3246
+ # resource.
3247
+ #
3248
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3249
+ #
3250
+ # @example Request syntax with placeholder values
3251
+ #
3252
+ # resp = client.untag_resource({
3253
+ # resource_arn: "ResourceArn", # required
3254
+ # tag_keys: ["TagKey"], # required
3255
+ # })
3256
+ #
3257
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource AWS API Documentation
3258
+ #
3259
+ # @overload untag_resource(params = {})
3260
+ # @param [Hash] params ({})
3261
+ def untag_resource(params = {}, options = {})
3262
+ req = build_request(:untag_resource, params)
3263
+ req.send_request(options)
3264
+ end
3265
+
3266
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3267
+ # in November, 2019. For information, including how to migrate your AWS
3268
+ # WAF resources from the prior release, see the [AWS WAF Developer
3269
+ # Guide][1].
3270
+ #
3271
+ # </note>
3272
+ #
3273
+ # Updates the specified IPSet.
3274
+ #
3275
+ #
3276
+ #
3277
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3278
+ #
3279
+ # @option params [required, String] :name
3280
+ # A friendly name of the IP set. You cannot change the name of an
3281
+ # `IPSet` after you create it.
3282
+ #
3283
+ # @option params [required, String] :scope
3284
+ # Specifies whether this is for an AWS CloudFront distribution or for a
3285
+ # regional application. A regional application can be an Application
3286
+ # Load Balancer (ALB) or an API Gateway stage.
3287
+ #
3288
+ # To work with CloudFront, you must also specify the Region US East (N.
3289
+ # Virginia) as follows:
3290
+ #
3291
+ # * CLI - Specify the region when you use the CloudFront scope:
3292
+ # `--scope=CLOUDFRONT --region=us-east-1`.
3293
+ #
3294
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
3295
+ #
3296
+ # @option params [required, String] :id
3297
+ # A unique identifier for the set. This ID is returned in the responses
3298
+ # to create and list commands. You provide it to operations like update
3299
+ # and delete.
3300
+ #
3301
+ # @option params [String] :description
3302
+ # A friendly description of the IP set. You cannot change the
3303
+ # description of an IP set after you create it.
3304
+ #
3305
+ # @option params [required, Array<String>] :addresses
3306
+ # Contains an array of strings that specify one or more IP addresses or
3307
+ # blocks of IP addresses in Classless Inter-Domain Routing (CIDR)
3308
+ # notation. AWS WAF supports all address ranges for IP versions IPv4 and
3309
+ # IPv6.
3310
+ #
3311
+ # Examples:
3312
+ #
3313
+ # * To configure AWS WAF to allow, block, or count requests that
3314
+ # originated from the IP address 192.0.2.44, specify `192.0.2.44/32`.
3315
+ #
3316
+ # * To configure AWS WAF to allow, block, or count requests that
3317
+ # originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify
3318
+ # `192.0.2.0/24`.
3319
+ #
3320
+ # * To configure AWS WAF to allow, block, or count requests that
3321
+ # originated from the IP address
3322
+ # 1111:0000:0000:0000:0000:0000:0000:0111, specify
3323
+ # `1111:0000:0000:0000:0000:0000:0000:0111/128`.
3324
+ #
3325
+ # * To configure AWS WAF to allow, block, or count requests that
3326
+ # originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000
3327
+ # to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
3328
+ # `1111:0000:0000:0000:0000:0000:0000:0000/64`.
3329
+ #
3330
+ # For more information about CIDR notation, see the Wikipedia entry
3331
+ # [Classless Inter-Domain Routing][1].
3332
+ #
3333
+ #
3334
+ #
3335
+ # [1]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
3336
+ #
3337
+ # @option params [required, String] :lock_token
3338
+ # A token used for optimistic locking. AWS WAF returns a token to your
3339
+ # get and list requests, to mark the state of the entity at the time of
3340
+ # the request. To make changes to the entity associated with the token,
3341
+ # you provide the token to operations like update and delete. AWS WAF
3342
+ # uses the token to ensure that no changes have been made to the entity
3343
+ # since you last retrieved it. If a change has been made, the update
3344
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
3345
+ # another get, and use the new token returned by that operation.
3346
+ #
3347
+ # @return [Types::UpdateIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3348
+ #
3349
+ # * {Types::UpdateIPSetResponse#next_lock_token #next_lock_token} => String
3350
+ #
3351
+ # @example Request syntax with placeholder values
3352
+ #
3353
+ # resp = client.update_ip_set({
3354
+ # name: "EntityName", # required
3355
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
3356
+ # id: "EntityId", # required
3357
+ # description: "EntityDescription",
3358
+ # addresses: ["IPAddress"], # required
3359
+ # lock_token: "LockToken", # required
3360
+ # })
3361
+ #
3362
+ # @example Response structure
3363
+ #
3364
+ # resp.next_lock_token #=> String
3365
+ #
3366
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet AWS API Documentation
3367
+ #
3368
+ # @overload update_ip_set(params = {})
3369
+ # @param [Hash] params ({})
3370
+ def update_ip_set(params = {}, options = {})
3371
+ req = build_request(:update_ip_set, params)
3372
+ req.send_request(options)
3373
+ end
3374
+
3375
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3376
+ # in November, 2019. For information, including how to migrate your AWS
3377
+ # WAF resources from the prior release, see the [AWS WAF Developer
3378
+ # Guide][1].
3379
+ #
3380
+ # </note>
3381
+ #
3382
+ # Updates the specified RegexPatternSet.
3383
+ #
3384
+ #
3385
+ #
3386
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3387
+ #
3388
+ # @option params [required, String] :name
3389
+ # A friendly name of the set. You cannot change the name after you
3390
+ # create the set.
3391
+ #
3392
+ # @option params [required, String] :scope
3393
+ # Specifies whether this is for an AWS CloudFront distribution or for a
3394
+ # regional application. A regional application can be an Application
3395
+ # Load Balancer (ALB) or an API Gateway stage.
3396
+ #
3397
+ # To work with CloudFront, you must also specify the Region US East (N.
3398
+ # Virginia) as follows:
3399
+ #
3400
+ # * CLI - Specify the region when you use the CloudFront scope:
3401
+ # `--scope=CLOUDFRONT --region=us-east-1`.
3402
+ #
3403
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
3404
+ #
3405
+ # @option params [required, String] :id
3406
+ # A unique identifier for the set. This ID is returned in the responses
3407
+ # to create and list commands. You provide it to operations like update
3408
+ # and delete.
3409
+ #
3410
+ # @option params [String] :description
3411
+ # A friendly description of the set. You cannot change the description
3412
+ # of a set after you create it.
3413
+ #
3414
+ # @option params [required, Array<Types::Regex>] :regular_expression_list
3415
+ #
3416
+ # @option params [required, String] :lock_token
3417
+ # A token used for optimistic locking. AWS WAF returns a token to your
3418
+ # get and list requests, to mark the state of the entity at the time of
3419
+ # the request. To make changes to the entity associated with the token,
3420
+ # you provide the token to operations like update and delete. AWS WAF
3421
+ # uses the token to ensure that no changes have been made to the entity
3422
+ # since you last retrieved it. If a change has been made, the update
3423
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
3424
+ # another get, and use the new token returned by that operation.
3425
+ #
3426
+ # @return [Types::UpdateRegexPatternSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3427
+ #
3428
+ # * {Types::UpdateRegexPatternSetResponse#next_lock_token #next_lock_token} => String
3429
+ #
3430
+ # @example Request syntax with placeholder values
3431
+ #
3432
+ # resp = client.update_regex_pattern_set({
3433
+ # name: "EntityName", # required
3434
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
3435
+ # id: "EntityId", # required
3436
+ # description: "EntityDescription",
3437
+ # regular_expression_list: [ # required
3438
+ # {
3439
+ # regex_string: "RegexPatternString",
3440
+ # },
3441
+ # ],
3442
+ # lock_token: "LockToken", # required
3443
+ # })
3444
+ #
3445
+ # @example Response structure
3446
+ #
3447
+ # resp.next_lock_token #=> String
3448
+ #
3449
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet AWS API Documentation
3450
+ #
3451
+ # @overload update_regex_pattern_set(params = {})
3452
+ # @param [Hash] params ({})
3453
+ def update_regex_pattern_set(params = {}, options = {})
3454
+ req = build_request(:update_regex_pattern_set, params)
3455
+ req.send_request(options)
3456
+ end
3457
+
3458
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3459
+ # in November, 2019. For information, including how to migrate your AWS
3460
+ # WAF resources from the prior release, see the [AWS WAF Developer
3461
+ # Guide][1].
3462
+ #
3463
+ # </note>
3464
+ #
3465
+ # Updates the specified RuleGroup.
3466
+ #
3467
+ # A rule group defines a collection of rules to inspect and control web
3468
+ # requests that you can use in a WebACL. When you create a rule group,
3469
+ # you define an immutable capacity limit. If you update a rule group,
3470
+ # you must stay within the capacity. This allows others to reuse the
3471
+ # rule group with confidence in its capacity requirements.
3472
+ #
3473
+ #
3474
+ #
3475
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3476
+ #
3477
+ # @option params [required, String] :name
3478
+ # A friendly name of the rule group. You cannot change the name of a
3479
+ # rule group after you create it.
3480
+ #
3481
+ # @option params [required, String] :scope
3482
+ # Specifies whether this is for an AWS CloudFront distribution or for a
3483
+ # regional application. A regional application can be an Application
3484
+ # Load Balancer (ALB) or an API Gateway stage.
3485
+ #
3486
+ # To work with CloudFront, you must also specify the Region US East (N.
3487
+ # Virginia) as follows:
3488
+ #
3489
+ # * CLI - Specify the region when you use the CloudFront scope:
3490
+ # `--scope=CLOUDFRONT --region=us-east-1`.
3491
+ #
3492
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
3493
+ #
3494
+ # @option params [required, String] :id
3495
+ # A unique identifier for the rule group. This ID is returned in the
3496
+ # responses to create and list commands. You provide it to operations
3497
+ # like update and delete.
3498
+ #
3499
+ # @option params [String] :description
3500
+ # A friendly description of the rule group. You cannot change the
3501
+ # description of a rule group after you create it.
3502
+ #
3503
+ # @option params [Array<Types::Rule>] :rules
3504
+ # The Rule statements used to identify the web requests that you want to
3505
+ # allow, block, or count. Each rule includes one top-level statement
3506
+ # that AWS WAF uses to identify matching web requests, and parameters
3507
+ # that govern how AWS WAF handles them.
3508
+ #
3509
+ # @option params [required, Types::VisibilityConfig] :visibility_config
3510
+ # Defines and enables Amazon CloudWatch metrics and web request sample
3511
+ # collection.
3512
+ #
3513
+ # @option params [required, String] :lock_token
3514
+ # A token used for optimistic locking. AWS WAF returns a token to your
3515
+ # get and list requests, to mark the state of the entity at the time of
3516
+ # the request. To make changes to the entity associated with the token,
3517
+ # you provide the token to operations like update and delete. AWS WAF
3518
+ # uses the token to ensure that no changes have been made to the entity
3519
+ # since you last retrieved it. If a change has been made, the update
3520
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
3521
+ # another get, and use the new token returned by that operation.
3522
+ #
3523
+ # @return [Types::UpdateRuleGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3524
+ #
3525
+ # * {Types::UpdateRuleGroupResponse#next_lock_token #next_lock_token} => String
3526
+ #
3527
+ # @example Request syntax with placeholder values
3528
+ #
3529
+ # resp = client.update_rule_group({
3530
+ # name: "EntityName", # required
3531
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
3532
+ # id: "EntityId", # required
3533
+ # description: "EntityDescription",
3534
+ # rules: [
3535
+ # {
3536
+ # name: "EntityName", # required
3537
+ # priority: 1, # required
3538
+ # statement: { # required
3539
+ # byte_match_statement: {
3540
+ # search_string: "data", # required
3541
+ # field_to_match: { # required
3542
+ # single_header: {
3543
+ # name: "FieldToMatchData", # required
3544
+ # },
3545
+ # single_query_argument: {
3546
+ # name: "FieldToMatchData", # required
3547
+ # },
3548
+ # all_query_arguments: {
3549
+ # },
3550
+ # uri_path: {
3551
+ # },
3552
+ # query_string: {
3553
+ # },
3554
+ # body: {
3555
+ # },
3556
+ # method: {
3557
+ # },
3558
+ # },
3559
+ # text_transformations: [ # required
3560
+ # {
3561
+ # priority: 1, # required
3562
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3563
+ # },
3564
+ # ],
3565
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
3566
+ # },
3567
+ # sqli_match_statement: {
3568
+ # field_to_match: { # required
3569
+ # single_header: {
3570
+ # name: "FieldToMatchData", # required
3571
+ # },
3572
+ # single_query_argument: {
3573
+ # name: "FieldToMatchData", # required
3574
+ # },
3575
+ # all_query_arguments: {
3576
+ # },
3577
+ # uri_path: {
3578
+ # },
3579
+ # query_string: {
3580
+ # },
3581
+ # body: {
3582
+ # },
3583
+ # method: {
3584
+ # },
3585
+ # },
3586
+ # text_transformations: [ # required
3587
+ # {
3588
+ # priority: 1, # required
3589
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3590
+ # },
3591
+ # ],
3592
+ # },
3593
+ # xss_match_statement: {
3594
+ # field_to_match: { # required
3595
+ # single_header: {
3596
+ # name: "FieldToMatchData", # required
3597
+ # },
3598
+ # single_query_argument: {
3599
+ # name: "FieldToMatchData", # required
3600
+ # },
3601
+ # all_query_arguments: {
3602
+ # },
3603
+ # uri_path: {
3604
+ # },
3605
+ # query_string: {
3606
+ # },
3607
+ # body: {
3608
+ # },
3609
+ # method: {
3610
+ # },
3611
+ # },
3612
+ # text_transformations: [ # required
3613
+ # {
3614
+ # priority: 1, # required
3615
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3616
+ # },
3617
+ # ],
3618
+ # },
3619
+ # size_constraint_statement: {
3620
+ # field_to_match: { # required
3621
+ # single_header: {
3622
+ # name: "FieldToMatchData", # required
3623
+ # },
3624
+ # single_query_argument: {
3625
+ # name: "FieldToMatchData", # required
3626
+ # },
3627
+ # all_query_arguments: {
3628
+ # },
3629
+ # uri_path: {
3630
+ # },
3631
+ # query_string: {
3632
+ # },
3633
+ # body: {
3634
+ # },
3635
+ # method: {
3636
+ # },
3637
+ # },
3638
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
3639
+ # size: 1, # required
3640
+ # text_transformations: [ # required
3641
+ # {
3642
+ # priority: 1, # required
3643
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3644
+ # },
3645
+ # ],
3646
+ # },
3647
+ # geo_match_statement: {
3648
+ # country_codes: ["AF"], # accepts AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
3649
+ # },
3650
+ # rule_group_reference_statement: {
3651
+ # arn: "ResourceArn", # required
3652
+ # excluded_rules: [
3653
+ # {
3654
+ # name: "EntityName", # required
3655
+ # },
3656
+ # ],
3657
+ # },
3658
+ # ip_set_reference_statement: {
3659
+ # arn: "ResourceArn", # required
3660
+ # },
3661
+ # regex_pattern_set_reference_statement: {
3662
+ # arn: "ResourceArn", # required
3663
+ # field_to_match: { # required
3664
+ # single_header: {
3665
+ # name: "FieldToMatchData", # required
3666
+ # },
3667
+ # single_query_argument: {
3668
+ # name: "FieldToMatchData", # required
3669
+ # },
3670
+ # all_query_arguments: {
3671
+ # },
3672
+ # uri_path: {
3673
+ # },
3674
+ # query_string: {
3675
+ # },
3676
+ # body: {
3677
+ # },
3678
+ # method: {
3679
+ # },
3680
+ # },
3681
+ # text_transformations: [ # required
3682
+ # {
3683
+ # priority: 1, # required
3684
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3685
+ # },
3686
+ # ],
3687
+ # },
3688
+ # rate_based_statement: {
3689
+ # limit: 1, # required
3690
+ # aggregate_key_type: "IP", # required, accepts IP
3691
+ # scope_down_statement: {
3692
+ # # recursive Statement
3693
+ # },
3694
+ # },
3695
+ # and_statement: {
3696
+ # statements: [ # required
3697
+ # {
3698
+ # # recursive Statement
3699
+ # },
3700
+ # ],
3701
+ # },
3702
+ # or_statement: {
3703
+ # statements: [ # required
3704
+ # {
3705
+ # # recursive Statement
3706
+ # },
3707
+ # ],
3708
+ # },
3709
+ # not_statement: {
3710
+ # statement: { # required
3711
+ # # recursive Statement
3712
+ # },
3713
+ # },
3714
+ # managed_rule_group_statement: {
3715
+ # vendor_name: "VendorName", # required
3716
+ # name: "EntityName", # required
3717
+ # excluded_rules: [
3718
+ # {
3719
+ # name: "EntityName", # required
3720
+ # },
3721
+ # ],
3722
+ # },
3723
+ # },
3724
+ # action: {
3725
+ # block: {
3726
+ # },
3727
+ # allow: {
3728
+ # },
3729
+ # count: {
3730
+ # },
3731
+ # },
3732
+ # override_action: {
3733
+ # count: {
3734
+ # },
3735
+ # none: {
3736
+ # },
3737
+ # },
3738
+ # visibility_config: { # required
3739
+ # sampled_requests_enabled: false, # required
3740
+ # cloud_watch_metrics_enabled: false, # required
3741
+ # metric_name: "MetricName", # required
3742
+ # },
3743
+ # },
3744
+ # ],
3745
+ # visibility_config: { # required
3746
+ # sampled_requests_enabled: false, # required
3747
+ # cloud_watch_metrics_enabled: false, # required
3748
+ # metric_name: "MetricName", # required
3749
+ # },
3750
+ # lock_token: "LockToken", # required
3751
+ # })
3752
+ #
3753
+ # @example Response structure
3754
+ #
3755
+ # resp.next_lock_token #=> String
3756
+ #
3757
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup AWS API Documentation
3758
+ #
3759
+ # @overload update_rule_group(params = {})
3760
+ # @param [Hash] params ({})
3761
+ def update_rule_group(params = {}, options = {})
3762
+ req = build_request(:update_rule_group, params)
3763
+ req.send_request(options)
3764
+ end
3765
+
3766
+ # <note markdown="1"> This is the latest version of **AWS WAF**, named AWS WAFV2, released
3767
+ # in November, 2019. For information, including how to migrate your AWS
3768
+ # WAF resources from the prior release, see the [AWS WAF Developer
3769
+ # Guide][1].
3770
+ #
3771
+ # </note>
3772
+ #
3773
+ # Updates the specified WebACL.
3774
+ #
3775
+ # A Web ACL defines a collection of rules to use to inspect and control
3776
+ # web requests. Each rule has an action defined (allow, block, or count)
3777
+ # for requests that match the statement of the rule. In the Web ACL, you
3778
+ # assign a default action to take (allow, block) for any request that
3779
+ # does not match any of the rules. The rules in a Web ACL can be a
3780
+ # combination of the types Rule, RuleGroup, and managed rule group. You
3781
+ # can associate a Web ACL with one or more AWS resources to protect. The
3782
+ # resources can be Amazon CloudFront, an Amazon API Gateway API, or an
3783
+ # Application Load Balancer.
3784
+ #
3785
+ #
3786
+ #
3787
+ # [1]: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html
3788
+ #
3789
+ # @option params [required, String] :name
3790
+ # A friendly name of the Web ACL. You cannot change the name of a Web
3791
+ # ACL after you create it.
3792
+ #
3793
+ # @option params [required, String] :scope
3794
+ # Specifies whether this is for an AWS CloudFront distribution or for a
3795
+ # regional application. A regional application can be an Application
3796
+ # Load Balancer (ALB) or an API Gateway stage.
3797
+ #
3798
+ # To work with CloudFront, you must also specify the Region US East (N.
3799
+ # Virginia) as follows:
3800
+ #
3801
+ # * CLI - Specify the region when you use the CloudFront scope:
3802
+ # `--scope=CLOUDFRONT --region=us-east-1`.
3803
+ #
3804
+ # * API and SDKs - For all calls, use the Region endpoint us-east-1.
3805
+ #
3806
+ # @option params [required, String] :id
3807
+ # The unique identifier for the Web ACL. This ID is returned in the
3808
+ # responses to create and list commands. You provide it to operations
3809
+ # like update and delete.
3810
+ #
3811
+ # @option params [required, Types::DefaultAction] :default_action
3812
+ # The action to perform if none of the `Rules` contained in the `WebACL`
3813
+ # match.
3814
+ #
3815
+ # @option params [String] :description
3816
+ # A friendly description of the Web ACL. You cannot change the
3817
+ # description of a Web ACL after you create it.
3818
+ #
3819
+ # @option params [Array<Types::Rule>] :rules
3820
+ # The Rule statements used to identify the web requests that you want to
3821
+ # allow, block, or count. Each rule includes one top-level statement
3822
+ # that AWS WAF uses to identify matching web requests, and parameters
3823
+ # that govern how AWS WAF handles them.
3824
+ #
3825
+ # @option params [required, Types::VisibilityConfig] :visibility_config
3826
+ # Defines and enables Amazon CloudWatch metrics and web request sample
3827
+ # collection.
3828
+ #
3829
+ # @option params [required, String] :lock_token
3830
+ # A token used for optimistic locking. AWS WAF returns a token to your
3831
+ # get and list requests, to mark the state of the entity at the time of
3832
+ # the request. To make changes to the entity associated with the token,
3833
+ # you provide the token to operations like update and delete. AWS WAF
3834
+ # uses the token to ensure that no changes have been made to the entity
3835
+ # since you last retrieved it. If a change has been made, the update
3836
+ # fails with a `WAFOptimisticLockException`. If this happens, perform
3837
+ # another get, and use the new token returned by that operation.
3838
+ #
3839
+ # @return [Types::UpdateWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3840
+ #
3841
+ # * {Types::UpdateWebACLResponse#next_lock_token #next_lock_token} => String
3842
+ #
3843
+ # @example Request syntax with placeholder values
3844
+ #
3845
+ # resp = client.update_web_acl({
3846
+ # name: "EntityName", # required
3847
+ # scope: "CLOUDFRONT", # required, accepts CLOUDFRONT, REGIONAL
3848
+ # id: "EntityId", # required
3849
+ # default_action: { # required
3850
+ # block: {
3851
+ # },
3852
+ # allow: {
3853
+ # },
3854
+ # },
3855
+ # description: "EntityDescription",
3856
+ # rules: [
3857
+ # {
3858
+ # name: "EntityName", # required
3859
+ # priority: 1, # required
3860
+ # statement: { # required
3861
+ # byte_match_statement: {
3862
+ # search_string: "data", # required
3863
+ # field_to_match: { # required
3864
+ # single_header: {
3865
+ # name: "FieldToMatchData", # required
3866
+ # },
3867
+ # single_query_argument: {
3868
+ # name: "FieldToMatchData", # required
3869
+ # },
3870
+ # all_query_arguments: {
3871
+ # },
3872
+ # uri_path: {
3873
+ # },
3874
+ # query_string: {
3875
+ # },
3876
+ # body: {
3877
+ # },
3878
+ # method: {
3879
+ # },
3880
+ # },
3881
+ # text_transformations: [ # required
3882
+ # {
3883
+ # priority: 1, # required
3884
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3885
+ # },
3886
+ # ],
3887
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
3888
+ # },
3889
+ # sqli_match_statement: {
3890
+ # field_to_match: { # required
3891
+ # single_header: {
3892
+ # name: "FieldToMatchData", # required
3893
+ # },
3894
+ # single_query_argument: {
3895
+ # name: "FieldToMatchData", # required
3896
+ # },
3897
+ # all_query_arguments: {
3898
+ # },
3899
+ # uri_path: {
3900
+ # },
3901
+ # query_string: {
3902
+ # },
3903
+ # body: {
3904
+ # },
3905
+ # method: {
3906
+ # },
3907
+ # },
3908
+ # text_transformations: [ # required
3909
+ # {
3910
+ # priority: 1, # required
3911
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3912
+ # },
3913
+ # ],
3914
+ # },
3915
+ # xss_match_statement: {
3916
+ # field_to_match: { # required
3917
+ # single_header: {
3918
+ # name: "FieldToMatchData", # required
3919
+ # },
3920
+ # single_query_argument: {
3921
+ # name: "FieldToMatchData", # required
3922
+ # },
3923
+ # all_query_arguments: {
3924
+ # },
3925
+ # uri_path: {
3926
+ # },
3927
+ # query_string: {
3928
+ # },
3929
+ # body: {
3930
+ # },
3931
+ # method: {
3932
+ # },
3933
+ # },
3934
+ # text_transformations: [ # required
3935
+ # {
3936
+ # priority: 1, # required
3937
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3938
+ # },
3939
+ # ],
3940
+ # },
3941
+ # size_constraint_statement: {
3942
+ # field_to_match: { # required
3943
+ # single_header: {
3944
+ # name: "FieldToMatchData", # required
3945
+ # },
3946
+ # single_query_argument: {
3947
+ # name: "FieldToMatchData", # required
3948
+ # },
3949
+ # all_query_arguments: {
3950
+ # },
3951
+ # uri_path: {
3952
+ # },
3953
+ # query_string: {
3954
+ # },
3955
+ # body: {
3956
+ # },
3957
+ # method: {
3958
+ # },
3959
+ # },
3960
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
3961
+ # size: 1, # required
3962
+ # text_transformations: [ # required
3963
+ # {
3964
+ # priority: 1, # required
3965
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
3966
+ # },
3967
+ # ],
3968
+ # },
3969
+ # geo_match_statement: {
3970
+ # country_codes: ["AF"], # accepts AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
3971
+ # },
3972
+ # rule_group_reference_statement: {
3973
+ # arn: "ResourceArn", # required
3974
+ # excluded_rules: [
3975
+ # {
3976
+ # name: "EntityName", # required
3977
+ # },
3978
+ # ],
3979
+ # },
3980
+ # ip_set_reference_statement: {
3981
+ # arn: "ResourceArn", # required
3982
+ # },
3983
+ # regex_pattern_set_reference_statement: {
3984
+ # arn: "ResourceArn", # required
3985
+ # field_to_match: { # required
3986
+ # single_header: {
3987
+ # name: "FieldToMatchData", # required
3988
+ # },
3989
+ # single_query_argument: {
3990
+ # name: "FieldToMatchData", # required
3991
+ # },
3992
+ # all_query_arguments: {
3993
+ # },
3994
+ # uri_path: {
3995
+ # },
3996
+ # query_string: {
3997
+ # },
3998
+ # body: {
3999
+ # },
4000
+ # method: {
4001
+ # },
4002
+ # },
4003
+ # text_transformations: [ # required
4004
+ # {
4005
+ # priority: 1, # required
4006
+ # type: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
4007
+ # },
4008
+ # ],
4009
+ # },
4010
+ # rate_based_statement: {
4011
+ # limit: 1, # required
4012
+ # aggregate_key_type: "IP", # required, accepts IP
4013
+ # scope_down_statement: {
4014
+ # # recursive Statement
4015
+ # },
4016
+ # },
4017
+ # and_statement: {
4018
+ # statements: [ # required
4019
+ # {
4020
+ # # recursive Statement
4021
+ # },
4022
+ # ],
4023
+ # },
4024
+ # or_statement: {
4025
+ # statements: [ # required
4026
+ # {
4027
+ # # recursive Statement
4028
+ # },
4029
+ # ],
4030
+ # },
4031
+ # not_statement: {
4032
+ # statement: { # required
4033
+ # # recursive Statement
4034
+ # },
4035
+ # },
4036
+ # managed_rule_group_statement: {
4037
+ # vendor_name: "VendorName", # required
4038
+ # name: "EntityName", # required
4039
+ # excluded_rules: [
4040
+ # {
4041
+ # name: "EntityName", # required
4042
+ # },
4043
+ # ],
4044
+ # },
4045
+ # },
4046
+ # action: {
4047
+ # block: {
4048
+ # },
4049
+ # allow: {
4050
+ # },
4051
+ # count: {
4052
+ # },
4053
+ # },
4054
+ # override_action: {
4055
+ # count: {
4056
+ # },
4057
+ # none: {
4058
+ # },
4059
+ # },
4060
+ # visibility_config: { # required
4061
+ # sampled_requests_enabled: false, # required
4062
+ # cloud_watch_metrics_enabled: false, # required
4063
+ # metric_name: "MetricName", # required
4064
+ # },
4065
+ # },
4066
+ # ],
4067
+ # visibility_config: { # required
4068
+ # sampled_requests_enabled: false, # required
4069
+ # cloud_watch_metrics_enabled: false, # required
4070
+ # metric_name: "MetricName", # required
4071
+ # },
4072
+ # lock_token: "LockToken", # required
4073
+ # })
4074
+ #
4075
+ # @example Response structure
4076
+ #
4077
+ # resp.next_lock_token #=> String
4078
+ #
4079
+ # @see http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL AWS API Documentation
4080
+ #
4081
+ # @overload update_web_acl(params = {})
4082
+ # @param [Hash] params ({})
4083
+ def update_web_acl(params = {}, options = {})
4084
+ req = build_request(:update_web_acl, params)
4085
+ req.send_request(options)
4086
+ end
4087
+
4088
+ # @!endgroup
4089
+
4090
+ # @param params ({})
4091
+ # @api private
4092
+ def build_request(operation_name, params = {})
4093
+ handlers = @handlers.for(operation_name)
4094
+ context = Seahorse::Client::RequestContext.new(
4095
+ operation_name: operation_name,
4096
+ operation: config.api.operation(operation_name),
4097
+ client: self,
4098
+ params: params,
4099
+ config: config)
4100
+ context[:gem_name] = 'aws-sdk-wafv2'
4101
+ context[:gem_version] = '1.0.0'
4102
+ Seahorse::Client::Request.new(handlers, context)
4103
+ end
4104
+
4105
+ # @api private
4106
+ # @deprecated
4107
+ def waiter_names
4108
+ []
4109
+ end
4110
+
4111
+ class << self
4112
+
4113
+ # @api private
4114
+ attr_reader :identifier
4115
+
4116
+ # @api private
4117
+ def errors_module
4118
+ Errors
4119
+ end
4120
+
4121
+ end
4122
+ end
4123
+ end