aws-sdk-connectscheduling 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,1116 @@
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::ConnectScheduling
40
+ # An API client for ConnectScheduling. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::ConnectScheduling::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 = :connectscheduling
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::ConnectScheduling::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
203
+ # to apply a clock skew correction and retry requests with skewed client
204
+ # clocks. Takes effect only when `disable_clock_skew_correction` is not set.
205
+ #
206
+ # @option options [String] :defaults_mode ("legacy")
207
+ # See {Aws::DefaultsModeConfiguration} for a list of the
208
+ # accepted modes and the configuration defaults that are included.
209
+ #
210
+ # @option options [Boolean] :disable_clock_skew_correction
211
+ # Used only in `standard` and `adaptive` retry modes. When `true`, the
212
+ # SDK does not apply a clock skew correction, does not update its stored
213
+ # skew from responses, and does not retry clock skew errors. Clock skew
214
+ # correction is enabled by default.
215
+ #
216
+ # @option options [Boolean] :disable_host_prefix_injection (false)
217
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
218
+ #
219
+ # @option options [Boolean] :disable_request_compression (false)
220
+ # When set to 'true' the request body will not be compressed
221
+ # for supported operations.
222
+ #
223
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
224
+ # Normally you should not configure the `:endpoint` option
225
+ # directly. This is normally constructed from the `:region`
226
+ # option. Configuring `:endpoint` is normally reserved for
227
+ # connecting to test or custom endpoints. The endpoint should
228
+ # be a URI formatted like:
229
+ #
230
+ # 'http://example.com'
231
+ # 'https://example.com'
232
+ # 'http://example.com:123'
233
+ #
234
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
235
+ # Used for the maximum size limit of the LRU cache storing endpoints data
236
+ # for endpoint discovery enabled operations. Defaults to 1000.
237
+ #
238
+ # @option options [Integer] :endpoint_cache_max_threads (10)
239
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
240
+ #
241
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
242
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
243
+ # Use this option to config the time interval in seconds for making
244
+ # requests fetching endpoints information. Defaults to 60 sec.
245
+ #
246
+ # @option options [Boolean] :endpoint_discovery (false)
247
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
248
+ #
249
+ # @option options [Boolean] :ignore_configured_endpoint_urls
250
+ # Setting to true disables use of endpoint URLs provided via environment
251
+ # variables and the shared configuration file.
252
+ #
253
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
254
+ # The log formatter.
255
+ #
256
+ # @option options [Symbol] :log_level (:info)
257
+ # The log level to send messages to the `:logger` at.
258
+ #
259
+ # @option options [Logger] :logger
260
+ # The Logger instance to send log messages to. If this option
261
+ # is not set, logging will be disabled.
262
+ #
263
+ # @option options [Integer] :max_attempts (3)
264
+ # An integer representing the maximum number attempts that will be made for
265
+ # a single request, including the initial attempt. For example,
266
+ # setting this value to 5 will result in a request being retried up to
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
269
+ #
270
+ # @option options [String] :profile ("default")
271
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
272
+ # When not specified, 'default' is used.
273
+ #
274
+ # @option options [String] :request_checksum_calculation ("when_supported")
275
+ # Determines when a checksum will be calculated for request payloads. Values are:
276
+ #
277
+ # * `when_supported` - (default) When set, a checksum will be
278
+ # calculated for all request payloads of operations modeled with the
279
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
280
+ # `requestAlgorithmMember` is modeled.
281
+ # * `when_required` - When set, a checksum will only be calculated for
282
+ # request payloads of operations modeled with the `httpChecksum` trait where
283
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
284
+ # is modeled and supplied.
285
+ #
286
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
287
+ # The minimum size in bytes that triggers compression for request
288
+ # bodies. The value must be non-negative integer value between 0
289
+ # and 10485780 bytes inclusive.
290
+ #
291
+ # @option options [String] :response_checksum_validation ("when_supported")
292
+ # Determines when checksum validation will be performed on response payloads. Values are:
293
+ #
294
+ # * `when_supported` - (default) When set, checksum validation is performed on all
295
+ # response payloads of operations modeled with the `httpChecksum` trait where
296
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
297
+ # are supported.
298
+ # * `when_required` - When set, checksum validation is not performed on
299
+ # response payloads of operations unless the checksum algorithm is supported and
300
+ # the `requestValidationModeMember` member is set to `ENABLED`.
301
+ #
302
+ # @option options [Proc] :retry_backoff
303
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
304
+ # This option is only used in the `legacy` retry mode.
305
+ #
306
+ # @option options [Float] :retry_base_delay (0.3)
307
+ # The base delay in seconds used by the default backoff function. This option
308
+ # is only used in the `legacy` retry mode.
309
+ #
310
+ # @option options [Symbol] :retry_jitter (:none)
311
+ # A delay randomiser function used by the default backoff function.
312
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
313
+ # otherwise a Proc that takes and returns a number. This option is only used
314
+ # in the `legacy` retry mode.
315
+ #
316
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
317
+ #
318
+ # @option options [Integer] :retry_limit (3)
319
+ # The maximum number of times to retry failed requests. Only
320
+ # ~ 500 level server errors and certain ~ 400 level client errors
321
+ # are retried. Generally, these are throttling errors, data
322
+ # checksum errors, networking errors, timeout errors, auth errors,
323
+ # endpoint discovery, and errors from expired credentials.
324
+ # This option is only used in the `legacy` retry mode.
325
+ #
326
+ # @option options [Integer] :retry_max_delay (0)
327
+ # The maximum number of seconds to delay between retries (0 for no limit)
328
+ # used by the default backoff function. This option is only used in the
329
+ # `legacy` retry mode.
330
+ #
331
+ # @option options [String] :retry_mode ("standard")
332
+ # Specifies which retry algorithm to use. Values are:
333
+ #
334
+ # * `legacy` - The pre-existing retry behavior.
335
+ #
336
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
+ # This includes support for retry quotas, which limit the number of
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
340
+ #
341
+ # * `adaptive` - A retry mode that includes all the functionality of
342
+ # `standard` mode along with automatic client side throttling.
343
+ #
344
+ # @option options [String] :sdk_ua_app_id
345
+ # A unique and opaque application ID that is appended to the
346
+ # User-Agent header as app/sdk_ua_app_id. It should have a
347
+ # maximum length of 50. This variable is sourced from environment
348
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
349
+ #
350
+ # @option options [String] :secret_access_key
351
+ #
352
+ # @option options [String] :session_token
353
+ #
354
+ # @option options [Array] :sigv4a_signing_region_set
355
+ # A list of regions that should be signed with SigV4a signing. When
356
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
357
+ # in the following locations:
358
+ #
359
+ # * `Aws.config[:sigv4a_signing_region_set]`
360
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
361
+ # * `~/.aws/config`
362
+ #
363
+ # @option options [Boolean] :stub_responses (false)
364
+ # Causes the client to return stubbed responses. By default
365
+ # fake responses are generated and returned. You can specify
366
+ # the response data to return or errors to raise by calling
367
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
368
+ #
369
+ # ** Please note ** When response stubbing is enabled, no HTTP
370
+ # requests are made, and retries are disabled.
371
+ #
372
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
373
+ # Allows you to provide a telemetry provider, which is used to
374
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
375
+ # will not record or emit any telemetry data. The SDK supports the
376
+ # following telemetry providers:
377
+ #
378
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
379
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
380
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
381
+ #
382
+ # @option options [Aws::TokenProvider] :token_provider
383
+ # Your Bearer token used for authentication. This can be any class that includes and implements
384
+ # `Aws::TokenProvider`, or instance of any one of the following classes:
385
+ #
386
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
387
+ # tokens.
388
+ #
389
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
390
+ # access token generated from `aws login`.
391
+ #
392
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
393
+ # will be used to search for tokens configured for your profile in shared configuration files.
394
+ #
395
+ # @option options [Boolean] :use_dualstack_endpoint
396
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
397
+ # will be used if available.
398
+ #
399
+ # @option options [Boolean] :use_fips_endpoint
400
+ # When set to `true`, fips compatible endpoints will be used if available.
401
+ # When a `fips` region is used, the region is normalized and this config
402
+ # is set to `true`.
403
+ #
404
+ # @option options [Boolean] :validate_params (true)
405
+ # When `true`, request parameters are validated before
406
+ # sending the request.
407
+ #
408
+ # @option options [Aws::ConnectScheduling::EndpointProvider] :endpoint_provider
409
+ # The endpoint provider used to resolve endpoints. Any object that responds to
410
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
411
+ # `Aws::ConnectScheduling::EndpointParameters`.
412
+ #
413
+ # @option options [Float] :http_continue_timeout (1)
414
+ # The number of seconds to wait for a 100-continue response before sending the
415
+ # request body. This option has no effect unless the request has "Expect"
416
+ # header set to "100-continue". Defaults to `nil` which disables this
417
+ # behaviour. This value can safely be set per request on the session.
418
+ #
419
+ # @option options [Float] :http_idle_timeout (5)
420
+ # The number of seconds a connection is allowed to sit idle before it
421
+ # is considered stale. Stale connections are closed and removed from the
422
+ # pool before making a request.
423
+ #
424
+ # @option options [Float] :http_open_timeout (15)
425
+ # The default number of seconds to wait for response data.
426
+ # This value can safely be set per-request on the session.
427
+ #
428
+ # @option options [URI::HTTP,String] :http_proxy
429
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
430
+ #
431
+ # @option options [Float] :http_read_timeout (60)
432
+ # The default number of seconds to wait for response data.
433
+ # This value can safely be set per-request on the session.
434
+ #
435
+ # @option options [Boolean] :http_wire_trace (false)
436
+ # When `true`, HTTP debug output will be sent to the `:logger`.
437
+ #
438
+ # @option options [Proc] :on_chunk_received
439
+ # When a Proc object is provided, it will be used as callback when each chunk
440
+ # of the response body is received. It provides three arguments: the chunk,
441
+ # the number of bytes received, and the total number of
442
+ # bytes in the response (or nil if the server did not send a `content-length`).
443
+ #
444
+ # @option options [Proc] :on_chunk_sent
445
+ # When a Proc object is provided, it will be used as callback when each chunk
446
+ # of the request body is sent. It provides three arguments: the chunk,
447
+ # the number of bytes read from the body, and the total number of
448
+ # bytes in the body.
449
+ #
450
+ # @option options [Boolean] :raise_response_errors (true)
451
+ # When `true`, response errors are raised.
452
+ #
453
+ # @option options [String] :ssl_ca_bundle
454
+ # Full path to the SSL certificate authority bundle file that should be used when
455
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
456
+ # `:ssl_ca_directory` the the system default will be used if available.
457
+ #
458
+ # @option options [String] :ssl_ca_directory
459
+ # Full path of the directory that contains the unbundled SSL certificate
460
+ # authority files for verifying peer certificates. If you do
461
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
462
+ # default will be used if available.
463
+ #
464
+ # @option options [String] :ssl_ca_store
465
+ # Sets the X509::Store to verify peer certificate.
466
+ #
467
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
468
+ # Sets a client certificate when creating http connections.
469
+ #
470
+ # @option options [OpenSSL::PKey] :ssl_key
471
+ # Sets a client key when creating http connections.
472
+ #
473
+ # @option options [Float] :ssl_timeout
474
+ # Sets the SSL timeout in seconds
475
+ #
476
+ # @option options [Boolean] :ssl_verify_peer (true)
477
+ # When `true`, SSL peer certificates are verified when establishing a connection.
478
+ #
479
+ def initialize(*args)
480
+ super
481
+ end
482
+
483
+ # @!group API Operations
484
+
485
+ # Approves a time off request. Evaluates agent time off balances and
486
+ # group time off allowances before approving. `RuleFailureAction`
487
+ # controls what happens when these evaluations fail. The request is
488
+ # rejected with `CONFLICTING_TIME_OFF_REQUEST` if it overlaps another
489
+ # time off request for the user that is `APPROVED` or being approved.
490
+ #
491
+ # The time off request is processed asynchronously, so a successful call
492
+ # doesn't indicate the final status. Read the resulting status with
493
+ # `GetTimeOff` or from the time off state-change events.
494
+ #
495
+ # Approving an `APPROVED` request succeeds without a change. Approving a
496
+ # `REJECTED` request evaluates the rules again, so it can end `APPROVED`
497
+ # or `REJECTED`, and repeating the call can give a different result.
498
+ # Check the status with `GetTimeOff` before you retry.
499
+ #
500
+ # Returns `ConflictException` if the request is `PENDING` or
501
+ # `CANCELLED`. `PENDING` means Connect Customer is still processing the
502
+ # request asynchronously. Wait until `GetTimeOff` returns a status other
503
+ # than `PENDING`, and then retry.
504
+ #
505
+ # When the approval succeeds, Connect Customer cancels any overtime or
506
+ # voluntary time off activity that overlaps the approved window.
507
+ #
508
+ # <note markdown="1"> Connect Customer doesn't check whether the principal that calls this
509
+ # operation supervises the user. The staffing group's approval settings
510
+ # also don't apply. IAM permissions are the only control. If you allow
511
+ # a principal to call this operation, that principal can send
512
+ # `RuleFailureAction` `OVERRIDE` and approve a request past failed
513
+ # rules. Grant permission for this operation only to principals that you
514
+ # trust to override time off rules.
515
+ #
516
+ # </note>
517
+ #
518
+ # @option params [required, String] :instance_id
519
+ # The identifier of the Connect Customer instance. This can be the ID or
520
+ # the ARN of the instance. You can [find the instance ID][1] in the
521
+ # Amazon Resource Name (ARN) of the instance.
522
+ #
523
+ #
524
+ #
525
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
526
+ #
527
+ # @option params [required, String] :user_id
528
+ # The identifier of the user who the time off request belongs to. This
529
+ # can be the ID or the ARN of the user.
530
+ #
531
+ # @option params [required, String] :time_off_id
532
+ # The unique identifier of the time off request to approve. If the time
533
+ # off request doesn't belong to `UserId`, the operation returns
534
+ # `ResourceNotFoundException`.
535
+ #
536
+ # @option params [String] :description
537
+ # A description recorded with the approval. `GetTimeOff` doesn't return
538
+ # it.
539
+ #
540
+ # @option params [String] :rule_failure_action
541
+ # Controls what happens when a configured rule fails. `REJECT`, the
542
+ # default, records an `ERROR` and leaves the request `REJECTED`.
543
+ # `OVERRIDE` records a `WARNING` and approves the request, like the
544
+ # *Override time off rules* option in the Connect Customer admin
545
+ # website. `OVERRIDE` never waives `CONFLICTING_TIME_OFF_REQUEST`.
546
+ #
547
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
548
+ #
549
+ #
550
+ # @example Example: To approve a time off request past a failed rule
551
+ #
552
+ # # The following example approves a time off request with RuleFailureAction OVERRIDE, so a failed rule is recorded as a
553
+ # # WARNING instead of rejecting the request.
554
+ #
555
+ # resp = client.approve_time_off({
556
+ # description: "Approved with coverage from the evening shift",
557
+ # instance_id: "12345678-1234-1234-1234-123456789012",
558
+ # rule_failure_action: "OVERRIDE",
559
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
560
+ # user_id: "87654321-4321-4321-4321-210987654321",
561
+ # })
562
+ #
563
+ # resp.to_h outputs the following:
564
+ # {
565
+ # }
566
+ #
567
+ # @example Request syntax with placeholder values
568
+ #
569
+ # resp = client.approve_time_off({
570
+ # instance_id: "InstanceIdOrArn", # required
571
+ # user_id: "UserIdOrArn", # required
572
+ # time_off_id: "TimeOffId", # required
573
+ # description: "Description",
574
+ # rule_failure_action: "REJECT", # accepts REJECT, OVERRIDE
575
+ # })
576
+ #
577
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/ApproveTimeOff AWS API Documentation
578
+ #
579
+ # @overload approve_time_off(params = {})
580
+ # @param [Hash] params ({})
581
+ def approve_time_off(params = {}, options = {})
582
+ req = build_request(:approve_time_off, params)
583
+ req.send_request(options)
584
+ end
585
+
586
+ # Cancels a time off request.
587
+ #
588
+ # Cancelling a `CANCELLED` request succeeds without a change. Returns
589
+ # `ConflictException` if the request is `PENDING`, which means Connect
590
+ # Customer is still processing the request asynchronously. Wait until
591
+ # `GetTimeOff` returns a status other than `PENDING`, and then retry.
592
+ #
593
+ # @option params [required, String] :instance_id
594
+ # The identifier of the Connect Customer instance. This can be the ID or
595
+ # the ARN of the instance. You can [find the instance ID][1] in the
596
+ # Amazon Resource Name (ARN) of the instance.
597
+ #
598
+ #
599
+ #
600
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
601
+ #
602
+ # @option params [required, String] :user_id
603
+ # The identifier of the user who the time off request belongs to. This
604
+ # can be the ID or the ARN of the user.
605
+ #
606
+ # @option params [required, String] :time_off_id
607
+ # The unique identifier of the time off request to cancel. If the time
608
+ # off request doesn't belong to `UserId`, the operation returns
609
+ # `ResourceNotFoundException`.
610
+ #
611
+ # @option params [String] :description
612
+ # A description recorded with the cancellation. It replaces the
613
+ # description of the time off request. If you omit it, the request's
614
+ # description is removed.
615
+ #
616
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
617
+ #
618
+ #
619
+ # @example Example: To cancel a time off request
620
+ #
621
+ # # The following example cancels a time off request and records the reason on the cancellation.
622
+ #
623
+ # resp = client.cancel_time_off({
624
+ # description: "Plans changed",
625
+ # instance_id: "12345678-1234-1234-1234-123456789012",
626
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
627
+ # user_id: "87654321-4321-4321-4321-210987654321",
628
+ # })
629
+ #
630
+ # resp.to_h outputs the following:
631
+ # {
632
+ # }
633
+ #
634
+ # @example Request syntax with placeholder values
635
+ #
636
+ # resp = client.cancel_time_off({
637
+ # instance_id: "InstanceIdOrArn", # required
638
+ # user_id: "UserIdOrArn", # required
639
+ # time_off_id: "TimeOffId", # required
640
+ # description: "Description",
641
+ # })
642
+ #
643
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/CancelTimeOff AWS API Documentation
644
+ #
645
+ # @overload cancel_time_off(params = {})
646
+ # @param [Hash] params ({})
647
+ def cancel_time_off(params = {}, options = {})
648
+ req = build_request(:cancel_time_off, params)
649
+ req.send_request(options)
650
+ end
651
+
652
+ # Creates a time off request for a user. You don't provide a status,
653
+ # because Connect Customer owns the request lifecycle. To get the
654
+ # decided status, call `GetTimeOff` or use the time off state-change
655
+ # events.
656
+ #
657
+ # `ApprovalType` controls who approves the request. You can specify one
658
+ # of the following values:
659
+ #
660
+ # * `AWAIT_APPROVAL`: the request waits in `AWAITING_APPROVAL` until you
661
+ # call `ApproveTimeOff` or `RejectTimeOff`. Rule evaluation and the
662
+ # overlap check run at approval, not at creation. A waiting request
663
+ # doesn't reserve its window, so another request for the same window
664
+ # can be approved first.
665
+ #
666
+ # * `AUTOMATIC`: Connect Customer evaluates the rules (time off balances
667
+ # and group allowances) and decides the request. The request can be
668
+ # `PENDING` while Connect Customer decides, and then ends `APPROVED`
669
+ # or `REJECTED`. If it overlaps another time off request for the user,
670
+ # the requested time off ends `REJECTED` with
671
+ # `CONFLICTING_TIME_OFF_REQUEST`. It also ends `REJECTED` if it
672
+ # overlaps overtime or voluntary time off. If the whole window is in
673
+ # the past, Connect Customer records failed rules as `WARNING` and
674
+ # doesn't reject the request, whatever the `RuleFailureAction`.
675
+ #
676
+ # The staffing group's *Supervisor approval needed* setting doesn't
677
+ # apply to this operation. `ApprovalType` alone decides whether the
678
+ # request waits for approval. The operation fails with
679
+ # `ValidationException` on `UserId` in the following cases:
680
+ #
681
+ # * The user isn't in a staffing group, or the staffing group isn't
682
+ # associated with a forecast group.
683
+ #
684
+ # * Time off isn't [enabled][1] for the user's staffing group, or the
685
+ # user's staff rules don't allow time off.
686
+ #
687
+ # To change the dates of a request, cancel it with `CancelTimeOff` and
688
+ # create a new request. The new request has a new `TimeOffId`.
689
+ #
690
+ # <note markdown="1"> Connect Customer doesn't check whether the principal that calls this
691
+ # operation supervises the user. The staffing group's approval settings
692
+ # also don't apply. IAM permissions are the only control. If you allow
693
+ # a principal to call this operation, that principal can send
694
+ # `ApprovalType` `AUTOMATIC` with `RuleFailureAction` `OVERRIDE` and
695
+ # approve a request past failed rules. Grant permission for this
696
+ # operation only to principals that you trust to override time off
697
+ # rules.
698
+ #
699
+ # </note>
700
+ #
701
+ # For information about time off in the Connect Customer admin website,
702
+ # see [Time off management][2] in the *Connect Customer Administrator
703
+ # Guide*.
704
+ #
705
+ #
706
+ #
707
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/enable-to.html
708
+ # [2]: https://docs.aws.amazon.com/connect/latest/adminguide/scheduling-time-off.html
709
+ #
710
+ # @option params [required, String] :instance_id
711
+ # The identifier of the Connect Customer instance. This can be the ID or
712
+ # the ARN of the instance. You can [find the instance ID][1] in the
713
+ # Amazon Resource Name (ARN) of the instance.
714
+ #
715
+ #
716
+ #
717
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
718
+ #
719
+ # @option params [required, String] :user_id
720
+ # The identifier of the user who the time off request is for. This can
721
+ # be the ID or the ARN of the user.
722
+ #
723
+ # @option params [required, String] :shift_activity_id
724
+ # The identifier of the shift activity that defines the type of time off
725
+ # being requested. This can be the ID or the ARN of the shift activity.
726
+ # It must be a time off activity. Activities that aren't set as
727
+ # *Requestable* are accepted.
728
+ #
729
+ # @option params [required, Time,DateTime,Date,Integer,String] :start_at
730
+ # The start of the time off window, inclusive. It must be no earlier
731
+ # than one year before the current date. Connect Customer stores the
732
+ # value as sent, to the millisecond.
733
+ #
734
+ # @option params [required, Time,DateTime,Date,Integer,String] :end_at
735
+ # The end of the time off window, exclusive. It must be after `StartAt`
736
+ # and no later than 24 months after the current date. Connect Customer
737
+ # stores the value as sent, to the millisecond.
738
+ #
739
+ # @option params [String] :description
740
+ # A description recorded on the time off request. If you omit it, the
741
+ # request has no description.
742
+ #
743
+ # @option params [required, String] :approval_type
744
+ # Controls who approves the request. `AWAIT_APPROVAL` waits for an
745
+ # `ApproveTimeOff` or `RejectTimeOff` call. `AUTOMATIC` has Connect
746
+ # Customer decide the request. For details, see `CreateTimeOff`.
747
+ #
748
+ # @option params [String] :rule_failure_action
749
+ # Controls what happens when a configured rule fails. `REJECT`, the
750
+ # default, records an `ERROR` and ends the request `REJECTED`, unless
751
+ # the whole window is in the past. `OVERRIDE` records a `WARNING` and
752
+ # ends the request `APPROVED`, like the *Override time off rules* option
753
+ # in the Connect Customer admin website. `OVERRIDE` requires
754
+ # `AUTOMATIC`. With `AWAIT_APPROVAL`, `OVERRIDE` fails with
755
+ # `ValidationException`. Set it on `ApproveTimeOff` instead. `OVERRIDE`
756
+ # never waives `CONFLICTING_TIME_OFF_REQUEST`.
757
+ #
758
+ # @option params [String] :client_token
759
+ # A unique, case-sensitive identifier that you provide to ensure that
760
+ # the operation completes no more than one time. If this token matches a
761
+ # previous request, Connect Customer returns the result of that request
762
+ # and doesn't create another time off request. If you don't provide a
763
+ # token, the AWS SDK populates this field. If you reuse a client token
764
+ # with a different request body, the request fails with
765
+ # `ValidationException`. For more information about idempotency, see
766
+ # [Making retries safe with idempotent APIs][1].
767
+ #
768
+ # **A suitable default value is auto-generated.** You should normally
769
+ # not need to pass this option.**
770
+ #
771
+ #
772
+ #
773
+ # [1]: https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/
774
+ #
775
+ # @return [Types::CreateTimeOffResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
776
+ #
777
+ # * {Types::CreateTimeOffResponse#time_off_id #time_off_id} => String
778
+ #
779
+ #
780
+ # @example Example: To create a time off request that waits for approval
781
+ #
782
+ # # The following example creates a time off request for one day. The request is created in AWAITING_APPROVAL until an
783
+ # # ApproveTimeOff or RejectTimeOff call decides it.
784
+ #
785
+ # resp = client.create_time_off({
786
+ # approval_type: "AWAIT_APPROVAL",
787
+ # description: "Family event",
788
+ # end_at: Time.parse(1795453200),
789
+ # instance_id: "12345678-1234-1234-1234-123456789012",
790
+ # shift_activity_id: "11112222-3333-4444-5555-666677778888",
791
+ # start_at: Time.parse(1795424400),
792
+ # user_id: "87654321-4321-4321-4321-210987654321",
793
+ # })
794
+ #
795
+ # resp.to_h outputs the following:
796
+ # {
797
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
798
+ # }
799
+ #
800
+ # @example Request syntax with placeholder values
801
+ #
802
+ # resp = client.create_time_off({
803
+ # instance_id: "InstanceIdOrArn", # required
804
+ # user_id: "UserIdOrArn", # required
805
+ # shift_activity_id: "ShiftActivityIdOrArn", # required
806
+ # start_at: Time.now, # required
807
+ # end_at: Time.now, # required
808
+ # description: "Description",
809
+ # approval_type: "AWAIT_APPROVAL", # required, accepts AWAIT_APPROVAL, AUTOMATIC
810
+ # rule_failure_action: "REJECT", # accepts REJECT, OVERRIDE
811
+ # client_token: "ClientToken",
812
+ # })
813
+ #
814
+ # @example Response structure
815
+ #
816
+ # resp.time_off_id #=> String
817
+ #
818
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/CreateTimeOff AWS API Documentation
819
+ #
820
+ # @overload create_time_off(params = {})
821
+ # @param [Hash] params ({})
822
+ def create_time_off(params = {}, options = {})
823
+ req = build_request(:create_time_off, params)
824
+ req.send_request(options)
825
+ end
826
+
827
+ # Returns a time off request, including its current status and
828
+ # validation results.
829
+ #
830
+ # @option params [required, String] :instance_id
831
+ # The identifier of the Connect Customer instance. This can be the ID or
832
+ # the ARN of the instance. You can [find the instance ID][1] in the
833
+ # Amazon Resource Name (ARN) of the instance.
834
+ #
835
+ #
836
+ #
837
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
838
+ #
839
+ # @option params [required, String] :user_id
840
+ # The identifier of the user who the time off request belongs to. This
841
+ # can be the ID or the ARN of the user.
842
+ #
843
+ # @option params [required, String] :time_off_id
844
+ # The identifier of the time off request. If the time off request
845
+ # doesn't belong to `UserId`, the operation returns
846
+ # `ResourceNotFoundException`.
847
+ #
848
+ # @return [Types::GetTimeOffResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
849
+ #
850
+ # * {Types::GetTimeOffResponse#time_off_id #time_off_id} => String
851
+ # * {Types::GetTimeOffResponse#user_id #user_id} => String
852
+ # * {Types::GetTimeOffResponse#shift_activity_id #shift_activity_id} => String
853
+ # * {Types::GetTimeOffResponse#start_at #start_at} => Time
854
+ # * {Types::GetTimeOffResponse#end_at #end_at} => Time
855
+ # * {Types::GetTimeOffResponse#status #status} => String
856
+ # * {Types::GetTimeOffResponse#description #description} => String
857
+ # * {Types::GetTimeOffResponse#validation_results #validation_results} => Array&lt;Types::TimeOffValidationResult&gt;
858
+ # * {Types::GetTimeOffResponse#created_by #created_by} => Types::ActorInfo
859
+ # * {Types::GetTimeOffResponse#created_at #created_at} => Time
860
+ # * {Types::GetTimeOffResponse#updated_by #updated_by} => Types::ActorInfo
861
+ # * {Types::GetTimeOffResponse#updated_at #updated_at} => Time
862
+ #
863
+ #
864
+ # @example Example: To get a time off request
865
+ #
866
+ # # The following example gets a time off request that was approved past a failed group allowance rule, which is reported as
867
+ # # a WARNING.
868
+ #
869
+ # resp = client.get_time_off({
870
+ # instance_id: "12345678-1234-1234-1234-123456789012",
871
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
872
+ # user_id: "87654321-4321-4321-4321-210987654321",
873
+ # })
874
+ #
875
+ # resp.to_h outputs the following:
876
+ # {
877
+ # created_at: Time.parse(1793644200),
878
+ # created_by: {
879
+ # connect_user_arn: "arn:aws:connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/agent/87654321-4321-4321-4321-210987654321",
880
+ # },
881
+ # description: "Family event",
882
+ # end_at: Time.parse(1795453200),
883
+ # shift_activity_id: "11112222-3333-4444-5555-666677778888",
884
+ # start_at: Time.parse(1795424400),
885
+ # status: "APPROVED",
886
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
887
+ # updated_at: Time.parse(1793721900),
888
+ # updated_by: {
889
+ # connect_user_arn: "arn:aws:connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/agent/99998888-7777-6666-5555-444433332222",
890
+ # },
891
+ # user_id: "87654321-4321-4321-4321-210987654321",
892
+ # validation_results: [
893
+ # {
894
+ # code: "INSUFFICIENT_GROUP_TIME_OFF_ALLOWANCE",
895
+ # severity: "WARNING",
896
+ # },
897
+ # ],
898
+ # }
899
+ #
900
+ # @example Request syntax with placeholder values
901
+ #
902
+ # resp = client.get_time_off({
903
+ # instance_id: "InstanceIdOrArn", # required
904
+ # user_id: "UserIdOrArn", # required
905
+ # time_off_id: "TimeOffId", # required
906
+ # })
907
+ #
908
+ # @example Response structure
909
+ #
910
+ # resp.time_off_id #=> String
911
+ # resp.user_id #=> String
912
+ # resp.shift_activity_id #=> String
913
+ # resp.start_at #=> Time
914
+ # resp.end_at #=> Time
915
+ # resp.status #=> String, one of "PENDING", "APPROVED", "REJECTED", "CANCELLED", "AWAITING_APPROVAL"
916
+ # resp.description #=> String
917
+ # resp.validation_results #=> Array
918
+ # resp.validation_results[0].severity #=> String, one of "WARNING", "ERROR"
919
+ # resp.validation_results[0].code #=> String, one of "INSUFFICIENT_USER_TIME_OFF_BALANCE", "INSUFFICIENT_GROUP_TIME_OFF_ALLOWANCE", "INSUFFICIENT_STAFFING_GROUP_TIME_OFF_ALLOWANCE", "CONFLICTING_TIME_OFF_REQUEST"
920
+ # resp.created_by.connect_user_arn #=> String
921
+ # resp.created_by.aws_identity_arn #=> String
922
+ # resp.created_at #=> Time
923
+ # resp.updated_by.connect_user_arn #=> String
924
+ # resp.updated_by.aws_identity_arn #=> String
925
+ # resp.updated_at #=> Time
926
+ #
927
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/GetTimeOff AWS API Documentation
928
+ #
929
+ # @overload get_time_off(params = {})
930
+ # @param [Hash] params ({})
931
+ def get_time_off(params = {}, options = {})
932
+ req = build_request(:get_time_off, params)
933
+ req.send_request(options)
934
+ end
935
+
936
+ # Sets the time off balance for one user and shift activity. The value
937
+ # replaces the existing balance rather than adjusting it, so you can
938
+ # safely retry the call. This operation can't remove a balance. To
939
+ # remove one, upload a blank balance in the Connect Customer admin
940
+ # website. For more information, see [Import an agent's time off
941
+ # balance][1] in the *Connect Customer Administrator Guide*.
942
+ #
943
+ #
944
+ #
945
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/upload-timeoff-balance.html
946
+ #
947
+ # @option params [required, String] :instance_id
948
+ # The identifier of the Connect Customer instance. This can be the ID or
949
+ # the ARN of the instance. You can [find the instance ID][1] in the
950
+ # Amazon Resource Name (ARN) of the instance.
951
+ #
952
+ #
953
+ #
954
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
955
+ #
956
+ # @option params [required, String] :user_id
957
+ # The identifier of the user whose balance is being updated. This can be
958
+ # the ID or the ARN of the user.
959
+ #
960
+ # @option params [required, String] :shift_activity_id
961
+ # The identifier of the shift activity that the balance applies to. This
962
+ # can be the ID or the ARN of the shift activity.
963
+ #
964
+ # @option params [required, Types::Duration] :balance
965
+ # The new time off balance for the user and activity. It replaces the
966
+ # existing balance.
967
+ #
968
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
969
+ #
970
+ #
971
+ # @example Example: To set a user's time off balance
972
+ #
973
+ # # The following example sets a user's balance for one time off activity to 80 hours, replacing any existing balance.
974
+ #
975
+ # resp = client.put_time_off_balance({
976
+ # balance: {
977
+ # unit: "HOURS",
978
+ # value: 80,
979
+ # },
980
+ # instance_id: "12345678-1234-1234-1234-123456789012",
981
+ # shift_activity_id: "11112222-3333-4444-5555-666677778888",
982
+ # user_id: "87654321-4321-4321-4321-210987654321",
983
+ # })
984
+ #
985
+ # resp.to_h outputs the following:
986
+ # {
987
+ # }
988
+ #
989
+ # @example Request syntax with placeholder values
990
+ #
991
+ # resp = client.put_time_off_balance({
992
+ # instance_id: "InstanceIdOrArn", # required
993
+ # user_id: "UserIdOrArn", # required
994
+ # shift_activity_id: "ShiftActivityIdOrArn", # required
995
+ # balance: { # required
996
+ # value: 1, # required
997
+ # unit: "MINUTES", # required, accepts MINUTES, HOURS, DAYS
998
+ # },
999
+ # })
1000
+ #
1001
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/PutTimeOffBalance AWS API Documentation
1002
+ #
1003
+ # @overload put_time_off_balance(params = {})
1004
+ # @param [Hash] params ({})
1005
+ def put_time_off_balance(params = {}, options = {})
1006
+ req = build_request(:put_time_off_balance, params)
1007
+ req.send_request(options)
1008
+ end
1009
+
1010
+ # Rejects a time off request.
1011
+ #
1012
+ # Rejecting a `REJECTED` request succeeds without a change. Returns
1013
+ # `ConflictException` if the request is `PENDING` or `CANCELLED`.
1014
+ # `PENDING` means Connect Customer is still processing the request
1015
+ # asynchronously. Wait until `GetTimeOff` returns a status other than
1016
+ # `PENDING`, and then retry.
1017
+ #
1018
+ # @option params [required, String] :instance_id
1019
+ # The identifier of the Connect Customer instance. This can be the ID or
1020
+ # the ARN of the instance. You can [find the instance ID][1] in the
1021
+ # Amazon Resource Name (ARN) of the instance.
1022
+ #
1023
+ #
1024
+ #
1025
+ # [1]: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
1026
+ #
1027
+ # @option params [required, String] :user_id
1028
+ # The identifier of the user who the time off request belongs to. This
1029
+ # can be the ID or the ARN of the user.
1030
+ #
1031
+ # @option params [required, String] :time_off_id
1032
+ # The unique identifier of the time off request to reject. If the time
1033
+ # off request doesn't belong to `UserId`, the operation returns
1034
+ # `ResourceNotFoundException`.
1035
+ #
1036
+ # @option params [String] :description
1037
+ # A description recorded with the rejection, such as the reason.
1038
+ # `GetTimeOff` doesn't return it.
1039
+ #
1040
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1041
+ #
1042
+ #
1043
+ # @example Example: To reject a time off request
1044
+ #
1045
+ # # The following example rejects a time off request and records the reason on the rejection.
1046
+ #
1047
+ # resp = client.reject_time_off({
1048
+ # description: "Not enough coverage for this shift",
1049
+ # instance_id: "12345678-1234-1234-1234-123456789012",
1050
+ # time_off_id: "abcdef12-3456-7890-abcd-ef1234567890",
1051
+ # user_id: "87654321-4321-4321-4321-210987654321",
1052
+ # })
1053
+ #
1054
+ # resp.to_h outputs the following:
1055
+ # {
1056
+ # }
1057
+ #
1058
+ # @example Request syntax with placeholder values
1059
+ #
1060
+ # resp = client.reject_time_off({
1061
+ # instance_id: "InstanceIdOrArn", # required
1062
+ # user_id: "UserIdOrArn", # required
1063
+ # time_off_id: "TimeOffId", # required
1064
+ # description: "Description",
1065
+ # })
1066
+ #
1067
+ # @see http://docs.aws.amazon.com/goto/WebAPI/connectscheduling-2026-07-16/RejectTimeOff AWS API Documentation
1068
+ #
1069
+ # @overload reject_time_off(params = {})
1070
+ # @param [Hash] params ({})
1071
+ def reject_time_off(params = {}, options = {})
1072
+ req = build_request(:reject_time_off, params)
1073
+ req.send_request(options)
1074
+ end
1075
+
1076
+ # @!endgroup
1077
+
1078
+ # @param params ({})
1079
+ # @api private
1080
+ def build_request(operation_name, params = {})
1081
+ handlers = @handlers.for(operation_name)
1082
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1083
+ Aws::Telemetry.module_to_tracer_name('Aws::ConnectScheduling')
1084
+ )
1085
+ context = Seahorse::Client::RequestContext.new(
1086
+ operation_name: operation_name,
1087
+ operation: config.api.operation(operation_name),
1088
+ client: self,
1089
+ params: params,
1090
+ config: config,
1091
+ tracer: tracer
1092
+ )
1093
+ context[:gem_name] = 'aws-sdk-connectscheduling'
1094
+ context[:gem_version] = '1.0.0'
1095
+ Seahorse::Client::Request.new(handlers, context)
1096
+ end
1097
+
1098
+ # @api private
1099
+ # @deprecated
1100
+ def waiter_names
1101
+ []
1102
+ end
1103
+
1104
+ class << self
1105
+
1106
+ # @api private
1107
+ attr_reader :identifier
1108
+
1109
+ # @api private
1110
+ def errors_module
1111
+ Errors
1112
+ end
1113
+
1114
+ end
1115
+ end
1116
+ end