aws-sdk-sns 1.55.0 → 1.60.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c71df1b2aa3b87d7830d1f1f0da8d3f0e77cd4a47bfefcbd0103b5b6345a0e0
4
- data.tar.gz: 94e9f8682965568bb34b3390edbda1e837169b7f8b7c71cc0ee5dc21697b734c
3
+ metadata.gz: 34622e6ec3f2ddc83c0acd26af55107e8064fe244d5782c9ee3185d9beefd8da
4
+ data.tar.gz: d7079d68ac0a9af6505ec04e8d1a081ec58538236f9e08f5f734a26837db7c19
5
5
  SHA512:
6
- metadata.gz: 1748ac289a9df669017f6a77869f5cf04b5c5e91f4576d6519d0c24e5628b2be2e22f526df0f1337930a88e0ea783878bfaa5ed2a7f9ad07eaa8890a59617a12
7
- data.tar.gz: '0994ffbc6518f135eeed5877540a3d30ddc42c9d4aef3f155780c22b3cecab8da234890882859f54624969aaab12d8aa84c63cddbee5158b71520f4eaf277d0e'
6
+ metadata.gz: a0b14856b47ac52e3be0b9f0eac5e0e6fb7e0a9b41ea0c98ecc0db63607e55c8a85cb7d29636b0ca32bc30ae9379041a5554c3497cb6d0faae71e94fed9fbc0e
7
+ data.tar.gz: d07976b97868bef8bdce7d52b7b7bf10bc7200e2a9db8137beedb494345d6091c1d940ec85d93809ab57caea2ee3080f4a5b4e522515b3ce854373fb732d9f76
data/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.60.0 (2023-02-10)
5
+ ------------------
6
+
7
+ * Feature - This release adds support for SNS X-Ray active tracing as well as other updates.
8
+
9
+ 1.59.0 (2023-02-01)
10
+ ------------------
11
+
12
+ * Feature - Additional attributes added for set-topic-attributes.
13
+
14
+ 1.58.0 (2023-01-18)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ * Issue - Replace runtime endpoint resolution approach with generated ruby code.
20
+
21
+ 1.57.0 (2022-12-02)
22
+ ------------------
23
+
24
+ * Feature - This release adds the message payload-filtering feature to the SNS Subscribe, SetSubscriptionAttributes, and GetSubscriptionAttributes API actions
25
+
26
+ 1.56.0 (2022-10-25)
27
+ ------------------
28
+
29
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
30
+
4
31
  1.55.0 (2022-09-07)
5
32
  ------------------
6
33
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.55.0
1
+ 1.60.0
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
30
30
  require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
32
  require 'aws-sdk-core/plugins/recursion_detection.rb'
33
- require 'aws-sdk-core/plugins/signature_v4.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
34
  require 'aws-sdk-core/plugins/protocols/query.rb'
35
35
 
36
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:sns)
@@ -79,8 +79,9 @@ module Aws::SNS
79
79
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
80
  add_plugin(Aws::Plugins::DefaultsMode)
81
81
  add_plugin(Aws::Plugins::RecursionDetection)
82
- add_plugin(Aws::Plugins::SignatureV4)
82
+ add_plugin(Aws::Plugins::Sign)
83
83
  add_plugin(Aws::Plugins::Protocols::Query)
84
+ add_plugin(Aws::SNS::Plugins::Endpoints)
84
85
 
85
86
  # @overload initialize(options)
86
87
  # @param [Hash] options
@@ -287,6 +288,19 @@ module Aws::SNS
287
288
  # ** Please note ** When response stubbing is enabled, no HTTP
288
289
  # requests are made, and retries are disabled.
289
290
  #
291
+ # @option options [Aws::TokenProvider] :token_provider
292
+ # A Bearer Token Provider. This can be an instance of any one of the
293
+ # following classes:
294
+ #
295
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
296
+ # tokens.
297
+ #
298
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
299
+ # access token generated from `aws login`.
300
+ #
301
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
302
+ # will be used to search for tokens configured for your profile in shared configuration files.
303
+ #
290
304
  # @option options [Boolean] :use_dualstack_endpoint
