aws-sdk-sns 1.40.0 → 1.41.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.
@@ -42,6 +42,7 @@ module Aws::SNS
42
42
  # * {KMSOptInRequired}
43
43
  # * {KMSThrottlingException}
44
44
  # * {NotFoundException}
45
+ # * {OptedOutException}
45
46
  # * {PlatformApplicationDisabledException}
46
47
  # * {ResourceNotFoundException}
47
48
  # * {StaleTagException}
@@ -50,6 +51,9 @@ module Aws::SNS
50
51
  # * {TagPolicyException}
51
52
  # * {ThrottledException}
52
53
  # * {TopicLimitExceededException}
54
+ # * {UserErrorException}
55
+ # * {ValidationException}
56
+ # * {VerificationException}
53
57
  #
54
58
  # Additionally, error classes are dynamically generated for service errors based on the error code
55
59
  # if they are not defined above.
@@ -282,6 +286,21 @@ module Aws::SNS
282
286
  end
283
287
  end
284
288
 
289
+ class OptedOutException < ServiceError
290
+
291
+ # @param [Seahorse::Client::RequestContext] context
292
+ # @param [String] message
293
+ # @param [Aws::SNS::Types::OptedOutException] data
294
+ def initialize(context, message, data = Aws::EmptyStructure.new)
295
+ super(context, message, data)
296
+ end
297
+
298
+ # @return [String]
299
+ def message
300
+ @message || @data[:message]
301
+ end
302
+ end
303
+
285
304
  class PlatformApplicationDisabledException < ServiceError
286
305
 
287
306
  # @param [Seahorse::Client::RequestContext] context
@@ -402,5 +421,55 @@ module Aws::SNS
402
421
  end
403
422
  end
404
423
 
424
+ class UserErrorException < ServiceError
425
+
426
+ # @param [Seahorse::Client::RequestContext] context
427
+ # @param [String] message
428
+ # @param [Aws::SNS::Types::UserErrorException] data
429
+ def initialize(context, message, data = Aws::EmptyStructure.new)
430
+ super(context, message, data)
431
+ end
432
+
433
+ # @return [String]
434
+ def message
435
+ @message || @data[:message]
436
+ end
437
+ end
438
+
439
+ class ValidationException < ServiceError
440
+
441
+ # @param [Seahorse::Client::RequestContext] context
442
+ # @param [String] message
443
+ # @param [Aws::SNS::Types::ValidationException] data
444
+ def initialize(context, message, data = Aws::EmptyStructure.new)
445
+ super(context, message, data)
446
+ end
447
+
448
+ # @return [String]
449
+ def message
450
+ @message || @data[:message]
451
+ end
452
+ end
453
+
454
+ class VerificationException < ServiceError
455
+
456
+ # @param [Seahorse::Client::RequestContext] context
457
+ # @param [String] message
458
+ # @param [Aws::SNS::Types::VerificationException] data
459
+ def initialize(context, message, data = Aws::EmptyStructure.new)
460
+ super(context, message, data)
461
+ end
462
+
463
+ # @return [String]
464
+ def message
465
+ @message || @data[:message]
466
+ end
467
+
468
+ # @return [String]
469
+ def status
470
+ @data[:status]
471
+ end
472
+ end
473
+
405
474
  end
406
475
  end
@@ -54,7 +54,7 @@ module Aws::SNS
54
54
  # APNS (Apple Push Notification Service), APNS\_SANDBOX, and GCM
55
55
  # (Firebase Cloud Messaging).
56
56
  # @option options [required, Hash<String,String>] :attributes
57
- # For a list of attributes, see [SetPlatformApplicationAttributes][1]
57
+ # For a list of attributes, see [SetPlatformApplicationAttributes][1].
58
58
  #
59
59
  #
60
60
  #
@@ -109,9 +109,9 @@ module Aws::SNS
109
109
  # * `Policy` – The policy that defines who can access your topic. By
