lib/aws-sdk-cloudwatch/plugins/endpoints.rb in aws-sdk-cloudwatch-1.103.0 vs lib/aws-sdk-cloudwatch/plugins/endpoints.rb in aws-sdk-cloudwatch-1.104.0
- old
+ new
@@ -25,11 +25,11 @@
# @api private
class Handler < Seahorse::Client::Handler
def call(context)
unless context[:discovered_endpoint]
- params = parameters_for_operation(context)
+ params = Aws::CloudWatch::Endpoints.parameters_for_operation(context)
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
context.http_request.endpoint = endpoint.url
apply_endpoint_headers(context, endpoint.headers)
@@ -63,90 +63,9 @@
.compact
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
.join(',')
context.http_request.headers[key] = value
- end
- end
-
- def parameters_for_operation(context)
- case context.operation_name
- when :delete_alarms
- Aws::CloudWatch::Endpoints::DeleteAlarms.build(context)
- when :delete_anomaly_detector
- Aws::CloudWatch::Endpoints::DeleteAnomalyDetector.build(context)
- when :delete_dashboards
- Aws::CloudWatch::Endpoints::DeleteDashboards.build(context)
- when :delete_insight_rules
- Aws::CloudWatch::Endpoints::DeleteInsightRules.build(context)
- when :delete_metric_stream
- Aws::CloudWatch::Endpoints::DeleteMetricStream.build(context)
- when :describe_alarm_history
- Aws::CloudWatch::Endpoints::DescribeAlarmHistory.build(context)
- when :describe_alarms
- Aws::CloudWatch::Endpoints::DescribeAlarms.build(context)
- when :describe_alarms_for_metric
- Aws::CloudWatch::Endpoints::DescribeAlarmsForMetric.build(context)
- when :describe_anomaly_detectors
- Aws::CloudWatch::Endpoints::DescribeAnomalyDetectors.build(context)
- when :describe_insight_rules
- Aws::CloudWatch::Endpoints::DescribeInsightRules.build(context)
- when :disable_alarm_actions
- Aws::CloudWatch::Endpoints::DisableAlarmActions.build(context)
- when :disable_insight_rules
- Aws::CloudWatch::Endpoints::DisableInsightRules.build(context)
- when :enable_alarm_actions
- Aws::CloudWatch::Endpoints::EnableAlarmActions.build(context)
- when :enable_insight_rules
- Aws::CloudWatch::Endpoints::EnableInsightRules.build(context)
- when :get_dashboard
- Aws::CloudWatch::Endpoints::GetDashboard.build(context)
- when :get_insight_rule_report
- Aws::CloudWatch::Endpoints::GetInsightRuleReport.build(context)
- when :get_metric_data
- Aws::CloudWatch::Endpoints::GetMetricData.build(context)
- when :get_metric_statistics
- Aws::CloudWatch::Endpoints::GetMetricStatistics.build(context)
- when :get_metric_stream
- Aws::CloudWatch::Endpoints::GetMetricStream.build(context)
- when :get_metric_widget_image
- Aws::CloudWatch::Endpoints::GetMetricWidgetImage.build(context)
- when :list_dashboards
- Aws::CloudWatch::Endpoints::ListDashboards.build(context)
- when :list_managed_insight_rules
- Aws::CloudWatch::Endpoints::ListManagedInsightRules.build(context)
- when :list_metric_streams
- Aws::CloudWatch::Endpoints::ListMetricStreams.build(context)
- when :list_metrics
- Aws::CloudWatch::Endpoints::ListMetrics.build(context)
- when :list_tags_for_resource
- Aws::CloudWatch::Endpoints::ListTagsForResource.build(context)
- when :put_anomaly_detector
- Aws::CloudWatch::Endpoints::PutAnomalyDetector.build(context)
- when :put_composite_alarm
- Aws::CloudWatch::Endpoints::PutCompositeAlarm.build(context)
- when :put_dashboard
- Aws::CloudWatch::Endpoints::PutDashboard.build(context)
- when :put_insight_rule
- Aws::CloudWatch::Endpoints::PutInsightRule.build(context)
- when :put_managed_insight_rules
- Aws::CloudWatch::Endpoints::PutManagedInsightRules.build(context)
- when :put_metric_alarm
- Aws::CloudWatch::Endpoints::PutMetricAlarm.build(context)
- when :put_metric_data
- Aws::CloudWatch::Endpoints::PutMetricData.build(context)
- when :put_metric_stream
- Aws::CloudWatch::Endpoints::PutMetricStream.build(context)
- when :set_alarm_state
- Aws::CloudWatch::Endpoints::SetAlarmState.build(context)
- when :start_metric_streams
- Aws::CloudWatch::Endpoints::StartMetricStreams.build(context)
- when :stop_metric_streams
- Aws::CloudWatch::Endpoints::StopMetricStreams.build(context)
- when :tag_resource
- Aws::CloudWatch::Endpoints::TagResource.build(context)
- when :untag_resource
- Aws::CloudWatch::Endpoints::UntagResource.build(context)
end
end
end
def add_handlers(handlers, _config)