// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the generated code, the service_crategen project
// must be updated to generate the changes.
//
// =================================================================
use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::proto;
use rusoto_core::request::HttpResponse;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
impl CostExplorerClient {
fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
let mut request = SignedRequest::new(http_method, "ce", &self.region, request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request
}
async fn sign_and_dispatch(
&self,
request: SignedRequest,
from_response: fn(BufferedHttpResponse) -> RusotoError,
) -> Result> {
let mut response = self.client.sign_and_dispatch(request).await?;
if !response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
return Err(from_response(response));
}
Ok(response)
}
}
use serde_json;
/// The structure of Cost Categories. This includes detailed metadata and the set of rules for the CostCategory
object.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CostCategory {
/// The unique identifier for your Cost Category.
#[serde(rename = "CostCategoryArn")]
pub cost_category_arn: String,
/// The Cost Category's effective end date.
#[serde(rename = "EffectiveEnd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_end: Option,
/// The Cost Category's effective start date.
#[serde(rename = "EffectiveStart")]
pub effective_start: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RuleVersion")]
pub rule_version: String,
/// Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
#[serde(rename = "Rules")]
pub rules: Vec,
}
/// A reference to a Cost Category containing only enough information to identify the Cost Category.
You can use this information to retrieve the full Cost Category information using DescribeCostCategory
.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CostCategoryReference {
/// The unique identifier for your Cost Category.
#[serde(rename = "CostCategoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_category_arn: Option,
/// The Cost Category's effective end date.
#[serde(rename = "EffectiveEnd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_end: Option,
/// The Cost Category's effective start date.
#[serde(rename = "EffectiveStart")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_start: Option,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option,
/// The number of rules associated with a specific Cost Category.
#[serde(rename = "NumberOfRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_rules: Option,
}
/// Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct CostCategoryRule {
/// 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 .
#[serde(rename = "Rule")]
pub rule: Expression,
#[serde(rename = "Value")]
pub value: String,
}
/// The Cost Categories values used for filtering the costs.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct CostCategoryValues {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option,
/// The specific value of the Cost Category.
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option>,
}
/// The amount of instance usage that a reservation covered.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Coverage {
/// The amount of cost that the reservation covered.
#[serde(rename = "CoverageCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_cost: Option,
/// The amount of instance usage that the reservation covered, in hours.
#[serde(rename = "CoverageHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_hours: Option,
/// The amount of instance usage that the reservation covered, in normalized units.
#[serde(rename = "CoverageNormalizedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_normalized_units: Option,
}
/// Reservation coverage for a specified period, in hours.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CoverageByTime {
/// The groups of instances that the reservation covered.
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option>,
/// The period that this coverage was used over.
#[serde(rename = "TimePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_period: Option,
/// The total reservation coverage, in hours.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
}
/// How much it costs to run an instance.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CoverageCost {
/// How much an On-Demand Instance costs.
#[serde(rename = "OnDemandCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_cost: Option,
}
/// How long a running instance either used a reservation or was On-Demand.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CoverageHours {
/// The percentage of instance hours that a reservation covered.
#[serde(rename = "CoverageHoursPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_hours_percentage: Option,
/// The number of instance running hours that On-Demand Instances covered.
#[serde(rename = "OnDemandHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_hours: Option,
/// The number of instance running hours that reservations covered.
#[serde(rename = "ReservedHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reserved_hours: Option,
/// The total instance usage, in hours.
#[serde(rename = "TotalRunningHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_running_hours: Option,
}
/// The amount of instance usage, in normalized units. Normalized units enable you to see your EC2 usage for multiple sizes of instances in a uniform way. For example, suppose you run an xlarge instance and a 2xlarge instance. If you run both instances for the same amount of time, the 2xlarge instance uses twice as much of your reservation as the xlarge instance, even though both instances show only one instance-hour. Using normalized units instead of instance-hours, the xlarge instance used 8 normalized units, and the 2xlarge instance used 16 normalized units.
For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide for Linux Instances .
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CoverageNormalizedUnits {
/// The percentage of your used instance normalized units that a reservation covers.
#[serde(rename = "CoverageNormalizedUnitsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_normalized_units_percentage: Option,
/// The number of normalized units that are covered by On-Demand Instances instead of a reservation.
#[serde(rename = "OnDemandNormalizedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_normalized_units: Option,
/// The number of normalized units that a reservation covers.
#[serde(rename = "ReservedNormalizedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reserved_normalized_units: Option,
/// The total number of normalized units that you used.
#[serde(rename = "TotalRunningNormalizedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_running_normalized_units: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateCostCategoryDefinitionRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RuleVersion")]
pub rule_version: String,
/// The Cost Category rules used to categorize costs. For more information, see CostCategoryRule .
#[serde(rename = "Rules")]
pub rules: Vec,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateCostCategoryDefinitionResponse {
/// The unique identifier for your newly created Cost Category.
#[serde(rename = "CostCategoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_category_arn: Option,
/// The Cost Category's effective start date.
#[serde(rename = "EffectiveStart")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_start: Option,
}
/// Context about the current instance.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CurrentInstance {
/// The currency code that Amazon Web Services used to calculate the costs for this instance.
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option,
/// The name you've given an instance. This field will show as blank if you haven't given the instance a name.
#[serde(rename = "InstanceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_name: Option,
/// Current On Demand cost of operating this instance on a monthly basis.
#[serde(rename = "MonthlyCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub monthly_cost: Option,
/// Number of hours during the lookback period billed at On Demand rates.
#[serde(rename = "OnDemandHoursInLookbackPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_hours_in_lookback_period: Option,
/// Number of hours during the lookback period covered by reservations.
#[serde(rename = "ReservationCoveredHoursInLookbackPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation_covered_hours_in_lookback_period: Option,
/// Details about the resource and utilization.
#[serde(rename = "ResourceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_details: Option,
/// Resource ID of the current instance.
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option,
/// Utilization information of the current instance during the lookback period.
#[serde(rename = "ResourceUtilization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_utilization: Option,
/// Number of hours during the lookback period covered by Savings Plans.
#[serde(rename = "SavingsPlansCoveredHoursInLookbackPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_covered_hours_in_lookback_period: Option,
/// Cost allocation resource tags applied to the instance.
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option>,
/// The total number of hours the instance ran during the lookback period.
#[serde(rename = "TotalRunningHoursInLookbackPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_running_hours_in_lookback_period: Option,
}
/// The time period that you want the usage and costs for.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DateInterval {
/// 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
.
#[serde(rename = "End")]
pub end: String,
/// 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.
#[serde(rename = "Start")]
pub start: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteCostCategoryDefinitionRequest {
/// The unique identifier for your Cost Category.
#[serde(rename = "CostCategoryArn")]
pub cost_category_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteCostCategoryDefinitionResponse {
/// The unique identifier for your Cost Category.
#[serde(rename = "CostCategoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_category_arn: Option,
/// The effective end date of the Cost Category as a result of deleting it. No costs after this date will be categorized by the deleted Cost Category.
#[serde(rename = "EffectiveEnd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_end: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeCostCategoryDefinitionRequest {
/// The unique identifier for your Cost Category.
#[serde(rename = "CostCategoryArn")]
pub cost_category_arn: String,
/// The date when the Cost Category was effective.
#[serde(rename = "EffectiveOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_on: Option,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeCostCategoryDefinitionResponse {
#[serde(rename = "CostCategory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_category: Option,
}
/// The metadata that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DimensionValues {
/// The names of the metadata types that you can use to filter and group your results. For example, AZ
returns a list of Availability Zones.
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option,
/// 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
.
#[serde(rename = "MatchOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub match_options: Option>,
/// The metadata values that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option>,
}
/// The metadata of a specific type that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DimensionValuesWithAttributes {
/// The attribute that applies to a specific Dimension
.
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap>,
/// The value of a dimension with a specific attribute.
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option,
}
/// Details about the Amazon EC2 instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EC2InstanceDetails {
/// The Availability Zone of the recommended reservation.
#[serde(rename = "AvailabilityZone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone: Option,
/// Whether the recommendation is for a current-generation instance.
#[serde(rename = "CurrentGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_generation: Option,
/// The instance family of the recommended reservation.
#[serde(rename = "Family")]
#[serde(skip_serializing_if = "Option::is_none")]
pub family: Option,
/// The type of instance that AWS recommends.
#[serde(rename = "InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option,
/// The platform of the recommended reservation. The platform is the specific combination of operating system, license model, and software on an instance.
#[serde(rename = "Platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option,
/// The AWS Region of the recommended reservation.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// Whether the recommended reservation is size flexible.
#[serde(rename = "SizeFlexEligible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size_flex_eligible: Option,
/// Whether the recommended reservation is dedicated or shared.
#[serde(rename = "Tenancy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tenancy: Option,
}
/// Details on the Amazon EC2 Resource.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EC2ResourceDetails {
/// Hourly public On Demand rate for the instance type.
#[serde(rename = "HourlyOnDemandRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hourly_on_demand_rate: Option,
/// The type of Amazon Web Services instance.
#[serde(rename = "InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option,
/// Memory capacity of Amazon Web Services instance.
#[serde(rename = "Memory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub memory: Option,
/// Network performance capacity of the Amazon Web Services instance.
#[serde(rename = "NetworkPerformance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_performance: Option,
/// The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, license model, and software on an instance.
#[serde(rename = "Platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option,
/// The Amazon Web Services Region of the instance.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// The SKU of the product.
#[serde(rename = "Sku")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sku: Option,
/// The disk storage of the Amazon Web Services instance (Not EBS storage).
#[serde(rename = "Storage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage: Option,
/// Number of VCPU cores in the Amazon Web Services instance type.
#[serde(rename = "Vcpu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vcpu: Option,
}
/// Utilization metrics of the instance.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EC2ResourceUtilization {
/// Maximum observed or expected CPU utilization of the instance.
#[serde(rename = "MaxCpuUtilizationPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_cpu_utilization_percentage: Option,
/// Maximum observed or expected memory utilization of the instance.
#[serde(rename = "MaxMemoryUtilizationPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_memory_utilization_percentage: Option,
/// Maximum observed or expected storage utilization of the instance (does not measure EBS storage).
#[serde(rename = "MaxStorageUtilizationPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_storage_utilization_percentage: Option,
}
/// The Amazon EC2 hardware specifications that you want AWS to provide recommendations for.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct EC2Specification {
/// Whether you want a recommendation for standard or convertible reservations.
#[serde(rename = "OfferingClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_class: Option,
}
/// Details about the Amazon ES instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ESInstanceDetails {
/// Whether the recommendation is for a current-generation instance.
#[serde(rename = "CurrentGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_generation: Option,
/// The class of instance that AWS recommends.
#[serde(rename = "InstanceClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_class: Option,
/// The size of instance that AWS recommends.
#[serde(rename = "InstanceSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_size: Option,
/// The AWS Region of the recommended reservation.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// Whether the recommended reservation is size flexible.
#[serde(rename = "SizeFlexEligible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size_flex_eligible: Option,
}
/// Details about the Amazon ElastiCache instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ElastiCacheInstanceDetails {
/// Whether the recommendation is for a current generation instance.
#[serde(rename = "CurrentGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_generation: Option,
/// The instance family of the recommended reservation.
#[serde(rename = "Family")]
#[serde(skip_serializing_if = "Option::is_none")]
pub family: Option,
/// The type of node that AWS recommends.
#[serde(rename = "NodeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub node_type: Option,
/// The description of the recommended reservation.
#[serde(rename = "ProductDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_description: Option,
/// The AWS Region of the recommended reservation.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// Whether the recommended reservation is size flexible.
#[serde(rename = "SizeFlexEligible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size_flex_eligible: Option,
}
///
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
. The Expression
for that looks like this:
{ "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 (USAGETYPE != 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": "USAGETYPE", "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": "USAGETYPE", "Values": [ "DataTransfer" ] } }
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 LINKEDACCOUNT
, REGION
, or RIGHTSIZING_TYPE
.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Expression {
/// Return results that match both Dimension
objects.
#[serde(rename = "And")]
#[serde(skip_serializing_if = "Option::is_none")]
pub and: Option>,
/// The filter based on CostCategory
values.
#[serde(rename = "CostCategories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_categories: Option,
/// The specific Dimension
to use for Expression
.
#[serde(rename = "Dimensions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dimensions: Option,
/// Return results that don't match a Dimension
object.
#[serde(rename = "Not")]
#[serde(skip_serializing_if = "Option::is_none")]
pub not: Box>,
/// Return results that match either Dimension
object.
#[serde(rename = "Or")]
#[serde(skip_serializing_if = "Option::is_none")]
pub or: Option>,
/// The specific Tag
to use for Expression
.
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option,
}
/// The forecast created for your query.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ForecastResult {
/// The mean value of the forecast.
#[serde(rename = "MeanValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mean_value: Option,
/// The lower limit for the prediction interval.
#[serde(rename = "PredictionIntervalLowerBound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prediction_interval_lower_bound: Option,
/// The upper limit for the prediction interval.
#[serde(rename = "PredictionIntervalUpperBound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prediction_interval_upper_bound: Option,
/// The period of time that the forecast covers.
#[serde(rename = "TimePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_period: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetCostAndUsageRequest {
/// 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 .
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// Sets the AWS cost granularity to MONTHLY
or DAILY
, or HOURLY
. If Granularity
isn't set, the response object doesn't include the Granularity
, either MONTHLY
or DAILY
, or HOURLY
.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
/// You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are AZ
, INSTANCE_TYPE
, LEGAL_ENTITY_NAME
, LINKED_ACCOUNT
, OPERATION
, PLATFORM
, PURCHASE_TYPE
, SERVICE
, TAGS
, TENANCY
, RECORD_TYPE
, and USAGE_TYPE
.
#[serde(rename = "GroupBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by: Option>,
/// Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill? .
Valid values are AmortizedCost
, BlendedCost
, NetAmortizedCost
, NetUnblendedCost
, NormalizedUsageAmount
, UnblendedCost
, and UsageQuantity
.
If you return the UsageQuantity
metric, the service aggregates all usage numbers without taking into account the units. For example, if you aggregate usageQuantity
across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours vs. GB). To get more meaningful UsageQuantity
metrics, filter by UsageType
or UsageTypeGroups
.
Metrics
is required for GetCostAndUsage
requests.
#[serde(rename = "Metrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetCostAndUsageResponse {
/// The groups that are specified by the Filter
or GroupBy
parameters in the request.
#[serde(rename = "GroupDefinitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_definitions: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The time period that is covered by the results in the response.
#[serde(rename = "ResultsByTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub results_by_time: Option>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetCostAndUsageWithResourcesRequest {
/// 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
.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// Sets the AWS cost granularity to MONTHLY
, DAILY
, or HOURLY
. If Granularity
isn't set, the response object doesn't include the Granularity
, MONTHLY
, DAILY
, or HOURLY
.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
/// You can group Amazon Web Services costs using up to two different groups: either dimensions, tag keys, or both.
#[serde(rename = "GroupBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by: Option>,
/// Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill? .
Valid values are AmortizedCost
, BlendedCost
, NetAmortizedCost
, NetUnblendedCost
, NormalizedUsageAmount
, UnblendedCost
, and UsageQuantity
.
If you return the UsageQuantity
metric, the service aggregates all usage numbers without taking the units into account. For example, if you aggregate usageQuantity
across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours vs. GB). To get more meaningful UsageQuantity
metrics, filter by UsageType
or UsageTypeGroups
.
Metrics
is required for GetCostAndUsageWithResources
requests.
#[serde(rename = "Metrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetCostAndUsageWithResourcesResponse {
/// The groups that are specified by the Filter
or GroupBy
parameters in the request.
#[serde(rename = "GroupDefinitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_definitions: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The time period that is covered by the results in the response.
#[serde(rename = "ResultsByTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub results_by_time: Option>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetCostForecastRequest {
/// The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// How granular you want the forecast to be. You can get 3 months of DAILY
forecasts or 12 months of MONTHLY
forecasts.
The GetCostForecast
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
pub granularity: String,
///
Which metric Cost Explorer uses to create your forecast. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill? .
Valid values for a GetCostForecast
call are the following:
AMORTIZEDCOST
BLENDEDCOST
NETAMORTIZED COST
NETUNBLENDED COST
UNBLENDED_COST
#[serde(rename = "Metric")]
pub metric: String,
/// Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
#[serde(rename = "PredictionIntervalLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prediction_interval_level: Option,
/// The period of time that you want the forecast to cover.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetCostForecastResponse {
/// The forecasts for your query, in order. For DAILY
forecasts, this is a list of days. For MONTHLY
forecasts, this is a list of months.
#[serde(rename = "ForecastResultsByTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub forecast_results_by_time: Option>,
/// How much you are forecasted to spend over the forecast period, in USD
.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDimensionValuesRequest {
///
The context for the call to GetDimensionValues
. This can be RESERVATIONS
or COSTAND USAGE
. The default value is COSTAND USAGE
. If the context is set to RESERVATIONS
, the resulting dimension values can be used in the GetReservationUtilization
operation. If the context is set to COSTAND USAGE
, the resulting dimension values can be used in the GetCostAndUsage
operation.
If you set the context to COSTAND USAGE
, you can use the following dimensions for searching:
AZ - The Availability Zone. An example is us-east-1a
.
DATABASEENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.
INSTANCETYPE - The type of Amazon EC2 instance. An example is m4.xlarge
.
LEGALENTITY NAME - The name of the organization that sells you AWS services, such as Amazon Web Services.
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
OPERATINGSYSTEM - The operating system. Examples are Windows or Linux.
OPERATION - The action performed. Examples include RunInstance
and CreateBucket
.
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
PURCHASETYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances.
SERVICE - The AWS service such as Amazon DynamoDB.
USAGETYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues
operation includes a unit attribute. Examples include GB and Hrs.
USAGETYPE GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.
RECORDTYPE - The different types of charges such as RI fees, usage costs, tax refunds, and credits.
RESOURCEID - The unique identifier of the resource. ResourceId is an opt-in feature only available for last 14 days for EC2-Compute Service.
If you set the context to RESERVATIONS
, you can use the following dimensions for searching:
AZ - The Availability Zone. An example is us-east-1a
.
CACHEENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.
DEPLOYMENTOPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ
and MultiAZ
.
INSTANCETYPE - The type of Amazon EC2 instance. An example is m4.xlarge
.
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
REGION - The AWS Region.
SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are regional or a single Availability Zone.
TAG (Coverage only) - The tags that are associated with a Reserved Instance (RI).
TENANCY - The tenancy of a resource. Examples are shared or dedicated.
If you set the context to SAVINGSPLANS
, you can use the following dimensions for searching:
SAVINGSPLANSTYPE - Type of Savings Plans (EC2 Instance or Compute)
PAYMENTOPTION - Payment option for the given Savings Plans (for example, All Upfront)
REGION - The AWS Region.
INSTANCETYPE FAMILY - The family of instances (For example, m5
)
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
SAVINGSPLAN_ARN - The unique identifier for your Savings Plan
#[serde(rename = "Context")]
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option,
/// The name of the dimension. Each Dimension
is available for a different Context
. For more information, see Context
.
#[serde(rename = "Dimension")]
pub dimension: String,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The value that you want to search the filter values for.
#[serde(rename = "SearchString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub search_string: Option,
/// 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetDimensionValuesResponse {
///
The filters that you used to filter your request. Some dimensions are available only for a specific context.
If you set the context to COSTAND USAGE
, you can use the following dimensions for searching:
AZ - The Availability Zone. An example is us-east-1a
.
DATABASEENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.
INSTANCETYPE - The type of Amazon EC2 instance. An example is m4.xlarge
.
LEGALENTITY NAME - The name of the organization that sells you AWS services, such as Amazon Web Services.
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
OPERATINGSYSTEM - The operating system. Examples are Windows or Linux.
OPERATION - The action performed. Examples include RunInstance
and CreateBucket
.
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
PURCHASETYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances.
SERVICE - The AWS service such as Amazon DynamoDB.
USAGETYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues
operation includes a unit attribute. Examples include GB and Hrs.
USAGETYPE GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.
RECORDTYPE - The different types of charges such as RI fees, usage costs, tax refunds, and credits.
RESOURCEID - The unique identifier of the resource. ResourceId is an opt-in feature only available for last 14 days for EC2-Compute Service.
If you set the context to RESERVATIONS
, you can use the following dimensions for searching:
AZ - The Availability Zone. An example is us-east-1a
.
CACHEENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.
DEPLOYMENTOPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ
and MultiAZ
.
INSTANCETYPE - The type of Amazon EC2 instance. An example is m4.xlarge
.
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
REGION - The AWS Region.
SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are regional or a single Availability Zone.
TAG (Coverage only) - The tags that are associated with a Reserved Instance (RI).
TENANCY - The tenancy of a resource. Examples are shared or dedicated.
If you set the context to SAVINGSPLANS
, you can use the following dimensions for searching:
SAVINGSPLANSTYPE - Type of Savings Plans (EC2 Instance or Compute)
PAYMENTOPTION - Payment option for the given Savings Plans (for example, All Upfront)
REGION - The AWS Region.
INSTANCETYPE FAMILY - The family of instances (For example, m5
)
LINKEDACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account.
SAVINGSPLAN_ARN - The unique identifier for your Savings Plan
#[serde(rename = "DimensionValues")]
pub dimension_values: Vec,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The number of results that AWS returned at one time.
#[serde(rename = "ReturnSize")]
pub return_size: i64,
/// The total number of search results.
#[serde(rename = "TotalSize")]
pub total_size: i64,
}
/// You can use the following request parameters to query for how much of your instance usage a reservation covered.
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetReservationCoverageRequest {
/// Filters utilization data by dimensions. You can filter by the following dimensions:
AZ
CACHE_ENGINE
DATABASE_ENGINE
DEPLOYMENT_OPTION
INSTANCE_TYPE
LINKED_ACCOUNT
OPERATING_SYSTEM
PLATFORM
REGION
SERVICE
TAG
TENANCY
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.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The granularity of the AWS cost data for the reservation. Valid values are MONTHLY
and DAILY
.
If GroupBy
is set, Granularity
can't be set. If Granularity
isn't set, the response object doesn't include Granularity
, either MONTHLY
or DAILY
.
The GetReservationCoverage
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
///
You can group the data by the following attributes:
AZ
CACHEENGINE
DATABASEENGINE
DEPLOYMENTOPTION
INSTANCETYPE
LINKEDACCOUNT
OPERATINGSYSTEM
PLATFORM
REGION
TENANCY
#[serde(rename = "GroupBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by: Option>,
/// 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.
#[serde(rename = "Metrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetReservationCoverageResponse {
/// The amount of time that your reservations covered.
#[serde(rename = "CoveragesByTime")]
pub coverages_by_time: Vec,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The total amount of instance usage that a reservation covered.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetReservationPurchaseRecommendationRequest {
/// The account ID that is associated with the recommendation.
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option,
/// The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the payer account and linked accounts if the value is set to PAYER
. If the value is LINKED
, recommendations are calculated for individual linked accounts only.
#[serde(rename = "AccountScope")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_scope: Option,
/// The number of previous days that you want AWS to consider when it calculates your recommendations.
#[serde(rename = "LookbackPeriodInDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookback_period_in_days: Option,
/// The pagination token that indicates the next set of results that you want to retrieve.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The number of recommendations that you want returned in a single response object.
#[serde(rename = "PageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option,
/// The reservation purchase option that you want recommendations for.
#[serde(rename = "PaymentOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_option: Option,
/// The specific service that you want recommendations for.
#[serde(rename = "Service")]
pub service: String,
/// The hardware specifications for the service instances that you want recommendations for, such as standard or convertible Amazon EC2 instances.
#[serde(rename = "ServiceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_specification: Option,
/// The reservation term that you want recommendations for.
#[serde(rename = "TermInYears")]
#[serde(skip_serializing_if = "Option::is_none")]
pub term_in_years: Option,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetReservationPurchaseRecommendationResponse {
/// Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.
#[serde(rename = "Metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option,
/// The pagination token for the next set of retrievable results.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// Recommendations for reservations to purchase.
#[serde(rename = "Recommendations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendations: Option>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetReservationUtilizationRequest {
/// Filters utilization data by dimensions. You can filter by the following dimensions:
AZ
CACHE_ENGINE
DEPLOYMENT_OPTION
INSTANCE_TYPE
LINKED_ACCOUNT
OPERATING_SYSTEM
PLATFORM
REGION
SERVICE
SCOPE
TENANCY
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.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// If GroupBy
is set, Granularity
can't be set. If Granularity
isn't set, the response object doesn't include Granularity
, either MONTHLY
or DAILY
. If both GroupBy
and Granularity
aren't set, GetReservationUtilization
defaults to DAILY
.
The GetReservationUtilization
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
/// Groups only by SUBSCRIPTION_ID
. Metadata is included.
#[serde(rename = "GroupBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by: Option>,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// 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
up to and including 2017-04-30
but not including 2017-05-01
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetReservationUtilizationResponse {
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The total amount of time that you used your RIs.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
/// The amount of time that you used your RIs.
#[serde(rename = "UtilizationsByTime")]
pub utilizations_by_time: Vec,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRightsizingRecommendationRequest {
/// Enables you to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
#[serde(rename = "Configuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration: Option,
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The pagination token that indicates the next set of results that you want to retrieve.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The number of recommendations that you want returned in a single response object.
#[serde(rename = "PageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option,
/// The specific service that you want recommendations for. The only valid value for GetRightsizingRecommendation
is "AmazonEC2
".
#[serde(rename = "Service")]
pub service: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetRightsizingRecommendationResponse {
/// Enables you to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
#[serde(rename = "Configuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration: Option,
/// Information regarding this specific recommendation set.
#[serde(rename = "Metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option,
/// The token to retrieve the next set of results.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// Recommendations to rightsize resources.
#[serde(rename = "RightsizingRecommendations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rightsizing_recommendations: Option>,
/// Summary of this recommendation set.
#[serde(rename = "Summary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSavingsPlansCoverageRequest {
/// Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:
LINKED_ACCOUNT
REGION
SERVICE
INSTANCE_FAMILY
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.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The granularity of the Amazon Web Services cost data for your Savings Plans. Granularity
can't be set if GroupBy
is set.
The GetSavingsPlansCoverage
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
/// You can group the data using the attributes INSTANCE_FAMILY
, REGION
, or SERVICE
.
#[serde(rename = "GroupBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by: Option>,
/// The number of items to be returned in a response. The default is 20
, with a minimum value of 1
.
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option,
/// The measurement that you want your Savings Plans coverage reported in. The only valid value is SpendCoveredBySavingsPlans
.
#[serde(rename = "Metrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option>,
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
/// 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.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetSavingsPlansCoverageResponse {
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
/// The amount of spend that your Savings Plans covered.
#[serde(rename = "SavingsPlansCoverages")]
pub savings_plans_coverages: Vec,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSavingsPlansPurchaseRecommendationRequest {
/// The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the payer account and linked accounts if the value is set to PAYER
. If the value is LINKED
, recommendations are calculated for individual linked accounts only.
#[serde(rename = "AccountScope")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_scope: Option,
/// 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.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The lookback period used to generate the recommendation.
#[serde(rename = "LookbackPeriodInDays")]
pub lookback_period_in_days: String,
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The number of recommendations that you want returned in a single response object.
#[serde(rename = "PageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option,
/// The payment option used to generate these recommendations.
#[serde(rename = "PaymentOption")]
pub payment_option: String,
/// The Savings Plans recommendation type requested.
#[serde(rename = "SavingsPlansType")]
pub savings_plans_type: String,
/// The savings plan recommendation term used to generate these recommendations.
#[serde(rename = "TermInYears")]
pub term_in_years: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetSavingsPlansPurchaseRecommendationResponse {
/// Information regarding this specific recommendation set.
#[serde(rename = "Metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option,
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// Contains your request parameters, Savings Plan Recommendations Summary, and Details.
#[serde(rename = "SavingsPlansPurchaseRecommendation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_purchase_recommendation: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSavingsPlansUtilizationDetailsRequest {
/// Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:
LINKED_ACCOUNT
SAVINGS_PLAN_ARN
REGION
PAYMENT_OPTION
INSTANCE_TYPE_FAMILY
GetSavingsPlansUtilizationDetails
uses the same Expression object as the other operations, but only AND
is supported among each dimension.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The number of items to be returned in a response. The default is 20
, with a minimum value of 1
.
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option,
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
/// 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.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetSavingsPlansUtilizationDetailsResponse {
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
/// Retrieves a single daily or monthly Savings Plans utilization rate and details for your account.
#[serde(rename = "SavingsPlansUtilizationDetails")]
pub savings_plans_utilization_details: Vec,
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
/// The total Savings Plans utilization, regardless of time period.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSavingsPlansUtilizationRequest {
/// Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:
LINKED_ACCOUNT
SAVINGS_PLAN_ARN
SAVINGS_PLANS_TYPE
REGION
PAYMENT_OPTION
INSTANCE_TYPE_FAMILY
GetSavingsPlansUtilization
uses the same Expression object as the other operations, but only AND
is supported among each dimension.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// The granularity of the Amazon Web Services utillization data for your Savings Plans.
The GetSavingsPlansUtilization
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub granularity: Option,
/// 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.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetSavingsPlansUtilizationResponse {
/// The amount of cost/commitment you used your Savings Plans. This allows you to specify date ranges.
#[serde(rename = "SavingsPlansUtilizationsByTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_utilizations_by_time: Option>,
/// The total amount of cost/commitment that you used your Savings Plans, regardless of date ranges.
#[serde(rename = "Total")]
pub total: SavingsPlansUtilizationAggregates,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetTagsRequest {
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The value that you want to search for.
#[serde(rename = "SearchString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub search_string: Option,
/// The key of the tag that you want to return values for.
#[serde(rename = "TagKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_key: Option,
/// 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetTagsResponse {
/// 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.
#[serde(rename = "NextPageToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option,
/// The number of query results that AWS returns at a time.
#[serde(rename = "ReturnSize")]
pub return_size: i64,
/// The tags that match your request.
#[serde(rename = "Tags")]
pub tags: Vec,
/// The total number of query results.
#[serde(rename = "TotalSize")]
pub total_size: i64,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsageForecastRequest {
/// The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters.
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option,
/// How granular you want the forecast to be. You can get 3 months of DAILY
forecasts or 12 months of MONTHLY
forecasts.
The GetUsageForecast
operation supports only DAILY
and MONTHLY
granularities.
#[serde(rename = "Granularity")]
pub granularity: String,
///
Which metric Cost Explorer uses to create your forecast.
Valid values for a GetUsageForecast
call are the following:
USAGEQUANTITY
NORMALIZEDUSAGE_AMOUNT
#[serde(rename = "Metric")]
pub metric: String,
/// Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
#[serde(rename = "PredictionIntervalLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prediction_interval_level: Option,
/// The start and end dates of the period that you want to retrieve usage forecast for. 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
.
#[serde(rename = "TimePeriod")]
pub time_period: DateInterval,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetUsageForecastResponse {
/// The forecasts for your query, in order. For DAILY
forecasts, this is a list of days. For MONTHLY
forecasts, this is a list of months.
#[serde(rename = "ForecastResultsByTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub forecast_results_by_time: Option>,
/// How much you're forecasted to use over the forecast period.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option,
}
/// One level of grouped data in the results.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Group {
/// The keys that are included in this group.
#[serde(rename = "Keys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub keys: Option>,
/// The metrics that are included in this group.
#[serde(rename = "Metrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option<::std::collections::HashMap>,
}
/// Represents a group when you specify a group by criteria or in the response to a query with a specific grouping.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GroupDefinition {
/// The string that represents a key for a specified group.
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option,
/// The string that represents the type of group.
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option,
}
/// Details about the instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InstanceDetails {
/// The Amazon EC2 instances that AWS recommends that you purchase.
#[serde(rename = "EC2InstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec2_instance_details: Option,
/// The Amazon ES instances that AWS recommends that you purchase.
#[serde(rename = "ESInstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub es_instance_details: Option,
/// The ElastiCache instances that AWS recommends that you purchase.
#[serde(rename = "ElastiCacheInstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub elasti_cache_instance_details: Option,
/// The Amazon RDS instances that AWS recommends that you purchase.
#[serde(rename = "RDSInstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rds_instance_details: Option,
/// The Amazon Redshift instances that AWS recommends that you purchase.
#[serde(rename = "RedshiftInstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub redshift_instance_details: Option,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListCostCategoryDefinitionsRequest {
/// The date when the Cost Category was effective.
#[serde(rename = "EffectiveOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_on: Option,
/// The number of entries a paginated response contains.
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option,
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListCostCategoryDefinitionsResponse {
/// A reference to a Cost Category containing enough information to identify the Cost Category.
#[serde(rename = "CostCategoryReferences")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cost_category_references: Option>,
/// The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option,
}
/// The aggregated value for a metric.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MetricValue {
/// The actual number that represents the metric.
#[serde(rename = "Amount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option,
/// The unit that the metric is given in.
#[serde(rename = "Unit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unit: Option,
}
/// Details on the modification recommendation.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ModifyRecommendationDetail {
/// Identifies whether this instance type is the Amazon Web Services default recommendation.
#[serde(rename = "TargetInstances")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_instances: Option>,
}
/// Details about the Amazon RDS instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RDSInstanceDetails {
/// Whether the recommendation is for a current-generation instance.
#[serde(rename = "CurrentGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_generation: Option,
/// The database edition that the recommended reservation supports.
#[serde(rename = "DatabaseEdition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub database_edition: Option,
/// The database engine that the recommended reservation supports.
#[serde(rename = "DatabaseEngine")]
#[serde(skip_serializing_if = "Option::is_none")]
pub database_engine: Option,
/// Whether the recommendation is for a reservation in a single Availability Zone or a reservation with a backup in a second Availability Zone.
#[serde(rename = "DeploymentOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_option: Option,
/// The instance family of the recommended reservation.
#[serde(rename = "Family")]
#[serde(skip_serializing_if = "Option::is_none")]
pub family: Option,
/// The type of instance that AWS recommends.
#[serde(rename = "InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option,
/// The license model that the recommended reservation supports.
#[serde(rename = "LicenseModel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_model: Option,
/// The AWS Region of the recommended reservation.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// Whether the recommended reservation is size flexible.
#[serde(rename = "SizeFlexEligible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size_flex_eligible: Option,
}
/// Details about the Amazon Redshift instances that AWS recommends that you purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RedshiftInstanceDetails {
/// Whether the recommendation is for a current-generation instance.
#[serde(rename = "CurrentGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_generation: Option,
/// The instance family of the recommended reservation.
#[serde(rename = "Family")]
#[serde(skip_serializing_if = "Option::is_none")]
pub family: Option,
/// The type of node that AWS recommends.
#[serde(rename = "NodeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub node_type: Option,
/// The AWS Region of the recommended reservation.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
/// Whether the recommended reservation is size flexible.
#[serde(rename = "SizeFlexEligible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size_flex_eligible: Option,
}
/// The aggregated numbers for your reservation usage.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationAggregates {
/// The monthly cost of your reservation, amortized over the reservation period.
#[serde(rename = "AmortizedRecurringFee")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amortized_recurring_fee: Option,
/// The upfront cost of your reservation, amortized over the reservation period.
#[serde(rename = "AmortizedUpfrontFee")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amortized_upfront_fee: Option,
/// How much you saved due to purchasing and utilizing reservation. AWS calculates this by subtracting TotalAmortizedFee
from OnDemandCostOfRIHoursUsed
.
#[serde(rename = "NetRISavings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub net_ri_savings: Option,
/// How much your reservation would cost if charged On-Demand rates.
#[serde(rename = "OnDemandCostOfRIHoursUsed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_cost_of_ri_hours_used: Option,
/// How many reservation hours that you purchased.
#[serde(rename = "PurchasedHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub purchased_hours: Option,
/// How many Amazon EC2 reservation hours that you purchased, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
#[serde(rename = "PurchasedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub purchased_units: Option,
/// The total number of reservation hours that you used.
#[serde(rename = "TotalActualHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_actual_hours: Option,
/// The total number of Amazon EC2 reservation hours that you used, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
#[serde(rename = "TotalActualUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_actual_units: Option,
/// The total cost of your reservation, amortized over the reservation period.
#[serde(rename = "TotalAmortizedFee")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_amortized_fee: Option,
/// How much you could save if you use your entire reservation.
#[serde(rename = "TotalPotentialRISavings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_potential_ri_savings: Option,
/// The number of reservation hours that you didn't use.
#[serde(rename = "UnusedHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unused_hours: Option,
/// The number of Amazon EC2 reservation hours that you didn't use, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
#[serde(rename = "UnusedUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unused_units: Option,
/// The percentage of reservation time that you used.
#[serde(rename = "UtilizationPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub utilization_percentage: Option,
/// The percentage of Amazon EC2 reservation time that you used, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
#[serde(rename = "UtilizationPercentageInUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub utilization_percentage_in_units: Option,
}
/// A group of reservations that share a set of attributes.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationCoverageGroup {
/// The attributes for this group of reservations.
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap>,
/// How much instance usage this group of reservations covered.
#[serde(rename = "Coverage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage: Option,
}
/// A specific reservation that AWS recommends for purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationPurchaseRecommendation {
/// The account scope that AWS recommends that you purchase this instance for. For example, you can purchase this reservation for an entire organization in AWS Organizations.
#[serde(rename = "AccountScope")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_scope: Option,
/// How many days of previous usage that AWS considers when making this recommendation.
#[serde(rename = "LookbackPeriodInDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookback_period_in_days: Option,
/// The payment option for the reservation. For example, AllUpfront
or NoUpfront
.
#[serde(rename = "PaymentOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_option: Option,
/// Details about the recommended purchases.
#[serde(rename = "RecommendationDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_details: Option>,
/// A summary about the recommended purchase.
#[serde(rename = "RecommendationSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_summary: Option,
/// Hardware specifications for the service that you want recommendations for.
#[serde(rename = "ServiceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_specification: Option,
/// The term of the reservation that you want recommendations for, in years.
#[serde(rename = "TermInYears")]
#[serde(skip_serializing_if = "Option::is_none")]
pub term_in_years: Option,
}
/// Details about your recommended reservation purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationPurchaseRecommendationDetail {
/// The account that this RI recommendation is for.
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option,
/// The average number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "AverageNormalizedUnitsUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_normalized_units_used_per_hour: Option,
/// The average number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "AverageNumberOfInstancesUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_number_of_instances_used_per_hour: Option,
/// The average utilization of your instances. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "AverageUtilization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_utilization: Option,
/// The currency code that AWS used to calculate the costs for this instance.
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option,
/// How long AWS estimates that it takes for this instance to start saving you money, in months.
#[serde(rename = "EstimatedBreakEvenInMonths")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_break_even_in_months: Option,
/// How much AWS estimates that you spend on On-Demand Instances in a month.
#[serde(rename = "EstimatedMonthlyOnDemandCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_monthly_on_demand_cost: Option,
/// How much AWS estimates that this specific recommendation could save you in a month.
#[serde(rename = "EstimatedMonthlySavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_monthly_savings_amount: Option,
/// How much AWS estimates that this specific recommendation could save you in a month, as a percentage of your overall costs.
#[serde(rename = "EstimatedMonthlySavingsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_monthly_savings_percentage: Option,
/// How much AWS estimates that you would have spent for all usage during the specified historical period if you had a reservation.
#[serde(rename = "EstimatedReservationCostForLookbackPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_reservation_cost_for_lookback_period: Option,
/// Details about the instances that AWS recommends that you purchase.
#[serde(rename = "InstanceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_details: Option,
/// The maximum number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "MaximumNormalizedUnitsUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_normalized_units_used_per_hour: Option,
/// The maximum number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "MaximumNumberOfInstancesUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_number_of_instances_used_per_hour: Option,
/// The minimum number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "MinimumNormalizedUnitsUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_normalized_units_used_per_hour: Option,
/// The minimum number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
#[serde(rename = "MinimumNumberOfInstancesUsedPerHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_number_of_instances_used_per_hour: Option,
/// The number of normalized units that AWS recommends that you purchase.
#[serde(rename = "RecommendedNormalizedUnitsToPurchase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommended_normalized_units_to_purchase: Option,
/// The number of instances that AWS recommends that you purchase.
#[serde(rename = "RecommendedNumberOfInstancesToPurchase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommended_number_of_instances_to_purchase: Option,
/// How much purchasing this instance costs you on a monthly basis.
#[serde(rename = "RecurringStandardMonthlyCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recurring_standard_monthly_cost: Option,
/// How much purchasing this instance costs you upfront.
#[serde(rename = "UpfrontCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upfront_cost: Option,
}
/// Information about this specific recommendation, such as the timestamp for when AWS made a specific recommendation.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationPurchaseRecommendationMetadata {
/// The timestamp for when AWS made this recommendation.
#[serde(rename = "GenerationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_timestamp: Option,
/// The ID for this specific recommendation.
#[serde(rename = "RecommendationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_id: Option,
}
/// A summary about this recommendation, such as the currency code, the amount that AWS estimates that you could save, and the total amount of reservation to purchase.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationPurchaseRecommendationSummary {
/// The currency code used for this recommendation.
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option,
/// The total amount that AWS estimates that this recommendation could save you in a month.
#[serde(rename = "TotalEstimatedMonthlySavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_estimated_monthly_savings_amount: Option,
/// The total amount that AWS estimates that this recommendation could save you in a month, as a percentage of your costs.
#[serde(rename = "TotalEstimatedMonthlySavingsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_estimated_monthly_savings_percentage: Option,
}
/// A group of reservations that share a set of attributes.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReservationUtilizationGroup {
/// The attributes for this group of reservations.
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap>,
/// The key for a specific reservation attribute.
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option,
/// How much you used this group of reservations.
#[serde(rename = "Utilization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub utilization: Option,
/// The value of a specific reservation attribute.
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option,
}
/// Details on the resource.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResourceDetails {
/// Details on the Amazon EC2 resource.
#[serde(rename = "EC2ResourceDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec2_resource_details: Option,
}
/// Resource utilization of current resource.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResourceUtilization {
/// Utilization of current Amazon EC2 Instance
#[serde(rename = "EC2ResourceUtilization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec2_resource_utilization: Option,
}
/// The result that is associated with a time period.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResultByTime {
/// Whether the result is estimated.
#[serde(rename = "Estimated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated: Option,
/// The groups that this time period includes.
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option>,
/// The time period that the result covers.
#[serde(rename = "TimePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_period: Option,
/// The total amount of cost or usage accrued during the time period.
#[serde(rename = "Total")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option<::std::collections::HashMap>,
}
/// Recommendations to rightsize resources.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RightsizingRecommendation {
/// The account that this recommendation is for.
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option,
/// Context regarding the current instance.
#[serde(rename = "CurrentInstance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_instance: Option,
/// Details for modification recommendations.
#[serde(rename = "ModifyRecommendationDetail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modify_recommendation_detail: Option,
/// Recommendation to either terminate or modify the resource.
#[serde(rename = "RightsizingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rightsizing_type: Option,
/// Details for termination recommendations.
#[serde(rename = "TerminateRecommendationDetail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub terminate_recommendation_detail: Option,
}
/// Enables you to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RightsizingRecommendationConfiguration {
/// The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is TRUE
.
#[serde(rename = "BenefitsConsidered")]
pub benefits_considered: bool,
/// The option to see recommendations within the same instance family, or recommendations for instances across other families. The default value is SAME_INSTANCE_FAMILY
.
#[serde(rename = "RecommendationTarget")]
pub recommendation_target: String,
}
/// Metadata for this recommendation set.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RightsizingRecommendationMetadata {
/// The timestamp for when Amazon Web Services made this recommendation.
#[serde(rename = "GenerationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_timestamp: Option,
/// How many days of previous usage that Amazon Web Services considers when making this recommendation.
#[serde(rename = "LookbackPeriodInDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookback_period_in_days: Option,
/// The ID for this specific recommendation.
#[serde(rename = "RecommendationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_id: Option,
}
/// Summary of rightsizing recommendations
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RightsizingRecommendationSummary {
/// Estimated total savings resulting from modifications, on a monthly basis.
#[serde(rename = "EstimatedTotalMonthlySavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_total_monthly_savings_amount: Option,
/// The currency code that Amazon Web Services used to calculate the savings.
#[serde(rename = "SavingsCurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_currency_code: Option,
/// Savings percentage based on the recommended modifications, relative to the total On-Demand costs associated with these instances.
#[serde(rename = "SavingsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_percentage: Option,
/// Total number of instance recommendations.
#[serde(rename = "TotalRecommendationCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_recommendation_count: Option,
}
/// The amortized amount of Savings Plans purchased in a specific account during a specific time interval.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansAmortizedCommitment {
/// The amortized amount of your Savings Plans commitment that was purchased with either a Partial
or a NoUpfront
.
#[serde(rename = "AmortizedRecurringCommitment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amortized_recurring_commitment: Option,
/// The amortized amount of your Savings Plans commitment that was purchased with an Upfront
or PartialUpfront
Savings Plans.
#[serde(rename = "AmortizedUpfrontCommitment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amortized_upfront_commitment: Option,
/// The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
#[serde(rename = "TotalAmortizedCommitment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_amortized_commitment: Option,
}
/// The amount of Savings Plans eligible usage that is covered by Savings Plans. All calculations consider the On-Demand equivalent of your Savings Plans usage.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansCoverage {
/// The attribute that applies to a specific Dimension
.
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap>,
/// The amount of Savings Plans eligible usage that the Savings Plans covered.
#[serde(rename = "Coverage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage: Option,
#[serde(rename = "TimePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_period: Option,
}
/// Specific coverage percentage, On-Demand costs, and spend covered by Savings Plans, and total Savings Plans costs for an account.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansCoverageData {
/// The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage in an account(or set of accounts).
#[serde(rename = "CoveragePercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coverage_percentage: Option,
/// The cost of your Amazon Web Services usage at the public On-Demand rate.
#[serde(rename = "OnDemandCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_demand_cost: Option,
/// The amount of your Amazon Web Services usage that is covered by a Savings Plans.
#[serde(rename = "SpendCoveredBySavingsPlans")]
#[serde(skip_serializing_if = "Option::is_none")]
pub spend_covered_by_savings_plans: Option,
/// The total cost of your Amazon Web Services usage, regardless of your purchase option.
#[serde(rename = "TotalCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_cost: Option,
}
/// Attribute details on a specific Savings Plan.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansDetails {
/// A group of instance types that Savings Plans applies to.
#[serde(rename = "InstanceFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_family: Option,
/// The unique ID used to distinguish Savings Plans from one another.
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option,
/// A collection of AWS resources in a geographic area. Each AWS Region is isolated and independent of the other Regions.
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option,
}
/// Contains your request parameters, Savings Plan Recommendations Summary, and Details.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansPurchaseRecommendation {
/// The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the payer account and linked accounts if the value is set to PAYER
. If the value is LINKED
, recommendations are calculated for individual linked accounts only.
#[serde(rename = "AccountScope")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_scope: Option,
/// The lookback period in days, used to generate the recommendation.
#[serde(rename = "LookbackPeriodInDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookback_period_in_days: Option,
/// The payment option used to generate the recommendation.
#[serde(rename = "PaymentOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_option: Option,
/// Details for the Savings Plans we recommend that you purchase to cover existing Savings Plans eligible workloads.
#[serde(rename = "SavingsPlansPurchaseRecommendationDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_purchase_recommendation_details:
Option>,
/// Summary metrics for your Savings Plans Recommendations.
#[serde(rename = "SavingsPlansPurchaseRecommendationSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_purchase_recommendation_summary:
Option,
/// The requested Savings Plans recommendation type.
#[serde(rename = "SavingsPlansType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_type: Option,
/// The Savings Plans recommendation term in years, used to generate the recommendation.
#[serde(rename = "TermInYears")]
#[serde(skip_serializing_if = "Option::is_none")]
pub term_in_years: Option,
}
/// Details for your recommended Savings Plans.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansPurchaseRecommendationDetail {
/// The AccountID
the recommendation is generated for.
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option,
/// The currency code Amazon Web Services used to generate the recommendations and present potential savings.
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option,
/// The average value of hourly On-Demand spend over the lookback period of the applicable usage type.
#[serde(rename = "CurrentAverageHourlyOnDemandSpend")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_average_hourly_on_demand_spend: Option,
/// The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.
#[serde(rename = "CurrentMaximumHourlyOnDemandSpend")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_maximum_hourly_on_demand_spend: Option,
/// The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.
#[serde(rename = "CurrentMinimumHourlyOnDemandSpend")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_minimum_hourly_on_demand_spend: Option,
/// The estimated utilization of the recommended Savings Plans.
#[serde(rename = "EstimatedAverageUtilization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_average_utilization: Option,
/// The estimated monthly savings amount, based on the recommended Savings Plans.
#[serde(rename = "EstimatedMonthlySavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_monthly_savings_amount: Option,
/// The remaining On-Demand cost estimated to not be covered by the recommended Savings Plans, over the length of the lookback period.
#[serde(rename = "EstimatedOnDemandCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_on_demand_cost: Option,
/// The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.
#[serde(rename = "EstimatedOnDemandCostWithCurrentCommitment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_on_demand_cost_with_current_commitment: Option,
/// The estimated return on investment based on the recommended Savings Plans purchased. This is calculated as estimatedSavingsAmount
/ estimatedSPCost
*100.
#[serde(rename = "EstimatedROI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_roi: Option,
/// The cost of the recommended Savings Plans over the length of the lookback period.
#[serde(rename = "EstimatedSPCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_sp_cost: Option,
/// The estimated savings amount based on the recommended Savings Plans over the length of the lookback period.
#[serde(rename = "EstimatedSavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_savings_amount: Option,
/// The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.
#[serde(rename = "EstimatedSavingsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_savings_percentage: Option,
/// The recommended hourly commitment level for the Savings Plans type, and configuration based on the usage during the lookback period.
#[serde(rename = "HourlyCommitmentToPurchase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hourly_commitment_to_purchase: Option,
/// Details for your recommended Savings Plans.
#[serde(rename = "SavingsPlansDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub savings_plans_details: Option,
/// The upfront cost of the recommended Savings Plans, based on the selected payment option.
#[serde(rename = "UpfrontCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upfront_cost: Option,
}
/// Metadata about your Savings Plans Purchase Recommendations.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansPurchaseRecommendationMetadata {
/// The timestamp showing when the recommendations were generated.
#[serde(rename = "GenerationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_timestamp: Option,
/// The unique identifier for the recommendation set.
#[serde(rename = "RecommendationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_id: Option,
}
/// Summary metrics for your Savings Plans Purchase Recommendations.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansPurchaseRecommendationSummary {
/// The currency code Amazon Web Services used to generate the recommendations and present potential savings.
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option,
/// The current total on demand spend of the applicable usage types over the lookback period.
#[serde(rename = "CurrentOnDemandSpend")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_on_demand_spend: Option,
/// The recommended Savings Plans cost on a daily (24 hourly) basis.
#[serde(rename = "DailyCommitmentToPurchase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub daily_commitment_to_purchase: Option,
/// The estimated monthly savings amount, based on the recommended Savings Plans purchase.
#[serde(rename = "EstimatedMonthlySavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_monthly_savings_amount: Option,
/// The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.
#[serde(rename = "EstimatedOnDemandCostWithCurrentCommitment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_on_demand_cost_with_current_commitment: Option,
/// The estimated return on investment based on the recommended Savings Plans and estimated savings.
#[serde(rename = "EstimatedROI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_roi: Option,
/// The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
#[serde(rename = "EstimatedSavingsAmount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_savings_amount: Option,
/// The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated as estimatedSavingsAmount
/ CurrentOnDemandSpend
*100.
#[serde(rename = "EstimatedSavingsPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_savings_percentage: Option,
/// The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost of Savings Plans during this term, and the remaining On-Demand usage.
#[serde(rename = "EstimatedTotalCost")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_total_cost: Option,
/// The recommended hourly commitment based on the recommendation parameters.
#[serde(rename = "HourlyCommitmentToPurchase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hourly_commitment_to_purchase: Option,
/// The aggregate number of Savings Plans recommendations that exist for your account.
#[serde(rename = "TotalRecommendationCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_recommendation_count: Option,
}
/// The amount of savings you're accumulating, against the public On-Demand rate of the usage accrued in an account.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SavingsPlansSavings {
/// The savings amount that you are accumulating for the usage that is covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
#[serde(rename = "NetSavings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub net_savings: Option,
///