110
110
  # default, only the topic owner can publish or subscribe to the topic.
111
111
  #
112
- # The following attribute applies only to [server-side-encryption][1]\:
112
+ # The following attribute applies only to [server-side encryption][1]\:
113
113
  #
114
- # * `KmsMasterKeyId` – The ID of an AWS-managed customer master key
114
+ # * `KmsMasterKeyId` – The ID of an AWS managed customer master key
115
115
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
116
116
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
117
117
  # Management Service API Reference*.
@@ -135,8 +135,8 @@ module Aws::SNS
135
135
  # the body of the message (but not the attributes of the message).
136
136
  #
137
137
  # (Optional) To override the generated value, you can specify a
138
- # value for the the `MessageDeduplicationId` parameter for the
139
- # `Publish` action.
138
+ # value for the `MessageDeduplicationId` parameter for the `Publish`
139
+ # action.
140
140
  #
141
141
  #
142
142
  #
@@ -88,8 +88,8 @@ module Aws::SNS
88
88
  # the body of the message (but not the attributes of the message).
89
89
  #
90
90
  # (Optional) To override the generated value, you can specify a
91
- # value for the the `MessageDeduplicationId` parameter for the
92
- # `Publish` action.
91
+ # value for the `MessageDeduplicationId` parameter for the `Publish`
92
+ # action.
93
93
  #
94
94
  #
95
95
  #
@@ -403,8 +403,8 @@ module Aws::SNS
403
403
  # the body of the message (but not the attributes of the message).
404
404
  #
405
405
  # (Optional) To override the generated value, you can specify a
406
- # value for the the `MessageDeduplicationId` parameter for the
407
- # `Publish` action.
406
+ # value for the `MessageDeduplicationId` parameter for the `Publish`
407
+ # action.
408
408
  #
409
409
  #
410
410
  #
@@ -211,7 +211,7 @@ module Aws::SNS
211
211
  # @return [String]
212
212
  #
213
213
  # @!attribute [rw] attributes
214
- # For a list of attributes, see [SetPlatformApplicationAttributes][1]
214
+ # For a list of attributes, see [SetPlatformApplicationAttributes][1].
215
215
  #
216
216
  #
217
217
  #
@@ -295,6 +295,38 @@ module Aws::SNS
295
295
  include Aws::Structure
296
296
  end
297
297
 
298
+ # @note When making an API call, you may pass CreateSMSSandboxPhoneNumberInput
299
+ # data as a hash:
300
+ #
301
+ # {
302
+ # phone_number: "PhoneNumberString", # required
303
+ # language_code: "en-US", # accepts en-US, en-GB, es-419, es-ES, de-DE, fr-CA, fr-FR, it-IT, ja-JP, pt-BR, kr-KR, zh-CN, zh-TW
304
+ # }
305
+ #
306
+ # @!attribute [rw] phone_number
307
+ # The destination phone number to verify. On verification, Amazon SNS
308
+ # adds this phone number to the list of verified phone numbers that
309
+ # you can send SMS messages to.
310
+ # @return [String]
311
+ #
312
+ # @!attribute [rw] language_code
313
+ # The language to use for sending the OTP. The default value is
314
+ # `en-US`.
315
+ # @return [String]
316
+ #
317
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateSMSSandboxPhoneNumberInput AWS API Documentation
318
+ #
319
+ class CreateSMSSandboxPhoneNumberInput < Struct.new(
320
+ :phone_number,
321
+ :language_code)
322
+ SENSITIVE = []
323
+ include Aws::Structure
324
+ end
325
+
326
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateSMSSandboxPhoneNumberResult AWS API Documentation
327
+ #
328
+ class CreateSMSSandboxPhoneNumberResult < Aws::EmptyStructure; end
329
+
298
330
  # Input for CreateTopic action.
299
331
  #
