From 078e3c745900af521e1c15fb75c6c35de8690e33 Mon Sep 17 00:00:00 2001 From: aws-sdk-go-automation <43143561+aws-sdk-go-automation@users.noreply.github.com> Date: Tue, 5 Jan 2021 11:14:27 -0800 Subject: [PATCH] Release v1.36.21 (2021-01-05) (#3724) Release v1.36.21 (2021-01-05) === ### Service Client Updates * `service/application-autoscaling`: Updates service documentation * `service/ce`: Updates service API and documentation --- CHANGELOG.md | 7 + aws/version.go | 2 +- .../2016-02-06/docs-2.json | 10 +- models/apis/ce/2017-10-25/api-2.json | 135 ++- models/apis/ce/2017-10-25/docs-2.json | 118 +- service/applicationautoscaling/api.go | 39 +- service/costexplorer/api.go | 1020 ++++++++++++++++- .../costexploreriface/interface.go | 4 + 8 files changed, 1275 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c24fcd1081..5a59ee2e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Release v1.36.21 (2021-01-05) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service documentation +* `service/ce`: Updates service API and documentation + Release v1.36.20 (2021-01-04) === diff --git a/aws/version.go b/aws/version.go index 6520fb025f..a5c3713adc 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.36.20" +const SDKVersion = "1.36.21" diff --git a/models/apis/application-autoscaling/2016-02-06/docs-2.json b/models/apis/application-autoscaling/2016-02-06/docs-2.json index 9f8a8492aa..ed7ce08cc1 100644 --- a/models/apis/application-autoscaling/2016-02-06/docs-2.json +++ b/models/apis/application-autoscaling/2016-02-06/docs-2.json @@ -216,7 +216,7 @@ "refs": { "StepAdjustment$MetricIntervalLowerBound": "

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.

", "StepAdjustment$MetricIntervalUpperBound": "

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.

The upper bound must be greater than the lower bound.

", - "TargetTrackingScalingPolicyConfiguration$TargetValue": "

The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

" + "TargetTrackingScalingPolicyConfiguration$TargetValue": "

The target value for the metric. Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.

" } }, "MetricStatistic": { @@ -301,8 +301,8 @@ "ResourceCapacity": { "base": null, "refs": { - "RegisterScalableTargetRequest$MinCapacity": "

The minimum value that you plan to scale in to. When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand.

This parameter is required if you are registering a scalable target. For certain resources, the minimum value allowed is 0. This includes Lambda provisioned concurrency, Spot Fleet, ECS services, Aurora DB clusters, EMR clusters, and custom resources. For all other resources, the minimum value allowed is 1.

", - "RegisterScalableTargetRequest$MaxCapacity": "

The maximum value that you plan to scale out to. When a scaling policy is in effect, Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to changing demand.

This parameter is required if you are registering a scalable target.

Although you can specify a large maximum capacity, note that service quotas may impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see Service Endpoints and Quotas in the Amazon Web Services General Reference.

", + "RegisterScalableTargetRequest$MinCapacity": "

The minimum value that you plan to scale in to. When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand. This property is required when registering a new scalable target.

For certain resources, the minimum value allowed is 0. This includes Lambda provisioned concurrency, Spot Fleet, ECS services, Aurora DB clusters, EMR clusters, and custom resources. For all other resources, the minimum value allowed is 1.

", + "RegisterScalableTargetRequest$MaxCapacity": "

The maximum value that you plan to scale out to. When a scaling policy is in effect, Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to changing demand. This property is required when registering a new scalable target.

Although you can specify a large maximum capacity, note that service quotas may impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see Service Endpoints and Quotas in the Amazon Web Services General Reference.

", "ScalableTarget$MinCapacity": "

The minimum value to scale to in response to a scale-in activity.

", "ScalableTarget$MaxCapacity": "

The maximum value to scale to in response to a scale-out activity.

", "ScalableTargetAction$MinCapacity": "

The minimum capacity.

For certain resources, the minimum value allowed is 0. This includes Lambda provisioned concurrency, Spot Fleet, ECS services, Aurora DB clusters, EMR clusters, and custom resources. For all other resources, the minimum value allowed is 1.

", @@ -330,7 +330,7 @@ "DescribeScheduledActionsRequest$ResourceId": "

The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID.

", "PutScalingPolicyRequest$ResourceId": "

The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.

", "PutScalingPolicyResponse$PolicyARN": "

The Amazon Resource Name (ARN) of the resulting scaling policy.

", - "PutScheduledActionRequest$Schedule": "

The schedule for this action. The following formats are supported:

At expressions are useful for one-time schedules. Specify the time in UTC.

For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days.

For more information about cron expressions, see Cron Expressions in the Amazon CloudWatch Events User Guide.

For examples of using these expressions, see Scheduled Scaling in the Application Auto Scaling User Guide.

", + "PutScheduledActionRequest$Schedule": "

The schedule for this action. The following formats are supported:

At expressions are useful for one-time schedules. Specify the time in UTC.

For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days.

For cron expressions, fields is a cron expression. The supported cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year].

For more information and examples, see Scheduled Scaling in the Application Auto Scaling User Guide.

", "PutScheduledActionRequest$ResourceId": "

The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.

", "RegisterScalableTargetRequest$ResourceId": "

The identifier of the resource that is associated with the scalable target. This string consists of the resource type and unique identifier.

", "RegisterScalableTargetRequest$RoleARN": "

This parameter is required for services that do not support service-linked roles (such as Amazon EMR), and it must specify the ARN of an IAM role that allows Application Auto Scaling to modify the scalable target on your behalf.

If the service supports service-linked roles, Application Auto Scaling uses a service-linked role, which it creates if it does not yet exist. For more information, see Application Auto Scaling IAM Roles.

", @@ -341,7 +341,7 @@ "ScalingPolicy$PolicyARN": "

The Amazon Resource Name (ARN) of the scaling policy.

", "ScalingPolicy$ResourceId": "

The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.

", "ScheduledAction$ScheduledActionARN": "

The Amazon Resource Name (ARN) of the scheduled action.

", - "ScheduledAction$Schedule": "

The schedule for this action. The following formats are supported:

At expressions are useful for one-time schedules. Specify the time in UTC.

For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days.

For more information about cron expressions, see Cron Expressions in the Amazon CloudWatch Events User Guide.

For examples of using these expressions, see Scheduled Scaling in the Application Auto Scaling User Guide.

", + "ScheduledAction$Schedule": "

The schedule for this action. The following formats are supported:

At expressions are useful for one-time schedules. Specify the time in UTC.

For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days.

For cron expressions, fields is a cron expression. The supported cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year].

For more information and examples, see Scheduled Scaling in the Application Auto Scaling User Guide.

", "ScheduledAction$ResourceId": "

The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.

