aws-sdk-transfer 1.59.0 → 1.61.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98089ecdcf2e9a746ee65bc0a529c97f48f666deabec6dced02fe323e14d899a
4
- data.tar.gz: dd0f7bd139618d8dcfb05ef4b7c8b79ff9e63c7414d999515c4a5ca393cbb8e2
3
+ metadata.gz: 1d51bd1b4709e8495e0050a8393a8e6be7ce22853c6e865bcc485e01886dd83e
4
+ data.tar.gz: 7c942628234f6b897c608b5fb994708233098431ceb58a964d9566f3e1ab45d5
5
5
  SHA512:
6
- metadata.gz: ad1509226e8f09f092ae565f03782438aeed5440b0aa781df7d1612c0f821e32c9e6685c4ea5d415f14a731070c102cd500aa0202cf48ac56f36ed0ebf68580d
7
- data.tar.gz: 6831c9934188d2e9857dfb6a9f52bc7e75bd8b53625970ec18dee2e277efbb08c581a84bc0888d5f1b0a8c2acb52ad7d5b4dcbd1745257691bc032292344ac55
6
+ metadata.gz: 6e8b269bf6837862343a211ed88ee4857bf1047236a0f885b5fba7abc84c1ad8b44f31e4fbfdd8955c000e5b4199ba41e945c6a7f597bfbb8787700878b69566
7
+ data.tar.gz: 2c1342dca7d524a33b44cd867cfeb642b16b62264b0a4b23da883d4408468b7cd2c38f7bfb92d1b7039181a7083d9d1b6d70cf1495de460d94f292b0a191b526
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.61.0 (2022-10-25)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.60.0 (2022-10-13)
10
+ ------------------
11
+
12
+ * Feature - This release adds an option for customers to configure workflows that are triggered when files are only partially received from a client due to premature session disconnect.
13
+
4
14
  1.59.0 (2022-09-13)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.59.0
1
+ 1.61.0
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
30
30
  require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
32
  require 'aws-sdk-core/plugins/recursion_detection.rb'
33
- require 'aws-sdk-core/plugins/signature_v4.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
34
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
35
 
36
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:transfer)
@@ -79,8 +79,9 @@ module Aws::Transfer
79
79
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
80
  add_plugin(Aws::Plugins::DefaultsMode)
81
81
  add_plugin(Aws::Plugins::RecursionDetection)
82
- add_plugin(Aws::Plugins::SignatureV4)
82
+ add_plugin(Aws::Plugins::Sign)
83
83
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+ add_plugin(Aws::Transfer::Plugins::Endpoints)
84
85
 
85
86
  # @overload initialize(options)
86
87
  # @param [Hash] options
@@ -297,6 +298,19 @@ module Aws::Transfer
297
298
  # ** Please note ** When response stubbing is enabled, no HTTP
298
299
  # requests are made, and retries are disabled.
299
300
  #
301
+ # @option options [Aws::TokenProvider] :token_provider
302
+ # A Bearer Token Provider. This can be an instance of any one of the
303
+ # following classes:
304
+ #
305
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
306
+ # tokens.
307
+ #
308
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
309
+ # access token generated from `aws login`.
310
+ #
311
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
312
+ # will be used to search for tokens configured for your profile in shared configuration files.
313
+ #
300
314
  # @option options [Boolean] :use_dualstack_endpoint
301
315
  # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
302
316
  # will be used if available.
@@ -310,6 +324,9 @@ module Aws::Transfer
310
324
  # When `true`, request parameters are validated before
311
325
  # sending the request.
312
326
  #
