aws-sdk-costexplorer 1.69.0 → 1.92.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +117 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-costexplorer/client.rb +1362 -382
- data/lib/aws-sdk-costexplorer/client_api.rb +304 -2
- data/lib/aws-sdk-costexplorer/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-costexplorer/endpoint_provider.rb +60 -0
- data/lib/aws-sdk-costexplorer/endpoints.rb +548 -0
- data/lib/aws-sdk-costexplorer/errors.rb +42 -0
- data/lib/aws-sdk-costexplorer/plugins/endpoints.rb +144 -0
- data/lib/aws-sdk-costexplorer/types.rb +1868 -1816
- data/lib/aws-sdk-costexplorer.rb +5 -1
- metadata +8 -4
|
@@ -29,11 +29,13 @@ module Aws::CostExplorer
|
|
|
29
29
|
# ## Error Classes
|
|
30
30
|
# * {BillExpirationException}
|
|
31
31
|
# * {DataUnavailableException}
|
|
32
|
+
# * {GenerationExistsException}
|
|
32
33
|
# * {InvalidNextTokenException}
|
|
33
34
|
# * {LimitExceededException}
|
|
34
35
|
# * {RequestChangedException}
|
|
35
36
|
# * {ResourceNotFoundException}
|
|
36
37
|
# * {ServiceQuotaExceededException}
|
|
38
|
+
# * {TooManyTagsException}
|
|
37
39
|
# * {UnknownMonitorException}
|
|
38
40
|
# * {UnknownSubscriptionException}
|
|
39
41
|
# * {UnresolvableUsageUnitException}
|
|
@@ -74,6 +76,21 @@ module Aws::CostExplorer
|
|
|
74
76
|
end
|
|
75
77
|
end
|
|
76
78
|
|
|
79
|
+
class GenerationExistsException < ServiceError
|
|
80
|
+
|
|
81
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
82
|
+
# @param [String] message
|
|
83
|
+
# @param [Aws::CostExplorer::Types::GenerationExistsException] data
|
|
84
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
85
|
+
super(context, message, data)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# @return [String]
|
|
89
|
+
def message
|
|
90
|
+
@message || @data[:message]
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
77
94
|
class InvalidNextTokenException < ServiceError
|
|
78
95
|
|
|
79
96
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -132,6 +149,11 @@ module Aws::CostExplorer
|
|
|
132
149
|
def message
|
|
133
150
|
@message || @data[:message]
|
|
134
151
|
end
|
|
152
|
+
|
|
153
|
+
# @return [String]
|
|
154
|
+
def resource_name
|
|
155
|
+
@data[:resource_name]
|
|
156
|
+
end
|
|
135
157
|
end
|
|
136
158
|
|
|
137
159
|
class ServiceQuotaExceededException < ServiceError
|
|
@@ -149,6 +171,26 @@ module Aws::CostExplorer
|
|
|
149
171
|
end
|
|
150
172
|
end
|
|
151
173
|
|
|
174
|
+
class TooManyTagsException < ServiceError
|
|
175
|
+
|
|
176
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
177
|
+
# @param [String] message
|
|
178
|
+
# @param [Aws::CostExplorer::Types::TooManyTagsException] data
|
|
179
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
180
|
+
super(context, message, data)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @return [String]
|
|
184
|
+
def message
|
|
185
|
+
@message || @data[:message]
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# @return [String]
|
|
189
|
+
def resource_name
|
|
190
|
+
@data[:resource_name]
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
152
194
|
class UnknownMonitorException < ServiceError
|
|
153
195
|
|
|
154
196
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -0,0 +1,144 @@
|
|
|
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::CostExplorer
|
|
12
|
+
module Plugins
|
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
|
14
|
+
option(
|
|
15
|
+
:endpoint_provider,
|
|
16
|
+
doc_type: 'Aws::CostExplorer::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::CostExplorer::EndpointParameters`'
|
|
21
|
+
) do |cfg|
|
|
22
|
+
Aws::CostExplorer::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 :create_anomaly_monitor
|
|
60
|
+
Aws::CostExplorer::Endpoints::CreateAnomalyMonitor.build(context)
|
|
61
|
+
when :create_anomaly_subscription
|
|
62
|
+
Aws::CostExplorer::Endpoints::CreateAnomalySubscription.build(context)
|
|
63
|
+
when :create_cost_category_definition
|
|
64
|
+
Aws::CostExplorer::Endpoints::CreateCostCategoryDefinition.build(context)
|
|
65
|
+
when :delete_anomaly_monitor
|
|
66
|
+
Aws::CostExplorer::Endpoints::DeleteAnomalyMonitor.build(context)
|
|
67
|
+
when :delete_anomaly_subscription
|
|
68
|
+
Aws::CostExplorer::Endpoints::DeleteAnomalySubscription.build(context)
|
|
69
|
+
when :delete_cost_category_definition
|
|
70
|
+
Aws::CostExplorer::Endpoints::DeleteCostCategoryDefinition.build(context)
|
|
71
|
+
when :describe_cost_category_definition
|
|
72
|
+
Aws::CostExplorer::Endpoints::DescribeCostCategoryDefinition.build(context)
|
|
73
|
+
when :get_anomalies
|
|
74
|
+
Aws::CostExplorer::Endpoints::GetAnomalies.build(context)
|
|
75
|
+
when :get_anomaly_monitors
|
|
76
|
+
Aws::CostExplorer::Endpoints::GetAnomalyMonitors.build(context)
|
|
77
|
+
when :get_anomaly_subscriptions
|
|
78
|
+
Aws::CostExplorer::Endpoints::GetAnomalySubscriptions.build(context)
|
|
79
|
+
when :get_cost_and_usage
|
|
80
|
+
Aws::CostExplorer::Endpoints::GetCostAndUsage.build(context)
|
|
81
|
+
when :get_cost_and_usage_with_resources
|
|
82
|
+
Aws::CostExplorer::Endpoints::GetCostAndUsageWithResources.build(context)
|
|
83
|
+
when :get_cost_categories
|
|
84
|
+
Aws::CostExplorer::Endpoints::GetCostCategories.build(context)
|
|
85
|
+
when :get_cost_forecast
|
|
86
|
+
Aws::CostExplorer::Endpoints::GetCostForecast.build(context)
|
|
87
|
+
when :get_dimension_values
|
|
88
|
+
Aws::CostExplorer::Endpoints::GetDimensionValues.build(context)
|
|
89
|
+
when :get_reservation_coverage
|
|
90
|
+
Aws::CostExplorer::Endpoints::GetReservationCoverage.build(context)
|
|
91
|
+
when :get_reservation_purchase_recommendation
|
|
92
|
+
Aws::CostExplorer::Endpoints::GetReservationPurchaseRecommendation.build(context)
|
|
93
|
+
when :get_reservation_utilization
|
|
94
|
+
Aws::CostExplorer::Endpoints::GetReservationUtilization.build(context)
|
|
95
|
+
when :get_rightsizing_recommendation
|
|
96
|
+
Aws::CostExplorer::Endpoints::GetRightsizingRecommendation.build(context)
|
|
97
|
+
when :get_savings_plan_purchase_recommendation_details
|
|
98
|
+
Aws::CostExplorer::Endpoints::GetSavingsPlanPurchaseRecommendationDetails.build(context)
|
|
99
|
+
when :get_savings_plans_coverage
|
|
100
|
+
Aws::CostExplorer::Endpoints::GetSavingsPlansCoverage.build(context)
|
|
101
|
+
when :get_savings_plans_purchase_recommendation
|
|
102
|
+
Aws::CostExplorer::Endpoints::GetSavingsPlansPurchaseRecommendation.build(context)
|
|
103
|
+
when :get_savings_plans_utilization
|
|
104
|
+
Aws::CostExplorer::Endpoints::GetSavingsPlansUtilization.build(context)
|
|
105
|
+
when :get_savings_plans_utilization_details
|
|
106
|
+
Aws::CostExplorer::Endpoints::GetSavingsPlansUtilizationDetails.build(context)
|
|
107
|
+
when :get_tags
|
|
108
|
+
Aws::CostExplorer::Endpoints::GetTags.build(context)
|
|
109
|
+
when :get_usage_forecast
|
|
110
|
+
Aws::CostExplorer::Endpoints::GetUsageForecast.build(context)
|
|
111
|
+
when :list_cost_allocation_tags
|
|
112
|
+
Aws::CostExplorer::Endpoints::ListCostAllocationTags.build(context)
|
|
113
|
+
when :list_cost_category_definitions
|
|
114
|
+
Aws::CostExplorer::Endpoints::ListCostCategoryDefinitions.build(context)
|
|
115
|
+
when :list_savings_plans_purchase_recommendation_generation
|
|
116
|
+
Aws::CostExplorer::Endpoints::ListSavingsPlansPurchaseRecommendationGeneration.build(context)
|
|
117
|
+
when :list_tags_for_resource
|
|
118
|
+
Aws::CostExplorer::Endpoints::ListTagsForResource.build(context)
|
|
119
|
+
when :provide_anomaly_feedback
|
|
120
|
+
Aws::CostExplorer::Endpoints::ProvideAnomalyFeedback.build(context)
|
|
121
|
+
when :start_savings_plans_purchase_recommendation_generation
|
|
122
|
+
Aws::CostExplorer::Endpoints::StartSavingsPlansPurchaseRecommendationGeneration.build(context)
|
|
123
|
+
when :tag_resource
|
|
124
|
+
Aws::CostExplorer::Endpoints::TagResource.build(context)
|
|
125
|
+
when :untag_resource
|
|
126
|
+
Aws::CostExplorer::Endpoints::UntagResource.build(context)
|
|
127
|
+
when :update_anomaly_monitor
|
|
128
|
+
Aws::CostExplorer::Endpoints::UpdateAnomalyMonitor.build(context)
|
|
129
|
+
when :update_anomaly_subscription
|
|
130
|
+
Aws::CostExplorer::Endpoints::UpdateAnomalySubscription.build(context)
|
|
131
|
+
when :update_cost_allocation_tags_status
|
|
132
|
+
Aws::CostExplorer::Endpoints::UpdateCostAllocationTagsStatus.build(context)
|
|
133
|
+
when :update_cost_category_definition
|
|
134
|
+
Aws::CostExplorer::Endpoints::UpdateCostCategoryDefinition.build(context)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def add_handlers(handlers, _config)
|
|
140
|
+
handlers.add(Handler, step: :build, priority: 75)
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|