aws-sdk-elasticache 1.79.0 → 1.81.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,198 @@
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::ElastiCache
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::ElastiCache::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::ElastiCache::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::ElastiCache::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_tags_to_resource
60
+ Aws::ElastiCache::Endpoints::AddTagsToResource.build(context)
61
+ when :authorize_cache_security_group_ingress
62
+ Aws::ElastiCache::Endpoints::AuthorizeCacheSecurityGroupIngress.build(context)
63
+ when :batch_apply_update_action
64
+ Aws::ElastiCache::Endpoints::BatchApplyUpdateAction.build(context)
65
+ when :batch_stop_update_action
66
+ Aws::ElastiCache::Endpoints::BatchStopUpdateAction.build(context)
67
+ when :complete_migration
68
+ Aws::ElastiCache::Endpoints::CompleteMigration.build(context)
69
+ when :copy_snapshot
70
+ Aws::ElastiCache::Endpoints::CopySnapshot.build(context)
71
+ when :create_cache_cluster
72
+ Aws::ElastiCache::Endpoints::CreateCacheCluster.build(context)
73
+ when :create_cache_parameter_group
74
+ Aws::ElastiCache::Endpoints::CreateCacheParameterGroup.build(context)
75
+ when :create_cache_security_group
76
+ Aws::ElastiCache::Endpoints::CreateCacheSecurityGroup.build(context)
77
+ when :create_cache_subnet_group
78
+ Aws::ElastiCache::Endpoints::CreateCacheSubnetGroup.build(context)
79
+ when :create_global_replication_group
80
+ Aws::ElastiCache::Endpoints::CreateGlobalReplicationGroup.build(context)
81
+ when :create_replication_group
82
+ Aws::ElastiCache::Endpoints::CreateReplicationGroup.build(context)
83
+ when :create_snapshot
84
+ Aws::ElastiCache::Endpoints::CreateSnapshot.build(context)
85
+ when :create_user
86
+ Aws::ElastiCache::Endpoints::CreateUser.build(context)
87
+ when :create_user_group
88
+ Aws::ElastiCache::Endpoints::CreateUserGroup.build(context)
89
+ when :decrease_node_groups_in_global_replication_group
90
+ Aws::ElastiCache::Endpoints::DecreaseNodeGroupsInGlobalReplicationGroup.build(context)
91
+ when :decrease_replica_count
92
+ Aws::ElastiCache::Endpoints::DecreaseReplicaCount.build(context)
93
+ when :delete_cache_cluster
94
+ Aws::ElastiCache::Endpoints::DeleteCacheCluster.build(context)
95
+ when :delete_cache_parameter_group
96
+ Aws::ElastiCache::Endpoints::DeleteCacheParameterGroup.build(context)
97
+ when :delete_cache_security_group
98
+ Aws::ElastiCache::Endpoints::DeleteCacheSecurityGroup.build(context)
99
+ when :delete_cache_subnet_group
100
+ Aws::ElastiCache::Endpoints::DeleteCacheSubnetGroup.build(context)
101
+ when :delete_global_replication_group
102
+ Aws::ElastiCache::Endpoints::DeleteGlobalReplicationGroup.build(context)
103
+ when :delete_replication_group
104
+ Aws::ElastiCache::Endpoints::DeleteReplicationGroup.build(context)
105
+ when :delete_snapshot
106
+ Aws::ElastiCache::Endpoints::DeleteSnapshot.build(context)
107
+ when :delete_user
108
+ Aws::ElastiCache::Endpoints::DeleteUser.build(context)
109
+ when :delete_user_group
110
+ Aws::ElastiCache::Endpoints::DeleteUserGroup.build(context)
111
+ when :describe_cache_clusters
112
+ Aws::ElastiCache::Endpoints::DescribeCacheClusters.build(context)
113
+ when :describe_cache_engine_versions
114
+ Aws::ElastiCache::Endpoints::DescribeCacheEngineVersions.build(context)
115
+ when :describe_cache_parameter_groups
116
+ Aws::ElastiCache::Endpoints::DescribeCacheParameterGroups.build(context)
117
+ when :describe_cache_parameters
118
+ Aws::ElastiCache::Endpoints::DescribeCacheParameters.build(context)
119
+ when :describe_cache_security_groups
120
+ Aws::ElastiCache::Endpoints::DescribeCacheSecurityGroups.build(context)
121
+ when :describe_cache_subnet_groups
122
+ Aws::ElastiCache::Endpoints::DescribeCacheSubnetGroups.build(context)
123
+ when :describe_engine_default_parameters
124
+ Aws::ElastiCache::Endpoints::DescribeEngineDefaultParameters.build(context)
125
+ when :describe_events
126
+ Aws::ElastiCache::Endpoints::DescribeEvents.build(context)
127
+ when :describe_global_replication_groups
128
+ Aws::ElastiCache::Endpoints::DescribeGlobalReplicationGroups.build(context)
129
+ when :describe_replication_groups
130
+ Aws::ElastiCache::Endpoints::DescribeReplicationGroups.build(context)
131
+ when :describe_reserved_cache_nodes
132
+ Aws::ElastiCache::Endpoints::DescribeReservedCacheNodes.build(context)
133
+ when :describe_reserved_cache_nodes_offerings
134
+ Aws::ElastiCache::Endpoints::DescribeReservedCacheNodesOfferings.build(context)
135
+ when :describe_service_updates
136
+ Aws::ElastiCache::Endpoints::DescribeServiceUpdates.build(context)
137
+ when :describe_snapshots
138
+ Aws::ElastiCache::Endpoints::DescribeSnapshots.build(context)
139
+ when :describe_update_actions
140
+ Aws::ElastiCache::Endpoints::DescribeUpdateActions.build(context)
141
+ when :describe_user_groups
142
+ Aws::ElastiCache::Endpoints::DescribeUserGroups.build(context)
143
+ when :describe_users
144
+ Aws::ElastiCache::Endpoints::DescribeUsers.build(context)
145
+ when :disassociate_global_replication_group
146
+ Aws::ElastiCache::Endpoints::DisassociateGlobalReplicationGroup.build(context)
147
+ when :failover_global_replication_group
148
+ Aws::ElastiCache::Endpoints::FailoverGlobalReplicationGroup.build(context)
149
+ when :increase_node_groups_in_global_replication_group
150
+ Aws::ElastiCache::Endpoints::IncreaseNodeGroupsInGlobalReplicationGroup.build(context)
151
+ when :increase_replica_count
152
+ Aws::ElastiCache::Endpoints::IncreaseReplicaCount.build(context)
153
+ when :list_allowed_node_type_modifications
154
+ Aws::ElastiCache::Endpoints::ListAllowedNodeTypeModifications.build(context)
155
+ when :list_tags_for_resource
156
+ Aws::ElastiCache::Endpoints::ListTagsForResource.build(context)
157
+ when :modify_cache_cluster
158
+ Aws::ElastiCache::Endpoints::ModifyCacheCluster.build(context)
159
+ when :modify_cache_parameter_group
160
+ Aws::ElastiCache::Endpoints::ModifyCacheParameterGroup.build(context)
161
+ when :modify_cache_subnet_group
162
+ Aws::ElastiCache::Endpoints::ModifyCacheSubnetGroup.build(context)
163
+ when :modify_global_replication_group
164
+ Aws::ElastiCache::Endpoints::ModifyGlobalReplicationGroup.build(context)
165
+ when :modify_replication_group
166
+ Aws::ElastiCache::Endpoints::ModifyReplicationGroup.build(context)
167
+ when :modify_replication_group_shard_configuration
168
+ Aws::ElastiCache::Endpoints::ModifyReplicationGroupShardConfiguration.build(context)
169
+ when :modify_user
170
+ Aws::ElastiCache::Endpoints::ModifyUser.build(context)
171
+ when :modify_user_group
172
+ Aws::ElastiCache::Endpoints::ModifyUserGroup.build(context)
173
+ when :purchase_reserved_cache_nodes_offering
174
+ Aws::ElastiCache::Endpoints::PurchaseReservedCacheNodesOffering.build(context)
175
+ when :rebalance_slots_in_global_replication_group
176
+ Aws::ElastiCache::Endpoints::RebalanceSlotsInGlobalReplicationGroup.build(context)
177
+ when :reboot_cache_cluster
178
+ Aws::ElastiCache::Endpoints::RebootCacheCluster.build(context)
179
+ when :remove_tags_from_resource
180
+ Aws::ElastiCache::Endpoints::RemoveTagsFromResource.build(context)
181
+ when :reset_cache_parameter_group
182
+ Aws::ElastiCache::Endpoints::ResetCacheParameterGroup.build(context)
183
+ when :revoke_cache_security_group_ingress
184
+ Aws::ElastiCache::Endpoints::RevokeCacheSecurityGroupIngress.build(context)
185
+ when :start_migration
186
+ Aws::ElastiCache::Endpoints::StartMigration.build(context)
187
+ when :test_failover
188
+ Aws::ElastiCache::Endpoints::TestFailover.build(context)
189
+ end
190
+ end
191
+ end
192
+
193
+ def add_handlers(handlers, _config)
194
+ handlers.add(Handler, step: :build, priority: 75)
195
+ end
196
+ end
197
+ end
198
+ end