327
+ # @option options [Aws::Transfer::EndpointProvider] :endpoint_provider
328
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::Transfer::EndpointParameters`
329
+ #
313
330
  # @option options [URI::HTTP,String] :http_proxy A proxy to send
314
331
  # requests through. Formatted like 'http://proxy.com:123'.
315
332
  #
@@ -544,7 +561,8 @@ module Aws::Transfer
544
561
  # The landing directory (folder) for files transferred by using the AS2
545
562
  # protocol.
546
563
  #
547
- # A `BaseDirectory` example is `/DOC-EXAMPLE-BUCKET/home/mydirectory `.
564
+ # A `BaseDirectory` example is
565
+ # *DOC-EXAMPLE-BUCKET*/*home*/*mydirectory*.
548
566
  #
549
567
  # @option params [required, String] :access_role
550
568
  # With AS2, you can send files by calling `StartFileTransfer` and
@@ -604,7 +622,12 @@ module Aws::Transfer
604
622
 
605
623
  # Creates the connector, which captures the parameters for an outbound
606
624
  # connection for the AS2 protocol. The connector is required for sending
607
- # files from a customer's non Amazon Web Services server.
625
+ # files to an externally hosted AS2 server. For more details about
626
+ # connectors, see [Create AS2 connectors][1].
627
+ #
628
+ #
629
+ #
630
+ # [1]: https://docs.aws.amazon.com/transfer/latest/userguide/create-b2b-server.html#configure-as2-connector
608
631
  #
609
632
  # @option params [required, String] :url
610
633
  # The URL of the partner's AS2 endpoint.
@@ -677,8 +700,7 @@ module Aws::Transfer
677
700
  req.send_request(options)
678
701
  end
679
702
 
680
- # Creates the profile for the AS2 process. The agreement is between the
681
- # partner and the AS2 process.
703
+ # Creates the local or partner profile to use for AS2 transfers.
682
704
  #
683
705
  # @option params [required, String] :as_2_id
684
706
  # The `As2Id` is the *AS2-name*, as defined in the [RFC 4130][1]. For
@@ -692,9 +714,14 @@ module Aws::Transfer
692
714
  # [1]: https://datatracker.ietf.org/doc/html/rfc4130
693
715
  #
694
716
  # @option params [required, String] :profile_type
695
- # Indicates whether to list only `LOCAL` type profiles or only `PARTNER`
696
- # type profiles. If not supplied in the request, the command lists all
697
- # types of profiles.
717
+ # Determines the type of profile to create:
718
+ #
719
+ # * Specify `LOCAL` to create a local profile. A local profile
720
+ # represents the AS2-enabled Transfer Family server organization or
721
+ # party.
722
+ #
723
+ # * Specify `PARTNER` to create a partner profile. A partner profile
724
+ # represents a remote organization, external to Transfer Family.
698
725
  #
699
726
  # @option params [Array<String>] :certificate_ids
700
727
  # An array of identifiers for the imported certificates. You use this
@@ -824,7 +851,9 @@ module Aws::Transfer
824
851
  # </note>
825
852
  #
826
853
  # @option params [String] :host_key
827
- # The RSA, ECDSA, or ED25519 private key to use for your server.
854
+ # The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled
855
+ # server. You can add multiple host keys, in case you want to rotate
856
+ # keys, or have a set of active keys that use different algorithms.
828
857
  #
829
858
  # Use the following command to generate an RSA 2048 bit key with no
830
859
  # passphrase:
@@ -853,7 +882,7 @@ module Aws::Transfer
853
882
  # SFTP-enabled server to a new server, don't update the host key.
854
883
  # Accidentally changing a server's host key can be disruptive.
855
884
  #
856
- # For more information, see [Change the host key for your SFTP-enabled
885
+ # For more information, see [Update host keys for your SFTP-enabled
857
886
  # server][1] in the *Transfer Family User Guide*.
858
887
  #
859
888
  #
@@ -985,6 +1014,11 @@ module Aws::Transfer
985
1014
  # Specifies the workflow ID for the workflow to assign and the execution
986
1015
  # role that's used for executing the workflow.
987
1016
  #
1017
+ # In additon to a workflow to execute when a file is uploaded
1018
+ # completely, `WorkflowDeatails` can also contain a workflow ID (and
1019
+ # execution role) for a workflow to execute on partial upload. A partial
1020
+ # upload occurs when a file is open when the session disconnects.
1021
+ #
988
1022
  # @return [Types::CreateServerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
989
1023
  #
990
1024
  # * {Types::CreateServerResponse#server_id #server_id} => String
@@ -1028,7 +1062,13 @@ module Aws::Transfer
1028
1062
  # },
1029
1063
  # ],
1030
1064
  # workflow_details: {
1031
- # on_upload: [ # required
1065
+ # on_upload: [
1066
+ # {
1067
+ # workflow_id: "WorkflowId", # required
1068
+ # execution_role: "Role", # required
1069
+ # },
1070
+ # ],
1071
+ # on_partial_upload: [
1032
1072
  # {
1033
1073
  # workflow_id: "WorkflowId", # required
1034
1074
  # execution_role: "Role", # required
@@ -1418,7 +1458,8 @@ module Aws::Transfer
1418
1458
  # when you create an agreement.
1419
1459
  #
1420
1460
  # @option params [required, String] :server_id
1421
- # The server ID associated with the agreement that you are deleting.
1461
+ # The server identifier associated with the agreement that you are
1462
+ # deleting.
1422
1463
  #
1423
1464
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1424
1465
  #
@@ -1442,7 +1483,7 @@ module Aws::Transfer
1442
1483
  # parameter.
1443
1484
  #
1444
1485
  # @option params [required, String] :certificate_id
1445
- # The ID of the certificate object that you are deleting.
1486
+ # The identifier of the certificate object that you are deleting.
1446
1487
  #
1447
1488
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1448
1489
  #
@@ -1486,11 +1527,11 @@ module Aws::Transfer
1486
1527
  # Deletes the host key that's specified in the `HoskKeyId` parameter.
1487
1528
  #
1488
1529
  # @option params [required, String] :server_id
1489
- # Provide the ID of the server that contains the host key that you are
1530
+ # The identifier of the server that contains the host key that you are
1490
1531
  # deleting.
1491
1532
  #
1492
1533
  # @option params [required, String] :host_key_id
1493
- # The ID of the host key that you are deleting.
1534
+ # The identifier of the host key that you are deleting.
1494
1535
  #
1495
1536
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1496
1537
  #
@@ -1513,7 +1554,7 @@ module Aws::Transfer
1513
1554
  # Deletes the profile that's specified in the `ProfileId` parameter.
1514
1555
  #
1515
1556
  # @option params [required, String] :profile_id
1516
- # The ID of the profile that you are deleting.
1557
+ # The identifier of the profile that you are deleting.
1517
1558
  #
1518
1559
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1519
1560
  #
@@ -1719,7 +1760,7 @@ module Aws::Transfer
1719
1760
  # when you create an agreement.
1720
1761
  #
1721
1762
  # @option params [required, String] :server_id
1722
- # The server ID that's associated with the agreement.
1763
+ # The server identifier that's associated with the agreement.
1723
1764
  #
1724
1765
  # @return [Types::DescribeAgreementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1725
1766
  #
@@ -1909,11 +1950,11 @@ module Aws::Transfer
1909
1950
  # `HostKeyId` and `ServerId`.
1910
1951
  #
1911
1952
  # @option params [required, String] :server_id
1912
- # Provide the ID of the server that contains the host key that you want
1953
+ # The identifier of the server that contains the host key that you want
1913
1954
  # described.
1914
1955
  #
1915
1956
  # @option params [required, String] :host_key_id
1916
- # Provide the ID of the host key that you want described.
1957
+ # The identifier of the host key that you want described.
1917
1958
  #
1918
1959
  # @return [Types::DescribeHostKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1919
1960
  #
@@ -2089,6 +2130,9 @@ module Aws::Transfer
2089
2130
  # resp.server.workflow_details.on_upload #=> Array
2090
2131
  # resp.server.workflow_details.on_upload[0].workflow_id #=> String
2091
2132
  # resp.server.workflow_details.on_upload[0].execution_role #=> String
2133
+ # resp.server.workflow_details.on_partial_upload #=> Array
2134
+ # resp.server.workflow_details.on_partial_upload[0].workflow_id #=> String
2135
+ # resp.server.workflow_details.on_partial_upload[0].execution_role #=> String
2092
2136
  #
2093
2137
  #
2094
2138
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -2302,10 +2346,11 @@ module Aws::Transfer
2302
2346
  req.send_request(options)
2303
2347
  end
2304
2348
 
2305
- # Adds a host key to the server specified by the `ServerId` parameter.
2349
+ # Adds a host key to the server that's specified by the `ServerId`
2350
+ # parameter.
2306
2351
  #
2307
2352
  # @option params [required, String] :server_id
2308
- # Provide the ID of the server that contains the host key that you are
2353
+ # The identifier of the server that contains the host key that you are
2309
2354
  # importing.
2310
2355
  #
2311
2356
  # @option params [required, String] :host_key_body
@@ -2314,7 +2359,7 @@ module Aws::Transfer
2314
2359
  # Transfer Family accepts RSA, ECDSA, and ED25519 keys.
2315
2360
  #
2316
2361
  # @option params [String] :description
2317
- # Enter a text description to identify this host key.
2362
+ # The text description that identifies this host key.
2318
2363
  #
2319
2364
  # @option params [Array<Types::Tag>] :tags
2320
2365
  # Key-value pairs that can be used to group and search for host keys.
@@ -2670,8 +2715,8 @@ module Aws::Transfer
2670
2715
  req.send_request(options)
2671
2716
  end
2672
2717
 
2673
- # Returns a list of host keys for the server specified by the `ServerId`
2674
- # paramter.
2718
+ # Returns a list of host keys for the server that's specified by the
2719
+ # `ServerId` parameter.
2675
2720
  #
2676
2721
  # @option params [Integer] :max_results
2677
2722
  # The maximum number of host keys to return.
@@ -2682,7 +2727,7 @@ module Aws::Transfer
2682
2727
  # subsequent call to `ListHostKeys` to continue listing results.
2683
2728
  #
2684
2729
  # @option params [required, String] :server_id
2685
- # Provide the ID of the server that contains the host keys that you want
2730
+ # The identifier of the server that contains the host keys that you want
2686
2731
  # to view.
2687
2732
  #
2688
2733
  # @return [Types::ListHostKeysResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
@@ -3048,8 +3093,8 @@ module Aws::Transfer
3048
3093
  req.send_request(options)
3049
3094
  end
3050
3095
 
3051
- # Begins an outbound file transfer. You specify the `ConnectorId` and
3052
- # the file paths for where to send the files.
3096
+ # Begins an outbound file transfer to a remote AS2 server. You specify
3097
+ # the `ConnectorId` and the file paths for where to send the files.
3053
3098
  #
3054
3099
  # @option params [required, String] :connector_id
3055
3100
  # The unique identifier for the connector.
@@ -3651,18 +3696,18 @@ module Aws::Transfer
3651
3696
  req.send_request(options)
3652
3697
  end
3653
3698
 
3654
- # Updates the description for the host key specified by the specified by
3655
- # the `ServerId` and `HostKeyId` parameters.
3699
+ # Updates the description for the host key that's specified by the
3700
+ # `ServerId` and `HostKeyId` parameters.
3656
3701
  #
3657
3702
  # @option params [required, String] :server_id
3658
- # Provide the ID of the server that contains the host key that you are
3703
+ # The identifier of the server that contains the host key that you are
3659
3704
  # updating.
3660
3705
  #
3661
3706
  # @option params [required, String] :host_key_id
3662
- # Provide the ID of the host key that you are updating.
3707
+ # The identifier of the host key that you are updating.
3663
3708
  #
3664
3709
  # @option params [required, String] :description
3665
- # Provide an updated description for the host key.
3710
+ # An updated description for the host key.
3666
3711
  #
3667
3712
  # @return [Types::UpdateHostKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3668
3713
  #
@@ -3832,7 +3877,9 @@ module Aws::Transfer
3832
3877
  # </note>
3833
3878
  #
3834
3879
  # @option params [String] :host_key
3835
- # The RSA, ECDSA, or ED25519 private key to use for your server.
3880
+ # The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled
3881
+ # server. You can add multiple host keys, in case you want to rotate
3882
+ # keys, or have a set of active keys that use different algorithms.
3836
3883
  #
3837
3884
  # Use the following command to generate an RSA 2048 bit key with no
3838
3885
  # passphrase:
@@ -3861,7 +3908,7 @@ module Aws::Transfer
3861
3908
  # SFTP-enabled server to a new server, don't update the host key.
3862
3909
  # Accidentally changing a server's host key can be disruptive.
3863
3910
  #
3864
- # For more information, see [Change the host key for your SFTP-enabled
3911
+ # For more information, see [Update host keys for your SFTP-enabled
3865
3912
  # server][1] in the *Transfer Family User Guide*.
3866
3913
  #
3867
3914
  #
@@ -3945,6 +3992,11 @@ module Aws::Transfer
3945
3992
  # Specifies the workflow ID for the workflow to assign and the execution
3946
3993
  # role that's used for executing the workflow.
3947
3994
  #
3995
+ # In additon to a workflow to execute when a file is uploaded
3996
+ # completely, `WorkflowDeatails` can also contain a workflow ID (and
3997
+ # execution role) for a workflow to execute on partial upload. A partial
3998
+ # upload occurs when a file is open when the session disconnects.
3999
+ #
3948
4000
  # To remove an associated workflow from a server, you can provide an
3949
4001
  # empty `OnUpload` object, as in the following example.
3950
4002
  #
@@ -3987,7 +4039,13 @@ module Aws::Transfer
3987
4039
  # security_policy_name: "SecurityPolicyName",
3988
4040
  # server_id: "ServerId", # required
3989
4041
  # workflow_details: {
3990
- # on_upload: [ # required
4042
+ # on_upload: [
4043
+ # {
4044
+ # workflow_id: "WorkflowId", # required
4045
+ # execution_role: "Role", # required
4046
+ # },
4047
+ # ],
4048
+ # on_partial_upload: [
3991
4049
  # {
3992
4050
  # workflow_id: "WorkflowId", # required
3993
4051
  # execution_role: "Role", # required
@@ -4167,7 +4225,7 @@ module Aws::Transfer
4167
4225
  params: params,
4168
4226
  config: config)
4169
4227
  context[:gem_name] = 'aws-sdk-transfer'
4170
- context[:gem_version] = '1.59.0'
4228
+ context[:gem_version] = '1.61.0'
4171
4229
  Seahorse::Client::Request.new(handlers, context)
4172
4230
  end
4173
4231
 
@@ -200,6 +200,7 @@ module Aws::Transfer
200
200
  MessageSubject = Shapes::StringShape.new(name: 'MessageSubject')
201
201
  NextToken = Shapes::StringShape.new(name: 'NextToken')
202
202
  NullableRole = Shapes::StringShape.new(name: 'NullableRole')
203
+ OnPartialUploadWorkflowDetails = Shapes::ListShape.new(name: 'OnPartialUploadWorkflowDetails')
203
204
  OnUploadWorkflowDetails = Shapes::ListShape.new(name: 'OnUploadWorkflowDetails')
204
205
  OverwriteExisting = Shapes::StringShape.new(name: 'OverwriteExisting')
205
206
  PassiveIp = Shapes::StringShape.new(name: 'PassiveIp')
@@ -964,6 +965,8 @@ module Aws::Transfer
964
965
  LoggingConfiguration.add_member(:log_group_name, Shapes::ShapeRef.new(shape: LogGroupName, location_name: "LogGroupName"))
965
966
  LoggingConfiguration.struct_class = Types::LoggingConfiguration
966
967
 
968
+ OnPartialUploadWorkflowDetails.member = Shapes::ShapeRef.new(shape: WorkflowDetail)
969
+
967
970
  OnUploadWorkflowDetails.member = Shapes::ShapeRef.new(shape: WorkflowDetail)
968
971
 
969
972
  PosixProfile.add_member(:uid, Shapes::ShapeRef.new(shape: PosixId, required: true, location_name: "Uid"))
@@ -1189,7 +1192,8 @@ module Aws::Transfer
1189
1192
  WorkflowDetail.add_member(:execution_role, Shapes::ShapeRef.new(shape: Role, required: true, location_name: "ExecutionRole"))
1190
1193
  WorkflowDetail.struct_class = Types::WorkflowDetail
1191
1194
 
1192
- WorkflowDetails.add_member(:on_upload, Shapes::ShapeRef.new(shape: OnUploadWorkflowDetails, required: true, location_name: "OnUpload"))
1195
+ WorkflowDetails.add_member(:on_upload, Shapes::ShapeRef.new(shape: OnUploadWorkflowDetails, location_name: "OnUpload"))
1196
+ WorkflowDetails.add_member(:on_partial_upload, Shapes::ShapeRef.new(shape: OnPartialUploadWorkflowDetails, location_name: "OnPartialUpload"))
1193
1197
  WorkflowDetails.struct_class = Types::WorkflowDetails
1194
1198
 
1195
1199
  WorkflowStep.add_member(:type, Shapes::ShapeRef.new(shape: WorkflowStepType, location_name: "Type"))
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Transfer
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
19
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ if self[:use_dual_stack].nil?
56
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
+ end
58
+ self[:use_fips] = options[:use_fips]
59
+ self[:use_fips] = false if self[:use_fips].nil?
60
+ if self[:use_fips].nil?
61
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
+ end
63
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Transfer
11
+ class EndpointProvider
12
+ def initialize(rule_set = nil)
13
+ @@rule_set ||= begin
14
+ endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
15
+ Aws::Endpoints::RuleSet.new(
16
+ version: endpoint_rules['version'],
17
+ service_id: endpoint_rules['serviceId'],
18
+ parameters: endpoint_rules['parameters'],
19
+ rules: endpoint_rules['rules']
20
+ )
21
+ end
22
+ @provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
23
+ end
24
+
25
+ def resolve_endpoint(parameters)
26
+ @provider.resolve_endpoint(parameters)
27
+ end
28
+
29
+ # @api private
30
+ RULES = <<-JSON
31
+ eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
32
+ bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
33
+ dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aG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