aws-sdk-abusesignal 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,531 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::AbuseSignal
11
+ module Types
12
+
13
+ # The caller does not have sufficient access to perform this operation.
14
+ # Verify that the caller has the specific IAM permission for the
15
+ # operation it is calling (for example, `abuse:CreateAbuseReport`,
16
+ # `abuse:GetAbuseReportStatus`, or `abuse:ListAbuseReportStatuses`).
17
+ # Grant only the actions each caller requires.
18
+ #
19
+ # @!attribute [rw] message
20
+ # A description of the access-denied error.
21
+ # @return [String]
22
+ #
23
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/AccessDeniedException AWS API Documentation
24
+ #
25
+ class AccessDeniedException < Struct.new(
26
+ :message)
27
+ SENSITIVE = []
28
+ include Aws::Structure
29
+ end
30
+
31
+ # The request conflicts with the current state of the resource. For
32
+ # example, an idempotency token was reused with a different payload.
33
+ #
34
+ # @!attribute [rw] message
35
+ # A description of the conflict.
36
+ # @return [String]
37
+ #
38
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ConflictException AWS API Documentation
39
+ #
40
+ class ConflictException < Struct.new(
41
+ :message)
42
+ SENSITIVE = []
43
+ include Aws::Structure
44
+ end
45
+
46
+ # The input for a CreateAbuseReport request. Provide the report in XARF
47
+ # format, and optionally your own correlation ID and idempotency token.
48
+ #
49
+ # @!attribute [rw] report
50
+ # The abuse report data in XARF format. Provide the report under the
51
+ # `xarf` key.
52
+ # @return [Types::ReportData]
53
+ #
54
+ # @!attribute [rw] correlation_id
55
+ # An optional correlation ID for tracking the report in the
56
+ # reporter's system. The service echoes this value back in responses,
57
+ # and you can use it to filter reports with ListAbuseReportStatuses.
58
+ # @return [String]
59
+ #
60
+ # @!attribute [rw] client_token
61
+ # An optional, client-provided idempotency token that ensures the
62
+ # operation completes no more than once. If the token matches a
63
+ # previous request within 24 hours, the service returns the existing
64
+ # report ID instead of creating a new report. When you omit this
65
+ # token, the service automatically generates one that is scoped to a
66
+ # 5-minute window.
67
+ # @return [String]
68
+ #
69
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/CreateAbuseReportRequest AWS API Documentation
70
+ #
71
+ class CreateAbuseReportRequest < Struct.new(
72
+ :report,
73
+ :correlation_id,
74
+ :client_token)
75
+ SENSITIVE = [:report]
76
+ include Aws::Structure
77
+ end
78
+
79
+ # The response from a CreateAbuseReport request. Contains the identifier
80
+ # that Amazon Web Services assigned to your report, which you use to
81
+ # track it.
82
+ #
83
+ # @!attribute [rw] report_id
84
+ # The unique identifier assigned to the submitted abuse report. Use
85
+ # this ID with GetAbuseReportStatus to track processing.
86
+ # @return [String]
87
+ #
88
+ # @!attribute [rw] correlation_id
89
+ # The correlation ID that you provided in the request, if any. The
90
+ # service echoes this value back in the response.
91
+ # @return [String]
92
+ #
93
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/CreateAbuseReportResponse AWS API Documentation
94
+ #
95
+ class CreateAbuseReportResponse < Struct.new(
96
+ :report_id,
97
+ :correlation_id)
98
+ SENSITIVE = []
99
+ include Aws::Structure
100
+ end
101
+
102
+ # The input for a GetAbuseReportStatus request. Identifies the abuse
103
+ # report whose status you want to retrieve.
104
+ #
105
+ # @!attribute [rw] report_id
106
+ # The unique identifier of the abuse report to retrieve status for.
107
+ # This is the `reportId` that is returned by CreateAbuseReport.
108
+ # @return [String]
109
+ #
110
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/GetAbuseReportStatusRequest AWS API Documentation
111
+ #
112
+ class GetAbuseReportStatusRequest < Struct.new(
113
+ :report_id)
114
+ SENSITIVE = []
115
+ include Aws::Structure
116
+ end
117
+
118
+ # The response from a GetAbuseReportStatus request. Contains the
119
+ # report's current status, when you submitted it, and when its status
120
+ # last changed.
121
+ #
122
+ # @!attribute [rw] report_id
123
+ # The unique identifier of the abuse report.
124
+ # @return [String]
125
+ #
126
+ # @!attribute [rw] correlation_id
127
+ # The reporter-provided correlation ID for cross-referencing.
128
+ # @return [String]
129
+ #
130
+ # @!attribute [rw] status
131
+ # The current processing status of the abuse report. Valid values are
132
+ # `QUEUED` (the report has been received and queued for processing),
133
+ # `PROCESSING` (the report has been received and is being processed),
134
+ # and `COMPLETED` (downstream resolution is finished).
135
+ # @return [String]
136
+ #
137
+ # @!attribute [rw] description
138
+ # A human-readable description of the current status.
139
+ # @return [String]
140
+ #
141
+ # @!attribute [rw] reason_code
142
+ # A code that explains the resolution outcome. This value is returned
143
+ # only after the report reaches the terminal `COMPLETED` status; it is
144
+ # absent while the report is `QUEUED` or `PROCESSING`. Treat an
145
+ # unrecognized value as opaque, because the set of reason codes is
146
+ # append-only.
147
+ # @return [String]
148
+ #
149
+ # @!attribute [rw] submitted_at
150
+ # The date and time when the abuse report was submitted.
151
+ # @return [Time]
152
+ #
153
+ # @!attribute [rw] last_updated_at
154
+ # The date and time when the status was last updated.
155
+ # @return [Time]
156
+ #
157
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/GetAbuseReportStatusResponse AWS API Documentation
158
+ #
159
+ class GetAbuseReportStatusResponse < Struct.new(
160
+ :report_id,
161
+ :correlation_id,
162
+ :status,
163
+ :description,
164
+ :reason_code,
165
+ :submitted_at,
166
+ :last_updated_at)
167
+ SENSITIVE = []
168
+ include Aws::Structure
169
+ end
170
+
171
+ # An unexpected error occurred during the processing of the request.
172
+ # This error is retryable; check the `Retry-After` header before you
173
+ # retry.
174
+ #
175
+ # @!attribute [rw] message
176
+ # A description of the error.
177
+ # @return [String]
178
+ #
179
+ # @!attribute [rw] retry_after_seconds
180
+ # The number of seconds to wait before you retry the request. The
181
+ # service also returns this value in the `Retry-After` HTTP header.
182
+ # @return [Integer]
183
+ #
184
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/InternalServerException AWS API Documentation
185
+ #
186
+ class InternalServerException < Struct.new(
187
+ :message,
188
+ :retry_after_seconds)
189
+ SENSITIVE = []
190
+ include Aws::Structure
191
+ end
192
+
193
+ # The input for a ListAbuseReportStatuses request. Use it to filter
194
+ # results by correlation ID and to page through them.
195
+ #
196
+ # @!attribute [rw] correlation_id
197
+ # Filters results by the reporter-provided correlation ID.
198
+ # @return [String]
199
+ #
200
+ # @!attribute [rw] next_token
201
+ # The pagination token for retrieving the next page of results. Omit
202
+ # this parameter to return the first page of results.
203
+ # @return [String]
204
+ #
205
+ # @!attribute [rw] max_results
206
+ # The maximum number of results to return in a single page. Valid
207
+ # range: 1–50. The default is 50.
208
+ # @return [Integer]
209
+ #
210
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ListAbuseReportStatusesRequest AWS API Documentation
211
+ #
212
+ class ListAbuseReportStatusesRequest < Struct.new(
213
+ :correlation_id,
214
+ :next_token,
215
+ :max_results)
216
+ SENSITIVE = []
217
+ include Aws::Structure
218
+ end
219
+
220
+ # The response from a ListAbuseReportStatuses request. Contains one page
221
+ # of abuse report statuses and, when more results remain, a token for
222
+ # retrieving the next page.
223
+ #
224
+ # @!attribute [rw] reports
225
+ # A list of abuse report status items. This list is empty when no
226
+ # reports are found for the calling account, or when no reports match
227
+ # the specified `correlationId` filter.
228
+ # @return [Array<Types::ReportStatusListItem>]
229
+ #
230
+ # @!attribute [rw] next_token
231
+ # The pagination token for the next page of results. This value is
232
+ # `null` when there are no more results.
233
+ # @return [String]
234
+ #
235
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ListAbuseReportStatusesResponse AWS API Documentation
236
+ #
237
+ class ListAbuseReportStatusesResponse < Struct.new(
238
+ :reports,
239
+ :next_token)
240
+ SENSITIVE = []
241
+ include Aws::Structure
242
+ end
243
+
244
+ # The abuse report data in XARF format. This is a union type, so exactly
245
+ # one member must be specified.
246
+ #
247
+ # @note ReportData is a union - when making an API calls you must set exactly one of the members.
248
+ #
249
+ # @!attribute [rw] xarf
250
+ # A JSON object that conforms to the XARF v4 specification. At a
251
+ # minimum, the document must include the XARF core fields, including
252
+ # the required `category` and `type` fields that classify the report
253
+ # (for example, `category` `content` with `type` `phishing`). For the
254
+ # XARF core fields and detailed schema definitions of each report
255
+ # type, see the [XARF v4 Technical Specification on the XARF
256
+ # website][1].
257
+ #
258
+ # <note markdown="1"> Never include images, video, or copies of child sexual abuse or
259
+ # child sexual exploitation material in a report, in any field and for
260
+ # any report type. Send URLs, hash values, and reference identifiers
261
+ # only.
262
+ #
263
+ # </note>
264
+ #
265
+ # If you suspect that activity is illegal, use the XARF `description`
266
+ # field to explain why and name the laws concerned.
267
+ #
268
+ # **Testing your integration**
269
+ #
270
+ # To test your integration, add the tag `lifecycle:test` to the
271
+ # report. Amazon Web Services validates test reports and returns a
272
+ # report ID and status in the same way as other reports, but doesn't
273
+ # process them as abuse reports. Amazon Web Services deletes test
274
+ # reports shortly after submission.
275
+ #
276
+ # Use test values only, such as example.com and the IP address ranges
277
+ # reserved for documentation (192.0.2.0/24, 198.51.100.0/24 and
278
+ # 203.0.113.0/24). Don't add this tag to a real abuse report.
279
+ #
280
+ # Tag keys that begin with `aws:` are reserved.
281
+ #
282
+ #
283
+ #
284
+ # [1]: https://xarf.org/docs/specification/
285
+ # @return [Hash,Array,String,Numeric,Boolean]
286
+ #
287
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ReportData AWS API Documentation
288
+ #
289
+ class ReportData < Struct.new(
290
+ :xarf,
291
+ :unknown)
292
+ SENSITIVE = []
293
+ include Aws::Structure
294
+ include Aws::Structure::Union
295
+
296
+ class Xarf < ReportData; end
297
+ class Unknown < ReportData; end
298
+ end
299
+
300
+ # Status information for an individual abuse report. The
301
+ # ListAbuseReportStatuses operation returns this structure in its
302
+ # reports list.
303
+ #
304
+ # @!attribute [rw] report_id
305
+ # The unique identifier of the abuse report.
306
+ # @return [String]
307
+ #
308
+ # @!attribute [rw] correlation_id
309
+ # The reporter-provided correlation ID for cross-referencing.
310
+ # @return [String]
311
+ #
312
+ # @!attribute [rw] status
313
+ # The current processing status of the abuse report. Valid values are
314
+ # `QUEUED` (the report has been received and queued for processing),
315
+ # `PROCESSING` (the report has been received and is being processed),
316
+ # and `COMPLETED` (downstream resolution is finished).
317
+ # @return [String]
318
+ #
319
+ # @!attribute [rw] description
320
+ # A human-readable description of the status.
321
+ # @return [String]
322
+ #
323
+ # @!attribute [rw] reason_code
324
+ # A code that explains the resolution outcome. This value is present
325
+ # only after the report reaches the terminal `COMPLETED` status; it is
326
+ # absent while the report is `QUEUED` or `PROCESSING`.
327
+ # @return [String]
328
+ #
329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ReportStatusListItem AWS API Documentation
330
+ #
331
+ class ReportStatusListItem < Struct.new(
332
+ :report_id,
333
+ :correlation_id,
334
+ :status,
335
+ :description,
336
+ :reason_code)
337
+ SENSITIVE = []
338
+ include Aws::Structure
339
+ end
340
+
341
+ # The specified resource was not found. Verify that the `reportId` is
342
+ # correct.
343
+ #
344
+ # @!attribute [rw] message
345
+ # A description of the error.
346
+ # @return [String]
347
+ #
348
+ # @!attribute [rw] resource_id
349
+ # The identifier of the resource that was not found.
350
+ # @return [String]
351
+ #
352
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ResourceNotFoundException AWS API Documentation
353
+ #
354
+ class ResourceNotFoundException < Struct.new(
355
+ :message,
356
+ :resource_id)
357
+ SENSITIVE = []
358
+ include Aws::Structure
359
+ end
360
+
361
+ # Describes one specific submission requirement that a well-formed
362
+ # report did not meet. The service returns this structure in the
363
+ # `unmetRequirements` list of a `SubmissionRequirementException` (HTTP
364
+ # 422).
365
+ #
366
+ # @!attribute [rw] code
367
+ # A stable, dot-namespaced identifier for the submission requirement
368
+ # that the report did not meet (for example,
369
+ # `rule.timestamp.too_old`). The set of codes is append-only, so treat
370
+ # an unrecognized value as opaque. This value is absent when the
371
+ # requirement that the report did not meet does not publish an
372
+ # identifier.
373
+ #
374
+ # The service checks the following submission requirements:
375
+ #
376
+ # * `rule.source_identifier.too_long` (`source_identifier`) – The
377
+ # value exceeds the maximum accepted length of 253 characters (the
378
+ # DNS hostname limit).
379
+ #
380
+ # * `rule.source_identifier.forbidden_characters`
381
+ # (`source_identifier`) – The value contains characters that are
382
+ # never valid in an address (`{`, `}`, `*`, or `` ` ``). These are
383
+ # common template-injection and command-injection markers.
384
+ #
385
+ # * `rule.source_identifier.malformed` (`source_identifier`) – The
386
+ # value is not a valid IPv4 address, IPv6 address, URL, or domain
387
+ # name.
388
+ #
389
+ # * `rule.timestamp.unparseable` (`timestamp`) – The value could not
390
+ # be parsed as an RFC 3339 date-time.
391
+ #
392
+ # * `rule.timestamp.in_future` (`timestamp`) – The value is dated
393
+ # further into the future than the accepted clock-skew tolerance (a
394
+ # default of 1 hour).
395
+ #
396
+ # * `rule.timestamp.too_old` (`timestamp`) – The value predates the
397
+ # submission lookback window (a default of 90 days). For content
398
+ # that is still accessible, set `timestamp` to the time you most
399
+ # recently observed it.
400
+ #
401
+ # * `rule.evidence.content_type_mismatch` (`evidence`) – The decoded
402
+ # payload of an evidence item does not match its declared
403
+ # `content_type`. The `path` identifies the item, for example
404
+ # `/evidence/0`.
405
+ #
406
+ # Submission requirement thresholds are configuration-driven and can
407
+ # change over time. The set of codes is append-only, so treat an
408
+ # unrecognized code as opaque.
409
+ # @return [String]
410
+ #
411
+ # @!attribute [rw] path
412
+ # A JSON Pointer expression to the report member that did not meet the
413
+ # requirement. An empty string refers to the report as a whole.
414
+ # @return [String]
415
+ #
416
+ # @!attribute [rw] message
417
+ # A detailed, human-readable description of the unmet submission
418
+ # requirement.
419
+ # @return [String]
420
+ #
421
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/SubmissionRequirement AWS API Documentation
422
+ #
423
+ class SubmissionRequirement < Struct.new(
424
+ :code,
425
+ :path,
426
+ :message)
427
+ SENSITIVE = []
428
+ include Aws::Structure
429
+ end
430
+
431
+ # The report is well-formed and satisfies the XARF schema, but it does
432
+ # not meet one or more submission requirements (for example, the
433
+ # submission lookback window or `source_identifier` restrictions). This
434
+ # error is distinct from `ValidationException` (HTTP 400), which
435
+ # indicates that the report is not well-formed. Retrying the same report
436
+ # will not succeed; the report content must change.
437
+ #
438
+ # @!attribute [rw] message
439
+ # A summary of the unmet submission requirements.
440
+ # @return [String]
441
+ #
442
+ # @!attribute [rw] unmet_requirements
443
+ # A list of the specific submission requirements that the report did
444
+ # not meet.
445
+ # @return [Array<Types::SubmissionRequirement>]
446
+ #
447
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/SubmissionRequirementException AWS API Documentation
448
+ #
449
+ class SubmissionRequirementException < Struct.new(
450
+ :message,
451
+ :unmet_requirements)
452
+ SENSITIVE = []
453
+ include Aws::Structure
454
+ end
455
+
456
+ # The request was denied due to request throttling. This error is
457
+ # retryable; retry with exponential backoff.
458
+ #
459
+ # @!attribute [rw] message
460
+ # A description of the throttling error.
461
+ # @return [String]
462
+ #
463
+ # @!attribute [rw] service_code
464
+ # The code for the Amazon Web Services service that is associated with
465
+ # the quota that was exceeded.
466
+ # @return [String]
467
+ #
468
+ # @!attribute [rw] quota_code
469
+ # The code for the service quota that was exceeded.
470
+ # @return [String]
471
+ #
472
+ # @!attribute [rw] retry_after_seconds
473
+ # The number of seconds to wait before you retry the request. The
474
+ # service also returns this value in the `Retry-After` HTTP header.
475
+ # @return [Integer]
476
+ #
477
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ThrottlingException AWS API Documentation
478
+ #
479
+ class ThrottlingException < Struct.new(
480
+ :message,
481
+ :service_code,
482
+ :quota_code,
483
+ :retry_after_seconds)
484
+ SENSITIVE = []
485
+ include Aws::Structure
486
+ end
487
+
488
+ # The input fails to satisfy the constraints specified by the service,
489
+ # which indicates that the request is not well-formed. Check `fieldList`
490
+ # for the specific members that failed validation.
491
+ #
492
+ # @!attribute [rw] message
493
+ # A summary of the validation failure.
494
+ # @return [String]
495
+ #
496
+ # @!attribute [rw] field_list
497
+ # A list of the specific input fields that failed validation.
498
+ # @return [Array<Types::ValidationExceptionField>]
499
+ #
500
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ValidationException AWS API Documentation
501
+ #
502
+ class ValidationException < Struct.new(
503
+ :message,
504
+ :field_list)
505
+ SENSITIVE = []
506
+ include Aws::Structure
507
+ end
508
+
509
+ # Describes one specific validation failure for an input member.
510
+ #
511
+ # @!attribute [rw] path
512
+ # A JSON Pointer expression to the structure member whose value failed
513
+ # to satisfy the modeled constraints.
514
+ # @return [String]
515
+ #
516
+ # @!attribute [rw] message
517
+ # A detailed description of the validation failure.
518
+ # @return [String]
519
+ #
520
+ # @see http://docs.aws.amazon.com/goto/WebAPI/abuse-signal-2026-01-12/ValidationExceptionField AWS API Documentation
521
+ #
522
+ class ValidationExceptionField < Struct.new(
523
+ :path,
524
+ :message)
525
+ SENSITIVE = []
526
+ include Aws::Structure
527
+ end
528
+
529
+ end
530
+ end
531
+
@@ -0,0 +1,133 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'aws-sdk-core/waiters'
11
+
12
+ module Aws::AbuseSignal
13
+ # Waiters are utility methods that poll for a particular state to occur
14
+ # on a client. Waiters can fail after a number of attempts at a polling
15
+ # interval defined for the service client.
16
+ #
17
+ # For a list of operations that can be waited for and the
18
+ # client methods called for each operation, see the table below or the
19
+ # {Client#wait_until} field documentation for the {Client}.
20
+ #
21
+ # # Invoking a Waiter
22
+ # To invoke a waiter, call #wait_until on a {Client}. The first parameter
23
+ # is the waiter name, which is specific to the service client and indicates
24
+ # which operation is being waited for. The second parameter is a hash of
25
+ # parameters that are passed to the client method called by the waiter,
26
+ # which varies according to the waiter name.
27
+ #
28
+ # # Wait Failures
29
+ # To catch errors in a waiter, use WaiterFailed,
30
+ # as shown in the following example.
31
+ #
32
+ # rescue rescue Aws::Waiters::Errors::WaiterFailed => error
33
+ # puts "failed waiting for instance running: #{error.message}
34
+ # end
35
+ #
36
+ # # Configuring a Waiter
37
+ # Each waiter has a default polling interval and a maximum number of
38
+ # attempts it will make before returning control to your program.
39
+ # To set these values, use the `max_attempts` and `delay` parameters
40
+ # in your `#wait_until` call.
41
+ # The following example waits for up to 25 seconds, polling every five seconds.
42
+ #
43
+ # client.wait_until(...) do |w|
44
+ # w.max_attempts = 5
45
+ # w.delay = 5
46
+ # end
47
+ #
48
+ # To disable wait failures, set the value of either of these parameters
49
+ # to `nil`.
50
+ #
51
+ # # Extending a Waiter
52
+ # To modify the behavior of waiters, you can register callbacks that are
53
+ # triggered before each polling attempt and before waiting.
54
+ #
55
+ # The following example implements an exponential backoff in a waiter
56
+ # by doubling the amount of time to wait on every attempt.
57
+ #
58
+ # client.wait_until(...) do |w|
59
+ # w.interval = 0 # disable normal sleep
60
+ # w.before_wait do |n, resp|
61
+ # sleep(n ** 2)
62
+ # end
63
+ # end
64
+ #
65
+ # # Available Waiters
66
+ #
67
+ # The following table lists the valid waiter names, the operations they call,
68
+ # and the default `:delay` and `:max_attempts` values.
69
+ #
70
+ # | waiter_name | params | :delay | :max_attempts |
71
+ # | ----------------- | -------------------------------- | -------- | ------------- |
72
+ # | report_processing | {Client#get_abuse_report_status} | 1 | 5 |
73
+ #
74
+ module Waiters
75
+
76
+ # Wait until an abuse report has at least reached PROCESSING.
77
+ #
78
+ # A report advances QUEUED -> PROCESSING -> COMPLETED. A report can
79
+ # go from QUEUED all the way to COMPLETED in well under a second,
80
+ # so a poller that only accepts PROCESSING can miss the transient
81
+ # PROCESSING window entirely and then poll forever. COMPLETED
82
+ # therefore also satisfies this waiter: it implies the report already
83
+ # passed through PROCESSING.
84
+ class ReportProcessing
85
+
86
+ # @param [Hash] options
87
+ # @option options [required, Client] :client
88
+ # @option options [Integer] :max_attempts (5)
89
+ # @option options [Integer] :delay (1)
90
+ # @option options [Proc] :before_attempt
91
+ # @option options [Proc] :before_wait
92
+ def initialize(options)
93
+ @client = options.fetch(:client)
94
+ @waiter = Aws::Waiters::Waiter.new({
95
+ max_attempts: 5,
96
+ delay: 1,
97
+ poller: Aws::Waiters::Poller.new(
98
+ operation_name: :get_abuse_report_status,
99
+ acceptors: [
100
+ {
101
+ "matcher" => "path",
102
+ "argument" => "status",
103
+ "state" => "success",
104
+ "expected" => "PROCESSING"
105
+ },
106
+ {
107
+ "matcher" => "path",
108
+ "argument" => "status",
109
+ "state" => "success",
110
+ "expected" => "COMPLETED"
111
+ },
112
+ {
113
+ "matcher" => "error",
114
+ "state" => "retry",
115
+ "expected" => "ResourceNotFoundException"
116
+ }
117
+ ]
118
+ )
119
+ }.merge(options))
120
+ end
121
+
122
+ # @option (see Client#get_abuse_report_status)
123
+ # @return (see Client#get_abuse_report_status)
124
+ def wait(params = {})
125
+ @waiter.wait(client: @client, params: params)
126
+ end
127
+
128
+ # @api private
129
+ attr_reader :waiter
130
+
131
+ end
132
+ end
133
+ end