pub struct Client { /* private fields */ }
Expand description

Client for AWS Cost Explorer Service

Client for invoking operations on AWS Cost Explorer Service. Each operation on AWS Cost Explorer Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_costexplorer::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::RetryConfig;
    let shared_config = aws_config::load_from_env().await;
    let config = aws_sdk_costexplorer::config::Builder::from(&shared_config)
        .retry_config(RetryConfig::disabled())
        .build();
    let client = aws_sdk_costexplorer::Client::from_conf(config);

Implementations

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the CreateAnomalyMonitor operation.

Constructs a fluent builder for the CreateAnomalySubscription operation.

Constructs a fluent builder for the CreateCostCategoryDefinition operation.

Constructs a fluent builder for the DeleteAnomalyMonitor operation.

Constructs a fluent builder for the DeleteAnomalySubscription operation.

Constructs a fluent builder for the DeleteCostCategoryDefinition operation.

Constructs a fluent builder for the DescribeCostCategoryDefinition operation.

Constructs a fluent builder for the GetAnomalies operation.

Constructs a fluent builder for the GetAnomalyMonitors operation.

Constructs a fluent builder for the GetAnomalySubscriptions operation.

Constructs a fluent builder for the GetCostAndUsage operation.

  • The fluent builder is configurable:
    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      Sets the start date and end date for retrieving Amazon Web Services 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.

    • granularity(Granularity) / set_granularity(Option<Granularity>):

      Sets the Amazon Web Services 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.

    • filter(Expression) / set_filter(Option<Expression>):

      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.

      Valid values for MatchOptions for CostCategories and Tags are EQUALS, ABSENT, and CASE_SENSITIVE.

      The default values are EQUALS and CASE_SENSITIVE. Valid values for MatchOptions for Dimensions are EQUALS and CASE_SENSITIVE.

    • metrics(Vec<String>) / set_metrics(Option<Vec<String>>):

      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 and GB). To get more meaningful UsageQuantity metrics, filter by UsageType or UsageTypeGroups.

      Metrics is required for GetCostAndUsage requests.

    • group_by(Vec<GroupDefinition>) / set_group_by(Option<Vec<GroupDefinition>>):

      You can group Amazon Web Services costs using up to two different groups, either dimensions, tag keys, cost categories, or any two group by types.

      Valid values for the DIMENSION type are AZ, INSTANCE_TYPE, LEGAL_ENTITY_NAME, INVOICING_ENTITY, LINKED_ACCOUNT, OPERATION, PLATFORM, PURCHASE_TYPE, SERVICE, TENANCY, RECORD_TYPE, and USAGE_TYPE.

      When you group by the TAG type and include a valid tag key, you get all tag values, including empty strings.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<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.

  • On success, responds with GetCostAndUsageOutput with field(s):
  • On failure, responds with SdkError<GetCostAndUsageError>

Constructs a fluent builder for the GetCostAndUsageWithResources operation.

  • The fluent builder is configurable:
    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      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.

    • granularity(Granularity) / set_granularity(Option<Granularity>):

      Sets the Amazon Web Services cost granularity to MONTHLY, DAILY, or HOURLY. If Granularity isn’t set, the response object doesn’t include the Granularity, MONTHLY, DAILY, or HOURLY.

    • filter(Expression) / set_filter(Option<Expression>):

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

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

      Valid values for MatchOptions for CostCategories and Tags are EQUALS, ABSENT, and CASE_SENSITIVE.

      The default values are EQUALS and CASE_SENSITIVE. Valid values for MatchOptions for Dimensions are EQUALS and CASE_SENSITIVE.

    • metrics(Vec<String>) / set_metrics(Option<Vec<String>>):

      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.

    • group_by(Vec<GroupDefinition>) / set_group_by(Option<Vec<GroupDefinition>>):

      You can group Amazon Web Services costs using up to two different groups: DIMENSION, TAG, COST_CATEGORY.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<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.

  • On success, responds with GetCostAndUsageWithResourcesOutput with field(s):
  • On failure, responds with SdkError<GetCostAndUsageWithResourcesError>

