aws-sdk-docdb 1.44.0 → 1.46.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-docdb/client.rb +20 -3
- data/lib/aws-sdk-docdb/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-docdb/endpoint_provider.rb +69 -0
- data/lib/aws-sdk-docdb/endpoints.rb +757 -0
- data/lib/aws-sdk-docdb/plugins/cross_region_copying.rb +12 -11
- data/lib/aws-sdk-docdb/plugins/endpoints.rb +174 -0
- data/lib/aws-sdk-docdb/types.rb +0 -767
- data/lib/aws-sdk-docdb.rb +5 -1
- metadata +8 -4
@@ -36,22 +36,23 @@ module Aws
|
|
36
36
|
context.operation.input,
|
37
37
|
params
|
38
38
|
)
|
39
|
-
|
40
|
-
|
39
|
+
|
40
|
+
endpoint_params = Aws::DocDB::EndpointParameters.new(
|
41
41
|
region: source_region,
|
42
|
-
|
42
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
43
|
+
use_fips: context.config.use_fips_endpoint
|
43
44
|
)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
endpoint = context.config.endpoint_provider
|
46
|
+
.resolve_endpoint(endpoint_params)
|
47
|
+
auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
48
|
+
|
49
|
+
signer = Aws::Plugins::Sign.signer_for(
|
50
|
+
auth_scheme, context.config, source_region
|
50
51
|
)
|
51
|
-
|
52
|
+
|
52
53
|
signer.presign_url(
|
53
54
|
http_method: 'GET',
|
54
|
-
url: url,
|
55
|
+
url: "#{endpoint.url}?#{param_list}",
|
55
56
|
expires_in: 3600
|
56
57
|
).to_s
|
57
58
|
end
|
@@ -0,0 +1,174 @@
|
|
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
|
+
|
11
|
+
module Aws::DocDB
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::DocDB::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::DocDB::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::DocDB::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :add_source_identifier_to_subscription
|
60
|
+
Aws::DocDB::Endpoints::AddSourceIdentifierToSubscription.build(context)
|
61
|
+
when :add_tags_to_resource
|
62
|
+
Aws::DocDB::Endpoints::AddTagsToResource.build(context)
|
63
|
+
when :apply_pending_maintenance_action
|
64
|
+
Aws::DocDB::Endpoints::ApplyPendingMaintenanceAction.build(context)
|
65
|
+
when :copy_db_cluster_parameter_group
|
66
|
+
Aws::DocDB::Endpoints::CopyDBClusterParameterGroup.build(context)
|
67
|
+
when :copy_db_cluster_snapshot
|
68
|
+
Aws::DocDB::Endpoints::CopyDBClusterSnapshot.build(context)
|
69
|
+
when :create_db_cluster
|
70
|
+
Aws::DocDB::Endpoints::CreateDBCluster.build(context)
|
71
|
+
when :create_db_cluster_parameter_group
|
72
|
+
Aws::DocDB::Endpoints::CreateDBClusterParameterGroup.build(context)
|
73
|
+
when :create_db_cluster_snapshot
|
74
|
+
Aws::DocDB::Endpoints::CreateDBClusterSnapshot.build(context)
|
75
|
+
when :create_db_instance
|
76
|
+
Aws::DocDB::Endpoints::CreateDBInstance.build(context)
|
77
|
+
when :create_db_subnet_group
|
78
|
+
Aws::DocDB::Endpoints::CreateDBSubnetGroup.build(context)
|
79
|
+
when :create_event_subscription
|
80
|
+
Aws::DocDB::Endpoints::CreateEventSubscription.build(context)
|
81
|
+
when :create_global_cluster
|
82
|
+
Aws::DocDB::Endpoints::CreateGlobalCluster.build(context)
|
83
|
+
when :delete_db_cluster
|
84
|
+
Aws::DocDB::Endpoints::DeleteDBCluster.build(context)
|
85
|
+
when :delete_db_cluster_parameter_group
|
86
|
+
Aws::DocDB::Endpoints::DeleteDBClusterParameterGroup.build(context)
|
87
|
+
when :delete_db_cluster_snapshot
|
88
|
+
Aws::DocDB::Endpoints::DeleteDBClusterSnapshot.build(context)
|
89
|
+
when :delete_db_instance
|
90
|
+
Aws::DocDB::Endpoints::DeleteDBInstance.build(context)
|
91
|
+
when :delete_db_subnet_group
|
92
|
+
Aws::DocDB::Endpoints::DeleteDBSubnetGroup.build(context)
|
93
|
+
when :delete_event_subscription
|
94
|
+
Aws::DocDB::Endpoints::DeleteEventSubscription.build(context)
|
95
|
+
when :delete_global_cluster
|
96
|
+
Aws::DocDB::Endpoints::DeleteGlobalCluster.build(context)
|
97
|
+
when :describe_certificates
|
98
|
+
Aws::DocDB::Endpoints::DescribeCertificates.build(context)
|
99
|
+
when :describe_db_cluster_parameter_groups
|
100
|
+
Aws::DocDB::Endpoints::DescribeDBClusterParameterGroups.build(context)
|
101
|
+
when :describe_db_cluster_parameters
|
102
|
+
Aws::DocDB::Endpoints::DescribeDBClusterParameters.build(context)
|
103
|
+
when :describe_db_cluster_snapshot_attributes
|
104
|
+
Aws::DocDB::Endpoints::DescribeDBClusterSnapshotAttributes.build(context)
|
105
|
+
when :describe_db_cluster_snapshots
|
106
|
+
Aws::DocDB::Endpoints::DescribeDBClusterSnapshots.build(context)
|
107
|
+
when :describe_db_clusters
|
108
|
+
Aws::DocDB::Endpoints::DescribeDBClusters.build(context)
|
109
|
+
when :describe_db_engine_versions
|
110
|
+
Aws::DocDB::Endpoints::DescribeDBEngineVersions.build(context)
|
111
|
+
when :describe_db_instances
|
112
|
+
Aws::DocDB::Endpoints::DescribeDBInstances.build(context)
|
113
|
+
when :describe_db_subnet_groups
|
114
|
+
Aws::DocDB::Endpoints::DescribeDBSubnetGroups.build(context)
|
115
|
+
when :describe_engine_default_cluster_parameters
|
116
|
+
Aws::DocDB::Endpoints::DescribeEngineDefaultClusterParameters.build(context)
|
117
|
+
when :describe_event_categories
|
118
|
+
Aws::DocDB::Endpoints::DescribeEventCategories.build(context)
|
119
|
+
when :describe_event_subscriptions
|
120
|
+
Aws::DocDB::Endpoints::DescribeEventSubscriptions.build(context)
|
121
|
+
when :describe_events
|
122
|
+
Aws::DocDB::Endpoints::DescribeEvents.build(context)
|
123
|
+
when :describe_global_clusters
|
124
|
+
Aws::DocDB::Endpoints::DescribeGlobalClusters.build(context)
|
125
|
+
when :describe_orderable_db_instance_options
|
126
|
+
Aws::DocDB::Endpoints::DescribeOrderableDBInstanceOptions.build(context)
|
127
|
+
when :describe_pending_maintenance_actions
|
128
|
+
Aws::DocDB::Endpoints::DescribePendingMaintenanceActions.build(context)
|
129
|
+
when :failover_db_cluster
|
130
|
+
Aws::DocDB::Endpoints::FailoverDBCluster.build(context)
|
131
|
+
when :list_tags_for_resource
|
132
|
+
Aws::DocDB::Endpoints::ListTagsForResource.build(context)
|
133
|
+
when :modify_db_cluster
|
134
|
+
Aws::DocDB::Endpoints::ModifyDBCluster.build(context)
|
135
|
+
when :modify_db_cluster_parameter_group
|
136
|
+
Aws::DocDB::Endpoints::ModifyDBClusterParameterGroup.build(context)
|
137
|
+
when :modify_db_cluster_snapshot_attribute
|
138
|
+
Aws::DocDB::Endpoints::ModifyDBClusterSnapshotAttribute.build(context)
|
139
|
+
when :modify_db_instance
|
140
|
+
Aws::DocDB::Endpoints::ModifyDBInstance.build(context)
|
141
|
+
when :modify_db_subnet_group
|
142
|
+
Aws::DocDB::Endpoints::ModifyDBSubnetGroup.build(context)
|
143
|
+
when :modify_event_subscription
|
144
|
+
Aws::DocDB::Endpoints::ModifyEventSubscription.build(context)
|
145
|
+
when :modify_global_cluster
|
146
|
+
Aws::DocDB::Endpoints::ModifyGlobalCluster.build(context)
|
147
|
+
when :reboot_db_instance
|
148
|
+
Aws::DocDB::Endpoints::RebootDBInstance.build(context)
|
149
|
+
when :remove_from_global_cluster
|
150
|
+
Aws::DocDB::Endpoints::RemoveFromGlobalCluster.build(context)
|
151
|
+
when :remove_source_identifier_from_subscription
|
152
|
+
Aws::DocDB::Endpoints::RemoveSourceIdentifierFromSubscription.build(context)
|
153
|
+
when :remove_tags_from_resource
|
154
|
+
Aws::DocDB::Endpoints::RemoveTagsFromResource.build(context)
|
155
|
+
when :reset_db_cluster_parameter_group
|
156
|
+
Aws::DocDB::Endpoints::ResetDBClusterParameterGroup.build(context)
|
157
|
+
when :restore_db_cluster_from_snapshot
|
158
|
+
Aws::DocDB::Endpoints::RestoreDBClusterFromSnapshot.build(context)
|
159
|
+
when :restore_db_cluster_to_point_in_time
|
160
|
+
Aws::DocDB::Endpoints::RestoreDBClusterToPointInTime.build(context)
|
161
|
+
when :start_db_cluster
|
162
|
+
Aws::DocDB::Endpoints::StartDBCluster.build(context)
|
163
|
+
when :stop_db_cluster
|
164
|
+
Aws::DocDB::Endpoints::StopDBCluster.build(context)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def add_handlers(handlers, _config)
|
170
|
+
handlers.add(Handler, step: :build, priority: 75)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|