aws-sdk-databasemigrationservice 1.88.0 → 1.111.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,7 @@ module Aws::DatabaseMigrationService
29
29
  # ## Error Classes
30
30
  # * {AccessDeniedFault}
31
31
  # * {CollectorNotFoundFault}
32
+ # * {FailedDependencyFault}
32
33
  # * {InsufficientResourceCapacityFault}
33
34
  # * {InvalidCertificateFault}
34
35
  # * {InvalidOperationFault}
@@ -89,6 +90,21 @@ module Aws::DatabaseMigrationService
89
90
  end
90
91
  end
91
92
 
93
+ class FailedDependencyFault < ServiceError
94
+
95
+ # @param [Seahorse::Client::RequestContext] context
96
+ # @param [String] message
97
+ # @param [Aws::DatabaseMigrationService::Types::FailedDependencyFault] data
98
+ def initialize(context, message, data = Aws::EmptyStructure.new)
99
+ super(context, message, data)
100
+ end
101
+
102
+ # @return [String]
103
+ def message
104
+ @message || @data[:message]
105
+ end
106
+ end
107
+
92
108
  class InsufficientResourceCapacityFault < ServiceError
93
109
 
94
110
  # @param [Seahorse::Client::RequestContext] context
@@ -14,35 +14,49 @@ module Aws::DatabaseMigrationService
14
14
  option(
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::DatabaseMigrationService::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::DatabaseMigrationService::EndpointParameters`'
21
- ) do |cfg|
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::DatabaseMigrationService::EndpointParameters`.
22
+ DOCS
22
23
  Aws::DatabaseMigrationService::EndpointProvider.new
23
24
  end
24
25
 
25
26
  # @api private
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
- # If endpoint was discovered, do not resolve or apply the endpoint.
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::DatabaseMigrationService::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
34
34
  apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
35
38
  end
36
39
 
37
- context[:endpoint_params] = params
38
40
  context[:auth_scheme] =
39
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
42
 
41
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
42
44
  end
43
45
 
44
46
  private
45
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
46
60
  def apply_endpoint_headers(context, headers)
47
61
  headers.each do |key, values|
48
62
  value = values
@@ -53,223 +67,6 @@ module Aws::DatabaseMigrationService
53
67
  context.http_request.headers[key] = value
54
68
  end
55
69
  end
56
-
57
- def parameters_for_operation(context)
58
- case context.operation_name
59
- when :add_tags_to_resource
60
- Aws::DatabaseMigrationService::Endpoints::AddTagsToResource.build(context)
61
- when :apply_pending_maintenance_action
62
- Aws::DatabaseMigrationService::Endpoints::ApplyPendingMaintenanceAction.build(context)
63
- when :batch_start_recommendations
64
- Aws::DatabaseMigrationService::Endpoints::BatchStartRecommendations.build(context)
65
- when :cancel_replication_task_assessment_run
66
- Aws::DatabaseMigrationService::Endpoints::CancelReplicationTaskAssessmentRun.build(context)
67
- when :create_data_provider
68
- Aws::DatabaseMigrationService::Endpoints::CreateDataProvider.build(context)
69
- when :create_endpoint
70
- Aws::DatabaseMigrationService::Endpoints::CreateEndpoint.build(context)
71
- when :create_event_subscription
72
- Aws::DatabaseMigrationService::Endpoints::CreateEventSubscription.build(context)
73
- when :create_fleet_advisor_collector
74
- Aws::DatabaseMigrationService::Endpoints::CreateFleetAdvisorCollector.build(context)
75
- when :create_instance_profile
76
- Aws::DatabaseMigrationService::Endpoints::CreateInstanceProfile.build(context)
77
- when :create_migration_project
78
- Aws::DatabaseMigrationService::Endpoints::CreateMigrationProject.build(context)
79
- when :create_replication_config
80
- Aws::DatabaseMigrationService::Endpoints::CreateReplicationConfig.build(context)
81
- when :create_replication_instance
82
- Aws::DatabaseMigrationService::Endpoints::CreateReplicationInstance.build(context)
83
- when :create_replication_subnet_group
84
- Aws::DatabaseMigrationService::Endpoints::CreateReplicationSubnetGroup.build(context)
85
- when :create_replication_task
86
- Aws::DatabaseMigrationService::Endpoints::CreateReplicationTask.build(context)
87
- when :delete_certificate
88
- Aws::DatabaseMigrationService::Endpoints::DeleteCertificate.build(context)
89
- when :delete_connection
90
- Aws::DatabaseMigrationService::Endpoints::DeleteConnection.build(context)
91
- when :delete_data_provider
92
- Aws::DatabaseMigrationService::Endpoints::DeleteDataProvider.build(context)
93
- when :delete_endpoint
94
- Aws::DatabaseMigrationService::Endpoints::DeleteEndpoint.build(context)
95
- when :delete_event_subscription
96
- Aws::DatabaseMigrationService::Endpoints::DeleteEventSubscription.build(context)
97
- when :delete_fleet_advisor_collector
98
- Aws::DatabaseMigrationService::Endpoints::DeleteFleetAdvisorCollector.build(context)
99
- when :delete_fleet_advisor_databases
100
- Aws::DatabaseMigrationService::Endpoints::DeleteFleetAdvisorDatabases.build(context)
101
- when :delete_instance_profile
102
- Aws::DatabaseMigrationService::Endpoints::DeleteInstanceProfile.build(context)
103
- when :delete_migration_project
104
- Aws::DatabaseMigrationService::Endpoints::DeleteMigrationProject.build(context)
105
- when :delete_replication_config
106
- Aws::DatabaseMigrationService::Endpoints::DeleteReplicationConfig.build(context)
107
- when :delete_replication_instance
108
- Aws::DatabaseMigrationService::Endpoints::DeleteReplicationInstance.build(context)
109
- when :delete_replication_subnet_group
110
- Aws::DatabaseMigrationService::Endpoints::DeleteReplicationSubnetGroup.build(context)
111
- when :delete_replication_task
112
- Aws::DatabaseMigrationService::Endpoints::DeleteReplicationTask.build(context)
113
- when :delete_replication_task_assessment_run
114
- Aws::DatabaseMigrationService::Endpoints::DeleteReplicationTaskAssessmentRun.build(context)
115
- when :describe_account_attributes
116
- Aws::DatabaseMigrationService::Endpoints::DescribeAccountAttributes.build(context)
117
- when :describe_applicable_individual_assessments
118
- Aws::DatabaseMigrationService::Endpoints::DescribeApplicableIndividualAssessments.build(context)
119
- when :describe_certificates
120
- Aws::DatabaseMigrationService::Endpoints::DescribeCertificates.build(context)
121
- when :describe_connections
122
- Aws::DatabaseMigrationService::Endpoints::DescribeConnections.build(context)
123
- when :describe_conversion_configuration
124
- Aws::DatabaseMigrationService::Endpoints::DescribeConversionConfiguration.build(context)
125
- when :describe_data_providers
126
- Aws::DatabaseMigrationService::Endpoints::DescribeDataProviders.build(context)
127
- when :describe_endpoint_settings
128
- Aws::DatabaseMigrationService::Endpoints::DescribeEndpointSettings.build(context)
129
- when :describe_endpoint_types
130
- Aws::DatabaseMigrationService::Endpoints::DescribeEndpointTypes.build(context)
131
- when :describe_endpoints
132
- Aws::DatabaseMigrationService::Endpoints::DescribeEndpoints.build(context)
133
- when :describe_engine_versions
134
- Aws::DatabaseMigrationService::Endpoints::DescribeEngineVersions.build(context)
135
- when :describe_event_categories
136
- Aws::DatabaseMigrationService::Endpoints::DescribeEventCategories.build(context)
137
- when :describe_event_subscriptions
138
- Aws::DatabaseMigrationService::Endpoints::DescribeEventSubscriptions.build(context)
139
- when :describe_events
140
- Aws::DatabaseMigrationService::Endpoints::DescribeEvents.build(context)
141
- when :describe_extension_pack_associations
142
- Aws::DatabaseMigrationService::Endpoints::DescribeExtensionPackAssociations.build(context)
143
- when :describe_fleet_advisor_collectors
144
- Aws::DatabaseMigrationService::Endpoints::DescribeFleetAdvisorCollectors.build(context)
145
- when :describe_fleet_advisor_databases
146
- Aws::DatabaseMigrationService::Endpoints::DescribeFleetAdvisorDatabases.build(context)
147
- when :describe_fleet_advisor_lsa_analysis
148
- Aws::DatabaseMigrationService::Endpoints::DescribeFleetAdvisorLsaAnalysis.build(context)
149
- when :describe_fleet_advisor_schema_object_summary
150
- Aws::DatabaseMigrationService::Endpoints::DescribeFleetAdvisorSchemaObjectSummary.build(context)
151
- when :describe_fleet_advisor_schemas
152
- Aws::DatabaseMigrationService::Endpoints::DescribeFleetAdvisorSchemas.build(context)
153
- when :describe_instance_profiles
154
- Aws::DatabaseMigrationService::Endpoints::DescribeInstanceProfiles.build(context)
155
- when :describe_metadata_model_assessments
156
- Aws::DatabaseMigrationService::Endpoints::DescribeMetadataModelAssessments.build(context)
157
- when :describe_metadata_model_conversions
158
- Aws::DatabaseMigrationService::Endpoints::DescribeMetadataModelConversions.build(context)
159
- when :describe_metadata_model_exports_as_script
160
- Aws::DatabaseMigrationService::Endpoints::DescribeMetadataModelExportsAsScript.build(context)
161
- when :describe_metadata_model_exports_to_target
162
- Aws::DatabaseMigrationService::Endpoints::DescribeMetadataModelExportsToTarget.build(context)
163
- when :describe_metadata_model_imports
164
- Aws::DatabaseMigrationService::Endpoints::DescribeMetadataModelImports.build(context)
165
- when :describe_migration_projects
166
- Aws::DatabaseMigrationService::Endpoints::DescribeMigrationProjects.build(context)
167
- when :describe_orderable_replication_instances
168
- Aws::DatabaseMigrationService::Endpoints::DescribeOrderableReplicationInstances.build(context)
169
- when :describe_pending_maintenance_actions
170
- Aws::DatabaseMigrationService::Endpoints::DescribePendingMaintenanceActions.build(context)
171
- when :describe_recommendation_limitations
172
- Aws::DatabaseMigrationService::Endpoints::DescribeRecommendationLimitations.build(context)
173
- when :describe_recommendations
174
- Aws::DatabaseMigrationService::Endpoints::DescribeRecommendations.build(context)
175
- when :describe_refresh_schemas_status
176
- Aws::DatabaseMigrationService::Endpoints::DescribeRefreshSchemasStatus.build(context)
177
- when :describe_replication_configs
178
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationConfigs.build(context)
179
- when :describe_replication_instance_task_logs
180
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationInstanceTaskLogs.build(context)
181
- when :describe_replication_instances
182
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationInstances.build(context)
183
- when :describe_replication_subnet_groups
184
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationSubnetGroups.build(context)
185
- when :describe_replication_table_statistics
186
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationTableStatistics.build(context)
187
- when :describe_replication_task_assessment_results
188
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationTaskAssessmentResults.build(context)
189
- when :describe_replication_task_assessment_runs
190
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationTaskAssessmentRuns.build(context)
191
- when :describe_replication_task_individual_assessments
192
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationTaskIndividualAssessments.build(context)
193
- when :describe_replication_tasks
194
- Aws::DatabaseMigrationService::Endpoints::DescribeReplicationTasks.build(context)
195
- when :describe_replications
196
- Aws::DatabaseMigrationService::Endpoints::DescribeReplications.build(context)
197
- when :describe_schemas
198
- Aws::DatabaseMigrationService::Endpoints::DescribeSchemas.build(context)
199
- when :describe_table_statistics
200
- Aws::DatabaseMigrationService::Endpoints::DescribeTableStatistics.build(context)
201
- when :export_metadata_model_assessment
202
- Aws::DatabaseMigrationService::Endpoints::ExportMetadataModelAssessment.build(context)
203
- when :import_certificate
204
- Aws::DatabaseMigrationService::Endpoints::ImportCertificate.build(context)
205
- when :list_tags_for_resource
206
- Aws::DatabaseMigrationService::Endpoints::ListTagsForResource.build(context)
207
- when :modify_conversion_configuration
208
- Aws::DatabaseMigrationService::Endpoints::ModifyConversionConfiguration.build(context)
209
- when :modify_data_provider
210
- Aws::DatabaseMigrationService::Endpoints::ModifyDataProvider.build(context)
211
- when :modify_endpoint
212
- Aws::DatabaseMigrationService::Endpoints::ModifyEndpoint.build(context)
213
- when :modify_event_subscription
214
- Aws::DatabaseMigrationService::Endpoints::ModifyEventSubscription.build(context)
215
- when :modify_instance_profile
216
- Aws::DatabaseMigrationService::Endpoints::ModifyInstanceProfile.build(context)
217
- when :modify_migration_project
218
- Aws::DatabaseMigrationService::Endpoints::ModifyMigrationProject.build(context)
219
- when :modify_replication_config
220
- Aws::DatabaseMigrationService::Endpoints::ModifyReplicationConfig.build(context)
221
- when :modify_replication_instance
222
- Aws::DatabaseMigrationService::Endpoints::ModifyReplicationInstance.build(context)
223
- when :modify_replication_subnet_group
224
- Aws::DatabaseMigrationService::Endpoints::ModifyReplicationSubnetGroup.build(context)
225
- when :modify_replication_task
226
- Aws::DatabaseMigrationService::Endpoints::ModifyReplicationTask.build(context)
227
- when :move_replication_task
228
- Aws::DatabaseMigrationService::Endpoints::MoveReplicationTask.build(context)
229
- when :reboot_replication_instance
230
- Aws::DatabaseMigrationService::Endpoints::RebootReplicationInstance.build(context)
231
- when :refresh_schemas
232
- Aws::DatabaseMigrationService::Endpoints::RefreshSchemas.build(context)
233
- when :reload_replication_tables
234
- Aws::DatabaseMigrationService::Endpoints::ReloadReplicationTables.build(context)
235
- when :reload_tables
236
- Aws::DatabaseMigrationService::Endpoints::ReloadTables.build(context)
237
- when :remove_tags_from_resource
238
- Aws::DatabaseMigrationService::Endpoints::RemoveTagsFromResource.build(context)
239
- when :run_fleet_advisor_lsa_analysis
240
- Aws::DatabaseMigrationService::Endpoints::RunFleetAdvisorLsaAnalysis.build(context)
241
- when :start_extension_pack_association
242
- Aws::DatabaseMigrationService::Endpoints::StartExtensionPackAssociation.build(context)
243
- when :start_metadata_model_assessment
244
- Aws::DatabaseMigrationService::Endpoints::StartMetadataModelAssessment.build(context)
245
- when :start_metadata_model_conversion
246
- Aws::DatabaseMigrationService::Endpoints::StartMetadataModelConversion.build(context)
247
- when :start_metadata_model_export_as_script
248
- Aws::DatabaseMigrationService::Endpoints::StartMetadataModelExportAsScript.build(context)
249
- when :start_metadata_model_export_to_target
250
- Aws::DatabaseMigrationService::Endpoints::StartMetadataModelExportToTarget.build(context)
251
- when :start_metadata_model_import
252
- Aws::DatabaseMigrationService::Endpoints::StartMetadataModelImport.build(context)
253
- when :start_recommendations
254
- Aws::DatabaseMigrationService::Endpoints::StartRecommendations.build(context)
255
- when :start_replication
256
- Aws::DatabaseMigrationService::Endpoints::StartReplication.build(context)
257
- when :start_replication_task
258
- Aws::DatabaseMigrationService::Endpoints::StartReplicationTask.build(context)
259
- when :start_replication_task_assessment
260
- Aws::DatabaseMigrationService::Endpoints::StartReplicationTaskAssessment.build(context)
261
- when :start_replication_task_assessment_run
262
- Aws::DatabaseMigrationService::Endpoints::StartReplicationTaskAssessmentRun.build(context)
263
- when :stop_replication
264
- Aws::DatabaseMigrationService::Endpoints::StopReplication.build(context)
265
- when :stop_replication_task
266
- Aws::DatabaseMigrationService::Endpoints::StopReplicationTask.build(context)
267
- when :test_connection
268
- Aws::DatabaseMigrationService::Endpoints::TestConnection.build(context)
269
- when :update_subscriptions_to_event_bridge
270
- Aws::DatabaseMigrationService::Endpoints::UpdateSubscriptionsToEventBridge.build(context)
271
- end
272
- end
273
70
  end
274
71
 
275
72
  def add_handlers(handlers, _config)