291
305
  # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
306
  # will be used if available.
@@ -300,6 +314,9 @@ module Aws::SNS
300
314
  # When `true`, request parameters are validated before
301
315
  # sending the request.
302
316
  #
317
+ # @option options [Aws::SNS::EndpointProvider] :endpoint_provider
318
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SNS::EndpointParameters`
319
+ #
303
320
  # @option options [URI::HTTP,String] :http_proxy A proxy to send
304
321
  # requests through. Formatted like 'http://proxy.com:123'.
305
322
  #
@@ -355,6 +372,12 @@ module Aws::SNS
355
372
  # for the specified Amazon Web Services accounts to the specified
356
373
  # actions.
357
374
  #
375
+ # <note markdown="1"> To remove the ability to change topic permissions, you must deny
376
+ # permissions to the `AddPermission`, `RemovePermission`, and
377
+ # `SetTopicAttributes` actions in your IAM policy.
378
+ #
379
+ # </note>
380
+ #
358
381
  # @option params [required, String] :topic_arn
359
382
  # The ARN of the topic whose access control policy you wish to modify.
360
383
  #
@@ -703,6 +726,19 @@ module Aws::SNS
703
726
  # * `Policy` – The policy that defines who can access your topic. By
704
727
  # default, only the topic owner can publish or subscribe to the topic.
705
728
  #
729
+ # * `SignatureVersion` – The signature version corresponds to the
730
+ # hashing algorithm used while creating the signature of the
731
+ # notifications, subscription confirmations, or unsubscribe
732
+ # confirmation messages sent by Amazon SNS. By default,
733
+ # `SignatureVersion` is set to `1`.
734
+ #
735
+ # * `TracingConfig` – Tracing mode of an Amazon SNS topic. By default
736
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
737
+ # through the tracing header it receives from an Amazon SNS publisher
738
+ # to its subscriptions. If set to `Active`, Amazon SNS will vend X-Ray
739
+ # segment data to topic owner account if the sampled flag in the
740
+ # tracing header is true. This is only supported on standard topics.
741
+ #
706
742
  # The following attribute applies only to [server-side encryption][1]\:
707
743
  #
708
744
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
@@ -1923,6 +1959,12 @@ module Aws::SNS
1923
1959
 
1924
1960
  # Removes a statement from a topic's access control policy.
1925
1961
  #
1962
+ # <note markdown="1"> To remove the ability to change topic permissions, you must deny
1963
+ # permissions to the `AddPermission`, `RemovePermission`, and
1964
+ # `SetTopicAttributes` actions in your IAM policy.
1965
+ #
1966
+ # </note>
1967
+ #
1926
1968
  # @option params [required, String] :topic_arn
1927
1969
  # The ARN of the topic whose access control policy you wish to modify.
1928
1970
  #
@@ -2238,6 +2280,14 @@ module Aws::SNS
2238
2280
  # receive only a subset of messages, rather than receiving every
2239
2281
  # message published to the topic.
2240
2282
  #
2283
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
2284
+ # scope by using one of the following string value types:
2285
+ #
2286
+ # * `MessageAttributes` (default) – The filter is applied on the
2287
+ # message attributes.
2288
+ #
2289
+ # * `MessageBody` – The filter is applied on the message body.
2290
+ #
2241
2291
  # * `RawMessageDelivery` – When set to `true`, enables raw message
2242
2292
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
2243
2293
  # for the endpoints to process JSON formatting, which is otherwise
@@ -2293,6 +2343,12 @@ module Aws::SNS
2293
2343
 
2294
2344
  # Allows a topic owner to set an attribute of the topic to a new value.
2295
2345
  #
2346
+ # <note markdown="1"> To remove the ability to change topic permissions, you must deny
2347
+ # permissions to the `AddPermission`, `RemovePermission`, and
2348
+ # `SetTopicAttributes` actions in your IAM policy.
2349
+ #
2350
+ # </note>
2351
+ #
2296
2352
  # @option params [required, String] :topic_arn
2297
2353
  # The ARN of the topic to modify.
2298
2354
  #
@@ -2302,6 +2358,10 @@ module Aws::SNS
2302
2358
  # The following lists the names, descriptions, and values of the special
2303
2359
  # request parameters that the `SetTopicAttributes` action uses:
2304
2360
  #
2361
+ # * `ApplicationSuccessFeedbackRoleArn` – Indicates failed message
2362
+ # delivery status for an Amazon SNS topic that is subscribed to a
2363
+ # platform application endpoint.
2364
+ #
2305
2365
  # * `DeliveryPolicy` – The policy that defines how Amazon SNS retries
2306
2366
  # failed deliveries to HTTP/S endpoints.
2307
2367
  #
@@ -2311,16 +2371,119 @@ module Aws::SNS
2311
2371
  # * `Policy` – The policy that defines who can access your topic. By
2312
2372
  # default, only the topic owner can publish or subscribe to the topic.
2313
2373
  #
2314
- # The following attribute applies only to [server-side-encryption][1]\:
2374
+ # * `TracingConfig` Tracing mode of an Amazon SNS topic. By default
2375
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
2376
+ # through the tracing header it receives from an Amazon SNS publisher
2377
+ # to its subscriptions. If set to `Active`, Amazon SNS will vend X-Ray
2378
+ # segment data to topic owner account if the sampled flag in the
2379
+ # tracing header is true. This is only supported on standard topics.
2380
+ #
2381
+ # * HTTP
2382
+ #
2383
+ # * `HTTPSuccessFeedbackRoleArn` – Indicates successful message
2384
+ # delivery status for an Amazon SNS topic that is subscribed to an
2385
+ # HTTP endpoint.
2386
+ #
2387
+ # * `HTTPSuccessFeedbackSampleRate` – Indicates percentage of
2388
+ # successful messages to sample for an Amazon SNS topic that is
2389
+ # subscribed to an HTTP endpoint.
2390
+ #
2391
+ # * `HTTPFailureFeedbackRoleArn` – Indicates failed message delivery
2392
+ # status for an Amazon SNS topic that is subscribed to an HTTP
2393
+ # endpoint.
2394
+ #
2395
+ # * Amazon Kinesis Data Firehose
2396
+ #
2397
+ # * `FirehoseSuccessFeedbackRoleArn` – Indicates successful message
2398
+ # delivery status for an Amazon SNS topic that is subscribed to an
2399
+ # Amazon Kinesis Data Firehose endpoint.
2400
+ #
2401
+ # * `FirehoseSuccessFeedbackSampleRate` – Indicates percentage of
2402
+ # successful messages to sample for an Amazon SNS topic that is
2403
+ # subscribed to an Amazon Kinesis Data Firehose endpoint.
2404
+ #
2405
+ # * `FirehoseFailureFeedbackRoleArn` – Indicates failed message
2406
+ # delivery status for an Amazon SNS topic that is subscribed to an
2407
+ # Amazon Kinesis Data Firehose endpoint.
2408
+ #
2409
+ # * Lambda
2410
+ #
2411
+ # * `LambdaSuccessFeedbackRoleArn` – Indicates successful message
2412
+ # delivery status for an Amazon SNS topic that is subscribed to an
2413
+ # Lambda endpoint.
2414
+ #
2415
+ # * `LambdaSuccessFeedbackSampleRate` – Indicates percentage of
2416
+ # successful messages to sample for an Amazon SNS topic that is
2417
+ # subscribed to an Lambda endpoint.
2418
+ #
2419
+ # * `LambdaFailureFeedbackRoleArn` – Indicates failed message delivery
2420
+ # status for an Amazon SNS topic that is subscribed to an Lambda
2421
+ # endpoint.
2422
+ #
2423
+ # * Platform application endpoint
2424
+ #
2425
+ # * `ApplicationSuccessFeedbackRoleArn` – Indicates successful message
2426
+ # delivery status for an Amazon SNS topic that is subscribed to an
2427
+ # Amazon Web Services application endpoint.
2428
+ #
2429
+ # * `ApplicationSuccessFeedbackSampleRate` – Indicates percentage of
2430
+ # successful messages to sample for an Amazon SNS topic that is
2431
+ # subscribed to an Amazon Web Services application endpoint.
2432
+ #
2433
+ # * `ApplicationFailureFeedbackRoleArn` – Indicates failed message
2434
+ # delivery status for an Amazon SNS topic that is subscribed to an
2435
+ # Amazon Web Services application endpoint.
2436
+ #
2437
+ # <note markdown="1"> In addition to being able to configure topic attributes for message
2438
+ # delivery status of notification messages sent to Amazon SNS
2439
+ # application endpoints, you can also configure application attributes
2440
+ # for the delivery status of push notification messages sent to push
2441
+ # notification services.
2442
+ #
2443
+ # For example, For more information, see [Using Amazon SNS Application
2444
+ # Attributes for Message Delivery Status][1].
2445
+ #
2446
+ # </note>
2447
+ #
2448
+ # * Amazon SQS
2449
+ #
2450
+ # * `SQSSuccessFeedbackRoleArn` – Indicates successful message
2451
+ # delivery status for an Amazon SNS topic that is subscribed to an
2452
+ # Amazon SQS endpoint.
2453
+ #
2454
+ # * `SQSSuccessFeedbackSampleRate` – Indicates percentage of
2455
+ # successful messages to sample for an Amazon SNS topic that is
2456
+ # subscribed to an Amazon SQS endpoint.
2457
+ #
2458
+ # * `SQSFailureFeedbackRoleArn` – Indicates failed message delivery
2459
+ # status for an Amazon SNS topic that is subscribed to an Amazon SQS
2460
+ # endpoint.
2461
+ #
2462
+ # <note markdown="1"> The &lt;ENDPOINT&gt;SuccessFeedbackRoleArn and
2463
+ # &lt;ENDPOINT&gt;FailureFeedbackRoleArn attributes are used to give
2464
+ # Amazon SNS write access to use CloudWatch Logs on your behalf. The
2465
+ # &lt;ENDPOINT&gt;SuccessFeedbackSampleRate attribute is for specifying
2466
+ # the sample rate percentage (0-100) of successfully delivered messages.
2467
+ # After you configure the &lt;ENDPOINT&gt;FailureFeedbackRoleArn
2468
+ # attribute, then all failed message deliveries generate CloudWatch
2469
+ # Logs.
2470
+ #
2471
+ # </note>
2472
+ #
2473
+ # The following attribute applies only to [server-side-encryption][2]\:
2315
2474
  #
2316
2475
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
2317
2476
  # master key (CMK) for Amazon SNS or a custom CMK. For more
2318
- # information, see [Key Terms][2]. For more examples, see [KeyId][3]
2477
+ # information, see [Key Terms][3]. For more examples, see [KeyId][4]
2319
2478
  # in the *Key Management Service API Reference*.
2320
2479
  #
2321
- # ^
2480
+ # * `SignatureVersion` – The signature version corresponds to the
2481
+ # hashing algorithm used while creating the signature of the
2482
+ # notifications, subscription confirmations, or unsubscribe
2483
+ # confirmation messages sent by Amazon SNS. By default,
2484
+ # `SignatureVersion` is set to `1`.
2322
2485
  #
2323
- # The following attribute applies only to [FIFO topics][4]\:
2486
+ # The following attribute applies only to [FIFO topics][5]\:
2324
2487
  #
2325
2488
  # * `ContentBasedDeduplication` – Enables content-based deduplication
2326
2489
  # for FIFO topics.
@@ -2328,7 +2491,7 @@ module Aws::SNS
2328
2491
  # * By default, `ContentBasedDeduplication` is set to `false`. If you
2329
2492
  # create a FIFO topic and this attribute is `false`, you must
2330
2493
  # specify a value for the `MessageDeduplicationId` parameter for the
2331
- # [Publish][5] action.
2494
+ # [Publish][6] action.
2332
2495
  #
2333
2496
  # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
2334
2497
  # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
@@ -2340,11 +2503,12 @@ module Aws::SNS
2340
2503
  #
2341
2504
  #
2342
2505
  #
2343
- # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
2344
- # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
2345
- # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
2346
- # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
2347
- # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
2506
+ # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html
2507
+ # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
2508
+ # [3]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
2509
+ # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
2510
+ # [5]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
2511
+ # [6]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
2348
2512
  #
2349
2513
  # @option params [String] :attribute_value
2350
2514
  # The new value for the attribute.
@@ -2446,6 +2610,14 @@ module Aws::SNS
2446
2610
  # receive only a subset of messages, rather than receiving every
2447
2611
  # message published to the topic.
2448
2612
  #
2613
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
2614
+ # scope by using one of the following string value types:
2615
+ #
2616
+ # * `MessageAttributes` (default) – The filter is applied on the
2617
+ # message attributes.
2618
+ #
2619
+ # * `MessageBody` – The filter is applied on the message body.
2620
+ #
2449
2621
  # * `RawMessageDelivery` – When set to `true`, enables raw message
2450
2622
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
2451
2623
  # for the endpoints to process JSON formatting, which is otherwise
@@ -2583,6 +2755,12 @@ module Aws::SNS
2583
2755
  # is delivered to the endpoint, so that the endpoint owner can easily
2584
2756
  # resubscribe to the topic if the `Unsubscribe` request was unintended.
2585
2757
  #
2758
+ # <note markdown="1"> Amazon SQS queue subscriptions require authentication for deletion.
2759
+ # Only the owner of the subscription, or the owner of the topic can
2760
+ # unsubscribe using the required Amazon Web Services signature.
2761
+ #
2762
+ # </note>
2763
+ #
2586
2764
  # This action is throttled at 100 transactions per second (TPS).
2587
2765
  #
2588
2766
  # @option params [required, String] :subscription_arn
@@ -2691,7 +2869,7 @@ module Aws::SNS
2691
2869
  params: params,
2692
2870
  config: config)
2693
2871
  context[:gem_name] = 'aws-sdk-sns'
2694
- context[:gem_version] = '1.55.0'
2872
+ context[:gem_version] = '1.60.0'
2695
2873
  Seahorse::Client::Request.new(handlers, context)
2696
2874
  end
2697
2875
 
@@ -0,0 +1,66 @@
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::SNS
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
19
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ if self[:use_dual_stack].nil?
56
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
+ end
58
+ self[:use_fips] = options[:use_fips]
59
+ self[:use_fips] = false if self[:use_fips].nil?
60
+ if self[:use_fips].nil?
61
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
+ end
63
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,60 @@
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::SNS
11
+ class EndpointProvider
12
+ def resolve_endpoint(parameters)
13
+ region = parameters.region
14
+ use_dual_stack = parameters.use_dual_stack
15
+ use_fips = parameters.use_fips
16
+ endpoint = parameters.endpoint
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
18
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
+ end
21
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-east-1")
37
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.us-gov-east-1.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-west-1")
40
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.us-gov-west-1.amazonaws.com", headers: {}, properties: {})
41
+ end
42
+ return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
43
+ end
44
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
45
+ end
46
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
47
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
48
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
49
+ end
50
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
51
+ end
52
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
53
+ end
54
+ end
55
+ raise ArgumentError, "Invalid Configuration: Missing Region"
56
+ raise ArgumentError, 'No endpoint could be resolved'
57
+
58
+ end
59
+ end
60
+ end