aws-sdk-pricingplanmanager 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,1384 @@
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 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
+
39
+ module Aws::PricingPlanManager
40
+ # An API client for PricingPlanManager. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::PricingPlanManager::Client.new(
43
+ # region: region_name,
44
+ # credentials: credentials,
45
+ # # ...
46
+ # )
47
+ #
48
+ # For details on configuring region and credentials see
49
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
50
+ #
51
+ # See {#initialize} for a full list of supported configuration options.
52
+ class Client < Seahorse::Client::Base
53
+
54
+ include Aws::ClientStubs
55
+
56
+ @identifier = :pricingplanmanager
57
+
58
+ set_api(ClientApi::API)
59
+
60
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
61
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
62
+ add_plugin(Aws::Plugins::Logging)
63
+ add_plugin(Aws::Plugins::ParamConverter)
64
+ add_plugin(Aws::Plugins::ParamValidator)
65
+ add_plugin(Aws::Plugins::UserAgent)
66
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
67
+ add_plugin(Aws::Plugins::RetryErrors)
68
+ add_plugin(Aws::Plugins::GlobalConfiguration)
69
+ add_plugin(Aws::Plugins::RegionalEndpoint)
70
+ add_plugin(Aws::Plugins::EndpointDiscovery)
71
+ add_plugin(Aws::Plugins::EndpointPattern)
72
+ add_plugin(Aws::Plugins::ResponsePaging)
73
+ add_plugin(Aws::Plugins::StubResponses)
74
+ add_plugin(Aws::Plugins::IdempotencyToken)
75
+ add_plugin(Aws::Plugins::InvocationId)
76
+ add_plugin(Aws::Plugins::JsonvalueConverter)
77
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
78
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
79
+ add_plugin(Aws::Plugins::TransferEncoding)
80
+ add_plugin(Aws::Plugins::HttpChecksum)
81
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
82
+ add_plugin(Aws::Plugins::RequestCompression)
83
+ add_plugin(Aws::Plugins::DefaultsMode)
84
+ add_plugin(Aws::Plugins::RecursionDetection)
85
+ add_plugin(Aws::Plugins::Telemetry)
86
+ add_plugin(Aws::Plugins::Sign)
87
+ add_plugin(Aws::Plugins::Protocols::RestJson)
88
+ add_plugin(Aws::PricingPlanManager::Plugins::Endpoints)
89
+
90
+ # @overload initialize(options)
91
+ # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
97
+ # @option options [required, Aws::CredentialProvider] :credentials
98
+ # Your AWS credentials used for authentication. This can be any class that includes and implements
99
+ # `Aws::CredentialProvider`, or instance of any one of the following classes:
100
+ #
101
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
102
+ # credentials.
103
+ #
104
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
105
+ # shared file, such as `~/.aws/config`.
106
+ #
107
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ #
109
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
110
+ # assume a role after providing credentials via the web.
111
+ #
112
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
113
+ # access token generated from `aws login`.
114
+ #
115
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
116
+ # process that outputs to stdout.
117
+ #
118
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
119
+ # from an EC2 IMDS on an EC2 instance.
120
+ #
121
+ # * `Aws::ECSCredentials` - Used for loading credentials from
122
+ # instances running in ECS.
123
+ #
124
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
125
+ # from the Cognito Identity service.
126
+ #
127
+ # When `:credentials` are not configured directly, the following locations will be searched for credentials:
128
+ #
129
+ # * `Aws.config[:credentials]`
130
+ #
131
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
132
+ # `:account_id` options.
133
+ #
134
+ # * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
135
+ # `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
136
+ #
137
+ # * `~/.aws/credentials`
138
+ #
139
+ # * `~/.aws/config`
140
+ #
141
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
142
+ # Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
143
+ # enable retries and extended timeouts. Instance profile credential fetching can be disabled by
144
+ # setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
145
+ #
146
+ # @option options [required, String] :region
147
+ # The AWS region to connect to. The configured `:region` is
148
+ # used to determine the service `:endpoint`. When not passed,
149
+ # a default `:region` is searched for in the following locations:
150
+ #
151
+ # * `Aws.config[:region]`
152
+ # * `ENV['AWS_REGION']`
153
+ # * `ENV['AMAZON_REGION']`
154
+ # * `ENV['AWS_DEFAULT_REGION']`
155
+ # * `~/.aws/credentials`
156
+ # * `~/.aws/config`
157
+ #
158
+ # @option options [String] :access_key_id
159
+ #
160
+ # @option options [String] :account_id
161
+ #
162
+ # @option options [Boolean] :active_endpoint_cache (false)
163
+ # When set to `true`, a thread polling for endpoints will be running in
164
+ # the background every 60 secs (default). Defaults to `false`.
165
+ #
166
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
167
+ # Used only in `adaptive` retry mode. When true, the request will sleep
168
+ # until there is sufficent client side capacity to retry the request.
169
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
170
+ # not retry instead of sleeping.
171
+ #
172
+ # @option options [Array<String>] :auth_scheme_preference
173
+ # A list of preferred authentication schemes to use when making a request. Supported values are:
174
+ # `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
175
+ # shared config as `auth_scheme_preference`, the value should be a comma-separated list.
176
+ #
177
+ # @option options [Boolean] :client_side_monitoring (false)
178
+ # When `true`, client-side metrics will be collected for all API requests from
179
+ # this client.
180
+ #
181
+ # @option options [String] :client_side_monitoring_client_id ("")
182
+ # Allows you to provide an identifier for this client which will be attached to
183
+ # all generated client side metrics. Defaults to an empty string.
184
+ #
185
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
186
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
187
+ # side monitoring agent is running on, where client metrics will be published via UDP.
188
+ #
189
+ # @option options [Integer] :client_side_monitoring_port (31000)
190
+ # Required for publishing client metrics. The port that the client side monitoring
191
+ # agent is running on, where client metrics will be published via UDP.
192
+ #
193
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
194
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
195
+ # will use the Client Side Monitoring Agent Publisher.
196
+ #
197
+ # @option options [Boolean] :convert_params (true)
198
+ # When `true`, an attempt is made to coerce request parameters into
199
+ # the required types.
200
+ #
201
+ # @option options [Boolean] :correct_clock_skew (true)
202
+ # Used only in `standard` and `adaptive` retry modes. Specifies whether to apply
203
+ # a clock skew correction and retry requests with skewed client clocks.
204
+ #
205
+ # @option options [String] :defaults_mode ("legacy")
206
+ # See {Aws::DefaultsModeConfiguration} for a list of the
207
+ # accepted modes and the configuration defaults that are included.
208
+ #
209
+ # @option options [Boolean] :disable_host_prefix_injection (false)
210
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
211
+ #
212
+ # @option options [Boolean] :disable_request_compression (false)
213
+ # When set to 'true' the request body will not be compressed
214
+ # for supported operations.
215
+ #
216
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
217
+ # Normally you should not configure the `:endpoint` option
218
+ # directly. This is normally constructed from the `:region`
219
+ # option. Configuring `:endpoint` is normally reserved for
220
+ # connecting to test or custom endpoints. The endpoint should
221
+ # be a URI formatted like:
222
+ #
223
+ # 'http://example.com'
224
+ # 'https://example.com'
225
+ # 'http://example.com:123'
226
+ #
227
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
228
+ # Used for the maximum size limit of the LRU cache storing endpoints data
229
+ # for endpoint discovery enabled operations. Defaults to 1000.
230
+ #
231
+ # @option options [Integer] :endpoint_cache_max_threads (10)
232
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
233
+ #
234
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
235
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
236
+ # Use this option to config the time interval in seconds for making
237
+ # requests fetching endpoints information. Defaults to 60 sec.
238
+ #
239
+ # @option options [Boolean] :endpoint_discovery (false)
240
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
241
+ #
242
+ # @option options [Boolean] :ignore_configured_endpoint_urls
243
+ # Setting to true disables use of endpoint URLs provided via environment
244
+ # variables and the shared configuration file.
245
+ #
246
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
247
+ # The log formatter.
248
+ #
249
+ # @option options [Symbol] :log_level (:info)
250
+ # The log level to send messages to the `:logger` at.
251
+ #
252
+ # @option options [Logger] :logger
253
+ # The Logger instance to send log messages to. If this option
254
+ # is not set, logging will be disabled.
255
+ #
256
+ # @option options [Integer] :max_attempts (3)
257
+ # An integer representing the maximum number attempts that will be made for
258
+ # a single request, including the initial attempt. For example,
259
+ # setting this value to 5 will result in a request being retried up to
260
+ # 4 times. Used in `standard` and `adaptive` retry modes.
261
+ #
262
+ # @option options [String] :profile ("default")
263
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
264
+ # When not specified, 'default' is used.
265
+ #
266
+ # @option options [String] :request_checksum_calculation ("when_supported")
267
+ # Determines when a checksum will be calculated for request payloads. Values are:
268
+ #
269
+ # * `when_supported` - (default) When set, a checksum will be
270
+ # calculated for all request payloads of operations modeled with the
271
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
272
+ # `requestAlgorithmMember` is modeled.
273
+ # * `when_required` - When set, a checksum will only be calculated for
274
+ # request payloads of operations modeled with the `httpChecksum` trait where
275
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
276
+ # is modeled and supplied.
277
+ #
278
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
279
+ # The minimum size in bytes that triggers compression for request
280
+ # bodies. The value must be non-negative integer value between 0
281
+ # and 10485780 bytes inclusive.
282
+ #
283
+ # @option options [String] :response_checksum_validation ("when_supported")
284
+ # Determines when checksum validation will be performed on response payloads. Values are:
285
+ #
286
+ # * `when_supported` - (default) When set, checksum validation is performed on all
287
+ # response payloads of operations modeled with the `httpChecksum` trait where
288
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
289
+ # are supported.
290
+ # * `when_required` - When set, checksum validation is not performed on
291
+ # response payloads of operations unless the checksum algorithm is supported and
292
+ # the `requestValidationModeMember` member is set to `ENABLED`.
293
+ #
294
+ # @option options [Proc] :retry_backoff
295
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
296
+ # This option is only used in the `legacy` retry mode.
297
+ #
298
+ # @option options [Float] :retry_base_delay (0.3)
299
+ # The base delay in seconds used by the default backoff function. This option
300
+ # is only used in the `legacy` retry mode.
301
+ #
302
+ # @option options [Symbol] :retry_jitter (:none)
303
+ # A delay randomiser function used by the default backoff function.
304
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
305
+ # otherwise a Proc that takes and returns a number. This option is only used
306
+ # in the `legacy` retry mode.
307
+ #
308
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
309
+ #
310
+ # @option options [Integer] :retry_limit (3)
311
+ # The maximum number of times to retry failed requests. Only
312
+ # ~ 500 level server errors and certain ~ 400 level client errors
313
+ # are retried. Generally, these are throttling errors, data
314
+ # checksum errors, networking errors, timeout errors, auth errors,
315
+ # endpoint discovery, and errors from expired credentials.
316
+ # This option is only used in the `legacy` retry mode.
317
+ #
318
+ # @option options [Integer] :retry_max_delay (0)
319
+ # The maximum number of seconds to delay between retries (0 for no limit)
320
+ # used by the default backoff function. This option is only used in the
321
+ # `legacy` retry mode.
322
+ #
323
+ # @option options [String] :retry_mode ("legacy")
324
+ # Specifies which retry algorithm to use. Values are:
325
+ #
326
+ # * `legacy` - The pre-existing retry behavior. This is the default
327
+ # value if no retry mode is provided.
328
+ #
329
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
330
+ # This includes support for retry quotas, which limit the number of
331
+ # unsuccessful retries a client can make.
332
+ #
333
+ # * `adaptive` - A retry mode that includes all the functionality of
334
+ # `standard` mode along with automatic client side throttling.
335
+ #
336
+ # @option options [String] :sdk_ua_app_id
337
+ # A unique and opaque application ID that is appended to the
338
+ # User-Agent header as app/sdk_ua_app_id. It should have a
339
+ # maximum length of 50. This variable is sourced from environment
340
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
341
+ #
342
+ # @option options [String] :secret_access_key
343
+ #
344
+ # @option options [String] :session_token
345
+ #
346
+ # @option options [Array] :sigv4a_signing_region_set
347
+ # A list of regions that should be signed with SigV4a signing. When
348
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
349
+ # in the following locations:
350
+ #
351
+ # * `Aws.config[:sigv4a_signing_region_set]`
352
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
353
+ # * `~/.aws/config`
354
+ #
355
+ # @option options [Boolean] :stub_responses (false)
356
+ # Causes the client to return stubbed responses. By default
357
+ # fake responses are generated and returned. You can specify
358
+ # the response data to return or errors to raise by calling
359
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
360
+ #
361
+ # ** Please note ** When response stubbing is enabled, no HTTP
362
+ # requests are made, and retries are disabled.
363
+ #
364
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
365
+ # Allows you to provide a telemetry provider, which is used to
366
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
367
+ # will not record or emit any telemetry data. The SDK supports the
368
+ # following telemetry providers:
369
+ #
370
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
371
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
372
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
373
+ #
374
+ # @option options [Aws::TokenProvider] :token_provider
375
+ # Your Bearer token used for authentication. This can be any class that includes and implements
376
+ # `Aws::TokenProvider`, or instance of any one of the following classes:
377
+ #
378
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
379
+ # tokens.
380
+ #
381
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
382
+ # access token generated from `aws login`.
383
+ #
384
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
385
+ # will be used to search for tokens configured for your profile in shared configuration files.
386
+ #
387
+ # @option options [Boolean] :use_dualstack_endpoint
388
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
389
+ # will be used if available.
390
+ #
391
+ # @option options [Boolean] :use_fips_endpoint
392
+ # When set to `true`, fips compatible endpoints will be used if available.
393
+ # When a `fips` region is used, the region is normalized and this config
394
+ # is set to `true`.
395
+ #
396
+ # @option options [Boolean] :validate_params (true)
397
+ # When `true`, request parameters are validated before
398
+ # sending the request.
399
+ #
400
+ # @option options [Aws::PricingPlanManager::EndpointProvider] :endpoint_provider
401
+ # The endpoint provider used to resolve endpoints. Any object that responds to
402
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
403
+ # `Aws::PricingPlanManager::EndpointParameters`.
404
+ #
405
+ # @option options [Float] :http_continue_timeout (1)
406
+ # The number of seconds to wait for a 100-continue response before sending the
407
+ # request body. This option has no effect unless the request has "Expect"
408
+ # header set to "100-continue". Defaults to `nil` which disables this
409
+ # behaviour. This value can safely be set per request on the session.
410
+ #
411
+ # @option options [Float] :http_idle_timeout (5)
412
+ # The number of seconds a connection is allowed to sit idle before it
413
+ # is considered stale. Stale connections are closed and removed from the
414
+ # pool before making a request.
415
+ #
416
+ # @option options [Float] :http_open_timeout (15)
417
+ # The default number of seconds to wait for response data.
418
+ # This value can safely be set per-request on the session.
419
+ #
420
+ # @option options [URI::HTTP,String] :http_proxy
421
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
422
+ #
423
+ # @option options [Float] :http_read_timeout (60)
424
+ # The default number of seconds to wait for response data.
425
+ # This value can safely be set per-request on the session.
426
+ #
427
+ # @option options [Boolean] :http_wire_trace (false)
428
+ # When `true`, HTTP debug output will be sent to the `:logger`.
429
+ #
430
+ # @option options [Proc] :on_chunk_received
431
+ # When a Proc object is provided, it will be used as callback when each chunk
432
+ # of the response body is received. It provides three arguments: the chunk,
433
+ # the number of bytes received, and the total number of
434
+ # bytes in the response (or nil if the server did not send a `content-length`).
435
+ #
436
+ # @option options [Proc] :on_chunk_sent
437
+ # When a Proc object is provided, it will be used as callback when each chunk
438
+ # of the request body is sent. It provides three arguments: the chunk,
439
+ # the number of bytes read from the body, and the total number of
440
+ # bytes in the body.
441
+ #
442
+ # @option options [Boolean] :raise_response_errors (true)
443
+ # When `true`, response errors are raised.
444
+ #
445
+ # @option options [String] :ssl_ca_bundle
446
+ # Full path to the SSL certificate authority bundle file that should be used when
447
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
448
+ # `:ssl_ca_directory` the the system default will be used if available.
449
+ #
450
+ # @option options [String] :ssl_ca_directory
451
+ # Full path of the directory that contains the unbundled SSL certificate
452
+ # authority files for verifying peer certificates. If you do
453
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
454
+ # default will be used if available.
455
+ #
456
+ # @option options [String] :ssl_ca_store
457
+ # Sets the X509::Store to verify peer certificate.
458
+ #
459
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
460
+ # Sets a client certificate when creating http connections.
461
+ #
462
+ # @option options [OpenSSL::PKey] :ssl_key
463
+ # Sets a client key when creating http connections.
464
+ #
465
+ # @option options [Float] :ssl_timeout
466
+ # Sets the SSL timeout in seconds
467
+ #
468
+ # @option options [Boolean] :ssl_verify_peer (true)
469
+ # When `true`, SSL peer certificates are verified when establishing a connection.
470
+ #
471
+ def initialize(*args)
472
+ super
473
+ end
474
+
475
+ # @!group API Operations
476
+
477
+ # Approves a subscription that is in `PENDING_APPROVAL` status,
478
+ # activating it and starting billing.
479
+ #
480
+ # <note markdown="1"> This operation requires the current `ETag` value for concurrency
481
+ # control. Retrieve it from a previous `GetSubscription` or
482
+ # `ListSubscriptions` response.
483
+ #
484
+ # </note>
485
+ #
486
+ # @option params [required, String] :arn
487
+ # The ARN of the subscription to approve.
488
+ #
489
+ # @option params [required, String] :if_match
490
+ # The `ETag` value from a previous `GetSubscription` or
491
+ # `ListSubscriptions` response. This ensures you are approving the
492
+ # expected version of the subscription.
493
+ #
494
+ # @option params [String] :client_token
495
+ # A unique, case-sensitive identifier that you provide to ensure the
496
+ # request is handled only once.
497
+ #
498
+ # **A suitable default value is auto-generated.** You should normally
499
+ # not need to pass this option.**
500
+ #
501
+ # @return [Types::ApprovePaidSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
502
+ #
503
+ # * {Types::ApprovePaidSubscriptionOutput#subscription #subscription} => Types::Subscription
504
+ # * {Types::ApprovePaidSubscriptionOutput#e_tag #e_tag} => String
505
+ #
506
+ #
507
+ # @example Example: Approve a pending paid subscription
508
+ #
509
+ # resp = client.approve_paid_subscription({
510
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
511
+ # if_match: "1",
512
+ # })
513
+ #
514
+ # resp.to_h outputs the following:
515
+ # {
516
+ # e_tag: "2",
517
+ # subscription: {
518
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
519
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
520
+ # plan_family: "CloudFront",
521
+ # plan_tier: "PRO",
522
+ # resource_arns: [
523
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
524
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
525
+ # ],
526
+ # status: "SYNC_IN_PROGRESS",
527
+ # updated_at: Time.parse("2025-01-15T10:35:00Z"),
528
+ # },
529
+ # }
530
+ #
531
+ # @example Request syntax with placeholder values
532
+ #
533
+ # resp = client.approve_paid_subscription({
534
+ # arn: "SubscriptionArn", # required
535
+ # if_match: "String", # required
536
+ # client_token: "IdempotencyToken",
537
+ # })
538
+ #
539
+ # @example Response structure
540
+ #
541
+ # resp.subscription.arn #=> String
542
+ # resp.subscription.plan_family #=> String
543
+ # resp.subscription.plan_tier #=> String
544
+ # resp.subscription.usage_level #=> String
545
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
546
+ # resp.subscription.scheduled_change.effective_date #=> Time
547
+ # resp.subscription.scheduled_change.plan_tier #=> String
548
+ # resp.subscription.scheduled_change.usage_level #=> String
549
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
550
+ # resp.subscription.status_reason #=> String
551
+ # resp.subscription.resource_arns #=> Array
552
+ # resp.subscription.resource_arns[0] #=> String
553
+ # resp.subscription.created_at #=> Time
554
+ # resp.subscription.updated_at #=> Time
555
+ # resp.e_tag #=> String
556
+ #
557
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/ApprovePaidSubscription AWS API Documentation
558
+ #
559
+ # @overload approve_paid_subscription(params = {})
560
+ # @param [Hash] params ({})
561
+ def approve_paid_subscription(params = {}, options = {})
562
+ req = build_request(:approve_paid_subscription, params)
563
+ req.send_request(options)
564
+ end
565
+
566
+ # Adds one or more resources to an existing subscription. The
567
+ # subscription must be in an active state that is not pending other
568
+ # changes.
569
+ #
570
+ # <note markdown="1"> For subscriptions in the CloudFront plan family, the associated
571
+ # resources must include exactly one Amazon CloudFront distribution and
572
+ # one AWS WAF web ACL. You can also include other supported resources,
573
+ # such as Amazon Route 53 hosted zones, and CloudFront KeyValueStores.
574
+ #
575
+ # </note>
576
+ #
577
+ # @option params [required, String] :arn
578
+ # The ARN of the subscription to add resources to.
579
+ #
580
+ # @option params [required, Array<String>] :resource_arns
581
+ # The ARNs of the resources to add to the subscription.
582
+ #
583
+ # @option params [required, String] :if_match
584
+ # The `ETag` value from a previous `GetSubscription` or
585
+ # `ListSubscriptions` response.
586
+ #
587
+ # @option params [String] :client_token
588
+ # A unique, case-sensitive identifier that you provide to ensure the
589
+ # request is handled only once.
590
+ #
591
+ # **A suitable default value is auto-generated.** You should normally
592
+ # not need to pass this option.**
593
+ #
594
+ # @return [Types::AssociateResourcesToSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
595
+ #
596
+ # * {Types::AssociateResourcesToSubscriptionOutput#subscription #subscription} => Types::Subscription
597
+ # * {Types::AssociateResourcesToSubscriptionOutput#e_tag #e_tag} => String
598
+ #
599
+ #
600
+ # @example Example: Associate additional resources to a subscription
601
+ #
602
+ # resp = client.associate_resources_to_subscription({
603
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
604
+ # if_match: "1",
605
+ # resource_arns: [
606
+ # "arn:aws:route53:::hostedzone/Z0123456789EXAMPLE",
607
+ # ],
608
+ # })
609
+ #
610
+ # resp.to_h outputs the following:
611
+ # {
612
+ # e_tag: "2",
613
+ # subscription: {
614
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
615
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
616
+ # plan_family: "CloudFront",
617
+ # plan_tier: "PRO",
618
+ # resource_arns: [
619
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
620
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
621
+ # "arn:aws:route53:::hostedzone/Z0123456789EXAMPLE",
622
+ # ],
623
+ # status: "SYNC_IN_PROGRESS",
624
+ # updated_at: Time.parse("2025-01-18T11:00:00Z"),
625
+ # },
626
+ # }
627
+ #
628
+ # @example Request syntax with placeholder values
629
+ #
630
+ # resp = client.associate_resources_to_subscription({
631
+ # arn: "SubscriptionArn", # required
632
+ # resource_arns: ["String"], # required
633
+ # if_match: "String", # required
634
+ # client_token: "IdempotencyToken",
635
+ # })
636
+ #
637
+ # @example Response structure
638
+ #
639
+ # resp.subscription.arn #=> String
640
+ # resp.subscription.plan_family #=> String
641
+ # resp.subscription.plan_tier #=> String
642
+ # resp.subscription.usage_level #=> String
643
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
644
+ # resp.subscription.scheduled_change.effective_date #=> Time
645
+ # resp.subscription.scheduled_change.plan_tier #=> String
646
+ # resp.subscription.scheduled_change.usage_level #=> String
647
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
648
+ # resp.subscription.status_reason #=> String
649
+ # resp.subscription.resource_arns #=> Array
650
+ # resp.subscription.resource_arns[0] #=> String
651
+ # resp.subscription.created_at #=> Time
652
+ # resp.subscription.updated_at #=> Time
653
+ # resp.e_tag #=> String
654
+ #
655
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/AssociateResourcesToSubscription AWS API Documentation
656
+ #
657
+ # @overload associate_resources_to_subscription(params = {})
658
+ # @param [Hash] params ({})
659
+ def associate_resources_to_subscription(params = {}, options = {})
660
+ req = build_request(:associate_resources_to_subscription, params)
661
+ req.send_request(options)
662
+ end
663
+
664
+ # Cancels a flat-rate pricing subscription.
665
+ #
666
+ # <note markdown="1"> For active subscriptions, the cancellation is scheduled to take effect
667
+ # at the end of the current billing period. The subscription remains
668
+ # active until that date. To revert a pending cancellation, use
669
+ # `CancelSubscriptionChange`.
670
+ #
671
+ # For subscriptions in `PENDING_APPROVAL` status, the subscription is
672
+ # deleted immediately without scheduling.
673
+ #
674
+ # </note>
675
+ #
676
+ # @option params [required, String] :arn
677
+ # The ARN of the subscription to cancel.
678
+ #
679
+ # @option params [required, String] :if_match
680
+ # The `ETag` value from a previous `GetSubscription` or
681
+ # `ListSubscriptions` response.
682
+ #
683
+ # @option params [String] :client_token
684
+ # A unique, case-sensitive identifier that you provide to ensure the
685
+ # request is handled only once.
686
+ #
687
+ # **A suitable default value is auto-generated.** You should normally
688
+ # not need to pass this option.**
689
+ #
690
+ # @return [Types::CancelSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
691
+ #
692
+ # * {Types::CancelSubscriptionOutput#subscription #subscription} => Types::Subscription
693
+ # * {Types::CancelSubscriptionOutput#e_tag #e_tag} => String
694
+ #
695
+ #
696
+ # @example Example: Cancel a subscription
697
+ #
698
+ # resp = client.cancel_subscription({
699
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
700
+ # if_match: "2",
701
+ # })
702
+ #
703
+ # resp.to_h outputs the following:
704
+ # {
705
+ # e_tag: "3",
706
+ # subscription: {
707
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
708
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
709
+ # plan_family: "CloudFront",
710
+ # plan_tier: "BUSINESS",
711
+ # resource_arns: [
712
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
713
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
714
+ # ],
715
+ # scheduled_change: {
716
+ # change_type: "CANCELLATION",
717
+ # effective_date: Time.parse("2025-02-01T00:00:00Z"),
718
+ # },
719
+ # status: "ACTIVE",
720
+ # updated_at: Time.parse("2025-01-16T12:00:00Z"),
721
+ # },
722
+ # }
723
+ #
724
+ # @example Request syntax with placeholder values
725
+ #
726
+ # resp = client.cancel_subscription({
727
+ # arn: "SubscriptionArn", # required
728
+ # if_match: "String", # required
729
+ # client_token: "IdempotencyToken",
730
+ # })
731
+ #
732
+ # @example Response structure
733
+ #
734
+ # resp.subscription.arn #=> String
735
+ # resp.subscription.plan_family #=> String
736
+ # resp.subscription.plan_tier #=> String
737
+ # resp.subscription.usage_level #=> String
738
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
739
+ # resp.subscription.scheduled_change.effective_date #=> Time
740
+ # resp.subscription.scheduled_change.plan_tier #=> String
741
+ # resp.subscription.scheduled_change.usage_level #=> String
742
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
743
+ # resp.subscription.status_reason #=> String
744
+ # resp.subscription.resource_arns #=> Array
745
+ # resp.subscription.resource_arns[0] #=> String
746
+ # resp.subscription.created_at #=> Time
747
+ # resp.subscription.updated_at #=> Time
748
+ # resp.e_tag #=> String
749
+ #
750
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/CancelSubscription AWS API Documentation
751
+ #
752
+ # @overload cancel_subscription(params = {})
753
+ # @param [Hash] params ({})
754
+ def cancel_subscription(params = {}, options = {})
755
+ req = build_request(:cancel_subscription, params)
756
+ req.send_request(options)
757
+ end
758
+
759
+ # Cancels a pending scheduled change on a subscription, such as a
760
+ # pending downgrade or cancellation. The subscription returns to its
761
+ # state before the change was scheduled.
762
+ #
763
+ # <note markdown="1"> You cannot cancel a scheduled change close to its effective date. If
764
+ # the change is within the processing window, this operation returns an
765
+ # error.
766
+ #
767
+ # </note>
768
+ #
769
+ # @option params [required, String] :arn
770
+ # The ARN of the subscription whose pending change you want to cancel.
771
+ #
772
+ # @option params [required, String] :if_match
773
+ # The `ETag` value from a previous `GetSubscription` or
774
+ # `ListSubscriptions` response.
775
+ #
776
+ # @option params [String] :client_token
777
+ # A unique, case-sensitive identifier that you provide to ensure the
778
+ # request is handled only once.
779
+ #
780
+ # **A suitable default value is auto-generated.** You should normally
781
+ # not need to pass this option.**
782
+ #
783
+ # @return [Types::CancelSubscriptionChangeOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
784
+ #
785
+ # * {Types::CancelSubscriptionChangeOutput#subscription #subscription} => Types::Subscription
786
+ # * {Types::CancelSubscriptionChangeOutput#e_tag #e_tag} => String
787
+ #
788
+ #
789
+ # @example Example: Cancel a pending subscription change
790
+ #
791
+ # resp = client.cancel_subscription_change({
792
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
793
+ # if_match: "3",
794
+ # })
795
+ #
796
+ # resp.to_h outputs the following:
797
+ # {
798
+ # e_tag: "4",
799
+ # subscription: {
800
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
801
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
802
+ # plan_family: "CloudFront",
803
+ # plan_tier: "BUSINESS",
804
+ # resource_arns: [
805
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
806
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
807
+ # ],
808
+ # status: "ACTIVE",
809
+ # updated_at: Time.parse("2025-01-17T09:00:00Z"),
810
+ # },
811
+ # }
812
+ #
813
+ # @example Request syntax with placeholder values
814
+ #
815
+ # resp = client.cancel_subscription_change({
816
+ # arn: "SubscriptionArn", # required
817
+ # if_match: "String", # required
818
+ # client_token: "IdempotencyToken",
819
+ # })
820
+ #
821
+ # @example Response structure
822
+ #
823
+ # resp.subscription.arn #=> String
824
+ # resp.subscription.plan_family #=> String
825
+ # resp.subscription.plan_tier #=> String
826
+ # resp.subscription.usage_level #=> String
827
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
828
+ # resp.subscription.scheduled_change.effective_date #=> Time
829
+ # resp.subscription.scheduled_change.plan_tier #=> String
830
+ # resp.subscription.scheduled_change.usage_level #=> String
831
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
832
+ # resp.subscription.status_reason #=> String
833
+ # resp.subscription.resource_arns #=> Array
834
+ # resp.subscription.resource_arns[0] #=> String
835
+ # resp.subscription.created_at #=> Time
836
+ # resp.subscription.updated_at #=> Time
837
+ # resp.e_tag #=> String
838
+ #
839
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/CancelSubscriptionChange AWS API Documentation
840
+ #
841
+ # @overload cancel_subscription_change(params = {})
842
+ # @param [Hash] params ({})
843
+ def cancel_subscription_change(params = {}, options = {})
844
+ req = build_request(:cancel_subscription_change, params)
845
+ req.send_request(options)
846
+ end
847
+
848
+ # Creates a flat-rate pricing subscription for the specified resources.
849
+ #
850
+ # <note markdown="1"> When `approvalMode` is set to `MANUAL`, paid-tier subscriptions are
851
+ # created in `PENDING_APPROVAL` status and require a separate
852
+ # `ApprovePaidSubscription` call before billing starts. Free-tier
853
+ # subscriptions are always activated immediately regardless of approval
854
+ # mode.
855
+ #
856
+ # When `approvalMode` is set to `IMMEDIATE` or is not specified, the
857
+ # subscription is activated immediately.
858
+ #
859
+ # </note>
860
+ #
861
+ # @option params [required, String] :plan_family
862
+ # The pricing plan family to subscribe to, such as `CloudFront`.
863
+ #
864
+ # @option params [required, String] :plan_tier
865
+ # The tier level for the subscription, such as `FREE`, `PRO`,
866
+ # `BUSINESS`, or `PREMIUM`.
867
+ #
868
+ # @option params [String] :usage_level
869
+ # The usage level within the plan tier. Specify `DEFAULT` for the base
870
+ # configuration, or a higher level if your plan tier supports it.
871
+ #
872
+ # @option params [required, Array<String>] :resource_arns
873
+ # The ARNs of the AWS resources to include in the subscription. Specify
874
+ # one or more supported resources.
875
+ #
876
+ # <note markdown="1"> For subscriptions in the CloudFront plan family, the resources must
877
+ # include exactly one Amazon CloudFront distribution and exactly one AWS
878
+ # WAF web ACL. You can also include other supported resources, such as
879
+ # Amazon Route 53 hosted zones and CloudFront KeyValueStores.
880
+ #
881
+ # </note>
882
+ #
883
+ # @option params [String] :approval_mode
884
+ # Determines whether the subscription requires explicit approval before
885
+ # billing starts. Set to `MANUAL` to require a separate
886
+ # `ApprovePaidSubscription` call, or `IMMEDIATE` to activate the
887
+ # subscription right away. Defaults to `IMMEDIATE` if not specified.
888
+ #
889
+ # @option params [String] :client_token
890
+ # A unique, case-sensitive identifier that you provide to ensure that
891
+ # the request is handled only once. If you send the same request with
892
+ # the same client token, the API returns the original response without
893
+ # creating a duplicate subscription.
894
+ #
895
+ # **A suitable default value is auto-generated.** You should normally
896
+ # not need to pass this option.**
897
+ #
898
+ # @return [Types::CreateSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
899
+ #
900
+ # * {Types::CreateSubscriptionOutput#subscription #subscription} => Types::Subscription
901
+ # * {Types::CreateSubscriptionOutput#e_tag #e_tag} => String
902
+ #
903
+ #
904
+ # @example Example: Create a flat-rate pricing subscription (deferred approval)
905
+ #
906
+ # resp = client.create_subscription({
907
+ # approval_mode: "MANUAL",
908
+ # plan_family: "CloudFront",
909
+ # plan_tier: "PRO",
910
+ # resource_arns: [
911
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
912
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
913
+ # ],
914
+ # })
915
+ #
916
+ # resp.to_h outputs the following:
917
+ # {
918
+ # e_tag: "1",
919
+ # subscription: {
920
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
921
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
922
+ # plan_family: "CloudFront",
923
+ # plan_tier: "PRO",
924
+ # resource_arns: [
925
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
926
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
927
+ # ],
928
+ # status: "PENDING_APPROVAL",
929
+ # updated_at: Time.parse("2025-01-15T10:30:00Z"),
930
+ # },
931
+ # }
932
+ #
933
+ # @example Example: Create a subscription with approval mode
934
+ #
935
+ # resp = client.create_subscription({
936
+ # approval_mode: "IMMEDIATE",
937
+ # plan_family: "CloudFront",
938
+ # plan_tier: "PRO",
939
+ # resource_arns: [
940
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
941
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
942
+ # ],
943
+ # })
944
+ #
945
+ # resp.to_h outputs the following:
946
+ # {
947
+ # e_tag: "1",
948
+ # subscription: {
949
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
950
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
951
+ # plan_family: "CloudFront",
952
+ # plan_tier: "PRO",
953
+ # resource_arns: [
954
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
955
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
956
+ # ],
957
+ # status: "SYNC_IN_PROGRESS",
958
+ # updated_at: Time.parse("2025-01-15T10:30:00Z"),
959
+ # },
960
+ # }
961
+ #
962
+ # @example Request syntax with placeholder values
963
+ #
964
+ # resp = client.create_subscription({
965
+ # plan_family: "String", # required
966
+ # plan_tier: "String", # required
967
+ # usage_level: "String",
968
+ # resource_arns: ["String"], # required
969
+ # approval_mode: "MANUAL", # accepts MANUAL, IMMEDIATE
970
+ # client_token: "IdempotencyToken",
971
+ # })
972
+ #
973
+ # @example Response structure
974
+ #
975
+ # resp.subscription.arn #=> String
976
+ # resp.subscription.plan_family #=> String
977
+ # resp.subscription.plan_tier #=> String
978
+ # resp.subscription.usage_level #=> String
979
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
980
+ # resp.subscription.scheduled_change.effective_date #=> Time
981
+ # resp.subscription.scheduled_change.plan_tier #=> String
982
+ # resp.subscription.scheduled_change.usage_level #=> String
983
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
984
+ # resp.subscription.status_reason #=> String
985
+ # resp.subscription.resource_arns #=> Array
986
+ # resp.subscription.resource_arns[0] #=> String
987
+ # resp.subscription.created_at #=> Time
988
+ # resp.subscription.updated_at #=> Time
989
+ # resp.e_tag #=> String
990
+ #
991
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/CreateSubscription AWS API Documentation
992
+ #
993
+ # @overload create_subscription(params = {})
994
+ # @param [Hash] params ({})
995
+ def create_subscription(params = {}, options = {})
996
+ req = build_request(:create_subscription, params)
997
+ req.send_request(options)
998
+ end
999
+
1000
+ # Removes one or more resources from an existing subscription.
1001
+ #
1002
+ # <note markdown="1"> For subscriptions in the CloudFront plan family, the associated
1003
+ # resources must always include exactly one Amazon CloudFront
1004
+ # distribution and exactly one AWS WAF web ACL. You cannot remove these
1005
+ # required resources.
1006
+ #
1007
+ # </note>
1008
+ #
1009
+ # @option params [required, String] :arn
1010
+ # The ARN of the subscription to remove resources from.
1011
+ #
1012
+ # @option params [required, Array<String>] :resource_arns
1013
+ # The ARNs of the resources to remove from the subscription. For
1014
+ # subscriptions in the CloudFront plan family, you cannot remove the
1015
+ # required CloudFront distribution or WAF web ACL.
1016
+ #
1017
+ # @option params [required, String] :if_match
1018
+ # The `ETag` value from a previous `GetSubscription` or
1019
+ # `ListSubscriptions` response.
1020
+ #
1021
+ # @option params [String] :client_token
1022
+ # A unique, case-sensitive identifier that you provide to ensure the
1023
+ # request is handled only once.
1024
+ #
1025
+ # **A suitable default value is auto-generated.** You should normally
1026
+ # not need to pass this option.**
1027
+ #
1028
+ # @return [Types::DisassociateResourcesFromSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1029
+ #
1030
+ # * {Types::DisassociateResourcesFromSubscriptionOutput#subscription #subscription} => Types::Subscription
1031
+ # * {Types::DisassociateResourcesFromSubscriptionOutput#e_tag #e_tag} => String
1032
+ #
1033
+ #
1034
+ # @example Example: Remove a resource from a subscription
1035
+ #
1036
+ # resp = client.disassociate_resources_from_subscription({
1037
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1038
+ # if_match: "2",
1039
+ # resource_arns: [
1040
+ # "arn:aws:route53:::hostedzone/Z0123456789EXAMPLE",
1041
+ # ],
1042
+ # })
1043
+ #
1044
+ # resp.to_h outputs the following:
1045
+ # {
1046
+ # e_tag: "3",
1047
+ # subscription: {
1048
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1049
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
1050
+ # plan_family: "CloudFront",
1051
+ # plan_tier: "PRO",
1052
+ # resource_arns: [
1053
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
1054
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
1055
+ # ],
1056
+ # status: "SYNC_IN_PROGRESS",
1057
+ # updated_at: Time.parse("2025-01-18T15:00:00Z"),
1058
+ # },
1059
+ # }
1060
+ #
1061
+ # @example Request syntax with placeholder values
1062
+ #
1063
+ # resp = client.disassociate_resources_from_subscription({
1064
+ # arn: "SubscriptionArn", # required
1065
+ # resource_arns: ["String"], # required
1066
+ # if_match: "String", # required
1067
+ # client_token: "IdempotencyToken",
1068
+ # })
1069
+ #
1070
+ # @example Response structure
1071
+ #
1072
+ # resp.subscription.arn #=> String
1073
+ # resp.subscription.plan_family #=> String
1074
+ # resp.subscription.plan_tier #=> String
1075
+ # resp.subscription.usage_level #=> String
1076
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
1077
+ # resp.subscription.scheduled_change.effective_date #=> Time
1078
+ # resp.subscription.scheduled_change.plan_tier #=> String
1079
+ # resp.subscription.scheduled_change.usage_level #=> String
1080
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
1081
+ # resp.subscription.status_reason #=> String
1082
+ # resp.subscription.resource_arns #=> Array
1083
+ # resp.subscription.resource_arns[0] #=> String
1084
+ # resp.subscription.created_at #=> Time
1085
+ # resp.subscription.updated_at #=> Time
1086
+ # resp.e_tag #=> String
1087
+ #
1088
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/DisassociateResourcesFromSubscription AWS API Documentation
1089
+ #
1090
+ # @overload disassociate_resources_from_subscription(params = {})
1091
+ # @param [Hash] params ({})
1092
+ def disassociate_resources_from_subscription(params = {}, options = {})
1093
+ req = build_request(:disassociate_resources_from_subscription, params)
1094
+ req.send_request(options)
1095
+ end
1096
+
1097
+ # Returns the details of a flat-rate pricing subscription, including its
1098
+ # current status, associated resources, and any pending scheduled
1099
+ # changes.
1100
+ #
1101
+ # @option params [required, String] :arn
1102
+ # The ARN of the subscription to retrieve.
1103
+ #
1104
+ # @return [Types::GetSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1105
+ #
1106
+ # * {Types::GetSubscriptionOutput#subscription #subscription} => Types::Subscription
1107
+ # * {Types::GetSubscriptionOutput#e_tag #e_tag} => String
1108
+ #
1109
+ #
1110
+ # @example Example: Get subscription details
1111
+ #
1112
+ # resp = client.get_subscription({
1113
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1114
+ # })
1115
+ #
1116
+ # resp.to_h outputs the following:
1117
+ # {
1118
+ # e_tag: "1",
1119
+ # subscription: {
1120
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1121
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
1122
+ # plan_family: "CloudFront",
1123
+ # plan_tier: "PRO",
1124
+ # resource_arns: [
1125
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
1126
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
1127
+ # ],
1128
+ # status: "ACTIVE",
1129
+ # updated_at: Time.parse("2025-01-15T10:30:00Z"),
1130
+ # },
1131
+ # }
1132
+ #
1133
+ # @example Request syntax with placeholder values
1134
+ #
1135
+ # resp = client.get_subscription({
1136
+ # arn: "SubscriptionArn", # required
1137
+ # })
1138
+ #
1139
+ # @example Response structure
1140
+ #
1141
+ # resp.subscription.arn #=> String
1142
+ # resp.subscription.plan_family #=> String
1143
+ # resp.subscription.plan_tier #=> String
1144
+ # resp.subscription.usage_level #=> String
1145
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
1146
+ # resp.subscription.scheduled_change.effective_date #=> Time
1147
+ # resp.subscription.scheduled_change.plan_tier #=> String
1148
+ # resp.subscription.scheduled_change.usage_level #=> String
1149
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
1150
+ # resp.subscription.status_reason #=> String
1151
+ # resp.subscription.resource_arns #=> Array
1152
+ # resp.subscription.resource_arns[0] #=> String
1153
+ # resp.subscription.created_at #=> Time
1154
+ # resp.subscription.updated_at #=> Time
1155
+ # resp.e_tag #=> String
1156
+ #
1157
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/GetSubscription AWS API Documentation
1158
+ #
1159
+ # @overload get_subscription(params = {})
1160
+ # @param [Hash] params ({})
1161
+ def get_subscription(params = {}, options = {})
1162
+ req = build_request(:get_subscription, params)
1163
+ req.send_request(options)
1164
+ end
1165
+
1166
+ # Returns a summary of all flat-rate pricing subscriptions in the
1167
+ # calling account.
1168
+ #
1169
+ # @option params [String] :next_token
1170
+ # A token from a previous `ListSubscriptions` response. If the response
1171
+ # included a `nextToken`, there are more results available. Pass this
1172
+ # value to retrieve the next page of results.
1173
+ #
1174
+ # @return [Types::ListSubscriptionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1175
+ #
1176
+ # * {Types::ListSubscriptionsOutput#subscription_summaries #subscription_summaries} => Array&lt;Types::SubscriptionSummary&gt;
1177
+ # * {Types::ListSubscriptionsOutput#next_token #next_token} => String
1178
+ #
1179
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1180
+ #
1181
+ #
1182
+ # @example Example: List all subscriptions
1183
+ #
1184
+ # resp = client.list_subscriptions({
1185
+ # })
1186
+ #
1187
+ # resp.to_h outputs the following:
1188
+ # {
1189
+ # subscription_summaries: [
1190
+ # {
1191
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1192
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
1193
+ # e_tag: "1",
1194
+ # plan_family: "CloudFront",
1195
+ # plan_tier: "PRO",
1196
+ # resource_arns: [
1197
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
1198
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
1199
+ # ],
1200
+ # status: "ACTIVE",
1201
+ # updated_at: Time.parse("2025-01-15T10:30:00Z"),
1202
+ # },
1203
+ # ],
1204
+ # }
1205
+ #
1206
+ # @example Request syntax with placeholder values
1207
+ #
1208
+ # resp = client.list_subscriptions({
1209
+ # next_token: "String",
1210
+ # })
1211
+ #
1212
+ # @example Response structure
1213
+ #
1214
+ # resp.subscription_summaries #=> Array
1215
+ # resp.subscription_summaries[0].arn #=> String
1216
+ # resp.subscription_summaries[0].plan_family #=> String
1217
+ # resp.subscription_summaries[0].plan_tier #=> String
1218
+ # resp.subscription_summaries[0].usage_level #=> String
1219
+ # resp.subscription_summaries[0].scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
1220
+ # resp.subscription_summaries[0].scheduled_change.effective_date #=> Time
1221
+ # resp.subscription_summaries[0].scheduled_change.plan_tier #=> String
1222
+ # resp.subscription_summaries[0].scheduled_change.usage_level #=> String
1223
+ # resp.subscription_summaries[0].status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
1224
+ # resp.subscription_summaries[0].status_reason #=> String
1225
+ # resp.subscription_summaries[0].resource_arns #=> Array
1226
+ # resp.subscription_summaries[0].resource_arns[0] #=> String
1227
+ # resp.subscription_summaries[0].created_at #=> Time
1228
+ # resp.subscription_summaries[0].updated_at #=> Time
1229
+ # resp.subscription_summaries[0].e_tag #=> String
1230
+ # resp.next_token #=> String
1231
+ #
1232
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/ListSubscriptions AWS API Documentation
1233
+ #
1234
+ # @overload list_subscriptions(params = {})
1235
+ # @param [Hash] params ({})
1236
+ def list_subscriptions(params = {}, options = {})
1237
+ req = build_request(:list_subscriptions, params)
1238
+ req.send_request(options)
1239
+ end
1240
+
1241
+ # Changes the plan tier of an existing subscription.
1242
+ #
1243
+ # <note markdown="1"> Upgrades take effect immediately. Downgrades are scheduled and the
1244
+ # current tier remains unchanged until the end of the billing cycle
1245
+ # (calendar month). You cannot update a subscription while a scheduled
1246
+ # change is pending. To make a new change, first cancel the pending
1247
+ # change using `CancelSubscriptionChange`.
1248
+ #
1249
+ # This operation replaces the plan tier value. If you omit the optional
1250
+ # `usageLevel` field, it is reset to the default.
1251
+ #
1252
+ # </note>
1253
+ #
1254
+ # @option params [required, String] :arn
1255
+ # The ARN of the subscription to update.
1256
+ #
1257
+ # @option params [required, String] :plan_tier
1258
+ # The new tier level for the subscription.
1259
+ #
1260
+ # @option params [String] :usage_level
1261
+ # The usage level within the plan tier. Specify `DEFAULT` for the base
1262
+ # configuration. If omitted, the usage level is reset to the default.
1263
+ #
1264
+ # @option params [required, String] :if_match
1265
+ # The `ETag` value from a previous `GetSubscription` or
1266
+ # `ListSubscriptions` response. This ensures you are updating the
1267
+ # expected version of the subscription.
1268
+ #
1269
+ # @option params [String] :client_token
1270
+ # A unique, case-sensitive identifier that you provide to ensure the
1271
+ # request is handled only once.
1272
+ #
1273
+ # **A suitable default value is auto-generated.** You should normally
1274
+ # not need to pass this option.**
1275
+ #
1276
+ # @return [Types::UpdateSubscriptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1277
+ #
1278
+ # * {Types::UpdateSubscriptionOutput#subscription #subscription} => Types::Subscription
1279
+ # * {Types::UpdateSubscriptionOutput#e_tag #e_tag} => String
1280
+ #
1281
+ #
1282
+ # @example Example: Update a subscription plan tier
1283
+ #
1284
+ # resp = client.update_subscription({
1285
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1286
+ # if_match: "1",
1287
+ # plan_tier: "BUSINESS",
1288
+ # })
1289
+ #
1290
+ # resp.to_h outputs the following:
1291
+ # {
1292
+ # e_tag: "2",
1293
+ # subscription: {
1294
+ # arn: "arn:aws:pricingplanmanager::123456789012:subscription/sub-1234567890",
1295
+ # created_at: Time.parse("2025-01-15T10:30:00Z"),
1296
+ # plan_family: "CloudFront",
1297
+ # plan_tier: "BUSINESS",
1298
+ # resource_arns: [
1299
+ # "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
1300
+ # "arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4",
1301
+ # ],
1302
+ # status: "SYNC_IN_PROGRESS",
1303
+ # updated_at: Time.parse("2025-01-16T08:00:00Z"),
1304
+ # },
1305
+ # }
1306
+ #
1307
+ # @example Request syntax with placeholder values
1308
+ #
1309
+ # resp = client.update_subscription({
1310
+ # arn: "SubscriptionArn", # required
1311
+ # plan_tier: "String", # required
1312
+ # usage_level: "String",
1313
+ # if_match: "String", # required
1314
+ # client_token: "IdempotencyToken",
1315
+ # })
1316
+ #
1317
+ # @example Response structure
1318
+ #
1319
+ # resp.subscription.arn #=> String
1320
+ # resp.subscription.plan_family #=> String
1321
+ # resp.subscription.plan_tier #=> String
1322
+ # resp.subscription.usage_level #=> String
1323
+ # resp.subscription.scheduled_change.change_type #=> String, one of "DOWNGRADE", "CANCELLATION"
1324
+ # resp.subscription.scheduled_change.effective_date #=> Time
1325
+ # resp.subscription.scheduled_change.plan_tier #=> String
1326
+ # resp.subscription.scheduled_change.usage_level #=> String
1327
+ # resp.subscription.status #=> String, one of "PENDING_APPROVAL", "ACTIVE", "SYNC_IN_PROGRESS", "FAILED"
1328
+ # resp.subscription.status_reason #=> String
1329
+ # resp.subscription.resource_arns #=> Array
1330
+ # resp.subscription.resource_arns[0] #=> String
1331
+ # resp.subscription.created_at #=> Time
1332
+ # resp.subscription.updated_at #=> Time
1333
+ # resp.e_tag #=> String
1334
+ #
1335
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-plan-manager-2025-08-05/UpdateSubscription AWS API Documentation
1336
+ #
1337
+ # @overload update_subscription(params = {})
1338
+ # @param [Hash] params ({})
1339
+ def update_subscription(params = {}, options = {})
1340
+ req = build_request(:update_subscription, params)
1341
+ req.send_request(options)
1342
+ end
1343
+
1344
+ # @!endgroup
1345
+
1346
+ # @param params ({})
1347
+ # @api private
1348
+ def build_request(operation_name, params = {})
1349
+ handlers = @handlers.for(operation_name)
1350
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1351
+ Aws::Telemetry.module_to_tracer_name('Aws::PricingPlanManager')
1352
+ )
1353
+ context = Seahorse::Client::RequestContext.new(
1354
+ operation_name: operation_name,
1355
+ operation: config.api.operation(operation_name),
1356
+ client: self,
1357
+ params: params,
1358
+ config: config,
1359
+ tracer: tracer
1360
+ )
1361
+ context[:gem_name] = 'aws-sdk-pricingplanmanager'
1362
+ context[:gem_version] = '1.0.0'
1363
+ Seahorse::Client::Request.new(handlers, context)
1364
+ end
1365
+
1366
+ # @api private
1367
+ # @deprecated
1368
+ def waiter_names
1369
+ []
1370
+ end
1371
+
1372
+ class << self
1373
+
1374
+ # @api private
1375
+ attr_reader :identifier
1376
+
1377
+ # @api private
1378
+ def errors_module
1379
+ Errors
1380
+ end
1381
+
1382
+ end
1383
+ end
1384
+ end