aws-sdk-wafregional 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5d462572344bef96820ad270cf5cb0fd21effe6a
4
+ data.tar.gz: 553d7946f3c639726f9b87441b17d8b31c696cf2
5
+ SHA512:
6
+ metadata.gz: 2d2591ad2a4a58cc8a6d5887cd27aa911e2fdd04abd11b579856b9705795b714b25b7764c66b2ae039cd586fd649faac7ecc6359c6b4de79170b9ebb4e8959bf
7
+ data.tar.gz: a02da32bb9e5a1b47ab4d0b1c52462f27d48e3686e423f1690f1629b63b16d1433b8fc25124ad568b8258c799e01b3317eff65b79093441fb9acdb7f7be72e22
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
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-wafregional/types'
12
+ require_relative 'aws-sdk-wafregional/client_api'
13
+ require_relative 'aws-sdk-wafregional/client'
14
+ require_relative 'aws-sdk-wafregional/errors'
15
+ require_relative 'aws-sdk-wafregional/resource'
16
+ require_relative 'aws-sdk-wafregional/customizations'
17
+
18
+ # This module provides support for AWS WAF Regional. This module is available in the
19
+ # `aws-sdk-wafregional` 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 WAF Regional all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::WAFRegional::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::WAFRegional
44
+
45
+ GEM_VERSION = '1.0.0.rc2'
46
+
47
+ end
@@ -0,0 +1,2259 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
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/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:wafregional)
25
+
26
+ module Aws
27
+ module WAFRegional
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :wafregional
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Associates a web ACL with a resource.
143
+ # @option params [required, String] :web_acl_id
144
+ # A unique identifier (ID) for the web ACL.
145
+ # @option params [required, String] :resource_arn
146
+ # The ARN (Amazon Resource Name) of the resource to be protected.
147
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
148
+ #
149
+ # @example Request syntax with placeholder values
150
+ # resp = client.associate_web_acl({
151
+ # web_acl_id: "ResourceId", # required
152
+ # resource_arn: "ResourceArn", # required
153
+ # })
154
+ # @overload associate_web_acl(params = {})
155
+ # @param [Hash] params ({})
156
+ def associate_web_acl(params = {}, options = {})
157
+ req = build_request(:associate_web_acl, params)
158
+ req.send_request(options)
159
+ end
160
+
161
+ # Creates a `ByteMatchSet`. You then use UpdateByteMatchSet to identify
162
+ # the part of a web request that you want AWS WAF to inspect, such as
163
+ # the values of the `User-Agent` header or the query string. For
164
+ # example, you can create a `ByteMatchSet` that matches any requests
165
+ # with `User-Agent` headers that contain the string `BadBot`. You can
166
+ # then configure AWS WAF to reject those requests.
167
+ #
168
+ # To create and configure a `ByteMatchSet`, perform the following steps:
169
+ #
170
+ # 1. Use GetChangeToken to get the change token that you provide in the
171
+ # `ChangeToken` parameter of a `CreateByteMatchSet` request.
172
+ #
173
+ # 2. Submit a `CreateByteMatchSet` request.
174
+ #
175
+ # 3. Use `GetChangeToken` to get the change token that you provide in
176
+ # the `ChangeToken` parameter of an `UpdateByteMatchSet` request.
177
+ #
178
+ # 4. Submit an UpdateByteMatchSet request to specify the part of the
179
+ # request that you want AWS WAF to inspect (for example, the header
180
+ # or the URI) and the value that you want AWS WAF to watch for.
181
+ #
182
+ # For more information about how to use the AWS WAF API to allow or
183
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
184
+ #
185
+ #
186
+ #
187
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
188
+ # @option params [required, String] :name
189
+ # A friendly name or description of the ByteMatchSet. You can't change
190
+ # `Name` after you create a `ByteMatchSet`.
191
+ # @option params [required, String] :change_token
192
+ # The value returned by the most recent call to GetChangeToken.
193
+ # @return [Types::CreateByteMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
194
+ #
195
+ # * {Types::CreateByteMatchSetResponse#byte_match_set #ByteMatchSet} => Types::ByteMatchSet
196
+ # * {Types::CreateByteMatchSetResponse#change_token #ChangeToken} => String
197
+ #
198
+ # @example Request syntax with placeholder values
199
+ # resp = client.create_byte_match_set({
200
+ # name: "ResourceName", # required
201
+ # change_token: "ChangeToken", # required
202
+ # })
203
+ #
204
+ # @example Response structure
205
+ # resp.byte_match_set.byte_match_set_id #=> String
206
+ # resp.byte_match_set.name #=> String
207
+ # resp.byte_match_set.byte_match_tuples #=> Array
208
+ # resp.byte_match_set.byte_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
209
+ # resp.byte_match_set.byte_match_tuples[0].field_to_match.data #=> String
210
+ # resp.byte_match_set.byte_match_tuples[0].target_string #=> String
211
+ # resp.byte_match_set.byte_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
212
+ # resp.byte_match_set.byte_match_tuples[0].positional_constraint #=> String, one of "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD"
213
+ # resp.change_token #=> String
214
+ # @overload create_byte_match_set(params = {})
215
+ # @param [Hash] params ({})
216
+ def create_byte_match_set(params = {}, options = {})
217
+ req = build_request(:create_byte_match_set, params)
218
+ req.send_request(options)
219
+ end
220
+
221
+ # Creates an IPSet, which you use to specify which web requests you want
222
+ # to allow or block based on the IP addresses that the requests
223
+ # originate from. For example, if you're receiving a lot of requests
224
+ # from one or more individual IP addresses or one or more ranges of IP
225
+ # addresses and you want to block the requests, you can create an
226
+ # `IPSet` that contains those IP addresses and then configure AWS WAF to
227
+ # block the requests.
228
+ #
229
+ # To create and configure an `IPSet`, perform the following steps:
230
+ #
231
+ # 1. Use GetChangeToken to get the change token that you provide in the
232
+ # `ChangeToken` parameter of a `CreateIPSet` request.
233
+ #
234
+ # 2. Submit a `CreateIPSet` request.
235
+ #
236
+ # 3. Use `GetChangeToken` to get the change token that you provide in
237
+ # the `ChangeToken` parameter of an UpdateIPSet request.
238
+ #
239
+ # 4. Submit an `UpdateIPSet` request to specify the IP addresses that
240
+ # you want AWS WAF to watch for.
241
+ #
242
+ # For more information about how to use the AWS WAF API to allow or
243
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
244
+ #
245
+ #
246
+ #
247
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
248
+ # @option params [required, String] :name
249
+ # A friendly name or description of the IPSet. You can't change `Name`
250
+ # after you create the `IPSet`.
251
+ # @option params [required, String] :change_token
252
+ # The value returned by the most recent call to GetChangeToken.
253
+ # @return [Types::CreateIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
254
+ #
255
+ # * {Types::CreateIPSetResponse#ip_set #IPSet} => Types::IPSet
256
+ # * {Types::CreateIPSetResponse#change_token #ChangeToken} => String
257
+ #
258
+ # @example Request syntax with placeholder values
259
+ # resp = client.create_ip_set({
260
+ # name: "ResourceName", # required
261
+ # change_token: "ChangeToken", # required
262
+ # })
263
+ #
264
+ # @example Response structure
265
+ # resp.ip_set.ip_set_id #=> String
266
+ # resp.ip_set.name #=> String
267
+ # resp.ip_set.ip_set_descriptors #=> Array
268
+ # resp.ip_set.ip_set_descriptors[0].type #=> String, one of "IPV4", "IPV6"
269
+ # resp.ip_set.ip_set_descriptors[0].value #=> String
270
+ # resp.change_token #=> String
271
+ # @overload create_ip_set(params = {})
272
+ # @param [Hash] params ({})
273
+ def create_ip_set(params = {}, options = {})
274
+ req = build_request(:create_ip_set, params)
275
+ req.send_request(options)
276
+ end
277
+
278
+ # Creates a `Rule`, which contains the `IPSet` objects, `ByteMatchSet`
279
+ # objects, and other predicates that identify the requests that you want
280
+ # to block. If you add more than one predicate to a `Rule`, a request
281
+ # must match all of the specifications to be allowed or blocked. For
282
+ # example, suppose you add the following to a `Rule`\:
283
+ #
284
+ # * An `IPSet` that matches the IP address `192.0.2.44/32`
285
+ #
286
+ # * A `ByteMatchSet` that matches `BadBot` in the `User-Agent` header
287
+ #
288
+ # You then add the `Rule` to a `WebACL` and specify that you want to
289
+ # blocks requests that satisfy the `Rule`. For a request to be blocked,
290
+ # it must come from the IP address 192.0.2.44 *and* the `User-Agent`
291
+ # header in the request must contain the value `BadBot`.
292
+ #
293
+ # To create and configure a `Rule`, perform the following steps:
294
+ #
295
+ # 1. Create and update the predicates that you want to include in the
296
+ # `Rule`. For more information, see CreateByteMatchSet, CreateIPSet,
297
+ # and CreateSqlInjectionMatchSet.
298
+ #
299
+ # 2. Use GetChangeToken to get the change token that you provide in the
300
+ # `ChangeToken` parameter of a `CreateRule` request.
301
+ #
302
+ # 3. Submit a `CreateRule` request.
303
+ #
304
+ # 4. Use `GetChangeToken` to get the change token that you provide in
305
+ # the `ChangeToken` parameter of an UpdateRule request.
306
+ #
307
+ # 5. Submit an `UpdateRule` request to specify the predicates that you
308
+ # want to include in the `Rule`.
309
+ #
310
+ # 6. Create and update a `WebACL` that contains the `Rule`. For more
311
+ # information, see CreateWebACL.
312
+ #
313
+ # For more information about how to use the AWS WAF API to allow or
314
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
315
+ #
316
+ #
317
+ #
318
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
319
+ # @option params [required, String] :name
320
+ # A friendly name or description of the Rule. You can't change the name
321
+ # of a `Rule` after you create it.
322
+ # @option params [required, String] :metric_name
323
+ # A friendly name or description for the metrics for this `Rule`. The
324
+ # name can contain only alphanumeric characters (A-Z, a-z, 0-9); the
325
+ # name can't contain whitespace. You can't change the name of the
326
+ # metric after you create the `Rule`.
327
+ # @option params [required, String] :change_token
328
+ # The value returned by the most recent call to GetChangeToken.
329
+ # @return [Types::CreateRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
330
+ #
331
+ # * {Types::CreateRuleResponse#rule #Rule} => Types::Rule
332
+ # * {Types::CreateRuleResponse#change_token #ChangeToken} => String
333
+ #
334
+ # @example Request syntax with placeholder values
335
+ # resp = client.create_rule({
336
+ # name: "ResourceName", # required
337
+ # metric_name: "MetricName", # required
338
+ # change_token: "ChangeToken", # required
339
+ # })
340
+ #
341
+ # @example Response structure
342
+ # resp.rule.rule_id #=> String
343
+ # resp.rule.name #=> String
344
+ # resp.rule.metric_name #=> String
345
+ # resp.rule.predicates #=> Array
346
+ # resp.rule.predicates[0].negated #=> Boolean
347
+ # resp.rule.predicates[0].type #=> String, one of "IPMatch", "ByteMatch", "SqlInjectionMatch", "SizeConstraint", "XssMatch"
348
+ # resp.rule.predicates[0].data_id #=> String
349
+ # resp.change_token #=> String
350
+ # @overload create_rule(params = {})
351
+ # @param [Hash] params ({})
352
+ def create_rule(params = {}, options = {})
353
+ req = build_request(:create_rule, params)
354
+ req.send_request(options)
355
+ end
356
+
357
+ # Creates a `SizeConstraintSet`. You then use UpdateSizeConstraintSet to
358
+ # identify the part of a web request that you want AWS WAF to check for
359
+ # length, such as the length of the `User-Agent` header or the length of
360
+ # the query string. For example, you can create a `SizeConstraintSet`
361
+ # that matches any requests that have a query string that is longer than
362
+ # 100 bytes. You can then configure AWS WAF to reject those requests.
363
+ #
364
+ # To create and configure a `SizeConstraintSet`, perform the following
365
+ # steps:
366
+ #
367
+ # 1. Use GetChangeToken to get the change token that you provide in the
368
+ # `ChangeToken` parameter of a `CreateSizeConstraintSet` request.
369
+ #
370
+ # 2. Submit a `CreateSizeConstraintSet` request.
371
+ #
372
+ # 3. Use `GetChangeToken` to get the change token that you provide in
373
+ # the `ChangeToken` parameter of an `UpdateSizeConstraintSet`
374
+ # request.
375
+ #
376
+ # 4. Submit an UpdateSizeConstraintSet request to specify the part of
377
+ # the request that you want AWS WAF to inspect (for example, the
378
+ # header or the URI) and the value that you want AWS WAF to watch
379
+ # for.
380
+ #
381
+ # For more information about how to use the AWS WAF API to allow or
382
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
383
+ #
384
+ #
385
+ #
386
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
387
+ # @option params [required, String] :name
388
+ # A friendly name or description of the SizeConstraintSet. You can't
389
+ # change `Name` after you create a `SizeConstraintSet`.
390
+ # @option params [required, String] :change_token
391
+ # The value returned by the most recent call to GetChangeToken.
392
+ # @return [Types::CreateSizeConstraintSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
393
+ #
394
+ # * {Types::CreateSizeConstraintSetResponse#size_constraint_set #SizeConstraintSet} => Types::SizeConstraintSet
395
+ # * {Types::CreateSizeConstraintSetResponse#change_token #ChangeToken} => String
396
+ #
397
+ # @example Request syntax with placeholder values
398
+ # resp = client.create_size_constraint_set({
399
+ # name: "ResourceName", # required
400
+ # change_token: "ChangeToken", # required
401
+ # })
402
+ #
403
+ # @example Response structure
404
+ # resp.size_constraint_set.size_constraint_set_id #=> String
405
+ # resp.size_constraint_set.name #=> String
406
+ # resp.size_constraint_set.size_constraints #=> Array
407
+ # resp.size_constraint_set.size_constraints[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
408
+ # resp.size_constraint_set.size_constraints[0].field_to_match.data #=> String
409
+ # resp.size_constraint_set.size_constraints[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
410
+ # resp.size_constraint_set.size_constraints[0].comparison_operator #=> String, one of "EQ", "NE", "LE", "LT", "GE", "GT"
411
+ # resp.size_constraint_set.size_constraints[0].size #=> Integer
412
+ # resp.change_token #=> String
413
+ # @overload create_size_constraint_set(params = {})
414
+ # @param [Hash] params ({})
415
+ def create_size_constraint_set(params = {}, options = {})
416
+ req = build_request(:create_size_constraint_set, params)
417
+ req.send_request(options)
418
+ end
419
+
420
+ # Creates a SqlInjectionMatchSet, which you use to allow, block, or
421
+ # count requests that contain snippets of SQL code in a specified part
422
+ # of web requests. AWS WAF searches for character sequences that are
423
+ # likely to be malicious strings.
424
+ #
425
+ # To create and configure a `SqlInjectionMatchSet`, perform the
426
+ # following steps:
427
+ #
428
+ # 1. Use GetChangeToken to get the change token that you provide in the
429
+ # `ChangeToken` parameter of a `CreateSqlInjectionMatchSet` request.
430
+ #
431
+ # 2. Submit a `CreateSqlInjectionMatchSet` request.
432
+ #
433
+ # 3. Use `GetChangeToken` to get the change token that you provide in
434
+ # the `ChangeToken` parameter of an UpdateSqlInjectionMatchSet
435
+ # request.
436
+ #
437
+ # 4. Submit an UpdateSqlInjectionMatchSet request to specify the parts
438
+ # of web requests in which you want to allow, block, or count
439
+ # malicious SQL code.
440
+ #
441
+ # For more information about how to use the AWS WAF API to allow or
442
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
443
+ #
444
+ #
445
+ #
446
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
447
+ # @option params [required, String] :name
448
+ # A friendly name or description for the SqlInjectionMatchSet that
449
+ # you're creating. You can't change `Name` after you create the
450
+ # `SqlInjectionMatchSet`.
451
+ # @option params [required, String] :change_token
452
+ # The value returned by the most recent call to GetChangeToken.
453
+ # @return [Types::CreateSqlInjectionMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
454
+ #
455
+ # * {Types::CreateSqlInjectionMatchSetResponse#sql_injection_match_set #SqlInjectionMatchSet} => Types::SqlInjectionMatchSet
456
+ # * {Types::CreateSqlInjectionMatchSetResponse#change_token #ChangeToken} => String
457
+ #
458
+ # @example Request syntax with placeholder values
459
+ # resp = client.create_sql_injection_match_set({
460
+ # name: "ResourceName", # required
461
+ # change_token: "ChangeToken", # required
462
+ # })
463
+ #
464
+ # @example Response structure
465
+ # resp.sql_injection_match_set.sql_injection_match_set_id #=> String
466
+ # resp.sql_injection_match_set.name #=> String
467
+ # resp.sql_injection_match_set.sql_injection_match_tuples #=> Array
468
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
469
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].field_to_match.data #=> String
470
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
471
+ # resp.change_token #=> String
472
+ # @overload create_sql_injection_match_set(params = {})
473
+ # @param [Hash] params ({})
474
+ def create_sql_injection_match_set(params = {}, options = {})
475
+ req = build_request(:create_sql_injection_match_set, params)
476
+ req.send_request(options)
477
+ end
478
+
479
+ # Creates a `WebACL`, which contains the `Rules` that identify the
480
+ # CloudFront web requests that you want to allow, block, or count. AWS
481
+ # WAF evaluates `Rules` in order based on the value of `Priority` for
482
+ # each `Rule`.
483
+ #
484
+ # You also specify a default action, either `ALLOW` or `BLOCK`. If a web
485
+ # request doesn't match any of the `Rules` in a `WebACL`, AWS WAF
486
+ # responds to the request with the default action.
487
+ #
488
+ # To create and configure a `WebACL`, perform the following steps:
489
+ #
490
+ # 1. Create and update the `ByteMatchSet` objects and other predicates
491
+ # that you want to include in `Rules`. For more information, see
492
+ # CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet,
493
+ # CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
494
+ #
495
+ # 2. Create and update the `Rules` that you want to include in the
496
+ # `WebACL`. For more information, see CreateRule and UpdateRule.
497
+ #
498
+ # 3. Use GetChangeToken to get the change token that you provide in the
499
+ # `ChangeToken` parameter of a `CreateWebACL` request.
500
+ #
501
+ # 4. Submit a `CreateWebACL` request.
502
+ #
503
+ # 5. Use `GetChangeToken` to get the change token that you provide in
504
+ # the `ChangeToken` parameter of an UpdateWebACL request.
505
+ #
506
+ # 6. Submit an UpdateWebACL request to specify the `Rules` that you
507
+ # want to include in the `WebACL`, to specify the default action,
508
+ # and to associate the `WebACL` with a CloudFront distribution.
509
+ #
510
+ # For more information about how to use the AWS WAF API, see the [AWS
511
+ # WAF Developer Guide][1].
512
+ #
513
+ #
514
+ #
515
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
516
+ # @option params [required, String] :name
517
+ # A friendly name or description of the WebACL. You can't change `Name`
518
+ # after you create the `WebACL`.
519
+ # @option params [required, String] :metric_name
520
+ # A friendly name or description for the metrics for this `WebACL`. The
521
+ # name can contain only alphanumeric characters (A-Z, a-z, 0-9); the
522
+ # name can't contain whitespace. You can't change `MetricName` after
523
+ # you create the `WebACL`.
524
+ # @option params [required, Types::WafAction] :default_action
525
+ # The action that you want AWS WAF to take when a request doesn't match
526
+ # the criteria specified in any of the `Rule` objects that are
527
+ # associated with the `WebACL`.
528
+ # @option params [required, String] :change_token
529
+ # The value returned by the most recent call to GetChangeToken.
530
+ # @return [Types::CreateWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
531
+ #
532
+ # * {Types::CreateWebACLResponse#web_acl #WebACL} => Types::WebACL
533
+ # * {Types::CreateWebACLResponse#change_token #ChangeToken} => String
534
+ #
535
+ # @example Request syntax with placeholder values
536
+ # resp = client.create_web_acl({
537
+ # name: "ResourceName", # required
538
+ # metric_name: "MetricName", # required
539
+ # default_action: { # required
540
+ # type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
541
+ # },
542
+ # change_token: "ChangeToken", # required
543
+ # })
544
+ #
545
+ # @example Response structure
546
+ # resp.web_acl.web_acl_id #=> String
547
+ # resp.web_acl.name #=> String
548
+ # resp.web_acl.metric_name #=> String
549
+ # resp.web_acl.default_action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
550
+ # resp.web_acl.rules #=> Array
551
+ # resp.web_acl.rules[0].priority #=> Integer
552
+ # resp.web_acl.rules[0].rule_id #=> String
553
+ # resp.web_acl.rules[0].action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
554
+ # resp.change_token #=> String
555
+ # @overload create_web_acl(params = {})
556
+ # @param [Hash] params ({})
557
+ def create_web_acl(params = {}, options = {})
558
+ req = build_request(:create_web_acl, params)
559
+ req.send_request(options)
560
+ end
561
+
562
+ # Creates an XssMatchSet, which you use to allow, block, or count
563
+ # requests that contain cross-site scripting attacks in the specified
564
+ # part of web requests. AWS WAF searches for character sequences that
565
+ # are likely to be malicious strings.
566
+ #
567
+ # To create and configure an `XssMatchSet`, perform the following steps:
568
+ #
569
+ # 1. Use GetChangeToken to get the change token that you provide in the
570
+ # `ChangeToken` parameter of a `CreateXssMatchSet` request.
571
+ #
572
+ # 2. Submit a `CreateXssMatchSet` request.
573
+ #
574
+ # 3. Use `GetChangeToken` to get the change token that you provide in
575
+ # the `ChangeToken` parameter of an UpdateXssMatchSet request.
576
+ #
577
+ # 4. Submit an UpdateXssMatchSet request to specify the parts of web
578
+ # requests in which you want to allow, block, or count cross-site
579
+ # scripting attacks.
580
+ #
581
+ # For more information about how to use the AWS WAF API to allow or
582
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
583
+ #
584
+ #
585
+ #
586
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
587
+ # @option params [required, String] :name
588
+ # A friendly name or description for the XssMatchSet that you're
589
+ # creating. You can't change `Name` after you create the `XssMatchSet`.
590
+ # @option params [required, String] :change_token
591
+ # The value returned by the most recent call to GetChangeToken.
592
+ # @return [Types::CreateXssMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
593
+ #
594
+ # * {Types::CreateXssMatchSetResponse#xss_match_set #XssMatchSet} => Types::XssMatchSet
595
+ # * {Types::CreateXssMatchSetResponse#change_token #ChangeToken} => String
596
+ #
597
+ # @example Request syntax with placeholder values
598
+ # resp = client.create_xss_match_set({
599
+ # name: "ResourceName", # required
600
+ # change_token: "ChangeToken", # required
601
+ # })
602
+ #
603
+ # @example Response structure
604
+ # resp.xss_match_set.xss_match_set_id #=> String
605
+ # resp.xss_match_set.name #=> String
606
+ # resp.xss_match_set.xss_match_tuples #=> Array
607
+ # resp.xss_match_set.xss_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
608
+ # resp.xss_match_set.xss_match_tuples[0].field_to_match.data #=> String
609
+ # resp.xss_match_set.xss_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
610
+ # resp.change_token #=> String
611
+ # @overload create_xss_match_set(params = {})
612
+ # @param [Hash] params ({})
613
+ def create_xss_match_set(params = {}, options = {})
614
+ req = build_request(:create_xss_match_set, params)
615
+ req.send_request(options)
616
+ end
617
+
618
+ # Permanently deletes a ByteMatchSet. You can't delete a `ByteMatchSet`
619
+ # if it's still used in any `Rules` or if it still includes any
620
+ # ByteMatchTuple objects (any filters).
621
+ #
622
+ # If you just want to remove a `ByteMatchSet` from a `Rule`, use
623
+ # UpdateRule.
624
+ #
625
+ # To permanently delete a `ByteMatchSet`, perform the following steps:
626
+ #
627
+ # 1. Update the `ByteMatchSet` to remove filters, if any. For more
628
+ # information, see UpdateByteMatchSet.
629
+ #
630
+ # 2. Use GetChangeToken to get the change token that you provide in the
631
+ # `ChangeToken` parameter of a `DeleteByteMatchSet` request.
632
+ #
633
+ # 3. Submit a `DeleteByteMatchSet` request.
634
+ # @option params [required, String] :byte_match_set_id
635
+ # The `ByteMatchSetId` of the ByteMatchSet that you want to delete.
636
+ # `ByteMatchSetId` is returned by CreateByteMatchSet and by
637
+ # ListByteMatchSets.
638
+ # @option params [required, String] :change_token
639
+ # The value returned by the most recent call to GetChangeToken.
640
+ # @return [Types::DeleteByteMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
641
+ #
642
+ # * {Types::DeleteByteMatchSetResponse#change_token #ChangeToken} => String
643
+ #
644
+ # @example Request syntax with placeholder values
645
+ # resp = client.delete_byte_match_set({
646
+ # byte_match_set_id: "ResourceId", # required
647
+ # change_token: "ChangeToken", # required
648
+ # })
649
+ #
650
+ # @example Response structure
651
+ # resp.change_token #=> String
652
+ # @overload delete_byte_match_set(params = {})
653
+ # @param [Hash] params ({})
654
+ def delete_byte_match_set(params = {}, options = {})
655
+ req = build_request(:delete_byte_match_set, params)
656
+ req.send_request(options)
657
+ end
658
+
659
+ # Permanently deletes an IPSet. You can't delete an `IPSet` if it's
660
+ # still used in any `Rules` or if it still includes any IP addresses.
661
+ #
662
+ # If you just want to remove an `IPSet` from a `Rule`, use UpdateRule.
663
+ #
664
+ # To permanently delete an `IPSet` from AWS WAF, perform the following
665
+ # steps:
666
+ #
667
+ # 1. Update the `IPSet` to remove IP address ranges, if any. For more
668
+ # information, see UpdateIPSet.
669
+ #
670
+ # 2. Use GetChangeToken to get the change token that you provide in the
671
+ # `ChangeToken` parameter of a `DeleteIPSet` request.
672
+ #
673
+ # 3. Submit a `DeleteIPSet` request.
674
+ # @option params [required, String] :ip_set_id
675
+ # The `IPSetId` of the IPSet that you want to delete. `IPSetId` is
676
+ # returned by CreateIPSet and by ListIPSets.
677
+ # @option params [required, String] :change_token
678
+ # The value returned by the most recent call to GetChangeToken.
679
+ # @return [Types::DeleteIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
680
+ #
681
+ # * {Types::DeleteIPSetResponse#change_token #ChangeToken} => String
682
+ #
683
+ # @example Request syntax with placeholder values
684
+ # resp = client.delete_ip_set({
685
+ # ip_set_id: "ResourceId", # required
686
+ # change_token: "ChangeToken", # required
687
+ # })
688
+ #
689
+ # @example Response structure
690
+ # resp.change_token #=> String
691
+ # @overload delete_ip_set(params = {})
692
+ # @param [Hash] params ({})
693
+ def delete_ip_set(params = {}, options = {})
694
+ req = build_request(:delete_ip_set, params)
695
+ req.send_request(options)
696
+ end
697
+
698
+ # Permanently deletes a Rule. You can't delete a `Rule` if it's still
699
+ # used in any `WebACL` objects or if it still includes any predicates,
700
+ # such as `ByteMatchSet` objects.
701
+ #
702
+ # If you just want to remove a `Rule` from a `WebACL`, use UpdateWebACL.
703
+ #
704
+ # To permanently delete a `Rule` from AWS WAF, perform the following
705
+ # steps:
706
+ #
707
+ # 1. Update the `Rule` to remove predicates, if any. For more
708
+ # information, see UpdateRule.
709
+ #
710
+ # 2. Use GetChangeToken to get the change token that you provide in the
711
+ # `ChangeToken` parameter of a `DeleteRule` request.
712
+ #
713
+ # 3. Submit a `DeleteRule` request.
714
+ # @option params [required, String] :rule_id
715
+ # The `RuleId` of the Rule that you want to delete. `RuleId` is returned
716
+ # by CreateRule and by ListRules.
717
+ # @option params [required, String] :change_token
718
+ # The value returned by the most recent call to GetChangeToken.
719
+ # @return [Types::DeleteRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
720
+ #
721
+ # * {Types::DeleteRuleResponse#change_token #ChangeToken} => String
722
+ #
723
+ # @example Request syntax with placeholder values
724
+ # resp = client.delete_rule({
725
+ # rule_id: "ResourceId", # required
726
+ # change_token: "ChangeToken", # required
727
+ # })
728
+ #
729
+ # @example Response structure
730
+ # resp.change_token #=> String
731
+ # @overload delete_rule(params = {})
732
+ # @param [Hash] params ({})
733
+ def delete_rule(params = {}, options = {})
734
+ req = build_request(:delete_rule, params)
735
+ req.send_request(options)
736
+ end
737
+
738
+ # Permanently deletes a SizeConstraintSet. You can't delete a
739
+ # `SizeConstraintSet` if it's still used in any `Rules` or if it still
740
+ # includes any SizeConstraint objects (any filters).
741
+ #
742
+ # If you just want to remove a `SizeConstraintSet` from a `Rule`, use
743
+ # UpdateRule.
744
+ #
745
+ # To permanently delete a `SizeConstraintSet`, perform the following
746
+ # steps:
747
+ #
748
+ # 1. Update the `SizeConstraintSet` to remove filters, if any. For more
749
+ # information, see UpdateSizeConstraintSet.
750
+ #
751
+ # 2. Use GetChangeToken to get the change token that you provide in the
752
+ # `ChangeToken` parameter of a `DeleteSizeConstraintSet` request.
753
+ #
754
+ # 3. Submit a `DeleteSizeConstraintSet` request.
755
+ # @option params [required, String] :size_constraint_set_id
756
+ # The `SizeConstraintSetId` of the SizeConstraintSet that you want to
757
+ # delete. `SizeConstraintSetId` is returned by CreateSizeConstraintSet
758
+ # and by ListSizeConstraintSets.
759
+ # @option params [required, String] :change_token
760
+ # The value returned by the most recent call to GetChangeToken.
761
+ # @return [Types::DeleteSizeConstraintSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
762
+ #
763
+ # * {Types::DeleteSizeConstraintSetResponse#change_token #ChangeToken} => String
764
+ #
765
+ # @example Request syntax with placeholder values
766
+ # resp = client.delete_size_constraint_set({
767
+ # size_constraint_set_id: "ResourceId", # required
768
+ # change_token: "ChangeToken", # required
769
+ # })
770
+ #
771
+ # @example Response structure
772
+ # resp.change_token #=> String
773
+ # @overload delete_size_constraint_set(params = {})
774
+ # @param [Hash] params ({})
775
+ def delete_size_constraint_set(params = {}, options = {})
776
+ req = build_request(:delete_size_constraint_set, params)
777
+ req.send_request(options)
778
+ end
779
+
780
+ # Permanently deletes a SqlInjectionMatchSet. You can't delete a
781
+ # `SqlInjectionMatchSet` if it's still used in any `Rules` or if it
782
+ # still contains any SqlInjectionMatchTuple objects.
783
+ #
784
+ # If you just want to remove a `SqlInjectionMatchSet` from a `Rule`, use
785
+ # UpdateRule.
786
+ #
787
+ # To permanently delete a `SqlInjectionMatchSet` from AWS WAF, perform
788
+ # the following steps:
789
+ #
790
+ # 1. Update the `SqlInjectionMatchSet` to remove filters, if any. For
791
+ # more information, see UpdateSqlInjectionMatchSet.
792
+ #
793
+ # 2. Use GetChangeToken to get the change token that you provide in the
794
+ # `ChangeToken` parameter of a `DeleteSqlInjectionMatchSet` request.
795
+ #
796
+ # 3. Submit a `DeleteSqlInjectionMatchSet` request.
797
+ # @option params [required, String] :sql_injection_match_set_id
798
+ # The `SqlInjectionMatchSetId` of the SqlInjectionMatchSet that you want
799
+ # to delete. `SqlInjectionMatchSetId` is returned by
800
+ # CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
801
+ # @option params [required, String] :change_token
802
+ # The value returned by the most recent call to GetChangeToken.
803
+ # @return [Types::DeleteSqlInjectionMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
804
+ #
805
+ # * {Types::DeleteSqlInjectionMatchSetResponse#change_token #ChangeToken} => String
806
+ #
807
+ # @example Request syntax with placeholder values
808
+ # resp = client.delete_sql_injection_match_set({
809
+ # sql_injection_match_set_id: "ResourceId", # required
810
+ # change_token: "ChangeToken", # required
811
+ # })
812
+ #
813
+ # @example Response structure
814
+ # resp.change_token #=> String
815
+ # @overload delete_sql_injection_match_set(params = {})
816
+ # @param [Hash] params ({})
817
+ def delete_sql_injection_match_set(params = {}, options = {})
818
+ req = build_request(:delete_sql_injection_match_set, params)
819
+ req.send_request(options)
820
+ end
821
+
822
+ # Permanently deletes a WebACL. You can't delete a `WebACL` if it still
823
+ # contains any `Rules`.
824
+ #
825
+ # To delete a `WebACL`, perform the following steps:
826
+ #
827
+ # 1. Update the `WebACL` to remove `Rules`, if any. For more
828
+ # information, see UpdateWebACL.
829
+ #
830
+ # 2. Use GetChangeToken to get the change token that you provide in the
831
+ # `ChangeToken` parameter of a `DeleteWebACL` request.
832
+ #
833
+ # 3. Submit a `DeleteWebACL` request.
834
+ # @option params [required, String] :web_acl_id
835
+ # The `WebACLId` of the WebACL that you want to delete. `WebACLId` is
836
+ # returned by CreateWebACL and by ListWebACLs.
837
+ # @option params [required, String] :change_token
838
+ # The value returned by the most recent call to GetChangeToken.
839
+ # @return [Types::DeleteWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
840
+ #
841
+ # * {Types::DeleteWebACLResponse#change_token #ChangeToken} => String
842
+ #
843
+ # @example Request syntax with placeholder values
844
+ # resp = client.delete_web_acl({
845
+ # web_acl_id: "ResourceId", # required
846
+ # change_token: "ChangeToken", # required
847
+ # })
848
+ #
849
+ # @example Response structure
850
+ # resp.change_token #=> String
851
+ # @overload delete_web_acl(params = {})
852
+ # @param [Hash] params ({})
853
+ def delete_web_acl(params = {}, options = {})
854
+ req = build_request(:delete_web_acl, params)
855
+ req.send_request(options)
856
+ end
857
+
858
+ # Permanently deletes an XssMatchSet. You can't delete an `XssMatchSet`
859
+ # if it's still used in any `Rules` or if it still contains any
860
+ # XssMatchTuple objects.
861
+ #
862
+ # If you just want to remove an `XssMatchSet` from a `Rule`, use
863
+ # UpdateRule.
864
+ #
865
+ # To permanently delete an `XssMatchSet` from AWS WAF, perform the
866
+ # following steps:
867
+ #
868
+ # 1. Update the `XssMatchSet` to remove filters, if any. For more
869
+ # information, see UpdateXssMatchSet.
870
+ #
871
+ # 2. Use GetChangeToken to get the change token that you provide in the
872
+ # `ChangeToken` parameter of a `DeleteXssMatchSet` request.
873
+ #
874
+ # 3. Submit a `DeleteXssMatchSet` request.
875
+ # @option params [required, String] :xss_match_set_id
876
+ # The `XssMatchSetId` of the XssMatchSet that you want to delete.
877
+ # `XssMatchSetId` is returned by CreateXssMatchSet and by
878
+ # ListXssMatchSets.
879
+ # @option params [required, String] :change_token
880
+ # The value returned by the most recent call to GetChangeToken.
881
+ # @return [Types::DeleteXssMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
882
+ #
883
+ # * {Types::DeleteXssMatchSetResponse#change_token #ChangeToken} => String
884
+ #
885
+ # @example Request syntax with placeholder values
886
+ # resp = client.delete_xss_match_set({
887
+ # xss_match_set_id: "ResourceId", # required
888
+ # change_token: "ChangeToken", # required
889
+ # })
890
+ #
891
+ # @example Response structure
892
+ # resp.change_token #=> String
893
+ # @overload delete_xss_match_set(params = {})
894
+ # @param [Hash] params ({})
895
+ def delete_xss_match_set(params = {}, options = {})
896
+ req = build_request(:delete_xss_match_set, params)
897
+ req.send_request(options)
898
+ end
899
+
900
+ # Removes a web ACL from the specified resource.
901
+ # @option params [required, String] :resource_arn
902
+ # The ARN (Amazon Resource Name) of the resource from which the web ACL
903
+ # is being removed.
904
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
905
+ #
906
+ # @example Request syntax with placeholder values
907
+ # resp = client.disassociate_web_acl({
908
+ # resource_arn: "ResourceArn", # required
909
+ # })
910
+ # @overload disassociate_web_acl(params = {})
911
+ # @param [Hash] params ({})
912
+ def disassociate_web_acl(params = {}, options = {})
913
+ req = build_request(:disassociate_web_acl, params)
914
+ req.send_request(options)
915
+ end
916
+
917
+ # Returns the ByteMatchSet specified by `ByteMatchSetId`.
918
+ # @option params [required, String] :byte_match_set_id
919
+ # The `ByteMatchSetId` of the ByteMatchSet that you want to get.
920
+ # `ByteMatchSetId` is returned by CreateByteMatchSet and by
921
+ # ListByteMatchSets.
922
+ # @return [Types::GetByteMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
923
+ #
924
+ # * {Types::GetByteMatchSetResponse#byte_match_set #ByteMatchSet} => Types::ByteMatchSet
925
+ #
926
+ # @example Request syntax with placeholder values
927
+ # resp = client.get_byte_match_set({
928
+ # byte_match_set_id: "ResourceId", # required
929
+ # })
930
+ #
931
+ # @example Response structure
932
+ # resp.byte_match_set.byte_match_set_id #=> String
933
+ # resp.byte_match_set.name #=> String
934
+ # resp.byte_match_set.byte_match_tuples #=> Array
935
+ # resp.byte_match_set.byte_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
936
+ # resp.byte_match_set.byte_match_tuples[0].field_to_match.data #=> String
937
+ # resp.byte_match_set.byte_match_tuples[0].target_string #=> String
938
+ # resp.byte_match_set.byte_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
939
+ # resp.byte_match_set.byte_match_tuples[0].positional_constraint #=> String, one of "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD"
940
+ # @overload get_byte_match_set(params = {})
941
+ # @param [Hash] params ({})
942
+ def get_byte_match_set(params = {}, options = {})
943
+ req = build_request(:get_byte_match_set, params)
944
+ req.send_request(options)
945
+ end
946
+
947
+ # When you want to create, update, or delete AWS WAF objects, get a
948
+ # change token and include the change token in the create, update, or
949
+ # delete request. Change tokens ensure that your application doesn't
950
+ # submit conflicting requests to AWS WAF.
951
+ #
952
+ # Each create, update, or delete request must use a unique change token.
953
+ # If your application submits a `GetChangeToken` request and then
954
+ # submits a second `GetChangeToken` request before submitting a create,
955
+ # update, or delete request, the second `GetChangeToken` request returns
956
+ # the same value as the first `GetChangeToken` request.
957
+ #
958
+ # When you use a change token in a create, update, or delete request,
959
+ # the status of the change token changes to `PENDING`, which indicates
960
+ # that AWS WAF is propagating the change to all AWS WAF servers. Use
961
+ # `GetChangeTokenStatus` to determine the status of your change token.
962
+ # @return [Types::GetChangeTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
963
+ #
964
+ # * {Types::GetChangeTokenResponse#change_token #ChangeToken} => String
965
+ #
966
+ # @example Request syntax with placeholder values
967
+ # resp = client.get_change_token()
968
+ #
969
+ # @example Response structure
970
+ # resp.change_token #=> String
971
+ # @overload get_change_token(params = {})
972
+ # @param [Hash] params ({})
973
+ def get_change_token(params = {}, options = {})
974
+ req = build_request(:get_change_token, params)
975
+ req.send_request(options)
976
+ end
977
+
978
+ # Returns the status of a `ChangeToken` that you got by calling
979
+ # GetChangeToken. `ChangeTokenStatus` is one of the following values:
980
+ #
981
+ # * `PROVISIONED`\: You requested the change token by calling
982
+ # `GetChangeToken`, but you haven't used it yet in a call to create,
983
+ # update, or delete an AWS WAF object.
984
+ #
985
+ # * `PENDING`\: AWS WAF is propagating the create, update, or delete
986
+ # request to all AWS WAF servers.
987
+ #
988
+ # * `IN_SYNC`\: Propagation is complete.
989
+ # @option params [required, String] :change_token
990
+ # The change token for which you want to get the status. This change
991
+ # token was previously returned in the `GetChangeToken` response.
992
+ # @return [Types::GetChangeTokenStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
993
+ #
994
+ # * {Types::GetChangeTokenStatusResponse#change_token_status #ChangeTokenStatus} => String
995
+ #
996
+ # @example Request syntax with placeholder values
997
+ # resp = client.get_change_token_status({
998
+ # change_token: "ChangeToken", # required
999
+ # })
1000
+ #
1001
+ # @example Response structure
1002
+ # resp.change_token_status #=> String, one of "PROVISIONED", "PENDING", "INSYNC"
1003
+ # @overload get_change_token_status(params = {})
1004
+ # @param [Hash] params ({})
1005
+ def get_change_token_status(params = {}, options = {})
1006
+ req = build_request(:get_change_token_status, params)
1007
+ req.send_request(options)
1008
+ end
1009
+
1010
+ # Returns the IPSet that is specified by `IPSetId`.
1011
+ # @option params [required, String] :ip_set_id
1012
+ # The `IPSetId` of the IPSet that you want to get. `IPSetId` is returned
1013
+ # by CreateIPSet and by ListIPSets.
1014
+ # @return [Types::GetIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1015
+ #
1016
+ # * {Types::GetIPSetResponse#ip_set #IPSet} => Types::IPSet
1017
+ #
1018
+ # @example Request syntax with placeholder values
1019
+ # resp = client.get_ip_set({
1020
+ # ip_set_id: "ResourceId", # required
1021
+ # })
1022
+ #
1023
+ # @example Response structure
1024
+ # resp.ip_set.ip_set_id #=> String
1025
+ # resp.ip_set.name #=> String
1026
+ # resp.ip_set.ip_set_descriptors #=> Array
1027
+ # resp.ip_set.ip_set_descriptors[0].type #=> String, one of "IPV4", "IPV6"
1028
+ # resp.ip_set.ip_set_descriptors[0].value #=> String
1029
+ # @overload get_ip_set(params = {})
1030
+ # @param [Hash] params ({})
1031
+ def get_ip_set(params = {}, options = {})
1032
+ req = build_request(:get_ip_set, params)
1033
+ req.send_request(options)
1034
+ end
1035
+
1036
+ # Returns the Rule that is specified by the `RuleId` that you included
1037
+ # in the `GetRule` request.
1038
+ # @option params [required, String] :rule_id
1039
+ # The `RuleId` of the Rule that you want to get. `RuleId` is returned by
1040
+ # CreateRule and by ListRules.
1041
+ # @return [Types::GetRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1042
+ #
1043
+ # * {Types::GetRuleResponse#rule #Rule} => Types::Rule
1044
+ #
1045
+ # @example Request syntax with placeholder values
1046
+ # resp = client.get_rule({
1047
+ # rule_id: "ResourceId", # required
1048
+ # })
1049
+ #
1050
+ # @example Response structure
1051
+ # resp.rule.rule_id #=> String
1052
+ # resp.rule.name #=> String
1053
+ # resp.rule.metric_name #=> String
1054
+ # resp.rule.predicates #=> Array
1055
+ # resp.rule.predicates[0].negated #=> Boolean
1056
+ # resp.rule.predicates[0].type #=> String, one of "IPMatch", "ByteMatch", "SqlInjectionMatch", "SizeConstraint", "XssMatch"
1057
+ # resp.rule.predicates[0].data_id #=> String
1058
+ # @overload get_rule(params = {})
1059
+ # @param [Hash] params ({})
1060
+ def get_rule(params = {}, options = {})
1061
+ req = build_request(:get_rule, params)
1062
+ req.send_request(options)
1063
+ end
1064
+
1065
+ # Gets detailed information about a specified number of requests--a
1066
+ # sample--that AWS WAF randomly selects from among the first 5,000
1067
+ # requests that your AWS resource received during a time range that you
1068
+ # choose. You can specify a sample size of up to 100 requests, and you
1069
+ # can specify any time range in the previous three hours.
1070
+ #
1071
+ # `GetSampledRequests` returns a time range, which is usually the time
1072
+ # range that you specified. However, if your resource (such as a
1073
+ # CloudFront distribution) received 5,000 requests before the specified
1074
+ # time range elapsed, `GetSampledRequests` returns an updated time
1075
+ # range. This new time range indicates the actual period during which
1076
+ # AWS WAF selected the requests in the sample.
1077
+ # @option params [required, String] :web_acl_id
1078
+ # The `WebACLId` of the `WebACL` for which you want `GetSampledRequests`
1079
+ # to return a sample of requests.
1080
+ # @option params [required, String] :rule_id
1081
+ # `RuleId` is one of two values:
1082
+ #
1083
+ # * The `RuleId` of the `Rule` for which you want `GetSampledRequests`
1084
+ # to return a sample of requests.
1085
+ #
1086
+ # * `Default_Action`, which causes `GetSampledRequests` to return a
1087
+ # sample of the requests that didn't match any of the rules in the
1088
+ # specified `WebACL`.
1089
+ # @option params [required, Types::TimeWindow] :time_window
1090
+ # The start date and time and the end date and time of the range for
1091
+ # which you want `GetSampledRequests` to return a sample of requests.
1092
+ # Specify the date and time in the following format:
1093
+ # `"2016-09-27T14:50Z"`. You can specify any time range in the previous
1094
+ # three hours.
1095
+ # @option params [required, Integer] :max_items
1096
+ # The number of requests that you want AWS WAF to return from among the
1097
+ # first 5,000 requests that your AWS resource received during the time
1098
+ # range. If your resource received fewer requests than the value of
1099
+ # `MaxItems`, `GetSampledRequests` returns information about all of
1100
+ # them.
1101
+ # @return [Types::GetSampledRequestsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1102
+ #
1103
+ # * {Types::GetSampledRequestsResponse#sampled_requests #SampledRequests} => Array&lt;Types::SampledHTTPRequest&gt;
1104
+ # * {Types::GetSampledRequestsResponse#population_size #PopulationSize} => Integer
1105
+ # * {Types::GetSampledRequestsResponse#time_window #TimeWindow} => Types::TimeWindow
1106
+ #
1107
+ # @example Request syntax with placeholder values
1108
+ # resp = client.get_sampled_requests({
1109
+ # web_acl_id: "ResourceId", # required
1110
+ # rule_id: "ResourceId", # required
1111
+ # time_window: { # required
1112
+ # start_time: Time.now, # required
1113
+ # end_time: Time.now, # required
1114
+ # },
1115
+ # max_items: 1, # required
1116
+ # })
1117
+ #
1118
+ # @example Response structure
1119
+ # resp.sampled_requests #=> Array
1120
+ # resp.sampled_requests[0].request.client_ip #=> String
1121
+ # resp.sampled_requests[0].request.country #=> String
1122
+ # resp.sampled_requests[0].request.uri #=> String
1123
+ # resp.sampled_requests[0].request.method #=> String
1124
+ # resp.sampled_requests[0].request.http_version #=> String
1125
+ # resp.sampled_requests[0].request.headers #=> Array
1126
+ # resp.sampled_requests[0].request.headers[0].name #=> String
1127
+ # resp.sampled_requests[0].request.headers[0].value #=> String
1128
+ # resp.sampled_requests[0].weight #=> Integer
1129
+ # resp.sampled_requests[0].timestamp #=> Time
1130
+ # resp.sampled_requests[0].action #=> String
1131
+ # resp.population_size #=> Integer
1132
+ # resp.time_window.start_time #=> Time
1133
+ # resp.time_window.end_time #=> Time
1134
+ # @overload get_sampled_requests(params = {})
1135
+ # @param [Hash] params ({})
1136
+ def get_sampled_requests(params = {}, options = {})
1137
+ req = build_request(:get_sampled_requests, params)
1138
+ req.send_request(options)
1139
+ end
1140
+
1141
+ # Returns the SizeConstraintSet specified by `SizeConstraintSetId`.
1142
+ # @option params [required, String] :size_constraint_set_id
1143
+ # The `SizeConstraintSetId` of the SizeConstraintSet that you want to
1144
+ # get. `SizeConstraintSetId` is returned by CreateSizeConstraintSet and
1145
+ # by ListSizeConstraintSets.
1146
+ # @return [Types::GetSizeConstraintSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1147
+ #
1148
+ # * {Types::GetSizeConstraintSetResponse#size_constraint_set #SizeConstraintSet} => Types::SizeConstraintSet
1149
+ #
1150
+ # @example Request syntax with placeholder values
1151
+ # resp = client.get_size_constraint_set({
1152
+ # size_constraint_set_id: "ResourceId", # required
1153
+ # })
1154
+ #
1155
+ # @example Response structure
1156
+ # resp.size_constraint_set.size_constraint_set_id #=> String
1157
+ # resp.size_constraint_set.name #=> String
1158
+ # resp.size_constraint_set.size_constraints #=> Array
1159
+ # resp.size_constraint_set.size_constraints[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
1160
+ # resp.size_constraint_set.size_constraints[0].field_to_match.data #=> String
1161
+ # resp.size_constraint_set.size_constraints[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
1162
+ # resp.size_constraint_set.size_constraints[0].comparison_operator #=> String, one of "EQ", "NE", "LE", "LT", "GE", "GT"
1163
+ # resp.size_constraint_set.size_constraints[0].size #=> Integer
1164
+ # @overload get_size_constraint_set(params = {})
1165
+ # @param [Hash] params ({})
1166
+ def get_size_constraint_set(params = {}, options = {})
1167
+ req = build_request(:get_size_constraint_set, params)
1168
+ req.send_request(options)
1169
+ end
1170
+
1171
+ # Returns the SqlInjectionMatchSet that is specified by
1172
+ # `SqlInjectionMatchSetId`.
1173
+ # @option params [required, String] :sql_injection_match_set_id
1174
+ # The `SqlInjectionMatchSetId` of the SqlInjectionMatchSet that you want
1175
+ # to get. `SqlInjectionMatchSetId` is returned by
1176
+ # CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
1177
+ # @return [Types::GetSqlInjectionMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1178
+ #
1179
+ # * {Types::GetSqlInjectionMatchSetResponse#sql_injection_match_set #SqlInjectionMatchSet} => Types::SqlInjectionMatchSet
1180
+ #
1181
+ # @example Request syntax with placeholder values
1182
+ # resp = client.get_sql_injection_match_set({
1183
+ # sql_injection_match_set_id: "ResourceId", # required
1184
+ # })
1185
+ #
1186
+ # @example Response structure
1187
+ # resp.sql_injection_match_set.sql_injection_match_set_id #=> String
1188
+ # resp.sql_injection_match_set.name #=> String
1189
+ # resp.sql_injection_match_set.sql_injection_match_tuples #=> Array
1190
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
1191
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].field_to_match.data #=> String
1192
+ # resp.sql_injection_match_set.sql_injection_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
1193
+ # @overload get_sql_injection_match_set(params = {})
1194
+ # @param [Hash] params ({})
1195
+ def get_sql_injection_match_set(params = {}, options = {})
1196
+ req = build_request(:get_sql_injection_match_set, params)
1197
+ req.send_request(options)
1198
+ end
1199
+
1200
+ # Returns the WebACL that is specified by `WebACLId`.
1201
+ # @option params [required, String] :web_acl_id
1202
+ # The `WebACLId` of the WebACL that you want to get. `WebACLId` is
1203
+ # returned by CreateWebACL and by ListWebACLs.
1204
+ # @return [Types::GetWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1205
+ #
1206
+ # * {Types::GetWebACLResponse#web_acl #WebACL} => Types::WebACL
1207
+ #
1208
+ # @example Request syntax with placeholder values
1209
+ # resp = client.get_web_acl({
1210
+ # web_acl_id: "ResourceId", # required
1211
+ # })
1212
+ #
1213
+ # @example Response structure
1214
+ # resp.web_acl.web_acl_id #=> String
1215
+ # resp.web_acl.name #=> String
1216
+ # resp.web_acl.metric_name #=> String
1217
+ # resp.web_acl.default_action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
1218
+ # resp.web_acl.rules #=> Array
1219
+ # resp.web_acl.rules[0].priority #=> Integer
1220
+ # resp.web_acl.rules[0].rule_id #=> String
1221
+ # resp.web_acl.rules[0].action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
1222
+ # @overload get_web_acl(params = {})
1223
+ # @param [Hash] params ({})
1224
+ def get_web_acl(params = {}, options = {})
1225
+ req = build_request(:get_web_acl, params)
1226
+ req.send_request(options)
1227
+ end
1228
+
1229
+ # Returns the web ACL for the specified resource.
1230
+ # @option params [required, String] :resource_arn
1231
+ # The ARN (Amazon Resource Name) of the resource for which to get the
1232
+ # web ACL.
1233
+ # @return [Types::GetWebACLForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1234
+ #
1235
+ # * {Types::GetWebACLForResourceResponse#web_acl_summary #WebACLSummary} => Types::WebACLSummary
1236
+ #
1237
+ # @example Request syntax with placeholder values
1238
+ # resp = client.get_web_acl_for_resource({
1239
+ # resource_arn: "ResourceArn", # required
1240
+ # })
1241
+ #
1242
+ # @example Response structure
1243
+ # resp.web_acl_summary.web_acl_id #=> String
1244
+ # resp.web_acl_summary.name #=> String
1245
+ # @overload get_web_acl_for_resource(params = {})
1246
+ # @param [Hash] params ({})
1247
+ def get_web_acl_for_resource(params = {}, options = {})
1248
+ req = build_request(:get_web_acl_for_resource, params)
1249
+ req.send_request(options)
1250
+ end
1251
+
1252
+ # Returns the XssMatchSet that is specified by `XssMatchSetId`.
1253
+ # @option params [required, String] :xss_match_set_id
1254
+ # The `XssMatchSetId` of the XssMatchSet that you want to get.
1255
+ # `XssMatchSetId` is returned by CreateXssMatchSet and by
1256
+ # ListXssMatchSets.
1257
+ # @return [Types::GetXssMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1258
+ #
1259
+ # * {Types::GetXssMatchSetResponse#xss_match_set #XssMatchSet} => Types::XssMatchSet
1260
+ #
1261
+ # @example Request syntax with placeholder values
1262
+ # resp = client.get_xss_match_set({
1263
+ # xss_match_set_id: "ResourceId", # required
1264
+ # })
1265
+ #
1266
+ # @example Response structure
1267
+ # resp.xss_match_set.xss_match_set_id #=> String
1268
+ # resp.xss_match_set.name #=> String
1269
+ # resp.xss_match_set.xss_match_tuples #=> Array
1270
+ # resp.xss_match_set.xss_match_tuples[0].field_to_match.type #=> String, one of "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY"
1271
+ # resp.xss_match_set.xss_match_tuples[0].field_to_match.data #=> String
1272
+ # resp.xss_match_set.xss_match_tuples[0].text_transformation #=> String, one of "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE"
1273
+ # @overload get_xss_match_set(params = {})
1274
+ # @param [Hash] params ({})
1275
+ def get_xss_match_set(params = {}, options = {})
1276
+ req = build_request(:get_xss_match_set, params)
1277
+ req.send_request(options)
1278
+ end
1279
+
1280
+ # Returns an array of ByteMatchSetSummary objects.
1281
+ # @option params [String] :next_marker
1282
+ # If you specify a value for `Limit` and you have more `ByteMatchSets`
1283
+ # than the value of `Limit`, AWS WAF returns a `NextMarker` value in the
1284
+ # response that allows you to list another group of `ByteMatchSets`. For
1285
+ # the second and subsequent `ListByteMatchSets` requests, specify the
1286
+ # value of `NextMarker` from the previous response to get information
1287
+ # about another batch of `ByteMatchSets`.
1288
+ # @option params [Integer] :limit
1289
+ # Specifies the number of `ByteMatchSet` objects that you want AWS WAF
1290
+ # to return for this request. If you have more `ByteMatchSets` objects
1291
+ # than the number you specify for `Limit`, the response includes a
1292
+ # `NextMarker` value that you can use to get another batch of
1293
+ # `ByteMatchSet` objects.
1294
+ # @return [Types::ListByteMatchSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1295
+ #
1296
+ # * {Types::ListByteMatchSetsResponse#next_marker #NextMarker} => String
1297
+ # * {Types::ListByteMatchSetsResponse#byte_match_sets #ByteMatchSets} => Array&lt;Types::ByteMatchSetSummary&gt;
1298
+ #
1299
+ # @example Request syntax with placeholder values
1300
+ # resp = client.list_byte_match_sets({
1301
+ # next_marker: "NextMarker",
1302
+ # limit: 1,
1303
+ # })
1304
+ #
1305
+ # @example Response structure
1306
+ # resp.next_marker #=> String
1307
+ # resp.byte_match_sets #=> Array
1308
+ # resp.byte_match_sets[0].byte_match_set_id #=> String
1309
+ # resp.byte_match_sets[0].name #=> String
1310
+ # @overload list_byte_match_sets(params = {})
1311
+ # @param [Hash] params ({})
1312
+ def list_byte_match_sets(params = {}, options = {})
1313
+ req = build_request(:list_byte_match_sets, params)
1314
+ req.send_request(options)
1315
+ end
1316
+
1317
+ # Returns an array of IPSetSummary objects in the response.
1318
+ # @option params [String] :next_marker
1319
+ # If you specify a value for `Limit` and you have more `IPSets` than the
1320
+ # value of `Limit`, AWS WAF returns a `NextMarker` value in the response
1321
+ # that allows you to list another group of `IPSets`. For the second and
1322
+ # subsequent `ListIPSets` requests, specify the value of `NextMarker`
1323
+ # from the previous response to get information about another batch of
1324
+ # `ByteMatchSets`.
1325
+ # @option params [Integer] :limit
1326
+ # Specifies the number of `IPSet` objects that you want AWS WAF to
1327
+ # return for this request. If you have more `IPSet` objects than the
1328
+ # number you specify for `Limit`, the response includes a `NextMarker`
1329
+ # value that you can use to get another batch of `IPSet` objects.
1330
+ # @return [Types::ListIPSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1331
+ #
1332
+ # * {Types::ListIPSetsResponse#next_marker #NextMarker} => String
1333
+ # * {Types::ListIPSetsResponse#ip_sets #IPSets} => Array&lt;Types::IPSetSummary&gt;
1334
+ #
1335
+ # @example Request syntax with placeholder values
1336
+ # resp = client.list_ip_sets({
1337
+ # next_marker: "NextMarker",
1338
+ # limit: 1,
1339
+ # })
1340
+ #
1341
+ # @example Response structure
1342
+ # resp.next_marker #=> String
1343
+ # resp.ip_sets #=> Array
1344
+ # resp.ip_sets[0].ip_set_id #=> String
1345
+ # resp.ip_sets[0].name #=> String
1346
+ # @overload list_ip_sets(params = {})
1347
+ # @param [Hash] params ({})
1348
+ def list_ip_sets(params = {}, options = {})
1349
+ req = build_request(:list_ip_sets, params)
1350
+ req.send_request(options)
1351
+ end
1352
+
1353
+ # Returns an array of resources associated with the specified web ACL.
1354
+ # @option params [required, String] :web_acl_id
1355
+ # The unique identifier (ID) of the web ACL for which to list the
1356
+ # associated resources.
1357
+ # @return [Types::ListResourcesForWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1358
+ #
1359
+ # * {Types::ListResourcesForWebACLResponse#resource_arns #ResourceArns} => Array&lt;String&gt;
1360
+ #
1361
+ # @example Request syntax with placeholder values
1362
+ # resp = client.list_resources_for_web_acl({
1363
+ # web_acl_id: "ResourceId", # required
1364
+ # })
1365
+ #
1366
+ # @example Response structure
1367
+ # resp.resource_arns #=> Array
1368
+ # resp.resource_arns[0] #=> String
1369
+ # @overload list_resources_for_web_acl(params = {})
1370
+ # @param [Hash] params ({})
1371
+ def list_resources_for_web_acl(params = {}, options = {})
1372
+ req = build_request(:list_resources_for_web_acl, params)
1373
+ req.send_request(options)
1374
+ end
1375
+
1376
+ # Returns an array of RuleSummary objects.
1377
+ # @option params [String] :next_marker
1378
+ # If you specify a value for `Limit` and you have more `Rules` than the
1379
+ # value of `Limit`, AWS WAF returns a `NextMarker` value in the response
1380
+ # that allows you to list another group of `Rules`. For the second and
1381
+ # subsequent `ListRules` requests, specify the value of `NextMarker`
1382
+ # from the previous response to get information about another batch of
1383
+ # `Rules`.
1384
+ # @option params [Integer] :limit
1385
+ # Specifies the number of `Rules` that you want AWS WAF to return for
1386
+ # this request. If you have more `Rules` than the number that you
1387
+ # specify for `Limit`, the response includes a `NextMarker` value that
1388
+ # you can use to get another batch of `Rules`.
1389
+ # @return [Types::ListRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1390
+ #
1391
+ # * {Types::ListRulesResponse#next_marker #NextMarker} => String
1392
+ # * {Types::ListRulesResponse#rules #Rules} => Array&lt;Types::RuleSummary&gt;
1393
+ #
1394
+ # @example Request syntax with placeholder values
1395
+ # resp = client.list_rules({
1396
+ # next_marker: "NextMarker",
1397
+ # limit: 1,
1398
+ # })
1399
+ #
1400
+ # @example Response structure
1401
+ # resp.next_marker #=> String
1402
+ # resp.rules #=> Array
1403
+ # resp.rules[0].rule_id #=> String
1404
+ # resp.rules[0].name #=> String
1405
+ # @overload list_rules(params = {})
1406
+ # @param [Hash] params ({})
1407
+ def list_rules(params = {}, options = {})
1408
+ req = build_request(:list_rules, params)
1409
+ req.send_request(options)
1410
+ end
1411
+
1412
+ # Returns an array of SizeConstraintSetSummary objects.
1413
+ # @option params [String] :next_marker
1414
+ # If you specify a value for `Limit` and you have more
1415
+ # `SizeConstraintSets` than the value of `Limit`, AWS WAF returns a
1416
+ # `NextMarker` value in the response that allows you to list another
1417
+ # group of `SizeConstraintSets`. For the second and subsequent
1418
+ # `ListSizeConstraintSets` requests, specify the value of `NextMarker`
1419
+ # from the previous response to get information about another batch of
1420
+ # `SizeConstraintSets`.
1421
+ # @option params [Integer] :limit
1422
+ # Specifies the number of `SizeConstraintSet` objects that you want AWS
1423
+ # WAF to return for this request. If you have more `SizeConstraintSets`
1424
+ # objects than the number you specify for `Limit`, the response includes
1425
+ # a `NextMarker` value that you can use to get another batch of
1426
+ # `SizeConstraintSet` objects.
1427
+ # @return [Types::ListSizeConstraintSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1428
+ #
1429
+ # * {Types::ListSizeConstraintSetsResponse#next_marker #NextMarker} => String
1430
+ # * {Types::ListSizeConstraintSetsResponse#size_constraint_sets #SizeConstraintSets} => Array&lt;Types::SizeConstraintSetSummary&gt;
1431
+ #
1432
+ # @example Request syntax with placeholder values
1433
+ # resp = client.list_size_constraint_sets({
1434
+ # next_marker: "NextMarker",
1435
+ # limit: 1,
1436
+ # })
1437
+ #
1438
+ # @example Response structure
1439
+ # resp.next_marker #=> String
1440
+ # resp.size_constraint_sets #=> Array
1441
+ # resp.size_constraint_sets[0].size_constraint_set_id #=> String
1442
+ # resp.size_constraint_sets[0].name #=> String
1443
+ # @overload list_size_constraint_sets(params = {})
1444
+ # @param [Hash] params ({})
1445
+ def list_size_constraint_sets(params = {}, options = {})
1446
+ req = build_request(:list_size_constraint_sets, params)
1447
+ req.send_request(options)
1448
+ end
1449
+
1450
+ # Returns an array of SqlInjectionMatchSet objects.
1451
+ # @option params [String] :next_marker
1452
+ # If you specify a value for `Limit` and you have more
1453
+ # SqlInjectionMatchSet objects than the value of `Limit`, AWS WAF
1454
+ # returns a `NextMarker` value in the response that allows you to list
1455
+ # another group of `SqlInjectionMatchSets`. For the second and
1456
+ # subsequent `ListSqlInjectionMatchSets` requests, specify the value of
1457
+ # `NextMarker` from the previous response to get information about
1458
+ # another batch of `SqlInjectionMatchSets`.
1459
+ # @option params [Integer] :limit
1460
+ # Specifies the number of SqlInjectionMatchSet objects that you want AWS
1461
+ # WAF to return for this request. If you have more
1462
+ # `SqlInjectionMatchSet` objects than the number you specify for
1463
+ # `Limit`, the response includes a `NextMarker` value that you can use
1464
+ # to get another batch of `Rules`.
1465
+ # @return [Types::ListSqlInjectionMatchSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1466
+ #
1467
+ # * {Types::ListSqlInjectionMatchSetsResponse#next_marker #NextMarker} => String
1468
+ # * {Types::ListSqlInjectionMatchSetsResponse#sql_injection_match_sets #SqlInjectionMatchSets} => Array&lt;Types::SqlInjectionMatchSetSummary&gt;
1469
+ #
1470
+ # @example Request syntax with placeholder values
1471
+ # resp = client.list_sql_injection_match_sets({
1472
+ # next_marker: "NextMarker",
1473
+ # limit: 1,
1474
+ # })
1475
+ #
1476
+ # @example Response structure
1477
+ # resp.next_marker #=> String
1478
+ # resp.sql_injection_match_sets #=> Array
1479
+ # resp.sql_injection_match_sets[0].sql_injection_match_set_id #=> String
1480
+ # resp.sql_injection_match_sets[0].name #=> String
1481
+ # @overload list_sql_injection_match_sets(params = {})
1482
+ # @param [Hash] params ({})
1483
+ def list_sql_injection_match_sets(params = {}, options = {})
1484
+ req = build_request(:list_sql_injection_match_sets, params)
1485
+ req.send_request(options)
1486
+ end
1487
+
1488
+ # Returns an array of WebACLSummary objects in the response.
1489
+ # @option params [String] :next_marker
1490
+ # If you specify a value for `Limit` and you have more `WebACL` objects
1491
+ # than the number that you specify for `Limit`, AWS WAF returns a
1492
+ # `NextMarker` value in the response that allows you to list another
1493
+ # group of `WebACL` objects. For the second and subsequent `ListWebACLs`
1494
+ # requests, specify the value of `NextMarker` from the previous response
1495
+ # to get information about another batch of `WebACL` objects.
1496
+ # @option params [Integer] :limit
1497
+ # Specifies the number of `WebACL` objects that you want AWS WAF to
1498
+ # return for this request. If you have more `WebACL` objects than the
1499
+ # number that you specify for `Limit`, the response includes a
1500
+ # `NextMarker` value that you can use to get another batch of `WebACL`
1501
+ # objects.
1502
+ # @return [Types::ListWebACLsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1503
+ #
1504
+ # * {Types::ListWebACLsResponse#next_marker #NextMarker} => String
1505
+ # * {Types::ListWebACLsResponse#web_acls #WebACLs} => Array&lt;Types::WebACLSummary&gt;
1506
+ #
1507
+ # @example Request syntax with placeholder values
1508
+ # resp = client.list_web_acls({
1509
+ # next_marker: "NextMarker",
1510
+ # limit: 1,
1511
+ # })
1512
+ #
1513
+ # @example Response structure
1514
+ # resp.next_marker #=> String
1515
+ # resp.web_acls #=> Array
1516
+ # resp.web_acls[0].web_acl_id #=> String
1517
+ # resp.web_acls[0].name #=> String
1518
+ # @overload list_web_acls(params = {})
1519
+ # @param [Hash] params ({})
1520
+ def list_web_acls(params = {}, options = {})
1521
+ req = build_request(:list_web_acls, params)
1522
+ req.send_request(options)
1523
+ end
1524
+
1525
+ # Returns an array of XssMatchSet objects.
1526
+ # @option params [String] :next_marker
1527
+ # If you specify a value for `Limit` and you have more XssMatchSet
1528
+ # objects than the value of `Limit`, AWS WAF returns a `NextMarker`
1529
+ # value in the response that allows you to list another group of
1530
+ # `XssMatchSets`. For the second and subsequent `ListXssMatchSets`
1531
+ # requests, specify the value of `NextMarker` from the previous response
1532
+ # to get information about another batch of `XssMatchSets`.
1533
+ # @option params [Integer] :limit
1534
+ # Specifies the number of XssMatchSet objects that you want AWS WAF to
1535
+ # return for this request. If you have more `XssMatchSet` objects than
1536
+ # the number you specify for `Limit`, the response includes a
1537
+ # `NextMarker` value that you can use to get another batch of `Rules`.
1538
+ # @return [Types::ListXssMatchSetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1539
+ #
1540
+ # * {Types::ListXssMatchSetsResponse#next_marker #NextMarker} => String
1541
+ # * {Types::ListXssMatchSetsResponse#xss_match_sets #XssMatchSets} => Array&lt;Types::XssMatchSetSummary&gt;
1542
+ #
1543
+ # @example Request syntax with placeholder values
1544
+ # resp = client.list_xss_match_sets({
1545
+ # next_marker: "NextMarker",
1546
+ # limit: 1,
1547
+ # })
1548
+ #
1549
+ # @example Response structure
1550
+ # resp.next_marker #=> String
1551
+ # resp.xss_match_sets #=> Array
1552
+ # resp.xss_match_sets[0].xss_match_set_id #=> String
1553
+ # resp.xss_match_sets[0].name #=> String
1554
+ # @overload list_xss_match_sets(params = {})
1555
+ # @param [Hash] params ({})
1556
+ def list_xss_match_sets(params = {}, options = {})
1557
+ req = build_request(:list_xss_match_sets, params)
1558
+ req.send_request(options)
1559
+ end
1560
+
1561
+ # Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet.
1562
+ # For each `ByteMatchTuple` object, you specify the following values:
1563
+ #
1564
+ # * Whether to insert or delete the object from the array. If you want
1565
+ # to change a `ByteMatchSetUpdate` object, you delete the existing
1566
+ # object and add a new one.
1567
+ #
1568
+ # * The part of a web request that you want AWS WAF to inspect, such as
1569
+ # a query string or the value of the `User-Agent` header.
1570
+ #
1571
+ # * The bytes (typically a string that corresponds with ASCII
1572
+ # characters) that you want AWS WAF to look for. For more information,
1573
+ # including how you specify the values for the AWS WAF API and the AWS
1574
+ # CLI or SDKs, see `TargetString` in the ByteMatchTuple data type.
1575
+ #
1576
+ # * Where to look, such as at the beginning or the end of a query
1577
+ # string.
1578
+ #
1579
+ # * Whether to perform any conversions on the request, such as
1580
+ # converting it to lowercase, before inspecting it for the specified
1581
+ # string.
1582
+ #
1583
+ # For example, you can add a `ByteMatchSetUpdate` object that matches
1584
+ # web requests in which `User-Agent` headers contain the string
1585
+ # `BadBot`. You can then configure AWS WAF to block those requests.
1586
+ #
1587
+ # To create and configure a `ByteMatchSet`, perform the following steps:
1588
+ #
1589
+ # 1. Create a `ByteMatchSet.` For more information, see
1590
+ # CreateByteMatchSet.
1591
+ #
1592
+ # 2. Use GetChangeToken to get the change token that you provide in the
1593
+ # `ChangeToken` parameter of an `UpdateByteMatchSet` request.
1594
+ #
1595
+ # 3. Submit an `UpdateByteMatchSet` request to specify the part of the
1596
+ # request that you want AWS WAF to inspect (for example, the header
1597
+ # or the URI) and the value that you want AWS WAF to watch for.
1598
+ #
1599
+ # For more information about how to use the AWS WAF API to allow or
1600
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
1601
+ #
1602
+ #
1603
+ #
1604
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
1605
+ # @option params [required, String] :byte_match_set_id
1606
+ # The `ByteMatchSetId` of the ByteMatchSet that you want to update.
1607
+ # `ByteMatchSetId` is returned by CreateByteMatchSet and by
1608
+ # ListByteMatchSets.
1609
+ # @option params [required, String] :change_token
1610
+ # The value returned by the most recent call to GetChangeToken.
1611
+ # @option params [required, Array<Types::ByteMatchSetUpdate>] :updates
1612
+ # An array of `ByteMatchSetUpdate` objects that you want to insert into
1613
+ # or delete from a ByteMatchSet. For more information, see the
1614
+ # applicable data types:
1615
+ #
1616
+ # * ByteMatchSetUpdate: Contains `Action` and `ByteMatchTuple`
1617
+ #
1618
+ # * ByteMatchTuple: Contains `FieldToMatch`, `PositionalConstraint`,
1619
+ # `TargetString`, and `TextTransformation`
1620
+ #
1621
+ # * FieldToMatch: Contains `Data` and `Type`
1622
+ # @return [Types::UpdateByteMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1623
+ #
1624
+ # * {Types::UpdateByteMatchSetResponse#change_token #ChangeToken} => String
1625
+ #
1626
+ # @example Request syntax with placeholder values
1627
+ # resp = client.update_byte_match_set({
1628
+ # byte_match_set_id: "ResourceId", # required
1629
+ # change_token: "ChangeToken", # required
1630
+ # updates: [ # required
1631
+ # {
1632
+ # action: "INSERT", # required, accepts INSERT, DELETE
1633
+ # byte_match_tuple: { # required
1634
+ # field_to_match: { # required
1635
+ # type: "URI", # required, accepts URI, QUERY_STRING, HEADER, METHOD, BODY
1636
+ # data: "MatchFieldData",
1637
+ # },
1638
+ # target_string: "data", # required
1639
+ # text_transformation: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1640
+ # positional_constraint: "EXACTLY", # required, accepts EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, CONTAINS_WORD
1641
+ # },
1642
+ # },
1643
+ # ],
1644
+ # })
1645
+ #
1646
+ # @example Response structure
1647
+ # resp.change_token #=> String
1648
+ # @overload update_byte_match_set(params = {})
1649
+ # @param [Hash] params ({})
1650
+ def update_byte_match_set(params = {}, options = {})
1651
+ req = build_request(:update_byte_match_set, params)
1652
+ req.send_request(options)
1653
+ end
1654
+
1655
+ # Inserts or deletes IPSetDescriptor objects in an `IPSet`. For each
1656
+ # `IPSetDescriptor` object, you specify the following values:
1657
+ #
1658
+ # * Whether to insert or delete the object from the array. If you want
1659
+ # to change an `IPSetDescriptor` object, you delete the existing
1660
+ # object and add a new one.
1661
+ #
1662
+ # * The IP address version, `IPv4` or `IPv6`.
1663
+ #
1664
+ # * The IP address in CIDR notation, for example, `192.0.2.0/24` (for
1665
+ # the range of IP addresses from `192.0.2.0` to `192.0.2.255`) or
1666
+ # `192.0.2.44/32` (for the individual IP address `192.0.2.44`).
1667
+ #
1668
+ # AWS WAF supports /8, /16, /24, and /32 IP address ranges for IPv4, and
1669
+ # /24, /32, /48, /56, /64 and /128 for IPv6. For more information about
1670
+ # CIDR notation, see the Wikipedia entry [Classless Inter-Domain
1671
+ # Routing][1].
1672
+ #
1673
+ # IPv6 addresses can be represented using any of the following formats:
1674
+ #
1675
+ # * 1111:0000:0000:0000:0000:0000:0000:0111/128
1676
+ #
1677
+ # * 1111:0:0:0:0:0:0:0111/128
1678
+ #
1679
+ # * 1111::0111/128
1680
+ #
1681
+ # * 1111::111/128
1682
+ #
1683
+ # You use an `IPSet` to specify which web requests you want to allow or
1684
+ # block based on the IP addresses that the requests originated from. For
1685
+ # example, if you're receiving a lot of requests from one or a small
1686
+ # number of IP addresses and you want to block the requests, you can
1687
+ # create an `IPSet` that specifies those IP addresses, and then
1688
+ # configure AWS WAF to block the requests.
1689
+ #
1690
+ # To create and configure an `IPSet`, perform the following steps:
1691
+ #
1692
+ # 1. Submit a CreateIPSet request.
1693
+ #
1694
+ # 2. Use GetChangeToken to get the change token that you provide in the
1695
+ # `ChangeToken` parameter of an UpdateIPSet request.
1696
+ #
1697
+ # 3. Submit an `UpdateIPSet` request to specify the IP addresses that
1698
+ # you want AWS WAF to watch for.
1699
+ #
1700
+ # When you update an `IPSet`, you specify the IP addresses that you want
1701
+ # to add and/or the IP addresses that you want to delete. If you want to
1702
+ # change an IP address, you delete the existing IP address and add the
1703
+ # new one.
1704
+ #
1705
+ # For more information about how to use the AWS WAF API to allow or
1706
+ # block HTTP requests, see the [AWS WAF Developer Guide][2].
1707
+ #
1708
+ #
1709
+ #
1710
+ # [1]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
1711
+ # [2]: http://docs.aws.amazon.com/waf/latest/developerguide/
1712
+ # @option params [required, String] :ip_set_id
1713
+ # The `IPSetId` of the IPSet that you want to update. `IPSetId` is
1714
+ # returned by CreateIPSet and by ListIPSets.
1715
+ # @option params [required, String] :change_token
1716
+ # The value returned by the most recent call to GetChangeToken.
1717
+ # @option params [required, Array<Types::IPSetUpdate>] :updates
1718
+ # An array of `IPSetUpdate` objects that you want to insert into or
1719
+ # delete from an IPSet. For more information, see the applicable data
1720
+ # types:
1721
+ #
1722
+ # * IPSetUpdate: Contains `Action` and `IPSetDescriptor`
1723
+ #
1724
+ # * IPSetDescriptor: Contains `Type` and `Value`
1725
+ # @return [Types::UpdateIPSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1726
+ #
1727
+ # * {Types::UpdateIPSetResponse#change_token #ChangeToken} => String
1728
+ #
1729
+ # @example Request syntax with placeholder values
1730
+ # resp = client.update_ip_set({
1731
+ # ip_set_id: "ResourceId", # required
1732
+ # change_token: "ChangeToken", # required
1733
+ # updates: [ # required
1734
+ # {
1735
+ # action: "INSERT", # required, accepts INSERT, DELETE
1736
+ # ip_set_descriptor: { # required
1737
+ # type: "IPV4", # required, accepts IPV4, IPV6
1738
+ # value: "IPSetDescriptorValue", # required
1739
+ # },
1740
+ # },
1741
+ # ],
1742
+ # })
1743
+ #
1744
+ # @example Response structure
1745
+ # resp.change_token #=> String
1746
+ # @overload update_ip_set(params = {})
1747
+ # @param [Hash] params ({})
1748
+ def update_ip_set(params = {}, options = {})
1749
+ req = build_request(:update_ip_set, params)
1750
+ req.send_request(options)
1751
+ end
1752
+
1753
+ # Inserts or deletes Predicate objects in a `Rule`. Each `Predicate`
1754
+ # object identifies a predicate, such as a ByteMatchSet or an IPSet,
1755
+ # that specifies the web requests that you want to allow, block, or
1756
+ # count. If you add more than one predicate to a `Rule`, a request must
1757
+ # match all of the specifications to be allowed, blocked, or counted.
1758
+ # For example, suppose you add the following to a `Rule`\:
1759
+ #
1760
+ # * A `ByteMatchSet` that matches the value `BadBot` in the `User-Agent`
1761
+ # header
1762
+ #
1763
+ # * An `IPSet` that matches the IP address `192.0.2.44`
1764
+ #
1765
+ # You then add the `Rule` to a `WebACL` and specify that you want to
1766
+ # block requests that satisfy the `Rule`. For a request to be blocked,
1767
+ # the `User-Agent` header in the request must contain the value `BadBot`
1768
+ # *and* the request must originate from the IP address 192.0.2.44.
1769
+ #
1770
+ # To create and configure a `Rule`, perform the following steps:
1771
+ #
1772
+ # 1. Create and update the predicates that you want to include in the
1773
+ # `Rule`.
1774
+ #
1775
+ # 2. Create the `Rule`. See CreateRule.
1776
+ #
1777
+ # 3. Use `GetChangeToken` to get the change token that you provide in
1778
+ # the `ChangeToken` parameter of an UpdateRule request.
1779
+ #
1780
+ # 4. Submit an `UpdateRule` request to add predicates to the `Rule`.
1781
+ #
1782
+ # 5. Create and update a `WebACL` that contains the `Rule`. See
1783
+ # CreateWebACL.
1784
+ #
1785
+ # If you want to replace one `ByteMatchSet` or `IPSet` with another, you
1786
+ # delete the existing one and add the new one.
1787
+ #
1788
+ # For more information about how to use the AWS WAF API to allow or
1789
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
1790
+ #
1791
+ #
1792
+ #
1793
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
1794
+ # @option params [required, String] :rule_id
1795
+ # The `RuleId` of the `Rule` that you want to update. `RuleId` is
1796
+ # returned by `CreateRule` and by ListRules.
1797
+ # @option params [required, String] :change_token
1798
+ # The value returned by the most recent call to GetChangeToken.
1799
+ # @option params [required, Array<Types::RuleUpdate>] :updates
1800
+ # An array of `RuleUpdate` objects that you want to insert into or
1801
+ # delete from a Rule. For more information, see the applicable data
1802
+ # types:
1803
+ #
1804
+ # * RuleUpdate: Contains `Action` and `Predicate`
1805
+ #
1806
+ # * Predicate: Contains `DataId`, `Negated`, and `Type`
1807
+ #
1808
+ # * FieldToMatch: Contains `Data` and `Type`
1809
+ # @return [Types::UpdateRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1810
+ #
1811
+ # * {Types::UpdateRuleResponse#change_token #ChangeToken} => String
1812
+ #
1813
+ # @example Request syntax with placeholder values
1814
+ # resp = client.update_rule({
1815
+ # rule_id: "ResourceId", # required
1816
+ # change_token: "ChangeToken", # required
1817
+ # updates: [ # required
1818
+ # {
1819
+ # action: "INSERT", # required, accepts INSERT, DELETE
1820
+ # predicate: { # required
1821
+ # negated: false, # required
1822
+ # type: "IPMatch", # required, accepts IPMatch, ByteMatch, SqlInjectionMatch, SizeConstraint, XssMatch
1823
+ # data_id: "ResourceId", # required
1824
+ # },
1825
+ # },
1826
+ # ],
1827
+ # })
1828
+ #
1829
+ # @example Response structure
1830
+ # resp.change_token #=> String
1831
+ # @overload update_rule(params = {})
1832
+ # @param [Hash] params ({})
1833
+ def update_rule(params = {}, options = {})
1834
+ req = build_request(:update_rule, params)
1835
+ req.send_request(options)
1836
+ end
1837
+
1838
+ # Inserts or deletes SizeConstraint objects (filters) in a
1839
+ # SizeConstraintSet. For each `SizeConstraint` object, you specify the
1840
+ # following values:
1841
+ #
1842
+ # * Whether to insert or delete the object from the array. If you want
1843
+ # to change a `SizeConstraintSetUpdate` object, you delete the
1844
+ # existing object and add a new one.
1845
+ #
1846
+ # * The part of a web request that you want AWS WAF to evaluate, such as
1847
+ # the length of a query string or the length of the `User-Agent`
1848
+ # header.
1849
+ #
1850
+ # * Whether to perform any transformations on the request, such as
1851
+ # converting it to lowercase, before checking its length. Note that
1852
+ # transformations of the request body are not supported because the
1853
+ # AWS resource forwards only the first `8192` bytes of your request to
1854
+ # AWS WAF.
1855
+ #
1856
+ # * A `ComparisonOperator` used for evaluating the selected part of the
1857
+ # request against the specified `Size`, such as equals, greater than,
1858
+ # less than, and so on.
1859
+ #
1860
+ # * The length, in bytes, that you want AWS WAF to watch for in selected
1861
+ # part of the request. The length is computed after applying the
1862
+ # transformation.
1863
+ #
1864
+ # For example, you can add a `SizeConstraintSetUpdate` object that
1865
+ # matches web requests in which the length of the `User-Agent` header is
1866
+ # greater than 100 bytes. You can then configure AWS WAF to block those
1867
+ # requests.
1868
+ #
1869
+ # To create and configure a `SizeConstraintSet`, perform the following
1870
+ # steps:
1871
+ #
1872
+ # 1. Create a `SizeConstraintSet.` For more information, see
1873
+ # CreateSizeConstraintSet.
1874
+ #
1875
+ # 2. Use GetChangeToken to get the change token that you provide in the
1876
+ # `ChangeToken` parameter of an `UpdateSizeConstraintSet` request.
1877
+ #
1878
+ # 3. Submit an `UpdateSizeConstraintSet` request to specify the part of
1879
+ # the request that you want AWS WAF to inspect (for example, the
1880
+ # header or the URI) and the value that you want AWS WAF to watch
1881
+ # for.
1882
+ #
1883
+ # For more information about how to use the AWS WAF API to allow or
1884
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
1885
+ #
1886
+ #
1887
+ #
1888
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
1889
+ # @option params [required, String] :size_constraint_set_id
1890
+ # The `SizeConstraintSetId` of the SizeConstraintSet that you want to
1891
+ # update. `SizeConstraintSetId` is returned by CreateSizeConstraintSet
1892
+ # and by ListSizeConstraintSets.
1893
+ # @option params [required, String] :change_token
1894
+ # The value returned by the most recent call to GetChangeToken.
1895
+ # @option params [required, Array<Types::SizeConstraintSetUpdate>] :updates
1896
+ # An array of `SizeConstraintSetUpdate` objects that you want to insert
1897
+ # into or delete from a SizeConstraintSet. For more information, see the
1898
+ # applicable data types:
1899
+ #
1900
+ # * SizeConstraintSetUpdate: Contains `Action` and `SizeConstraint`
1901
+ #
1902
+ # * SizeConstraint: Contains `FieldToMatch`, `TextTransformation`,
1903
+ # `ComparisonOperator`, and `Size`
1904
+ #
1905
+ # * FieldToMatch: Contains `Data` and `Type`
1906
+ # @return [Types::UpdateSizeConstraintSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1907
+ #
1908
+ # * {Types::UpdateSizeConstraintSetResponse#change_token #ChangeToken} => String
1909
+ #
1910
+ # @example Request syntax with placeholder values
1911
+ # resp = client.update_size_constraint_set({
1912
+ # size_constraint_set_id: "ResourceId", # required
1913
+ # change_token: "ChangeToken", # required
1914
+ # updates: [ # required
1915
+ # {
1916
+ # action: "INSERT", # required, accepts INSERT, DELETE
1917
+ # size_constraint: { # required
1918
+ # field_to_match: { # required
1919
+ # type: "URI", # required, accepts URI, QUERY_STRING, HEADER, METHOD, BODY
1920
+ # data: "MatchFieldData",
1921
+ # },
1922
+ # text_transformation: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
1923
+ # comparison_operator: "EQ", # required, accepts EQ, NE, LE, LT, GE, GT
1924
+ # size: 1, # required
1925
+ # },
1926
+ # },
1927
+ # ],
1928
+ # })
1929
+ #
1930
+ # @example Response structure
1931
+ # resp.change_token #=> String
1932
+ # @overload update_size_constraint_set(params = {})
1933
+ # @param [Hash] params ({})
1934
+ def update_size_constraint_set(params = {}, options = {})
1935
+ req = build_request(:update_size_constraint_set, params)
1936
+ req.send_request(options)
1937
+ end
1938
+
1939
+ # Inserts or deletes SqlInjectionMatchTuple objects (filters) in a
1940
+ # SqlInjectionMatchSet. For each `SqlInjectionMatchTuple` object, you
1941
+ # specify the following values:
1942
+ #
1943
+ # * `Action`\: Whether to insert the object into or delete the object
1944
+ # from the array. To change a `SqlInjectionMatchTuple`, you delete the
1945
+ # existing object and add a new one.
1946
+ #
1947
+ # * `FieldToMatch`\: The part of web requests that you want AWS WAF to
1948
+ # inspect and, if you want AWS WAF to inspect a header, the name of
1949
+ # the header.
1950
+ #
1951
+ # * `TextTransformation`\: Which text transformation, if any, to perform
1952
+ # on the web request before inspecting the request for snippets of
1953
+ # malicious SQL code.
1954
+ #
1955
+ # You use `SqlInjectionMatchSet` objects to specify which CloudFront
1956
+ # requests you want to allow, block, or count. For example, if you're
1957
+ # receiving requests that contain snippets of SQL code in the query
1958
+ # string and you want to block the requests, you can create a
1959
+ # `SqlInjectionMatchSet` with the applicable settings, and then
1960
+ # configure AWS WAF to block the requests.
1961
+ #
1962
+ # To create and configure a `SqlInjectionMatchSet`, perform the
1963
+ # following steps:
1964
+ #
1965
+ # 1. Submit a CreateSqlInjectionMatchSet request.
1966
+ #
1967
+ # 2. Use GetChangeToken to get the change token that you provide in the
1968
+ # `ChangeToken` parameter of an UpdateIPSet request.
1969
+ #
1970
+ # 3. Submit an `UpdateSqlInjectionMatchSet` request to specify the
1971
+ # parts of web requests that you want AWS WAF to inspect for
1972
+ # snippets of SQL code.
1973
+ #
1974
+ # For more information about how to use the AWS WAF API to allow or
1975
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
1976
+ #
1977
+ #
1978
+ #
1979
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
1980
+ # @option params [required, String] :sql_injection_match_set_id
1981
+ # The `SqlInjectionMatchSetId` of the `SqlInjectionMatchSet` that you
1982
+ # want to update. `SqlInjectionMatchSetId` is returned by
1983
+ # CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
1984
+ # @option params [required, String] :change_token
1985
+ # The value returned by the most recent call to GetChangeToken.
1986
+ # @option params [required, Array<Types::SqlInjectionMatchSetUpdate>] :updates
1987
+ # An array of `SqlInjectionMatchSetUpdate` objects that you want to
1988
+ # insert into or delete from a SqlInjectionMatchSet. For more
1989
+ # information, see the applicable data types:
1990
+ #
1991
+ # * SqlInjectionMatchSetUpdate: Contains `Action` and
1992
+ # `SqlInjectionMatchTuple`
1993
+ #
1994
+ # * SqlInjectionMatchTuple: Contains `FieldToMatch` and
1995
+ # `TextTransformation`
1996
+ #
1997
+ # * FieldToMatch: Contains `Data` and `Type`
1998
+ # @return [Types::UpdateSqlInjectionMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1999
+ #
2000
+ # * {Types::UpdateSqlInjectionMatchSetResponse#change_token #ChangeToken} => String
2001
+ #
2002
+ # @example Request syntax with placeholder values
2003
+ # resp = client.update_sql_injection_match_set({
2004
+ # sql_injection_match_set_id: "ResourceId", # required
2005
+ # change_token: "ChangeToken", # required
2006
+ # updates: [ # required
2007
+ # {
2008
+ # action: "INSERT", # required, accepts INSERT, DELETE
2009
+ # sql_injection_match_tuple: { # required
2010
+ # field_to_match: { # required
2011
+ # type: "URI", # required, accepts URI, QUERY_STRING, HEADER, METHOD, BODY
2012
+ # data: "MatchFieldData",
2013
+ # },
2014
+ # text_transformation: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
2015
+ # },
2016
+ # },
2017
+ # ],
2018
+ # })
2019
+ #
2020
+ # @example Response structure
2021
+ # resp.change_token #=> String
2022
+ # @overload update_sql_injection_match_set(params = {})
2023
+ # @param [Hash] params ({})
2024
+ def update_sql_injection_match_set(params = {}, options = {})
2025
+ req = build_request(:update_sql_injection_match_set, params)
2026
+ req.send_request(options)
2027
+ end
2028
+
2029
+ # Inserts or deletes ActivatedRule objects in a `WebACL`. Each `Rule`
2030
+ # identifies web requests that you want to allow, block, or count. When
2031
+ # you update a `WebACL`, you specify the following values:
2032
+ #
2033
+ # * A default action for the `WebACL`, either `ALLOW` or `BLOCK`. AWS
2034
+ # WAF performs the default action if a request doesn't match the
2035
+ # criteria in any of the `Rules` in a `WebACL`.
2036
+ #
2037
+ # * The `Rules` that you want to add and/or delete. If you want to
2038
+ # replace one `Rule` with another, you delete the existing `Rule` and
2039
+ # add the new one.
2040
+ #
2041
+ # * For each `Rule`, whether you want AWS WAF to allow requests, block
2042
+ # requests, or count requests that match the conditions in the `Rule`.
2043
+ #
2044
+ # * The order in which you want AWS WAF to evaluate the `Rules` in a
2045
+ # `WebACL`. If you add more than one `Rule` to a `WebACL`, AWS WAF
2046
+ # evaluates each request against the `Rules` in order based on the
2047
+ # value of `Priority`. (The `Rule` that has the lowest value for
2048
+ # `Priority` is evaluated first.) When a web request matches all of
2049
+ # the predicates (such as `ByteMatchSets` and `IPSets`) in a `Rule`,
2050
+ # AWS WAF immediately takes the corresponding action, allow or block,
2051
+ # and doesn't evaluate the request against the remaining `Rules` in
2052
+ # the `WebACL`, if any.
2053
+ #
2054
+ # * The CloudFront distribution that you want to associate with the
2055
+ # `WebACL`.
2056
+ #
2057
+ # To create and configure a `WebACL`, perform the following steps:
2058
+ #
2059
+ # 1. Create and update the predicates that you want to include in
2060
+ # `Rules`. For more information, see CreateByteMatchSet,
2061
+ # UpdateByteMatchSet, CreateIPSet, UpdateIPSet,
2062
+ # CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
2063
+ #
2064
+ # 2. Create and update the `Rules` that you want to include in the
2065
+ # `WebACL`. For more information, see CreateRule and UpdateRule.
2066
+ #
2067
+ # 3. Create a `WebACL`. See CreateWebACL.
2068
+ #
2069
+ # 4. Use `GetChangeToken` to get the change token that you provide in
2070
+ # the `ChangeToken` parameter of an UpdateWebACL request.
2071
+ #
2072
+ # 5. Submit an `UpdateWebACL` request to specify the `Rules` that you
2073
+ # want to include in the `WebACL`, to specify the default action,
2074
+ # and to associate the `WebACL` with a CloudFront distribution.
2075
+ #
2076
+ # For more information about how to use the AWS WAF API to allow or
2077
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
2078
+ #
2079
+ #
2080
+ #
2081
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
2082
+ # @option params [required, String] :web_acl_id
2083
+ # The `WebACLId` of the WebACL that you want to update. `WebACLId` is
2084
+ # returned by CreateWebACL and by ListWebACLs.
2085
+ # @option params [required, String] :change_token
2086
+ # The value returned by the most recent call to GetChangeToken.
2087
+ # @option params [Array<Types::WebACLUpdate>] :updates
2088
+ # An array of updates to make to the WebACL.
2089
+ #
2090
+ # An array of `WebACLUpdate` objects that you want to insert into or
2091
+ # delete from a WebACL. For more information, see the applicable data
2092
+ # types:
2093
+ #
2094
+ # * WebACLUpdate: Contains `Action` and `ActivatedRule`
2095
+ #
2096
+ # * ActivatedRule: Contains `Action`, `Priority`, and `RuleId`
2097
+ #
2098
+ # * WafAction: Contains `Type`
2099
+ # @option params [Types::WafAction] :default_action
2100
+ # A default action for the web ACL, either ALLOW or BLOCK. AWS WAF
2101
+ # performs the default action if a request doesn't match the criteria
2102
+ # in any of the rules in a web ACL.
2103
+ # @return [Types::UpdateWebACLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2104
+ #
2105
+ # * {Types::UpdateWebACLResponse#change_token #ChangeToken} => String
2106
+ #
2107
+ # @example Request syntax with placeholder values
2108
+ # resp = client.update_web_acl({
2109
+ # web_acl_id: "ResourceId", # required
2110
+ # change_token: "ChangeToken", # required
2111
+ # updates: [
2112
+ # {
2113
+ # action: "INSERT", # required, accepts INSERT, DELETE
2114
+ # activated_rule: { # required
2115
+ # priority: 1, # required
2116
+ # rule_id: "ResourceId", # required
2117
+ # action: { # required
2118
+ # type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
2119
+ # },
2120
+ # },
2121
+ # },
2122
+ # ],
2123
+ # default_action: {
2124
+ # type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
2125
+ # },
2126
+ # })
2127
+ #
2128
+ # @example Response structure
2129
+ # resp.change_token #=> String
2130
+ # @overload update_web_acl(params = {})
2131
+ # @param [Hash] params ({})
2132
+ def update_web_acl(params = {}, options = {})
2133
+ req = build_request(:update_web_acl, params)
2134
+ req.send_request(options)
2135
+ end
2136
+
2137
+ # Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet.
2138
+ # For each `XssMatchTuple` object, you specify the following values:
2139
+ #
2140
+ # * `Action`\: Whether to insert the object into or delete the object
2141
+ # from the array. To change a `XssMatchTuple`, you delete the existing
2142
+ # object and add a new one.
2143
+ #
2144
+ # * `FieldToMatch`\: The part of web requests that you want AWS WAF to
2145
+ # inspect and, if you want AWS WAF to inspect a header, the name of
2146
+ # the header.
2147
+ #
2148
+ # * `TextTransformation`\: Which text transformation, if any, to perform
2149
+ # on the web request before inspecting the request for cross-site
2150
+ # scripting attacks.
2151
+ #
2152
+ # You use `XssMatchSet` objects to specify which CloudFront requests you
2153
+ # want to allow, block, or count. For example, if you're receiving
2154
+ # requests that contain cross-site scripting attacks in the request body
2155
+ # and you want to block the requests, you can create an `XssMatchSet`
2156
+ # with the applicable settings, and then configure AWS WAF to block the
2157
+ # requests.
2158
+ #
2159
+ # To create and configure an `XssMatchSet`, perform the following steps:
2160
+ #
2161
+ # 1. Submit a CreateXssMatchSet request.
2162
+ #
2163
+ # 2. Use GetChangeToken to get the change token that you provide in the
2164
+ # `ChangeToken` parameter of an UpdateIPSet request.
2165
+ #
2166
+ # 3. Submit an `UpdateXssMatchSet` request to specify the parts of web
2167
+ # requests that you want AWS WAF to inspect for cross-site scripting
2168
+ # attacks.
2169
+ #
2170
+ # For more information about how to use the AWS WAF API to allow or
2171
+ # block HTTP requests, see the [AWS WAF Developer Guide][1].
2172
+ #
2173
+ #
2174
+ #
2175
+ # [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
2176
+ # @option params [required, String] :xss_match_set_id
2177
+ # The `XssMatchSetId` of the `XssMatchSet` that you want to update.
2178
+ # `XssMatchSetId` is returned by CreateXssMatchSet and by
2179
+ # ListXssMatchSets.
2180
+ # @option params [required, String] :change_token
2181
+ # The value returned by the most recent call to GetChangeToken.
2182
+ # @option params [required, Array<Types::XssMatchSetUpdate>] :updates
2183
+ # An array of `XssMatchSetUpdate` objects that you want to insert into
2184
+ # or delete from a XssMatchSet. For more information, see the applicable
2185
+ # data types:
2186
+ #
2187
+ # * XssMatchSetUpdate: Contains `Action` and `XssMatchTuple`
2188
+ #
2189
+ # * XssMatchTuple: Contains `FieldToMatch` and `TextTransformation`
2190
+ #
2191
+ # * FieldToMatch: Contains `Data` and `Type`
2192
+ # @return [Types::UpdateXssMatchSetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2193
+ #
2194
+ # * {Types::UpdateXssMatchSetResponse#change_token #ChangeToken} => String
2195
+ #
2196
+ # @example Request syntax with placeholder values
2197
+ # resp = client.update_xss_match_set({
2198
+ # xss_match_set_id: "ResourceId", # required
2199
+ # change_token: "ChangeToken", # required
2200
+ # updates: [ # required
2201
+ # {
2202
+ # action: "INSERT", # required, accepts INSERT, DELETE
2203
+ # xss_match_tuple: { # required
2204
+ # field_to_match: { # required
2205
+ # type: "URI", # required, accepts URI, QUERY_STRING, HEADER, METHOD, BODY
2206
+ # data: "MatchFieldData",
2207
+ # },
2208
+ # text_transformation: "NONE", # required, accepts NONE, COMPRESS_WHITE_SPACE, HTML_ENTITY_DECODE, LOWERCASE, CMD_LINE, URL_DECODE
2209
+ # },
2210
+ # },
2211
+ # ],
2212
+ # })
2213
+ #
2214
+ # @example Response structure
2215
+ # resp.change_token #=> String
2216
+ # @overload update_xss_match_set(params = {})
2217
+ # @param [Hash] params ({})
2218
+ def update_xss_match_set(params = {}, options = {})
2219
+ req = build_request(:update_xss_match_set, params)
2220
+ req.send_request(options)
2221
+ end
2222
+
2223
+ # @!endgroup
2224
+
2225
+ # @param params ({})
2226
+ # @api private
2227
+ def build_request(operation_name, params = {})
2228
+ handlers = @handlers.for(operation_name)
2229
+ context = Seahorse::Client::RequestContext.new(
2230
+ operation_name: operation_name,
2231
+ operation: config.api.operation(operation_name),
2232
+ client: self,
2233
+ params: params,
2234
+ config: config)
2235
+ context[:gem_name] = 'aws-sdk-wafregional'
2236
+ context[:gem_version] = '1.0.0.rc2'
2237
+ Seahorse::Client::Request.new(handlers, context)
2238
+ end
2239
+
2240
+ # @api private
2241
+ # @deprecated
2242
+ def waiter_names
2243
+ []
2244
+ end
2245
+
2246
+ class << self
2247
+
2248
+ # @api private
2249
+ attr_reader :identifier
2250
+
2251
+ # @api private
2252
+ def errors_module
2253
+ Errors
2254
+ end
2255
+
2256
+ end
2257
+ end
2258
+ end
2259
+ end