" } }, diff --git a/models/apis/ce/2017-10-25/api-2.json b/models/apis/ce/2017-10-25/api-2.json index 422df6a71e..f34a21fdb0 100644 --- a/models/apis/ce/2017-10-25/api-2.json +++ b/models/apis/ce/2017-10-25/api-2.json @@ -177,6 +177,22 @@ {"shape":"RequestChangedException"} ] }, + "GetCostCategories":{ + "name":"GetCostCategories", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetCostCategoriesRequest"}, + "output":{"shape":"GetCostCategoriesResponse"}, + "errors":[ + {"shape":"LimitExceededException"}, + {"shape":"BillExpirationException"}, + {"shape":"DataUnavailableException"}, + {"shape":"InvalidNextTokenException"}, + {"shape":"RequestChangedException"} + ] + }, "GetCostForecast":{ "name":"GetCostForecast", "http":{ @@ -583,6 +599,10 @@ "min":1, "pattern":"^(?! )[\\p{L}\\p{N}\\p{Z}-_]*(?Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).

", "GetCostAndUsage": "

Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in AWS Organizations have access to all member accounts.

For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.

", "GetCostAndUsageWithResources": "

Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in AWS Organizations have access to all member accounts. This API is currently available for the Amazon Elastic Compute Cloud – Compute service only.

This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information on how to access the Settings page, see Controlling Access for Cost Explorer in the AWS Billing and Cost Management User Guide.

", + "GetCostCategories": "

Retrieves an array of Cost Category names and values incurred cost.

If some Cost Category names and values are not associated with any cost, they will not be returned by this API.

", "GetCostForecast": "

Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.

", "GetDimensionValues": "

Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.

", "GetReservationCoverage": "

Retrieves the reservation coverage for your account. This enables you to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:

To determine valid values for a dimension, use the GetDimensionValues operation.

", @@ -182,9 +183,17 @@ "base": "

The unique name of the Cost Category.

", "refs": { "CostCategory$Name": null, + "CostCategoryNamesList$member": null, "CostCategoryReference$Name": null, "CostCategoryValues$Key": null, - "CreateCostCategoryDefinitionRequest$Name": null + "CreateCostCategoryDefinitionRequest$Name": null, + "GetCostCategoriesRequest$CostCategoryName": null + } + }, + "CostCategoryNamesList": { + "base": null, + "refs": { + "GetCostCategoriesResponse$CostCategoryNames": "

The names of the Cost Categories.

" } }, "CostCategoryProcessingStatus": { @@ -254,7 +263,7 @@ } }, "CostCategoryValues": { - "base": "

The Cost Categories values used for filtering the costs.

", + "base": "

The Cost Categories values used for filtering the costs.

If Values and Key are not specified, the ABSENT MatchOption is applied to all Cost Categories. That is, filtering on resources that are not mapped to any Cost Categories.

If Values is provided and Key is not specified, the ABSENT MatchOption is applied to the Cost Categories Key only. That is, filtering on resources without the given Cost Categories key.

", "refs": { "Expression$CostCategories": "

The filter based on CostCategory values.

" } @@ -262,7 +271,8 @@ "CostCategoryValuesList": { "base": null, "refs": { - "CostCategoryReference$Values": "

A list of unique cost category values in a specific cost category.

" + "CostCategoryReference$Values": "

A list of unique cost category values in a specific cost category.

", + "GetCostCategoriesResponse$CostCategoryValues": "

The Cost Category values.

CostCategoryValues are not returned if CostCategoryName is not specified in the request.

" } }, "Coverage": { @@ -357,12 +367,13 @@ } }, "DateInterval": { - "base": "

The time period that you want the usage and costs for.

", + "base": "

The time period of the request.

", "refs": { "CoverageByTime$TimePeriod": "

The period that this coverage was used over.

", "ForecastResult$TimePeriod": "

The period of time that the forecast covers.

", "GetCostAndUsageRequest$TimePeriod": "

Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.

", "GetCostAndUsageWithResourcesRequest$TimePeriod": "

Sets the start and end dates for retrieving Amazon Web Services costs. The range must be within the last 14 days (the start date cannot be earlier than 14 days ago). The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.

", + "GetCostCategoriesRequest$TimePeriod": null, "GetCostForecastRequest$TimePeriod": "

The period of time that you want the forecast to cover. The start date must be equal to or no later than the current date to avoid a validation error.

", "GetDimensionValuesRequest$TimePeriod": "

The start and end dates for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.

", "GetReservationCoverageRequest$TimePeriod": "

The start and end dates of the period that you want to retrieve data about reservation coverage for. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.

", @@ -441,6 +452,8 @@ "DimensionValuesWithAttributesList": { "base": null, "refs": { + "GetCostAndUsageResponse$DimensionValueAttributes": "

The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.

", + "GetCostAndUsageWithResourcesResponse$DimensionValueAttributes": "

The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.

", "GetDimensionValuesResponse$DimensionValues": "

The filters that you used to filter your request. Some dimensions are available only for a specific context.

If you set the context to COST_AND_USAGE, you can use the following dimensions for searching:

If you set the context to RESERVATIONS, you can use the following dimensions for searching:

If you set the context to SAVINGS_PLANS, you can use the following dimensions for searching:

" } }, @@ -514,7 +527,7 @@ } }, "Expression": { - "base": "

Use Expression to filter by cost or by usage. There are two patterns:

For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE.

", + "base": "

Use Expression to filter by cost or by usage. There are two patterns:

For the GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE.

For the GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT.

", "refs": { "AnomalyMonitor$MonitorSpecification": null, "CostCategoryRule$Rule": "

An Expression object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently the only dimensions supported are LINKED_ACCOUNT, SERVICE_CODE, RECORD_TYPE, and LINKED_ACCOUNT_NAME.

Root level OR is not supported. We recommend that you create a separate rule instead.

RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the AWS Billing and Cost Management User Guide.

", @@ -522,14 +535,18 @@ "Expressions$member": null, "GetCostAndUsageRequest$Filter": "

Filters AWS costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression.

", "GetCostAndUsageWithResourcesRequest$Filter": "

Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression.

The GetCostAndUsageWithResources operation requires that you either group by or filter by a ResourceId. It requires the Expression \"SERVICE = Amazon Elastic Compute Cloud - Compute\" in the filter.

", + "GetCostCategoriesRequest$Filter": null, "GetCostForecastRequest$Filter": "

The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters.

", + "GetDimensionValuesRequest$Filter": null, "GetReservationCoverageRequest$Filter": "

Filters utilization data by dimensions. You can filter by the following dimensions:

GetReservationCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.

If you don't provide a SERVICE filter, Cost Explorer defaults to EC2.

Cost category is also supported.

", + "GetReservationPurchaseRecommendationRequest$Filter": null, "GetReservationUtilizationRequest$Filter": "

Filters utilization data by dimensions. You can filter by the following dimensions:

GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

", "GetRightsizingRecommendationRequest$Filter": null, "GetSavingsPlansCoverageRequest$Filter": "

Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:

GetSavingsPlansCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. If there are multiple values for a dimension, they are OR'd together.

Cost category is also supported.

", "GetSavingsPlansPurchaseRecommendationRequest$Filter": "

You can filter your recommendations by Account ID with the LINKED_ACCOUNT dimension. To filter your recommendations by Account ID, specify Key as LINKED_ACCOUNT and Value as the comma-separated Acount ID(s) for which you want to see Savings Plans purchase recommendations.

For GetSavingsPlansPurchaseRecommendation, the Filter does not include CostCategories or Tags. It only includes Dimensions. With Dimensions, Key must be LINKED_ACCOUNT and Value can be a single Account ID or multiple comma-separated Account IDs for which you want to see Savings Plans Purchase Recommendations. AND and OR operators are not supported.

", "GetSavingsPlansUtilizationDetailsRequest$Filter": "

Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:

GetSavingsPlansUtilizationDetails uses the same Expression object as the other operations, but only AND is supported among each dimension.

", "GetSavingsPlansUtilizationRequest$Filter": "

Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:

GetSavingsPlansUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension.

", + "GetTagsRequest$Filter": null, "GetUsageForecastRequest$Filter": "

The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters.

" } }, @@ -796,6 +813,16 @@ "refs": { } }, + "GetCostCategoriesRequest": { + "base": null, + "refs": { + } + }, + "GetCostCategoriesResponse": { + "base": null, + "refs": { + } + }, "GetCostForecastRequest": { "base": null, "refs": { @@ -1034,7 +1061,7 @@ "MatchOptions": { "base": null, "refs": { - "CostCategoryValues$MatchOptions": "

The match options that you can use to filter your results. MatchOptions is only applicable for only applicable for actions related to cost category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE.

", + "CostCategoryValues$MatchOptions": "

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE.

", "DimensionValues$MatchOptions": "

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions are EQUALS and CASE_SENSITIVE.

", "TagValues$MatchOptions": "

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions are EQUALS and CASE_SENSITIVE.

" } @@ -1042,8 +1069,13 @@ "MaxResults": { "base": null, "refs": { + "GetCostCategoriesRequest$MaxResults": "

This field is only used when SortBy is provided in the request.

The maximum number of objects that to be returned for this request. If MaxResults is not specified with SortBy, the request will return 1000 results as the default value for this parameter.

", + "GetDimensionValuesRequest$MaxResults": "

This field is only used when SortBy is provided in the request. The maximum number of objects that to be returned for this request. If MaxResults is not specified with SortBy, the request will return 1000 results as the default value for this parameter.

", + "GetReservationCoverageRequest$MaxResults": "

The maximum number of objects that you returned for this request. If more objects are available, in the response, AWS provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.

", + "GetReservationUtilizationRequest$MaxResults": "

The maximum number of objects that you returned for this request. If more objects are available, in the response, AWS provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.

", "GetSavingsPlansCoverageRequest$MaxResults": "

The number of items to be returned in a response. The default is 20, with a minimum value of 1.

", - "GetSavingsPlansUtilizationDetailsRequest$MaxResults": "

The number of items to be returned in a response. The default is 20, with a minimum value of 1.

" + "GetSavingsPlansUtilizationDetailsRequest$MaxResults": "

The number of items to be returned in a response. The default is 20, with a minimum value of 1.

", + "GetTagsRequest$MaxResults": "

This field is only used when SortBy is provided in the request. The maximum number of objects that to be returned for this request. If MaxResults is not specified with SortBy, the request will return 1000 results as the default value for this parameter.

" } }, "Metric": { @@ -1140,6 +1172,8 @@ "GetCostAndUsageResponse$NextPageToken": "

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", "GetCostAndUsageWithResourcesRequest$NextPageToken": "

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", "GetCostAndUsageWithResourcesResponse$NextPageToken": "

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", + "GetCostCategoriesRequest$NextPageToken": "

If the number of objects that are still available for retrieval exceeds the limit, AWS returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the NextPageToken from the prior call in your next request.

", + "GetCostCategoriesResponse$NextPageToken": "

If the number of objects that are still available for retrieval exceeds the limit, AWS returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

", "GetDimensionValuesRequest$NextPageToken": "

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", "GetDimensionValuesResponse$NextPageToken": "

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", "GetReservationCoverageRequest$NextPageToken": "

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

", @@ -1221,6 +1255,8 @@ "GetAnomaliesRequest$MaxResults": "

The number of entries a paginated response contains.

", "GetAnomalyMonitorsRequest$MaxResults": "

The number of entries a paginated response contains.

", "GetAnomalySubscriptionsRequest$MaxResults": "

The number of entries a paginated response contains.

", + "GetCostCategoriesResponse$ReturnSize": "

The number of objects returned.

", + "GetCostCategoriesResponse$TotalSize": "

The total number of objects.

", "GetDimensionValuesResponse$ReturnSize": "

The number of results that AWS returned at one time.

", "GetDimensionValuesResponse$TotalSize": "

The total number of search results.

", "GetTagsResponse$ReturnSize": "

The number of query results that AWS returns at a time.

", @@ -1271,6 +1307,18 @@ "InstanceDetails$RDSInstanceDetails": "

The Amazon RDS instances that AWS recommends that you purchase.

" } }, + "RICostForUnusedHours": { + "base": null, + "refs": { + "ReservationAggregates$RICostForUnusedHours": "

The cost of unused hours for your reservation.

" + } + }, + "RealizedSavings": { + "base": null, + "refs": { + "ReservationAggregates$RealizedSavings": "

The realized savings due to purchasing and using a reservation.

" + } + }, "RecommendationTarget": { "base": null, "refs": { @@ -1493,6 +1541,18 @@ "GetSavingsPlansCoverageResponse$SavingsPlansCoverages": "

The amount of spend that your Savings Plans covered.

" } }, + "SavingsPlansDataType": { + "base": null, + "refs": { + "SavingsPlansDataTypes$member": null + } + }, + "SavingsPlansDataTypes": { + "base": null, + "refs": { + "GetSavingsPlansUtilizationDetailsRequest$DataType": "

The data type.

" + } + }, "SavingsPlansDetails": { "base": "

Attribute details on a specific Savings Plan.

", "refs": { @@ -1579,6 +1639,7 @@ "SearchString": { "base": null, "refs": { + "GetCostCategoriesRequest$SearchString": "

The value that you want to search the filter values for.

If you do not specify a CostCategoryName, SearchString will be used to filter Cost Category names that match the SearchString pattern. If you do specifiy a CostCategoryName, SearchString will be used to filter Cost Category values that match the SearchString pattern.

", "GetDimensionValuesRequest$SearchString": "

The value that you want to search the filter values for.

", "GetTagsRequest$SearchString": "

The value that you want to search for.

" } @@ -1595,6 +1656,37 @@ "ReservationPurchaseRecommendation$ServiceSpecification": "

Hardware specifications for the service that you want recommendations for.

" } }, + "SortDefinition": { + "base": "

The details of how to sort the data.

", + "refs": { + "GetReservationCoverageRequest$SortBy": "

The value by which you want to sort the data.

The following values are supported for Key:

Supported values for SortOrder are ASCENDING or DESCENDING.

", + "GetReservationUtilizationRequest$SortBy": "

The value by which you want to sort the data.

The following values are supported for Key:

Supported values for SortOrder are ASCENDING or DESCENDING.

", + "GetSavingsPlansCoverageRequest$SortBy": "

The value by which you want to sort the data.

The following values are supported for Key:

Supported values for SortOrder are ASCENDING or DESCENDING.

", + "GetSavingsPlansUtilizationDetailsRequest$SortBy": "

The value by which you want to sort the data.

The following values are supported for Key:

Supported values for SortOrder are ASCENDING or DESCENDING.

", + "GetSavingsPlansUtilizationRequest$SortBy": "

The value by which you want to sort the data.

The following values are supported for Key:

Supported values for SortOrder are ASCENDING or DESCENDING.

", + "SortDefinitions$member": null + } + }, + "SortDefinitionKey": { + "base": null, + "refs": { + "SortDefinition$Key": "

The key by which to sort the data.

" + } + }, + "SortDefinitions": { + "base": null, + "refs": { + "GetCostCategoriesRequest$SortBy": "

The value by which you want to sort the data.

The key represents cost and usage metrics. The following values are supported:

Supported values for SortOrder are ASCENDING or DESCENDING.

When using SortBy, NextPageToken and SearchString are not supported.

", + "GetDimensionValuesRequest$SortBy": "

The value by which you want to sort the data.

The key represents cost and usage metrics. The following values are supported:

Supported values for SortOrder are ASCENDING or DESCENDING.

When you specify a SortBy paramater, the context must be COST_AND_USAGE. Further, when using SortBy, NextPageToken and SearchString are not supported.

", + "GetTagsRequest$SortBy": "

The value by which you want to sort the data.

The key represents cost and usage metrics. The following values are supported:

Supported values for SortOrder are ASCENDING or DESCENDING.

When using SortBy, NextPageToken and SearchString are not supported.

" + } + }, + "SortOrder": { + "base": null, + "refs": { + "SortDefinition$SortOrder": "

The order in which to sort the data.

" + } + }, "Subscriber": { "base": "

The recipient of AnomalySubscription notifications.

", "refs": { @@ -1647,7 +1739,7 @@ } }, "TagValues": { - "base": "

The values that are available for a tag.

", + "base": "

The values that are available for a tag.

If Values and Key are not specified, the ABSENT MatchOption is applied to all tags. That is, filtering on resources with no tags.

If Values is provided and Key is not specified, the ABSENT MatchOption is applied to the tag Key only. That is, filtering on resources without the given tag key.

", "refs": { "Expression$Tags": "

The specific Tag to use for Expression.

", "TagValuesList$member": null @@ -1738,6 +1830,12 @@ "refs": { } }, + "UnrealizedSavings": { + "base": null, + "refs": { + "ReservationAggregates$UnrealizedSavings": "

The unrealized savings due to purchasing and using a reservation.

" + } + }, "UnresolvableUsageUnitException": { "base": "

Cost Explorer was unable to identify the usage unit. Provide UsageType/UsageTypeGroup filter selections that contain matching units, for example: hours.

", "refs": { @@ -1836,8 +1934,8 @@ "AnomalyMonitor$CreationDate": "

The date when the monitor was created.

", "AnomalyMonitor$LastUpdatedDate": "

The date when the monitor was last updated.

", "AnomalyMonitor$LastEvaluatedDate": "

The date when the monitor last evaluated for anomalies.

", - "DateInterval$Start": "

The beginning of the time period that you want the usage and costs for. The start date is inclusive. For example, if start is 2017-01-01, AWS retrieves cost and usage data starting at 2017-01-01 up to the end date.

", - "DateInterval$End": "

The end of the time period that you want the usage and costs for. The end date is exclusive. For example, if end is 2017-05-01, AWS retrieves cost and usage data from the start date up to, but not including, 2017-05-01.

" + "DateInterval$Start": "

The beginning of the time period. The start date is inclusive. For example, if start is 2017-01-01, AWS retrieves cost and usage data starting at 2017-01-01 up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.

", + "DateInterval$End": "

The end of the time period. The end date is exclusive. For example, if end is 2017-05-01, AWS retrieves cost and usage data from the start date up to, but not including, 2017-05-01.

" } }, "ZonedDateTime": { diff --git a/service/applicationautoscaling/api.go b/service/applicationautoscaling/api.go index 4cd69a330d..2641e2ff3f 100644 --- a/service/applicationautoscaling/api.go +++ b/service/applicationautoscaling/api.go @@ -3832,10 +3832,11 @@ type PutScheduledActionInput struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) - // in the Amazon CloudWatch Events User Guide. + // For cron expressions, fields is a cron expression. The supported cron format + // consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] + // [Month] [Day_of_Week] [Year]. // - // For examples of using these expressions, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) + // For more information and examples, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) // in the Application Auto Scaling User Guide. Schedule *string `min:"1" type:"string"` @@ -3963,9 +3964,8 @@ type RegisterScalableTargetInput struct { // The maximum value that you plan to scale out to. When a scaling policy is // in effect, Application Auto Scaling can scale out (expand) as needed to the - // maximum capacity limit in response to changing demand. - // - // This parameter is required if you are registering a scalable target. + // maximum capacity limit in response to changing demand. This property is required + // when registering a new scalable target. // // Although you can specify a large maximum capacity, note that service quotas // may impose lower limits. Each service has its own default quotas for the @@ -3978,13 +3978,13 @@ type RegisterScalableTargetInput struct { // The minimum value that you plan to scale in to. When a scaling policy is // in effect, Application Auto Scaling can scale in (contract) as needed to - // the minimum capacity limit in response to changing demand. + // the minimum capacity limit in response to changing demand. This property + // is required when registering a new scalable target. // - // This parameter is required if you are registering a scalable target. For - // certain resources, the minimum value allowed is 0. This includes Lambda provisioned - // concurrency, Spot Fleet, ECS services, Aurora DB clusters, EMR clusters, - // and custom resources. For all other resources, the minimum value allowed - // is 1. + // For certain resources, the minimum value allowed is 0. This includes Lambda + // provisioned concurrency, Spot Fleet, ECS services, Aurora DB clusters, EMR + // clusters, and custom resources. For all other resources, the minimum value + // allowed is 1. MinCapacity *int64 `type:"integer"` // The identifier of the resource that is associated with the scalable target. @@ -5066,10 +5066,11 @@ type ScheduledAction struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) - // in the Amazon CloudWatch Events User Guide. + // For cron expressions, fields is a cron expression. The supported cron format + // consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] + // [Month] [Day_of_Week] [Year]. // - // For examples of using these expressions, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) + // For more information and examples, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) // in the Application Auto Scaling User Guide. // // Schedule is a required field @@ -5565,8 +5566,12 @@ type TargetTrackingScalingPolicyConfiguration struct { // * Amazon MSK cluster storage ScaleOutCooldown *int64 `type:"integer"` - // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 - // (Base 10) or 2e-360 to 2e360 (Base 2). + // The target value for the metric. Although this property accepts numbers of + // type Double, it won't accept values that are either too small or too large. + // Values must be in the range of -2^360 to 2^360. The value must be a valid + // number based on the choice of metric. For example, if the metric is CPU utilization, + // then the target value is a percent value that represents how much of the + // CPU can be used before scaling out. // // TargetValue is a required field TargetValue *float64 `type:"double" required:"true"` diff --git a/service/costexplorer/api.go b/service/costexplorer/api.go index 13d84bcaab..33818fb9a8 100644 --- a/service/costexplorer/api.go +++ b/service/costexplorer/api.go @@ -1057,6 +1057,101 @@ func (c *CostExplorer) GetCostAndUsageWithResourcesWithContext(ctx aws.Context, return out, req.Send() } +const opGetCostCategories = "GetCostCategories" + +// GetCostCategoriesRequest generates a "aws/request.Request" representing the +// client's request for the GetCostCategories operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCostCategories for more information on using the GetCostCategories +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCostCategoriesRequest method. +// req, resp := client.GetCostCategoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostCategories +func (c *CostExplorer) GetCostCategoriesRequest(input *GetCostCategoriesInput) (req *request.Request, output *GetCostCategoriesOutput) { + op := &request.Operation{ + Name: opGetCostCategories, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCostCategoriesInput{} + } + + output = &GetCostCategoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCostCategories API operation for AWS Cost Explorer Service. +// +// Retrieves an array of Cost Category names and values incurred cost. +// +// If some Cost Category names and values are not associated with any cost, +// they will not be returned by this API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cost Explorer Service's +// API operation GetCostCategories for usage and error information. +// +// Returned Error Types: +// * LimitExceededException +// You made too many calls in a short period of time. Try again later. +// +// * BillExpirationException +// The requested report expired. Update the date interval and try again. +// +// * DataUnavailableException +// The requested data is unavailable. +// +// * InvalidNextTokenException +// The pagination token is invalid. Try again without a pagination token. +// +// * RequestChangedException +// Your request parameters changed between pages. Try again with the old parameters +// or without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostCategories +func (c *CostExplorer) GetCostCategories(input *GetCostCategoriesInput) (*GetCostCategoriesOutput, error) { + req, out := c.GetCostCategoriesRequest(input) + return out, req.Send() +} + +// GetCostCategoriesWithContext is the same as GetCostCategories with the addition of +// the ability to pass a context and additional request options. +// +// See GetCostCategories for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CostExplorer) GetCostCategoriesWithContext(ctx aws.Context, input *GetCostCategoriesInput, opts ...request.Option) (*GetCostCategoriesOutput, error) { + req, out := c.GetCostCategoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetCostForecast = "GetCostForecast" // GetCostForecastRequest generates a "aws/request.Request" representing the @@ -2973,10 +3068,13 @@ type AnomalyMonitor struct { // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } // - // For GetRightsizingRecommendation action, a combination of OR and NOT is not - // supported. OR is not supported between different dimensions, or dimensions + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions // and tags. NOT operators aren't supported. Dimensions are also limited to // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. MonitorSpecification *Expression `type:"structure"` // The possible type values. @@ -3574,6 +3672,14 @@ func (s *CostCategoryRule) SetValue(v string) *CostCategoryRule { } // The Cost Categories values used for filtering the costs. +// +// If Values and Key are not specified, the ABSENT MatchOption is applied to +// all Cost Categories. That is, filtering on resources that are not mapped +// to any Cost Categories. +// +// If Values is provided and Key is not specified, the ABSENT MatchOption is +// applied to the Cost Categories Key only. That is, filtering on resources +// without the given Cost Categories key. type CostCategoryValues struct { _ struct{} `type:"structure"` @@ -3581,8 +3687,8 @@ type CostCategoryValues struct { Key *string `min:"1" type:"string"` // The match options that you can use to filter your results. MatchOptions is - // only applicable for only applicable for actions related to cost category. - // The default values for MatchOptions is EQUALS and CASE_SENSITIVE. + // only applicable for actions related to cost category. The default values + // for MatchOptions is EQUALS and CASE_SENSITIVE. MatchOptions []*string `type:"list"` // The specific value of the Cost Category. @@ -4275,20 +4381,21 @@ func (s *DataUnavailableException) RequestID() string { return s.RespMetadata.RequestID } -// The time period that you want the usage and costs for. +// The time period of the request. type DateInterval struct { _ struct{} `type:"structure"` - // The end of the time period that you want the usage and costs for. The end - // date is exclusive. For example, if end is 2017-05-01, AWS retrieves cost - // and usage data from the start date up to, but not including, 2017-05-01. + // The end of the time period. The end date is exclusive. For example, if end + // is 2017-05-01, AWS retrieves cost and usage data from the start date up to, + // but not including, 2017-05-01. // // End is a required field End *string `type:"string" required:"true"` - // The beginning of the time period that you want the usage and costs for. The - // start date is inclusive. For example, if start is 2017-01-01, AWS retrieves - // cost and usage data starting at 2017-01-01 up to the end date. + // The beginning of the time period. The start date is inclusive. For example, + // if start is 2017-01-01, AWS retrieves cost and usage data starting at 2017-01-01 + // up to the end date. The start date must be equal to or no later than the + // current date to avoid a validation error. // // Start is a required field Start *string `type:"string" required:"true"` @@ -5139,10 +5246,13 @@ func (s *ElastiCacheInstanceDetails) SetSizeFlexEligible(v bool) *ElastiCacheIns // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } // -// For GetRightsizingRecommendation action, a combination of OR and NOT is not -// supported. OR is not supported between different dimensions, or dimensions +// For the GetRightsizingRecommendation action, a combination of OR and NOT +// is not supported. OR is not supported between different dimensions, or dimensions // and tags. NOT operators aren't supported. Dimensions are also limited to // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. +// +// For the GetReservationPurchaseRecommendation action, only NOT is supported. +// AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. type Expression struct { _ struct{} `type:"structure"` @@ -5727,6 +5837,10 @@ func (s *GetCostAndUsageInput) SetTimePeriod(v *DateInterval) *GetCostAndUsageIn type GetCostAndUsageOutput struct { _ struct{} `type:"structure"` + // The attributes that apply to a specific dimension value. For example, if + // the value is a linked account, the attribute is that account name. + DimensionValueAttributes []*DimensionValuesWithAttributes `type:"list"` + // The groups that are specified by the Filter or GroupBy parameters in the // request. GroupDefinitions []*GroupDefinition `type:"list"` @@ -5750,6 +5864,12 @@ func (s GetCostAndUsageOutput) GoString() string { return s.String() } +// SetDimensionValueAttributes sets the DimensionValueAttributes field's value. +func (s *GetCostAndUsageOutput) SetDimensionValueAttributes(v []*DimensionValuesWithAttributes) *GetCostAndUsageOutput { + s.DimensionValueAttributes = v + return s +} + // SetGroupDefinitions sets the GroupDefinitions field's value. func (s *GetCostAndUsageOutput) SetGroupDefinitions(v []*GroupDefinition) *GetCostAndUsageOutput { s.GroupDefinitions = v @@ -5901,6 +6021,10 @@ func (s *GetCostAndUsageWithResourcesInput) SetTimePeriod(v *DateInterval) *GetC type GetCostAndUsageWithResourcesOutput struct { _ struct{} `type:"structure"` + // The attributes that apply to a specific dimension value. For example, if + // the value is a linked account, the attribute is that account name. + DimensionValueAttributes []*DimensionValuesWithAttributes `type:"list"` + // The groups that are specified by the Filter or GroupBy parameters in the // request. GroupDefinitions []*GroupDefinition `type:"list"` @@ -5924,6 +6048,12 @@ func (s GetCostAndUsageWithResourcesOutput) GoString() string { return s.String() } +// SetDimensionValueAttributes sets the DimensionValueAttributes field's value. +func (s *GetCostAndUsageWithResourcesOutput) SetDimensionValueAttributes(v []*DimensionValuesWithAttributes) *GetCostAndUsageWithResourcesOutput { + s.DimensionValueAttributes = v + return s +} + // SetGroupDefinitions sets the GroupDefinitions field's value. func (s *GetCostAndUsageWithResourcesOutput) SetGroupDefinitions(v []*GroupDefinition) *GetCostAndUsageWithResourcesOutput { s.GroupDefinitions = v @@ -5942,6 +6072,257 @@ func (s *GetCostAndUsageWithResourcesOutput) SetResultsByTime(v []*ResultByTime) return s } +type GetCostCategoriesInput struct { + _ struct{} `type:"structure"` + + // The unique name of the Cost Category. + CostCategoryName *string `min:"1" type:"string"` + + // Use Expression to filter by cost or by usage. There are two patterns: + // + // * Simple dimension values - You can set the dimension name and values + // for the filters that you plan to use. For example, you can filter for + // REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, + // the Region is a full name (for example, REGION==US East (N. Virginia). + // The Expression example looks like: { "Dimensions": { "Key": "REGION", + // "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values + // are OR'd together to retrieve cost or usage data. You can create Expression + // and DimensionValues objects using either with* methods or set* methods + // in multiple lines. + // + // * Compound dimension values with logical operations - You can use multiple + // Expression types and the logical operators AND/OR/NOT to create a list + // of one or more Expression objects. This allows you to filter on more advanced + // options. For example, you can filter on ((REGION == us-east-1 OR REGION + // == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). + // The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": + // { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": + // { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": + // { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each + // Expression can have only one operator, the service returns an error if + // more than one is specified. The following example shows an Expression + // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": + // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } + // + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions + // and tags. NOT operators aren't supported. Dimensions are also limited to + // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. + Filter *Expression `type:"structure"` + + // This field is only used when SortBy is provided in the request. + // + // The maximum number of objects that to be returned for this request. If MaxResults + // is not specified with SortBy, the request will return 1000 results as the + // default value for this parameter. + MaxResults *int64 `min:"1" type:"integer"` + + // If the number of objects that are still available for retrieval exceeds the + // limit, AWS returns a NextPageToken value in the response. To retrieve the + // next batch of objects, provide the NextPageToken from the prior call in your + // next request. + NextPageToken *string `type:"string"` + + // The value that you want to search the filter values for. + // + // If you do not specify a CostCategoryName, SearchString will be used to filter + // Cost Category names that match the SearchString pattern. If you do specifiy + // a CostCategoryName, SearchString will be used to filter Cost Category values + // that match the SearchString pattern. + SearchString *string `type:"string"` + + // The value by which you want to sort the data. + // + // The key represents cost and usage metrics. The following values are supported: + // + // * BlendedCost + // + // * UnblendedCost + // + // * AmortizedCost + // + // * NetAmortizedCost + // + // * NetUnblendedCost + // + // * UsageQuantity + // + // * NormalizedUsageAmount + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + // + // When using SortBy, NextPageToken and SearchString are not supported. + SortBy []*SortDefinition `type:"list"` + + // The time period of the request. + // + // TimePeriod is a required field + TimePeriod *DateInterval `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCostCategoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCostCategoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCostCategoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCostCategoriesInput"} + if s.CostCategoryName != nil && len(*s.CostCategoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CostCategoryName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.TimePeriod == nil { + invalidParams.Add(request.NewErrParamRequired("TimePeriod")) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + if s.SortBy != nil { + for i, v := range s.SortBy { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortBy", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TimePeriod != nil { + if err := s.TimePeriod.Validate(); err != nil { + invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCostCategoryName sets the CostCategoryName field's value. +func (s *GetCostCategoriesInput) SetCostCategoryName(v string) *GetCostCategoriesInput { + s.CostCategoryName = &v + return s +} + +// SetFilter sets the Filter field's value. +func (s *GetCostCategoriesInput) SetFilter(v *Expression) *GetCostCategoriesInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetCostCategoriesInput) SetMaxResults(v int64) *GetCostCategoriesInput { + s.MaxResults = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetCostCategoriesInput) SetNextPageToken(v string) *GetCostCategoriesInput { + s.NextPageToken = &v + return s +} + +// SetSearchString sets the SearchString field's value. +func (s *GetCostCategoriesInput) SetSearchString(v string) *GetCostCategoriesInput { + s.SearchString = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *GetCostCategoriesInput) SetSortBy(v []*SortDefinition) *GetCostCategoriesInput { + s.SortBy = v + return s +} + +// SetTimePeriod sets the TimePeriod field's value. +func (s *GetCostCategoriesInput) SetTimePeriod(v *DateInterval) *GetCostCategoriesInput { + s.TimePeriod = v + return s +} + +type GetCostCategoriesOutput struct { + _ struct{} `type:"structure"` + + // The names of the Cost Categories. + CostCategoryNames []*string `type:"list"` + + // The Cost Category values. + // + // CostCategoryValues are not returned if CostCategoryName is not specified + // in the request. + CostCategoryValues []*string `type:"list"` + + // If the number of objects that are still available for retrieval exceeds the + // limit, AWS returns a NextPageToken value in the response. To retrieve the + // next batch of objects, provide the marker from the prior call in your next + // request. + NextPageToken *string `type:"string"` + + // The number of objects returned. + // + // ReturnSize is a required field + ReturnSize *int64 `type:"integer" required:"true"` + + // The total number of objects. + // + // TotalSize is a required field + TotalSize *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s GetCostCategoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCostCategoriesOutput) GoString() string { + return s.String() +} + +// SetCostCategoryNames sets the CostCategoryNames field's value. +func (s *GetCostCategoriesOutput) SetCostCategoryNames(v []*string) *GetCostCategoriesOutput { + s.CostCategoryNames = v + return s +} + +// SetCostCategoryValues sets the CostCategoryValues field's value. +func (s *GetCostCategoriesOutput) SetCostCategoryValues(v []*string) *GetCostCategoriesOutput { + s.CostCategoryValues = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetCostCategoriesOutput) SetNextPageToken(v string) *GetCostCategoriesOutput { + s.NextPageToken = &v + return s +} + +// SetReturnSize sets the ReturnSize field's value. +func (s *GetCostCategoriesOutput) SetReturnSize(v int64) *GetCostCategoriesOutput { + s.ReturnSize = &v + return s +} + +// SetTotalSize sets the TotalSize field's value. +func (s *GetCostCategoriesOutput) SetTotalSize(v int64) *GetCostCategoriesOutput { + s.TotalSize = &v + return s +} + type GetCostForecastInput struct { _ struct{} `type:"structure"` @@ -6205,6 +6586,47 @@ type GetDimensionValuesInput struct { // Dimension is a required field Dimension *string `type:"string" required:"true" enum:"Dimension"` + // Use Expression to filter by cost or by usage. There are two patterns: + // + // * Simple dimension values - You can set the dimension name and values + // for the filters that you plan to use. For example, you can filter for + // REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, + // the Region is a full name (for example, REGION==US East (N. Virginia). + // The Expression example looks like: { "Dimensions": { "Key": "REGION", + // "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values + // are OR'd together to retrieve cost or usage data. You can create Expression + // and DimensionValues objects using either with* methods or set* methods + // in multiple lines. + // + // * Compound dimension values with logical operations - You can use multiple + // Expression types and the logical operators AND/OR/NOT to create a list + // of one or more Expression objects. This allows you to filter on more advanced + // options. For example, you can filter on ((REGION == us-east-1 OR REGION + // == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). + // The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": + // { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": + // { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": + // { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each + // Expression can have only one operator, the service returns an error if + // more than one is specified. The following example shows an Expression + // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": + // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } + // + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions + // and tags. NOT operators aren't supported. Dimensions are also limited to + // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. + Filter *Expression `type:"structure"` + + // This field is only used when SortBy is provided in the request. The maximum + // number of objects that to be returned for this request. If MaxResults is + // not specified with SortBy, the request will return 1000 results as the default + // value for this parameter. + MaxResults *int64 `min:"1" type:"integer"` + // The token to retrieve the next set of results. AWS provides the token when // the response from a previous call has more results than the maximum page // size. @@ -6213,6 +6635,30 @@ type GetDimensionValuesInput struct { // The value that you want to search the filter values for. SearchString *string `type:"string"` + // The value by which you want to sort the data. + // + // The key represents cost and usage metrics. The following values are supported: + // + // * BlendedCost + // + // * UnblendedCost + // + // * AmortizedCost + // + // * NetAmortizedCost + // + // * NetUnblendedCost + // + // * UsageQuantity + // + // * NormalizedUsageAmount + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + // + // When you specify a SortBy paramater, the context must be COST_AND_USAGE. + // Further, when using SortBy, NextPageToken and SearchString are not supported. + SortBy []*SortDefinition `type:"list"` + // The start and end dates for retrieving the dimension values. The start date // is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 @@ -6238,9 +6684,27 @@ func (s *GetDimensionValuesInput) Validate() error { if s.Dimension == nil { invalidParams.Add(request.NewErrParamRequired("Dimension")) } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.TimePeriod == nil { invalidParams.Add(request.NewErrParamRequired("TimePeriod")) } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + if s.SortBy != nil { + for i, v := range s.SortBy { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortBy", i), err.(request.ErrInvalidParams)) + } + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -6265,6 +6729,18 @@ func (s *GetDimensionValuesInput) SetDimension(v string) *GetDimensionValuesInpu return s } +// SetFilter sets the Filter field's value. +func (s *GetDimensionValuesInput) SetFilter(v *Expression) *GetDimensionValuesInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetDimensionValuesInput) SetMaxResults(v int64) *GetDimensionValuesInput { + s.MaxResults = &v + return s +} + // SetNextPageToken sets the NextPageToken field's value. func (s *GetDimensionValuesInput) SetNextPageToken(v string) *GetDimensionValuesInput { s.NextPageToken = &v @@ -6277,6 +6753,12 @@ func (s *GetDimensionValuesInput) SetSearchString(v string) *GetDimensionValuesI return s } +// SetSortBy sets the SortBy field's value. +func (s *GetDimensionValuesInput) SetSortBy(v []*SortDefinition) *GetDimensionValuesInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetDimensionValuesInput) SetTimePeriod(v *DateInterval) *GetDimensionValuesInput { s.TimePeriod = v @@ -6507,6 +6989,11 @@ type GetReservationCoverageInput struct { // * TENANCY GroupBy []*GroupDefinition `type:"list"` + // The maximum number of objects that you returned for this request. If more + // objects are available, in the response, AWS provides a NextPageToken value + // that you can use in a subsequent call to get the next batch of objects. + MaxResults *int64 `min:"1" type:"integer"` + // The measurement that you want your reservation coverage reported in. // // Valid values are Hour, Unit, and Cost. You can use multiple values in a request. @@ -6517,6 +7004,33 @@ type GetReservationCoverageInput struct { // size. NextPageToken *string `type:"string"` + // The value by which you want to sort the data. + // + // The following values are supported for Key: + // + // * OnDemandCost + // + // * CoverageHoursPercentage + // + // * OnDemandHours + // + // * ReservedHours + // + // * TotalRunningHours + // + // * CoverageNormalizedUnitsPercentage + // + // * OnDemandNormalizedUnits + // + // * ReservedNormalizedUnits + // + // * TotalRunningNormalizedUnits + // + // * Time + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + SortBy *SortDefinition `type:"structure"` + // The start and end dates of the period that you want to retrieve data about // reservation coverage for. You can retrieve data for a maximum of 13 months: // the last 12 months and the current month. The start date is inclusive, but @@ -6541,6 +7055,9 @@ func (s GetReservationCoverageInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetReservationCoverageInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetReservationCoverageInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.TimePeriod == nil { invalidParams.Add(request.NewErrParamRequired("TimePeriod")) } @@ -6549,6 +7066,11 @@ func (s *GetReservationCoverageInput) Validate() error { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } + if s.SortBy != nil { + if err := s.SortBy.Validate(); err != nil { + invalidParams.AddNested("SortBy", err.(request.ErrInvalidParams)) + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -6579,6 +7101,12 @@ func (s *GetReservationCoverageInput) SetGroupBy(v []*GroupDefinition) *GetReser return s } +// SetMaxResults sets the MaxResults field's value. +func (s *GetReservationCoverageInput) SetMaxResults(v int64) *GetReservationCoverageInput { + s.MaxResults = &v + return s +} + // SetMetrics sets the Metrics field's value. func (s *GetReservationCoverageInput) SetMetrics(v []*string) *GetReservationCoverageInput { s.Metrics = v @@ -6591,6 +7119,12 @@ func (s *GetReservationCoverageInput) SetNextPageToken(v string) *GetReservation return s } +// SetSortBy sets the SortBy field's value. +func (s *GetReservationCoverageInput) SetSortBy(v *SortDefinition) *GetReservationCoverageInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetReservationCoverageInput) SetTimePeriod(v *DateInterval) *GetReservationCoverageInput { s.TimePeriod = v @@ -6654,6 +7188,41 @@ type GetReservationPurchaseRecommendationInput struct { // calculated for individual member accounts only. AccountScope *string `type:"string" enum:"AccountScope"` + // Use Expression to filter by cost or by usage. There are two patterns: + // + // * Simple dimension values - You can set the dimension name and values + // for the filters that you plan to use. For example, you can filter for + // REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, + // the Region is a full name (for example, REGION==US East (N. Virginia). + // The Expression example looks like: { "Dimensions": { "Key": "REGION", + // "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values + // are OR'd together to retrieve cost or usage data. You can create Expression + // and DimensionValues objects using either with* methods or set* methods + // in multiple lines. + // + // * Compound dimension values with logical operations - You can use multiple + // Expression types and the logical operators AND/OR/NOT to create a list + // of one or more Expression objects. This allows you to filter on more advanced + // options. For example, you can filter on ((REGION == us-east-1 OR REGION + // == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). + // The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": + // { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": + // { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": + // { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each + // Expression can have only one operator, the service returns an error if + // more than one is specified. The following example shows an Expression + // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": + // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } + // + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions + // and tags. NOT operators aren't supported. Dimensions are also limited to + // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. + Filter *Expression `type:"structure"` + // The number of previous days that you want AWS to consider when it calculates // your recommendations. LookbackPeriodInDays *string `type:"string" enum:"LookbackPeriodInDays"` @@ -6698,6 +7267,11 @@ func (s *GetReservationPurchaseRecommendationInput) Validate() error { if s.Service == nil { invalidParams.Add(request.NewErrParamRequired("Service")) } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -6717,6 +7291,12 @@ func (s *GetReservationPurchaseRecommendationInput) SetAccountScope(v string) *G return s } +// SetFilter sets the Filter field's value. +func (s *GetReservationPurchaseRecommendationInput) SetFilter(v *Expression) *GetReservationPurchaseRecommendationInput { + s.Filter = v + return s +} + // SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. func (s *GetReservationPurchaseRecommendationInput) SetLookbackPeriodInDays(v string) *GetReservationPurchaseRecommendationInput { s.LookbackPeriodInDays = &v @@ -6845,11 +7425,57 @@ type GetReservationUtilizationInput struct { // Groups only by SUBSCRIPTION_ID. Metadata is included. GroupBy []*GroupDefinition `type:"list"` + // The maximum number of objects that you returned for this request. If more + // objects are available, in the response, AWS provides a NextPageToken value + // that you can use in a subsequent call to get the next batch of objects. + MaxResults *int64 `min:"1" type:"integer"` + // The token to retrieve the next set of results. AWS provides the token when // the response from a previous call has more results than the maximum page // size. NextPageToken *string `type:"string"` + // The value by which you want to sort the data. + // + // The following values are supported for Key: + // + // * UtilizationPercentage + // + // * UtilizationPercentageInUnits + // + // * PurchasedHours + // + // * PurchasedUnits + // + // * TotalActualHours + // + // * TotalActualUnits + // + // * UnusedHours + // + // * UnusedUnits + // + // * OnDemandCostOfRIHoursUsed + // + // * NetRISavings + // + // * TotalPotentialRISavings + // + // * AmortizedUpfrontFee + // + // * AmortizedRecurringFee + // + // * TotalAmortizedFee + // + // * RICostForUnusedHours + // + // * RealizedSavings + // + // * UnrealizedSavings + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + SortBy *SortDefinition `type:"structure"` + // Sets the start and end dates for retrieving RI utilization. The start date // is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 @@ -6872,6 +7498,9 @@ func (s GetReservationUtilizationInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetReservationUtilizationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetReservationUtilizationInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.TimePeriod == nil { invalidParams.Add(request.NewErrParamRequired("TimePeriod")) } @@ -6880,6 +7509,11 @@ func (s *GetReservationUtilizationInput) Validate() error { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } + if s.SortBy != nil { + if err := s.SortBy.Validate(); err != nil { + invalidParams.AddNested("SortBy", err.(request.ErrInvalidParams)) + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -6910,12 +7544,24 @@ func (s *GetReservationUtilizationInput) SetGroupBy(v []*GroupDefinition) *GetRe return s } +// SetMaxResults sets the MaxResults field's value. +func (s *GetReservationUtilizationInput) SetMaxResults(v int64) *GetReservationUtilizationInput { + s.MaxResults = &v + return s +} + // SetNextPageToken sets the NextPageToken field's value. func (s *GetReservationUtilizationInput) SetNextPageToken(v string) *GetReservationUtilizationInput { s.NextPageToken = &v return s } +// SetSortBy sets the SortBy field's value. +func (s *GetReservationUtilizationInput) SetSortBy(v *SortDefinition) *GetReservationUtilizationInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetReservationUtilizationInput) SetTimePeriod(v *DateInterval) *GetReservationUtilizationInput { s.TimePeriod = v @@ -7003,10 +7649,13 @@ type GetRightsizingRecommendationInput struct { // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } // - // For GetRightsizingRecommendation action, a combination of OR and NOT is not - // supported. OR is not supported between different dimensions, or dimensions + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions // and tags. NOT operators aren't supported. Dimensions are also limited to // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. Filter *Expression `type:"structure"` // The pagination token that indicates the next set of results that you want @@ -7193,6 +7842,27 @@ type GetSavingsPlansCoverageInput struct { // maximum page size. NextToken *string `type:"string"` + // The value by which you want to sort the data. + // + // The following values are supported for Key: + // + // * SpendCoveredBySavingsPlan + // + // * OnDemandCost + // + // * CoveragePercentage + // + // * TotalCost + // + // * InstanceFamily + // + // * Region + // + // * Service + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + SortBy *SortDefinition `type:"structure"` + // The time period that you want the usage and costs for. The Start date must // be within 13 months. The End date must be after the Start date, and before // the current date. Future dates can't be used as an End date. @@ -7225,6 +7895,11 @@ func (s *GetSavingsPlansCoverageInput) Validate() error { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } + if s.SortBy != nil { + if err := s.SortBy.Validate(); err != nil { + invalidParams.AddNested("SortBy", err.(request.ErrInvalidParams)) + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -7273,6 +7948,12 @@ func (s *GetSavingsPlansCoverageInput) SetNextToken(v string) *GetSavingsPlansCo return s } +// SetSortBy sets the SortBy field's value. +func (s *GetSavingsPlansCoverageInput) SetSortBy(v *SortDefinition) *GetSavingsPlansCoverageInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetSavingsPlansCoverageInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansCoverageInput { s.TimePeriod = v @@ -7498,6 +8179,9 @@ func (s *GetSavingsPlansPurchaseRecommendationOutput) SetSavingsPlansPurchaseRec type GetSavingsPlansUtilizationDetailsInput struct { _ struct{} `type:"structure"` + // The data type. + DataType []*string `type:"list"` + // Filters Savings Plans utilization coverage data for active Savings Plans // dimensions. You can filter data with the following dimensions: // @@ -7524,6 +8208,27 @@ type GetSavingsPlansUtilizationDetailsInput struct { // maximum page size. NextToken *string `type:"string"` + // The value by which you want to sort the data. + // + // The following values are supported for Key: + // + // * UtilizationPercentage + // + // * TotalCommitment + // + // * UsedCommitment + // + // * UnusedCommitment + // + // * NetSavings + // + // * AmortizedRecurringCommitment + // + // * AmortizedUpfrontCommitment + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + SortBy *SortDefinition `type:"structure"` + // The time period that you want the usage and costs for. The Start date must // be within 13 months. The End date must be after the Start date, and before // the current date. Future dates can't be used as an End date. @@ -7556,6 +8261,11 @@ func (s *GetSavingsPlansUtilizationDetailsInput) Validate() error { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } + if s.SortBy != nil { + if err := s.SortBy.Validate(); err != nil { + invalidParams.AddNested("SortBy", err.(request.ErrInvalidParams)) + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -7568,6 +8278,12 @@ func (s *GetSavingsPlansUtilizationDetailsInput) Validate() error { return nil } +// SetDataType sets the DataType field's value. +func (s *GetSavingsPlansUtilizationDetailsInput) SetDataType(v []*string) *GetSavingsPlansUtilizationDetailsInput { + s.DataType = v + return s +} + // SetFilter sets the Filter field's value. func (s *GetSavingsPlansUtilizationDetailsInput) SetFilter(v *Expression) *GetSavingsPlansUtilizationDetailsInput { s.Filter = v @@ -7586,6 +8302,12 @@ func (s *GetSavingsPlansUtilizationDetailsInput) SetNextToken(v string) *GetSavi return s } +// SetSortBy sets the SortBy field's value. +func (s *GetSavingsPlansUtilizationDetailsInput) SetSortBy(v *SortDefinition) *GetSavingsPlansUtilizationDetailsInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetSavingsPlansUtilizationDetailsInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansUtilizationDetailsInput { s.TimePeriod = v @@ -7606,7 +8328,7 @@ type GetSavingsPlansUtilizationDetailsOutput struct { // SavingsPlansUtilizationDetails is a required field SavingsPlansUtilizationDetails []*SavingsPlansUtilizationDetail `type:"list" required:"true"` - // The time period that you want the usage and costs for. + // The time period of the request. // // TimePeriod is a required field TimePeriod *DateInterval `type:"structure" required:"true"` @@ -7678,6 +8400,23 @@ type GetSavingsPlansUtilizationInput struct { // granularities. Granularity *string `type:"string" enum:"Granularity"` + // The value by which you want to sort the data. + // + // The following values are supported for Key: + // + // * UtilizationPercentage + // + // * TotalCommitment + // + // * UsedCommitment + // + // * UnusedCommitment + // + // * NetSavings + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + SortBy *SortDefinition `type:"structure"` + // The time period that you want the usage and costs for. The Start date must // be within 13 months. The End date must be after the Start date, and before // the current date. Future dates can't be used as an End date. @@ -7707,6 +8446,11 @@ func (s *GetSavingsPlansUtilizationInput) Validate() error { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } + if s.SortBy != nil { + if err := s.SortBy.Validate(); err != nil { + invalidParams.AddNested("SortBy", err.(request.ErrInvalidParams)) + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -7731,6 +8475,12 @@ func (s *GetSavingsPlansUtilizationInput) SetGranularity(v string) *GetSavingsPl return s } +// SetSortBy sets the SortBy field's value. +func (s *GetSavingsPlansUtilizationInput) SetSortBy(v *SortDefinition) *GetSavingsPlansUtilizationInput { + s.SortBy = v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *GetSavingsPlansUtilizationInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansUtilizationInput { s.TimePeriod = v @@ -7776,6 +8526,47 @@ func (s *GetSavingsPlansUtilizationOutput) SetTotal(v *SavingsPlansUtilizationAg type GetTagsInput struct { _ struct{} `type:"structure"` + // Use Expression to filter by cost or by usage. There are two patterns: + // + // * Simple dimension values - You can set the dimension name and values + // for the filters that you plan to use. For example, you can filter for + // REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, + // the Region is a full name (for example, REGION==US East (N. Virginia). + // The Expression example looks like: { "Dimensions": { "Key": "REGION", + // "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values + // are OR'd together to retrieve cost or usage data. You can create Expression + // and DimensionValues objects using either with* methods or set* methods + // in multiple lines. + // + // * Compound dimension values with logical operations - You can use multiple + // Expression types and the logical operators AND/OR/NOT to create a list + // of one or more Expression objects. This allows you to filter on more advanced + // options. For example, you can filter on ((REGION == us-east-1 OR REGION + // == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). + // The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": + // { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": + // { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": + // { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each + // Expression can have only one operator, the service returns an error if + // more than one is specified. The following example shows an Expression + // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": + // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } + // + // For the GetRightsizingRecommendation action, a combination of OR and NOT + // is not supported. OR is not supported between different dimensions, or dimensions + // and tags. NOT operators aren't supported. Dimensions are also limited to + // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. + // + // For the GetReservationPurchaseRecommendation action, only NOT is supported. + // AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT. + Filter *Expression `type:"structure"` + + // This field is only used when SortBy is provided in the request. The maximum + // number of objects that to be returned for this request. If MaxResults is + // not specified with SortBy, the request will return 1000 results as the default + // value for this parameter. + MaxResults *int64 `min:"1" type:"integer"` + // The token to retrieve the next set of results. AWS provides the token when // the response from a previous call has more results than the maximum page // size. @@ -7784,6 +8575,29 @@ type GetTagsInput struct { // The value that you want to search for. SearchString *string `type:"string"` + // The value by which you want to sort the data. + // + // The key represents cost and usage metrics. The following values are supported: + // + // * BlendedCost + // + // * UnblendedCost + // + // * AmortizedCost + // + // * NetAmortizedCost + // + // * NetUnblendedCost + // + // * UsageQuantity + // + // * NormalizedUsageAmount + // + // Supported values for SortOrder are ASCENDING or DESCENDING. + // + // When using SortBy, NextPageToken and SearchString are not supported. + SortBy []*SortDefinition `type:"list"` + // The key of the tag that you want to return values for. TagKey *string `type:"string"` @@ -7809,9 +8623,27 @@ func (s GetTagsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetTagsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.TimePeriod == nil { invalidParams.Add(request.NewErrParamRequired("TimePeriod")) } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + if s.SortBy != nil { + for i, v := range s.SortBy { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortBy", i), err.(request.ErrInvalidParams)) + } + } + } if s.TimePeriod != nil { if err := s.TimePeriod.Validate(); err != nil { invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) @@ -7824,6 +8656,18 @@ func (s *GetTagsInput) Validate() error { return nil } +// SetFilter sets the Filter field's value. +func (s *GetTagsInput) SetFilter(v *Expression) *GetTagsInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetTagsInput) SetMaxResults(v int64) *GetTagsInput { + s.MaxResults = &v + return s +} + // SetNextPageToken sets the NextPageToken field's value. func (s *GetTagsInput) SetNextPageToken(v string) *GetTagsInput { s.NextPageToken = &v @@ -7836,6 +8680,12 @@ func (s *GetTagsInput) SetSearchString(v string) *GetTagsInput { return s } +// SetSortBy sets the SortBy field's value. +func (s *GetTagsInput) SetSortBy(v []*SortDefinition) *GetTagsInput { + s.SortBy = v + return s +} + // SetTagKey sets the TagKey field's value. func (s *GetTagsInput) SetTagKey(v string) *GetTagsInput { s.TagKey = &v @@ -8798,6 +9648,12 @@ type ReservationAggregates struct { // 11, 2017. PurchasedUnits *string `type:"string"` + // The cost of unused hours for your reservation. + RICostForUnusedHours *string `type:"string"` + + // The realized savings due to purchasing and using a reservation. + RealizedSavings *string `type:"string"` + // The total number of reservation hours that you used. TotalActualHours *string `type:"string"` @@ -8812,6 +9668,9 @@ type ReservationAggregates struct { // How much you could save if you use your entire reservation. TotalPotentialRISavings *string `type:"string"` + // The unrealized savings due to purchasing and using a reservation. + UnrealizedSavings *string `type:"string"` + // The number of reservation hours that you didn't use. UnusedHours *string `type:"string"` @@ -8875,6 +9734,18 @@ func (s *ReservationAggregates) SetPurchasedUnits(v string) *ReservationAggregat return s } +// SetRICostForUnusedHours sets the RICostForUnusedHours field's value. +func (s *ReservationAggregates) SetRICostForUnusedHours(v string) *ReservationAggregates { + s.RICostForUnusedHours = &v + return s +} + +// SetRealizedSavings sets the RealizedSavings field's value. +func (s *ReservationAggregates) SetRealizedSavings(v string) *ReservationAggregates { + s.RealizedSavings = &v + return s +} + // SetTotalActualHours sets the TotalActualHours field's value. func (s *ReservationAggregates) SetTotalActualHours(v string) *ReservationAggregates { s.TotalActualHours = &v @@ -8899,6 +9770,12 @@ func (s *ReservationAggregates) SetTotalPotentialRISavings(v string) *Reservatio return s } +// SetUnrealizedSavings sets the UnrealizedSavings field's value. +func (s *ReservationAggregates) SetUnrealizedSavings(v string) *ReservationAggregates { + s.UnrealizedSavings = &v + return s +} + // SetUnusedHours sets the UnusedHours field's value. func (s *ReservationAggregates) SetUnusedHours(v string) *ReservationAggregates { s.UnusedHours = &v @@ -9854,7 +10731,7 @@ type SavingsPlansCoverage struct { // The amount of Savings Plans eligible usage that the Savings Plans covered. Coverage *SavingsPlansCoverageData `type:"structure"` - // The time period that you want the usage and costs for. + // The time period of the request. TimePeriod *DateInterval `type:"structure"` } @@ -10557,7 +11434,7 @@ type SavingsPlansUtilizationByTime struct { // Plans when considering the utilization rate. Savings *SavingsPlansSavings `type:"structure"` - // The time period that you want the usage and costs for. + // The time period of the request. // // TimePeriod is a required field TimePeriod *DateInterval `type:"structure" required:"true"` @@ -10752,6 +11629,54 @@ func (s *ServiceSpecification) SetEC2Specification(v *EC2Specification) *Service return s } +// The details of how to sort the data. +type SortDefinition struct { + _ struct{} `type:"structure"` + + // The key by which to sort the data. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // The order in which to sort the data. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s SortDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SortDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SortDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SortDefinition"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *SortDefinition) SetKey(v string) *SortDefinition { + s.Key = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SortDefinition) SetSortOrder(v string) *SortDefinition { + s.SortOrder = &v + return s +} + // The recipient of AnomalySubscription notifications. type Subscriber struct { _ struct{} `type:"structure"` @@ -10808,6 +11733,13 @@ func (s *Subscriber) SetType(v string) *Subscriber { } // The values that are available for a tag. +// +// If Values and Key are not specified, the ABSENT MatchOption is applied to +// all tags. That is, filtering on resources with no tags. +// +// If Values is provided and Key is not specified, the ABSENT MatchOption is +// applied to the tag Key only. That is, filtering on resources without the +// given tag key. type TagValues struct { _ struct{} `type:"structure"` @@ -11735,6 +12667,12 @@ const ( // DimensionPaymentOption is a Dimension enum value DimensionPaymentOption = "PAYMENT_OPTION" + + // DimensionAgreementEndDateTimeAfter is a Dimension enum value + DimensionAgreementEndDateTimeAfter = "AGREEMENT_END_DATE_TIME_AFTER" + + // DimensionAgreementEndDateTimeBefore is a Dimension enum value + DimensionAgreementEndDateTimeBefore = "AGREEMENT_END_DATE_TIME_BEFORE" ) // Dimension_Values returns all elements of the Dimension enum @@ -11769,6 +12707,8 @@ func Dimension_Values() []string { DimensionSavingsPlansType, DimensionSavingsPlanArn, DimensionPaymentOption, + DimensionAgreementEndDateTimeAfter, + DimensionAgreementEndDateTimeBefore, } } @@ -11836,6 +12776,9 @@ const ( // MatchOptionEquals is a MatchOption enum value MatchOptionEquals = "EQUALS" + // MatchOptionAbsent is a MatchOption enum value + MatchOptionAbsent = "ABSENT" + // MatchOptionStartsWith is a MatchOption enum value MatchOptionStartsWith = "STARTS_WITH" @@ -11856,6 +12799,7 @@ const ( func MatchOption_Values() []string { return []string{ MatchOptionEquals, + MatchOptionAbsent, MatchOptionStartsWith, MatchOptionEndsWith, MatchOptionContains, @@ -12040,6 +12984,46 @@ func RightsizingType_Values() []string { } } +const ( + // SavingsPlansDataTypeAttributes is a SavingsPlansDataType enum value + SavingsPlansDataTypeAttributes = "ATTRIBUTES" + + // SavingsPlansDataTypeUtilization is a SavingsPlansDataType enum value + SavingsPlansDataTypeUtilization = "UTILIZATION" + + // SavingsPlansDataTypeAmortizedCommitment is a SavingsPlansDataType enum value + SavingsPlansDataTypeAmortizedCommitment = "AMORTIZED_COMMITMENT" + + // SavingsPlansDataTypeSavings is a SavingsPlansDataType enum value + SavingsPlansDataTypeSavings = "SAVINGS" +) + +// SavingsPlansDataType_Values returns all elements of the SavingsPlansDataType enum +func SavingsPlansDataType_Values() []string { + return []string{ + SavingsPlansDataTypeAttributes, + SavingsPlansDataTypeUtilization, + SavingsPlansDataTypeAmortizedCommitment, + SavingsPlansDataTypeSavings, + } +} + +const ( + // SortOrderAscending is a SortOrder enum value + SortOrderAscending = "ASCENDING" + + // SortOrderDescending is a SortOrder enum value + SortOrderDescending = "DESCENDING" +) + +// SortOrder_Values returns all elements of the SortOrder enum +func SortOrder_Values() []string { + return []string{ + SortOrderAscending, + SortOrderDescending, + } +} + const ( // SubscriberStatusConfirmed is a SubscriberStatus enum value SubscriberStatusConfirmed = "CONFIRMED" diff --git a/service/costexplorer/costexploreriface/interface.go b/service/costexplorer/costexploreriface/interface.go index 6bef73b6f6..d1258a5883 100644 --- a/service/costexplorer/costexploreriface/interface.go +++ b/service/costexplorer/costexploreriface/interface.go @@ -108,6 +108,10 @@ type CostExplorerAPI interface { GetCostAndUsageWithResourcesWithContext(aws.Context, *costexplorer.GetCostAndUsageWithResourcesInput, ...request.Option) (*costexplorer.GetCostAndUsageWithResourcesOutput, error) GetCostAndUsageWithResourcesRequest(*costexplorer.GetCostAndUsageWithResourcesInput) (*request.Request, *costexplorer.GetCostAndUsageWithResourcesOutput) + GetCostCategories(*costexplorer.GetCostCategoriesInput) (*costexplorer.GetCostCategoriesOutput, error) + GetCostCategoriesWithContext(aws.Context, *costexplorer.GetCostCategoriesInput, ...request.Option) (*costexplorer.GetCostCategoriesOutput, error) + GetCostCategoriesRequest(*costexplorer.GetCostCategoriesInput) (*request.Request, *costexplorer.GetCostCategoriesOutput) + GetCostForecast(*costexplorer.GetCostForecastInput) (*costexplorer.GetCostForecastOutput, error) GetCostForecastWithContext(aws.Context, *costexplorer.GetCostForecastInput, ...request.Option) (*costexplorer.GetCostForecastOutput, error) GetCostForecastRequest(*costexplorer.GetCostForecastInput) (*request.Request, *costexplorer.GetCostForecastOutput)