300
332
  # @note When making an API call, you may pass CreateTopicInput
@@ -342,10 +374,10 @@ module Aws::SNS
342
374
  # default, only the topic owner can publish or subscribe to the
343
375
  # topic.
344
376
  #
345
- # The following attribute applies only to
346
- # [server-side-encryption][1]\:
377
+ # The following attribute applies only to [server-side
378
+ # encryption][1]\:
347
379
  #
348
- # * `KmsMasterKeyId` – The ID of an AWS-managed customer master key
380
+ # * `KmsMasterKeyId` – The ID of an AWS managed customer master key
349
381
  # (CMK) for Amazon SNS or a custom CMK. For more information, see
350
382
  # [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
351
383
  # Management Service API Reference*.
@@ -370,7 +402,7 @@ module Aws::SNS
370
402
  # message).
371
403
  #
372
404
  # (Optional) To override the generated value, you can specify a
373
- # value for the the `MessageDeduplicationId` parameter for the
405
+ # value for the `MessageDeduplicationId` parameter for the
374
406
  # `Publish` action.
375
407
  #
376
408
  #
@@ -457,6 +489,29 @@ module Aws::SNS
457
489
  include Aws::Structure
458
490
  end
459
491
 
492
+ # @note When making an API call, you may pass DeleteSMSSandboxPhoneNumberInput
493
+ # data as a hash:
494
+ #
495
+ # {
496
+ # phone_number: "PhoneNumberString", # required
497
+ # }
498
+ #
499
+ # @!attribute [rw] phone_number
500
+ # The destination phone number to delete.
501
+ # @return [String]
502
+ #
503
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteSMSSandboxPhoneNumberInput AWS API Documentation
504
+ #
505
+ class DeleteSMSSandboxPhoneNumberInput < Struct.new(
506
+ :phone_number)
507
+ SENSITIVE = []
508
+ include Aws::Structure
509
+ end
510
+
511
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteSMSSandboxPhoneNumberResult AWS API Documentation
512
+ #
513
+ class DeleteSMSSandboxPhoneNumberResult < Aws::EmptyStructure; end
514
+
460
515
  # @note When making an API call, you may pass DeleteTopicInput
461
516
  # data as a hash:
462
517
  #
@@ -670,6 +725,24 @@ module Aws::SNS
670
725
  include Aws::Structure
671
726
  end
672
727
 
728
+ # @api private
729
+ #
730
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSSandboxAccountStatusInput AWS API Documentation
731
+ #
732
+ class GetSMSSandboxAccountStatusInput < Aws::EmptyStructure; end
733
+
734
+ # @!attribute [rw] is_in_sandbox
735
+ # Indicates whether the calling account is in the SMS sandbox.
736
+ # @return [Boolean]
737
+ #
738
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSSandboxAccountStatusResult AWS API Documentation
739
+ #
740
+ class GetSMSSandboxAccountStatusResult < Struct.new(
741
+ :is_in_sandbox)
742
+ SENSITIVE = []
743
+ include Aws::Structure
744
+ end
745
+
673
746
  # Input for GetSubscriptionAttributes.
674
747
  #
675
748
  # @note When making an API call, you may pass GetSubscriptionAttributesInput
@@ -843,7 +916,7 @@ module Aws::SNS
843
916
  # message).
844
917
  #
845
918
  # (Optional) To override the generated value, you can specify a
846
- # value for the the `MessageDeduplicationId` parameter for the
919
+ # value for the `MessageDeduplicationId` parameter for the
847
920
  # `Publish` action.
848
921
  #
849
922
  #
@@ -1064,6 +1137,51 @@ module Aws::SNS
1064
1137
  include Aws::Structure
1065
1138
  end
1066
1139
 