Constructs a fluent builder for the GetCostCategories operation.

  • The fluent builder is configurable:
    • search_string(impl Into<String>) / set_search_string(Option<String>):

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

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

    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      The time period of the request.

    • cost_category_name(impl Into<String>) / set_cost_category_name(Option<String>):

      The unique name of the Cost Category.

    • filter(Expression) / set_filter(Option<Expression>):

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

      • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name (for example, REGION==US East (N. Virginia). The Expression example is as follows:

        { “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. By doing this, you can filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). The Expression for that is as follows:

        { “And”: [ {“Or”: [ {“Dimensions”: { “Key”: “REGION”, “Values”: [ “us-east-1”, “us-west-1” ] }}, {“Tags”: { “Key”: “TagName”, “Values”: [“Value1”] } } ]}, {“Not”: {“Dimensions”: { “Key”: “USAGE_TYPE”, “Values”: [“DataTransfer”] }}} ] }

        Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

        { “And”: [ … ], “DimensionValues”: { “Dimension”: “USAGE_TYPE”, “Values”: [ “DataTransfer” ] } }

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

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

    • sort_by(Vec<SortDefinition>) / set_sort_by(Option<Vec<SortDefinition>>):

      The value by which you want to sort the data.

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

      • BlendedCost

      • UnblendedCost

      • AmortizedCost

      • NetAmortizedCost

      • NetUnblendedCost

      • UsageQuantity

      • NormalizedUsageAmount

      Supported values for SortOrder are ASCENDING or DESCENDING.

      When using SortBy, NextPageToken and SearchString are not supported.

    • max_results(i32) / set_max_results(i32):

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

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

      For GetCostCategories, MaxResults has an upper limit of 1000.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<String>):

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

  • On success, responds with GetCostCategoriesOutput with field(s):
  • On failure, responds with SdkError<GetCostCategoriesError>

Constructs a fluent builder for the GetCostForecast operation.

Constructs a fluent builder for the GetDimensionValues operation.

  • The fluent builder is configurable:
    • search_string(impl Into<String>) / set_search_string(Option<String>):

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

    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      The start date and end date 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.

    • dimension(Dimension) / set_dimension(Option<Dimension>):

      The name of the dimension. Each Dimension is available for a different Context. For more information, see Context.

    • context(Context) / set_context(Option<Context>):

      The context for the call to GetDimensionValues. This can be RESERVATIONS or COST_AND_USAGE. The default value is COST_AND_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 COST_AND_USAGE, the resulting dimension values can be used in the GetCostAndUsage operation.

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

      • AZ - The Availability Zone. An example is us-east-1a.

      • BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible values are the following:

        - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services.

        - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that is an acting reseller for Amazon Web Services services in India.

        - Amazon Web Services Marketplace: The entity that supports the sale of solutions built on Amazon Web Services by third-party software providers.

      • CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.

      • DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ and MultiAZ.

      • DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.

      • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

      • INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use cases. Examples are Compute Optimized (C4, C5, C6g, C7g etc.), Memory Optimization (R4, R5n, R5b, R6g etc).

      • INVOICING_ENTITY - The name of the entity issuing the Amazon Web Services invoice.

      • LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • OPERATING_SYSTEM - 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.

      • PURCHASE_TYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances.

      • RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation Instance.

      • SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

      • SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute).

      • SERVICE - The Amazon Web Services service such as Amazon DynamoDB.

      • TENANCY - The tenancy of a resource. Examples are shared or dedicated.

      • USAGE_TYPE - 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.

      • USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.

      • REGION - The Amazon Web Services Region.

      • RECORD_TYPE - The different types of charges such as RI fees, usage costs, tax refunds, and credits.

      • RESOURCE_ID - 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.

      • CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.

      • DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ and MultiAZ.

      • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.

      • REGION - The Amazon Web Services 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 SAVINGS_PLANS, you can use the following dimensions for searching:

      • SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)

      • PAYMENT_OPTION - Payment option for the given Savings Plans (for example, All Upfront)

      • REGION - The Amazon Web Services Region.

      • INSTANCE_TYPE_FAMILY - The family of instances (For example, m5)

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

    • filter(Expression) / set_filter(Option<Expression>):

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

      • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name (for example, REGION==US East (N. Virginia). The Expression example is as follows:

        { “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. By doing this, you can filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). The Expression for that is as follows:

        { “And”: [ {“Or”: [ {“Dimensions”: { “Key”: “REGION”, “Values”: [ “us-east-1”, “us-west-1” ] }}, {“Tags”: { “Key”: “TagName”, “Values”: [“Value1”] } } ]}, {“Not”: {“Dimensions”: { “Key”: “USAGE_TYPE”, “Values”: [“DataTransfer”] }}} ] }

        Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

        { “And”: [ … ], “DimensionValues”: { “Dimension”: “USAGE_TYPE”, “Values”: [ “DataTransfer” ] } }

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

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

    • sort_by(Vec<SortDefinition>) / set_sort_by(Option<Vec<SortDefinition>>):

      The value by which you want to sort the data.

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

      • BlendedCost

      • UnblendedCost

      • AmortizedCost

      • NetAmortizedCost

      • NetUnblendedCost

      • UsageQuantity

      • NormalizedUsageAmount

      Supported values for SortOrder are ASCENDING or DESCENDING.

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

    • max_results(i32) / set_max_results(i32):

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

      For GetDimensionValues, MaxResults has an upper limit of 1000.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<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.

  • On success, responds with GetDimensionValuesOutput with field(s):
    • dimension_values(Option<Vec<DimensionValuesWithAttributes>>):

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

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

      • AZ - The Availability Zone. An example is us-east-1a.

      • DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.

      • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

      • LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • OPERATING_SYSTEM - 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.

      • PURCHASE_TYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances.

      • SERVICE - The Amazon Web Services service such as Amazon DynamoDB.

      • USAGE_TYPE - 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.

      • USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.

      • RECORD_TYPE - The different types of charges such as RI fees, usage costs, tax refunds, and credits.

      • RESOURCE_ID - 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.

      • CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.

      • DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ and MultiAZ.

      • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.

      • REGION - The Amazon Web Services 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 SAVINGS_PLANS, you can use the following dimensions for searching:

      • SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)

      • PAYMENT_OPTION - Payment option for the given Savings Plans (for example, All Upfront)

      • REGION - The Amazon Web Services Region.

      • INSTANCE_TYPE_FAMILY - The family of instances (For example, m5)

      • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

      • SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan

    • return_size(Option<i32>):

      The number of results that Amazon Web Services returned at one time.

    • total_size(Option<i32>):

      The total number of search results.

    • next_page_token(Option<String>):

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

  • On failure, responds with SdkError<GetDimensionValuesError>

