Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginator definitions for CostExplorer API #3041

Open
wants to merge 2 commits into
base: version-3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions apis/ce/2017-10-25/paginators-1.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,78 @@
{
"pagination": {
"GetAnomalies": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetAnomalyMonitors": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetAnomalySubscriptions": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetCostAndUsage": {
"input_token": "NextPageToken",
"output_token": "NextPageToken"
},
"GetCostAndUsageWithResources": {
"input_token": "NextPageToken",
"output_token": "NextPageToken"
},
"GetCostCategories": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetDimensionValues": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetReservationCoverage": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetReservationPurchaseRecommendation": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "PageSize"
},
"GetReservationUtilization": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"GetRightsizingRecommendation": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "PageSize"
},
"GetSavingsPlansCoverage": {
"input_token": "NextToken",
"output_token": "NextToken",
"limit_key": "MaxResults"
},
"GetSavingsPlansPurchaseRecommendation": {
"input_token": "NextToken",
"output_token": "NextToken",
"limit_key": "PageSize"
},
"GetSavingsPlansUtilizationDetails": {
"input_token": "NextToken",
"output_token": "NextToken",
"limit_key": "MaxResults"
},
"GetTags": {
"input_token": "NextPageToken",
"output_token": "NextPageToken",
"limit_key": "MaxResults"
},
"ListCostAllocationTagBackfillHistory": {
"input_token": "NextToken",
"output_token": "NextToken",
Expand All @@ -24,6 +87,11 @@
"input_token": "NextToken",
"output_token": "NextToken",
"limit_key": "MaxResults"
},
"ListSavingsPlansPurchaseRecommendationGeneration": {
"input_token": "NextToken",
"output_token": "NextToken",
"limit_key": "PageSize"
}
}
}
28 changes: 28 additions & 0 deletions gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ def describe_cost_category_definition(params = {}, options = {})
# * {Types::GetAnomaliesResponse#anomalies #anomalies} => Array<Types::Anomaly>
# * {Types::GetAnomaliesResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_anomalies({
Expand Down Expand Up @@ -1078,6 +1080,8 @@ def get_anomalies(params = {}, options = {})
# * {Types::GetAnomalyMonitorsResponse#anomaly_monitors #anomaly_monitors} => Array<Types::AnomalyMonitor>
# * {Types::GetAnomalyMonitorsResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_anomaly_monitors({
Expand Down Expand Up @@ -1151,6 +1155,8 @@ def get_anomaly_monitors(params = {}, options = {})
# * {Types::GetAnomalySubscriptionsResponse#anomaly_subscriptions #anomaly_subscriptions} => Array<Types::AnomalySubscription>
# * {Types::GetAnomalySubscriptionsResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_anomaly_subscriptions({
Expand Down Expand Up @@ -1349,6 +1355,8 @@ def get_approximate_usage_records(params = {}, options = {})
# * {Types::GetCostAndUsageResponse#results_by_time #results_by_time} => Array<Types::ResultByTime>
# * {Types::GetCostAndUsageResponse#dimension_value_attributes #dimension_value_attributes} => Array<Types::DimensionValuesWithAttributes>
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_cost_and_usage({
Expand Down Expand Up @@ -1532,6 +1540,8 @@ def get_cost_and_usage(params = {}, options = {})
# * {Types::GetCostAndUsageWithResourcesResponse#results_by_time #results_by_time} => Array<Types::ResultByTime>
# * {Types::GetCostAndUsageWithResourcesResponse#dimension_value_attributes #dimension_value_attributes} => Array<Types::DimensionValuesWithAttributes>
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_cost_and_usage_with_resources({
Expand Down Expand Up @@ -1777,6 +1787,8 @@ def get_cost_and_usage_with_resources(params = {}, options = {})
# * {Types::GetCostCategoriesResponse#return_size #return_size} => Integer
# * {Types::GetCostCategoriesResponse#total_size #total_size} => Integer
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_cost_categories({
Expand Down Expand Up @@ -2320,6 +2332,8 @@ def get_cost_forecast(params = {}, options = {})
# * {Types::GetDimensionValuesResponse#total_size #total_size} => Integer
# * {Types::GetDimensionValuesResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_dimension_values({
Expand Down Expand Up @@ -2562,6 +2576,8 @@ def get_dimension_values(params = {}, options = {})
# * {Types::GetReservationCoverageResponse#total #total} => Types::Coverage
# * {Types::GetReservationCoverageResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_reservation_coverage({
Expand Down Expand Up @@ -2819,6 +2835,8 @@ def get_reservation_coverage(params = {}, options = {})
# * {Types::GetReservationPurchaseRecommendationResponse#recommendations #recommendations} => Array<Types::ReservationPurchaseRecommendation>
# * {Types::GetReservationPurchaseRecommendationResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_reservation_purchase_recommendation({
Expand Down Expand Up @@ -3074,6 +3092,8 @@ def get_reservation_purchase_recommendation(params = {}, options = {})
# * {Types::GetReservationUtilizationResponse#total #total} => Types::ReservationAggregates
# * {Types::GetReservationUtilizationResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_reservation_utilization({
Expand Down Expand Up @@ -3332,6 +3352,8 @@ def get_reservation_utilization(params = {}, options = {})
# * {Types::GetRightsizingRecommendationResponse#next_page_token #next_page_token} => String
# * {Types::GetRightsizingRecommendationResponse#configuration #configuration} => Types::RightsizingRecommendationConfiguration
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_rightsizing_recommendation({
Expand Down Expand Up @@ -3765,6 +3787,8 @@ def get_savings_plans_coverage(params = {}, options = {})
# * {Types::GetSavingsPlansPurchaseRecommendationResponse#savings_plans_purchase_recommendation #savings_plans_purchase_recommendation} => Types::SavingsPlansPurchaseRecommendation
# * {Types::GetSavingsPlansPurchaseRecommendationResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_savings_plans_purchase_recommendation({
Expand Down Expand Up @@ -4327,6 +4351,8 @@ def get_savings_plans_utilization_details(params = {}, options = {})
# * {Types::GetTagsResponse#return_size #return_size} => Integer
# * {Types::GetTagsResponse#total_size #total_size} => Integer
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.get_tags({
Expand Down Expand Up @@ -4737,6 +4763,8 @@ def list_cost_category_definitions(params = {}, options = {})
# * {Types::ListSavingsPlansPurchaseRecommendationGenerationResponse#generation_summary_list #generation_summary_list} => Array<Types::GenerationSummary>
# * {Types::ListSavingsPlansPurchaseRecommendationGenerationResponse#next_page_token #next_page_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
# @example Request syntax with placeholder values
#
# resp = client.list_savings_plans_purchase_recommendation_generation({
Expand Down
82 changes: 82 additions & 0 deletions gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/client_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,12 @@ module ClientApi
o.output = Shapes::ShapeRef.new(shape: GetAnomaliesResponse)
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_anomaly_monitors, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1653,6 +1659,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: UnknownMonitorException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_anomaly_subscriptions, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1664,6 +1676,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: UnknownSubscriptionException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_approximate_usage_records, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1687,6 +1705,11 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
o[:pager] = Aws::Pager.new(
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_cost_and_usage_with_resources, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1700,6 +1723,11 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: BillExpirationException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
o[:pager] = Aws::Pager.new(
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_cost_categories, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1713,6 +1741,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_cost_forecast, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1736,6 +1770,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_reservation_coverage, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1747,6 +1787,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_reservation_purchase_recommendation, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1758,6 +1804,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "page_size",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_reservation_utilization, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1769,6 +1821,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_rightsizing_recommendation, Seahorse::Model::Operation.new.tap do |o|
Expand All @@ -1779,6 +1837,12 @@ module ClientApi
o.output = Shapes::ShapeRef.new(shape: GetRightsizingRecommendationResponse)
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "page_size",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_savings_plan_purchase_recommendation_details, Seahorse::Model::Operation.new.tap do |o|
Expand Down Expand Up @@ -1816,6 +1880,12 @@ module ClientApi
o.output = Shapes::ShapeRef.new(shape: GetSavingsPlansPurchaseRecommendationResponse)
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o[:pager] = Aws::Pager.new(
limit_key: "page_size",
tokens: {
"next_token" => "next_token"
}
)
end)

api.add_operation(:get_savings_plans_utilization, Seahorse::Model::Operation.new.tap do |o|
Expand Down Expand Up @@ -1856,6 +1926,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
o[:pager] = Aws::Pager.new(
limit_key: "max_results",
tokens: {
"next_page_token" => "next_page_token"
}
)
end)

api.add_operation(:get_usage_forecast, Seahorse::Model::Operation.new.tap do |o|
Expand Down Expand Up @@ -1925,6 +2001,12 @@ module ClientApi
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
o[:pager] = Aws::Pager.new(
limit_key: "page_size",
tokens: {
"next_token" => "next_token"
}
)
end)

api.add_operation(:list_tags_for_resource, Seahorse::Model::Operation.new.tap do |o|
Expand Down