1140
+ # @note When making an API call, you may pass ListOriginationNumbersRequest
1141
+ # data as a hash:
1142
+ #
1143
+ # {
1144
+ # next_token: "nextToken",
1145
+ # max_results: 1,
1146
+ # }
1147
+ #
1148
+ # @!attribute [rw] next_token
1149
+ # Token that the previous `ListOriginationNumbers` request returns.
1150
+ # @return [String]
1151
+ #
1152
+ # @!attribute [rw] max_results
1153
+ # The maximum number of origination numbers to return.
1154
+ # @return [Integer]
1155
+ #
1156
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListOriginationNumbersRequest AWS API Documentation
1157
+ #
1158
+ class ListOriginationNumbersRequest < Struct.new(
1159
+ :next_token,
1160
+ :max_results)
1161
+ SENSITIVE = []
1162
+ include Aws::Structure
1163
+ end
1164
+
1165
+ # @!attribute [rw] next_token
1166
+ # A `NextToken` string is returned when you call the
1167
+ # `ListOriginationNumbers` operation if additional pages of records
1168
+ # are available.
1169
+ # @return [String]
1170
+ #
1171
+ # @!attribute [rw] phone_numbers
1172
+ # A list of the calling account's verified and pending origination
1173
+ # numbers.
1174
+ # @return [Array<Types::PhoneNumberInformation>]
1175
+ #
1176
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListOriginationNumbersResult AWS API Documentation
1177
+ #
1178
+ class ListOriginationNumbersResult < Struct.new(
1179
+ :next_token,
1180
+ :phone_numbers)
1181
+ SENSITIVE = []
1182
+ include Aws::Structure
1183
+ end
1184
+
1067
1185
  # The input for the `ListPhoneNumbersOptedOut` action.
1068
1186
  #
1069
1187
  # @note When making an API call, you may pass ListPhoneNumbersOptedOutInput
@@ -1155,6 +1273,51 @@ module Aws::SNS
1155
1273
  include Aws::Structure
1156
1274
  end
1157
1275
 
1276
+ # @note When making an API call, you may pass ListSMSSandboxPhoneNumbersInput
1277
+ # data as a hash:
1278
+ #
1279
+ # {
1280
+ # next_token: "nextToken",
1281
+ # max_results: 1,
1282
+ # }
1283
+ #
1284
+ # @!attribute [rw] next_token
1285
+ # Token that the previous `ListSMSSandboxPhoneNumbersInput` request
1286
+ # returns.
1287
+ # @return [String]
1288
+ #
1289
+ # @!attribute [rw] max_results
1290
+ # The maximum number of phone numbers to return.
1291
+ # @return [Integer]
1292
+ #
1293
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSMSSandboxPhoneNumbersInput AWS API Documentation
1294
+ #
1295
+ class ListSMSSandboxPhoneNumbersInput < Struct.new(
1296
+ :next_token,
1297
+ :max_results)
1298
+ SENSITIVE = []
1299
+ include Aws::Structure
1300
+ end
1301
+
1302
+ # @!attribute [rw] phone_numbers
1303
+ # A list of the calling account's pending and verified phone numbers.
1304
+ # @return [Array<Types::SMSSandboxPhoneNumber>]
1305
+ #
1306
+ # @!attribute [rw] next_token
1307
+ # A `NextToken` string is returned when you call the
1308
+ # `ListSMSSandboxPhoneNumbersInput` operation if additional pages of
1309
+ # records are available.
1310
+ # @return [String]
1311
+ #
1312
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSMSSandboxPhoneNumbersResult AWS API Documentation
1313
+ #
1314
+ class ListSMSSandboxPhoneNumbersResult < Struct.new(
1315
+ :phone_numbers,
1316
+ :next_token)
1317
+ SENSITIVE = []
1318
+ include Aws::Structure
1319
+ end
1320
+
1158
1321
  # Input for ListSubscriptionsByTopic action.
1159
1322
  #
1160
1323
  # @note When making an API call, you may pass ListSubscriptionsByTopicInput