Constructs a fluent builder for the GetReservationCoverage operation.

  • The fluent builder is configurable:
    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      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.

    • group_by(Vec<GroupDefinition>) / set_group_by(Option<Vec<GroupDefinition>>):

      You can group the data by the following attributes:

      • AZ

      • CACHE_ENGINE

      • DATABASE_ENGINE

      • DEPLOYMENT_OPTION

      • INSTANCE_TYPE

      • INVOICING_ENTITY

      • LINKED_ACCOUNT

      • OPERATING_SYSTEM

      • PLATFORM

      • REGION

      • TENANCY

    • granularity(Granularity) / set_granularity(Option<Granularity>):

      The granularity of the Amazon Web Services 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.

    • filter(Expression) / set_filter(Option<Expression>):

      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.

    • metrics(Vec<String>) / set_metrics(Option<Vec<String>>):

      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.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<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.

    • sort_by(SortDefinition) / set_sort_by(Option<SortDefinition>):

      The value by which you want to sort the data.

      The following values are supported for Key:

      • OnDemandCost

      • CoverageHoursPercentage

      • OnDemandHours

      • ReservedHours

      • TotalRunningHours

      • CoverageNormalizedUnitsPercentage

      • OnDemandNormalizedUnits

      • ReservedNormalizedUnits

      • TotalRunningNormalizedUnits

      • Time

      Supported values for SortOrder are ASCENDING or DESCENDING.

    • max_results(i32) / set_max_results(Option<i32>):

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

  • On success, responds with GetReservationCoverageOutput with field(s):
  • On failure, responds with SdkError<GetReservationCoverageError>

Constructs a fluent builder for the GetReservationPurchaseRecommendation operation.

Constructs a fluent builder for the GetReservationUtilization operation.

Constructs a fluent builder for the GetRightsizingRecommendation operation.

  • The fluent builder is configurable:
    • filter(Expression) / set_filter(Option<Expression>):

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

      • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name (for example, REGION==US East (N. Virginia). The Expression example is as follows:

        { “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. By doing this, you can filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). The Expression for that is as follows:

        { “And”: [ {“Or”: [ {“Dimensions”: { “Key”: “REGION”, “Values”: [ “us-east-1”, “us-west-1” ] }}, {“Tags”: { “Key”: “TagName”, “Values”: [“Value1”] } } ]}, {“Not”: {“Dimensions”: { “Key”: “USAGE_TYPE”, “Values”: [“DataTransfer”] }}} ] }

        Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

        { “And”: [ … ], “DimensionValues”: { “Dimension”: “USAGE_TYPE”, “Values”: [ “DataTransfer” ] } }

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

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

    • configuration(RightsizingRecommendationConfiguration) / set_configuration(Option<RightsizingRecommendationConfiguration>):

      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.

    • service(impl Into<String>) / set_service(Option<String>):

      The specific service that you want recommendations for. The only valid value for GetRightsizingRecommendation is “AmazonEC2”.

    • page_size(i32) / set_page_size(i32):

      The number of recommendations that you want returned in a single response object.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<String>):

      The pagination token that indicates the next set of results that you want to retrieve.

  • On success, responds with GetRightsizingRecommendationOutput with field(s):
  • On failure, responds with SdkError<GetRightsizingRecommendationError>