@@ -1414,6 +1577,61 @@ module Aws::SNS
1414
1577
  #
1415
1578
  class OptInPhoneNumberResponse < Aws::EmptyStructure; end
1416
1579
 
1580
+ # Indicates that the specified phone number opted out of receiving SMS
1581
+ # messages from your AWS account. You can't send SMS messages to phone
1582
+ # numbers that opt out.
1583
+ #
1584
+ # @!attribute [rw] message
1585
+ # @return [String]
1586
+ #
1587
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/OptedOutException AWS API Documentation
1588
+ #
1589
+ class OptedOutException < Struct.new(
1590
+ :message)
1591
+ SENSITIVE = []
1592
+ include Aws::Structure
1593
+ end
1594
+
1595
+ # A list of phone numbers and their metadata.
1596
+ #
1597
+ # @!attribute [rw] created_at
1598
+ # The date and time when the phone number was created.
1599
+ # @return [Time]
1600
+ #
1601
+ # @!attribute [rw] phone_number
1602
+ # The phone number.
1603
+ # @return [String]
1604
+ #
1605
+ # @!attribute [rw] status
1606
+ # The status of the phone number.
1607
+ # @return [String]
1608
+ #
1609
+ # @!attribute [rw] iso_2_country_code
1610
+ # The two-character code for the country or region, in ISO 3166-1
1611
+ # alpha-2 format.
1612
+ # @return [String]
1613
+ #
1614
+ # @!attribute [rw] route_type
1615
+ # The list of supported routes.
1616
+ # @return [String]
1617
+ #
1618
+ # @!attribute [rw] number_capabilities
1619
+ # The capabilities of each phone number.
1620
+ # @return [Array<String>]
1621
+ #
1622
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/PhoneNumberInformation AWS API Documentation
1623
+ #
1624
+ class PhoneNumberInformation < Struct.new(
1625
+ :created_at,
1626
+ :phone_number,
1627
+ :status,
1628
+ :iso_2_country_code,
1629
+ :route_type,
1630
+ :number_capabilities)
1631
+ SENSITIVE = []
1632
+ include Aws::Structure
1633
+ end
1634
+
1417
1635
  # Platform application object.
1418
1636
  #
1419
1637
  # @!attribute [rw] platform_application_arn
@@ -1682,7 +1900,8 @@ module Aws::SNS
1682
1900
  include Aws::Structure
1683
1901
  end
1684
1902
 
1685
- # Can't tag resource. Verify that the topic exists.
1903
+ # Cant perform the action on the specified resource. Make sure that the
1904
+ # resource exists.
1686
1905
  #
1687
1906
  # @!attribute [rw] message
1688
1907
  # @return [String]
@@ -1695,6 +1914,39 @@ module Aws::SNS
1695
1914
  include Aws::Structure
1696
1915
  end
1697
1916
 
1917
+ # A verified or pending destination phone number in the SMS sandbox.
1918
+ #
1919
+ # When you start using Amazon SNS to send SMS messages, your AWS account
1920
+ # is in the *SMS sandbox*. The SMS sandbox provides a safe environment
1921
+ # for you to try Amazon SNS features without risking your reputation as
1922
+ # an SMS sender. While your account is in the SMS sandbox, you can use
1923
+ # all of the features of Amazon SNS. However, you can send SMS messages
1924
+ # only to verified destination phone numbers. For more information,
1925
+ # including how to move out of the sandbox to send messages without
1926
+ # restrictions, see [SMS sandbox][1] in the *Amazon SNS Developer
1927
+ # Guide*.
1928
+ #
1929
+ #
1930
+ #
1931
+ # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html
1932
+ #
1933
+ # @!attribute [rw] phone_number
1934
+ # The destination phone number.
1935
+ # @return [String]
1936
+ #
1937
+ # @!attribute [rw] status
1938
+ # The destination phone number's verification status.
1939
+ # @return [String]
1940
+ #
1941
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SMSSandboxPhoneNumber AWS API Documentation
1942
+ #
1943
+ class SMSSandboxPhoneNumber < Struct.new(
1944
+ :phone_number,
1945
+ :status)
1946
+ SENSITIVE = []
1947
+ include Aws::Structure
1948
+ end
1949
+
1698
1950
  # Input for SetEndpointAttributes action.
1699
1951
  #
1700
1952
  # @note When making an API call, you may pass SetEndpointAttributesInput
@@ -2046,7 +2298,7 @@ module Aws::SNS
2046
2298
  # message).
2047
2299
  #
2048
2300
  # (Optional) To override the generated value, you can specify a
2049
- # value for the the `MessageDeduplicationId` parameter for the
2301
+ # value for the `MessageDeduplicationId` parameter for the
2050
2302
  # `Publish` action.
2051
2303
  #
2052
2304
  #
@@ -2485,5 +2737,83 @@ module Aws::SNS
2485
2737
  #
2486
2738
  class UntagResourceResponse < Aws::EmptyStructure; end
2487
2739
 
2740
+ # Indicates that a request parameter does not comply with the associated
2741
+ # constraints.
2742
+ #
2743
+ # @!attribute [rw] message
2744
+ # @return [String]
2745
+ #
2746
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/UserErrorException AWS API Documentation
2747
+ #
2748
+ class UserErrorException < Struct.new(
2749
+ :message)
2750
+ SENSITIVE = []
2751
+ include Aws::Structure
2752
+ end
2753
+
2754
+ # Indicates that a parameter in the request is invalid.
2755
+ #
2756
+ # @!attribute [rw] message
2757
+ # @return [String]
2758
+ #
2759
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ValidationException AWS API Documentation
2760
+ #
2761
+ class ValidationException < Struct.new(
2762
+ :message)
2763
+ SENSITIVE = []
2764
+ include Aws::Structure
2765
+ end
2766
+
2767
+ # Indicates that the one-time password (OTP) used for verification is
2768
+ # invalid.
2769
+ #
2770
+ # @!attribute [rw] message
2771
+ # @return [String]
2772
+ #
2773
+ # @!attribute [rw] status
2774
+ # The status of the verification error.
2775
+ # @return [String]
2776
+ #
2777
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/VerificationException AWS API Documentation
2778
+ #
2779
+ class VerificationException < Struct.new(
2780
+ :message,
2781
+ :status)
2782
+ SENSITIVE = []
2783
+ include Aws::Structure
2784
+ end
2785
+
2786
+ # @note When making an API call, you may pass VerifySMSSandboxPhoneNumberInput
2787
+ # data as a hash:
2788
+ #
2789
+ # {
2790
+ # phone_number: "PhoneNumberString", # required
2791
+ # one_time_password: "OTPCode", # required
2792
+ # }
2793
+ #
2794
+ # @!attribute [rw] phone_number
2795
+ # The destination phone number to verify.
2796
+ # @return [String]
2797
+ #
2798
+ # @!attribute [rw] one_time_password
2799
+ # The OTP sent to the destination number from the
2800
+ # `CreateSMSSandBoxPhoneNumber` call.
2801
+ # @return [String]
2802
+ #
2803
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/VerifySMSSandboxPhoneNumberInput AWS API Documentation
2804
+ #
2805
+ class VerifySMSSandboxPhoneNumberInput < Struct.new(
2806
+ :phone_number,
2807
+ :one_time_password)
2808
+ SENSITIVE = []
2809
+ include Aws::Structure
2810
+ end
2811
+
2812
+ # The destination phone number's verification status.
2813
+ #
2814
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/VerifySMSSandboxPhoneNumberResult AWS API Documentation
2815
+ #
2816
+ class VerifySMSSandboxPhoneNumberResult < Aws::EmptyStructure; end
2817
+
2488
2818
  end
2489
2819
  end