Constructs a fluent builder for the GetSavingsPlansCoverage operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetSavingsPlansPurchaseRecommendation operation.

Constructs a fluent builder for the GetSavingsPlansUtilization operation.

Constructs a fluent builder for the GetSavingsPlansUtilizationDetails operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetTags operation.

  • The fluent builder is configurable:
    • search_string(impl Into<String>) / set_search_string(Option<String>):

      The value that you want to search for.

    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      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.

    • tag_key(impl Into<String>) / set_tag_key(Option<String>):

      The key of the tag that you want to return values for.

    • filter(Expression) / set_filter(Option<Expression>):

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

      • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name (for example, REGION==US East (N. Virginia). The Expression example is as follows:

        { “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. By doing this, you can filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). The Expression for that is as follows:

        { “And”: [ {“Or”: [ {“Dimensions”: { “Key”: “REGION”, “Values”: [ “us-east-1”, “us-west-1” ] }}, {“Tags”: { “Key”: “TagName”, “Values”: [“Value1”] } } ]}, {“Not”: {“Dimensions”: { “Key”: “USAGE_TYPE”, “Values”: [“DataTransfer”] }}} ] }

        Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

        { “And”: [ … ], “DimensionValues”: { “Dimension”: “USAGE_TYPE”, “Values”: [ “DataTransfer” ] } }

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

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

    • sort_by(Vec<SortDefinition>) / set_sort_by(Option<Vec<SortDefinition>>):

      The value by which you want to sort the data.

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

      • BlendedCost

      • UnblendedCost

      • AmortizedCost

      • NetAmortizedCost

      • NetUnblendedCost

      • UsageQuantity

      • NormalizedUsageAmount

      Supported values for SortOrder are ASCENDING or DESCENDING.

      When using SortBy, NextPageToken and SearchString are not supported.

    • max_results(i32) / set_max_results(i32):

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

      For GetTags, MaxResults has an upper limit of 1000.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<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.

  • On success, responds with GetTagsOutput with field(s):
  • On failure, responds with SdkError<GetTagsError>

Constructs a fluent builder for the GetUsageForecast operation.

  • The fluent builder is configurable:
    • time_period(DateInterval) / set_time_period(Option<DateInterval>):

      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. The start date must be equal to or later than the current date to avoid a validation error.

    • metric(Metric) / set_metric(Option<Metric>):

      Which metric Cost Explorer uses to create your forecast.

      Valid values for a GetUsageForecast call are the following:

      • USAGE_QUANTITY

      • NORMALIZED_USAGE_AMOUNT

    • granularity(Granularity) / set_granularity(Option<Granularity>):

      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.

    • filter(Expression) / set_filter(Option<Expression>):

      The filters that you want to use to filter your forecast. The GetUsageForecast API supports filtering by the following dimensions:

      • AZ

      • INSTANCE_TYPE

      • LINKED_ACCOUNT

      • LINKED_ACCOUNT_NAME

      • OPERATION

      • PURCHASE_TYPE

      • REGION

      • SERVICE

      • USAGE_TYPE

      • USAGE_TYPE_GROUP

      • RECORD_TYPE

      • OPERATING_SYSTEM

      • TENANCY

      • SCOPE

      • PLATFORM

      • SUBSCRIPTION_ID

      • LEGAL_ENTITY_NAME

      • DEPLOYMENT_OPTION

      • DATABASE_ENGINE

      • INSTANCE_TYPE_FAMILY

      • BILLING_ENTITY

      • RESERVATION_ID

      • SAVINGS_PLAN_ARN

    • prediction_interval_level(i32) / set_prediction_interval_level(Option<i32>):

      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.

  • On success, responds with GetUsageForecastOutput with field(s):
  • On failure, responds with SdkError<GetUsageForecastError>

Constructs a fluent builder for the ListCostCategoryDefinitions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ProvideAnomalyFeedback operation.

Constructs a fluent builder for the UpdateAnomalyMonitor operation.

Constructs a fluent builder for the UpdateAnomalySubscription operation.

Constructs a fluent builder for the UpdateCostCategoryDefinition operation.

Creates a client with the given service config and connector override.

Creates a new client from a shared config.

Creates a new client from the service Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more