Skip to content

CostExplorerClient

Index > CostExplorer > CostExplorerClient

Auto-generated documentation for CostExplorer type annotations stubs module mypy-boto3-ce.

CostExplorerClient

Type annotations and code completion for boto3.client("ce"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_ce.client import CostExplorerClient

def get_ce_client() -> CostExplorerClient:
    return Session().client("ce")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("ce").exceptions structure.

Usage example
client = boto3.client("ce")

try:
    do_something(client)
except (
    client.BillExpirationException,
    client.ClientError,
    client.DataUnavailableException,
    client.GenerationExistsException,
    client.InvalidNextTokenException,
    client.LimitExceededException,
    client.RequestChangedException,
    client.ResourceNotFoundException,
    client.ServiceQuotaExceededException,
    client.TooManyTagsException,
    client.UnknownMonitorException,
    client.UnknownSubscriptionException,
    client.UnresolvableUsageUnitException,
) as e:
    print(e)
Type checking example
from mypy_boto3_ce.client import Exceptions

def handle_error(exc: Exceptions.BillExpirationException) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("ce").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("ce").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_anomaly_monitor

Creates a new cost anomaly detection monitor with the requested type and monitor specification.

Type annotations and code completion for boto3.client("ce").create_anomaly_monitor method. boto3 documentation

Method definition
def create_anomaly_monitor(
    self,
    *,
    AnomalyMonitor: AnomalyMonitorTypeDef,  # (1)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
) -> CreateAnomalyMonitorResponseTypeDef:  # (3)
    ...
  1. See AnomalyMonitorTypeDef
  2. See ResourceTagTypeDef
  3. See CreateAnomalyMonitorResponseTypeDef
Usage example with kwargs
kwargs: CreateAnomalyMonitorRequestRequestTypeDef = {  # (1)
    "AnomalyMonitor": ...,
}

parent.create_anomaly_monitor(**kwargs)
  1. See CreateAnomalyMonitorRequestRequestTypeDef

create_anomaly_subscription

Adds an alert subscription to a cost anomaly detection monitor.

Type annotations and code completion for boto3.client("ce").create_anomaly_subscription method. boto3 documentation

Method definition
def create_anomaly_subscription(
    self,
    *,
    AnomalySubscription: AnomalySubscriptionTypeDef,  # (1)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
) -> CreateAnomalySubscriptionResponseTypeDef:  # (3)
    ...
  1. See AnomalySubscriptionTypeDef
  2. See ResourceTagTypeDef
  3. See CreateAnomalySubscriptionResponseTypeDef
Usage example with kwargs
kwargs: CreateAnomalySubscriptionRequestRequestTypeDef = {  # (1)
    "AnomalySubscription": ...,
}

parent.create_anomaly_subscription(**kwargs)
  1. See CreateAnomalySubscriptionRequestRequestTypeDef

create_cost_category_definition

Creates a new Cost Category with the requested name and rules.

Type annotations and code completion for boto3.client("ce").create_cost_category_definition method. boto3 documentation

Method definition
def create_cost_category_definition(
    self,
    *,
    Name: str,
    RuleVersion: CostCategoryRuleVersionType,  # (1)
    Rules: Sequence[CostCategoryRuleTypeDef],  # (2)
    EffectiveStart: str = ...,
    DefaultValue: str = ...,
    SplitChargeRules: Sequence[CostCategorySplitChargeRuleTypeDef] = ...,  # (3)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (4)
) -> CreateCostCategoryDefinitionResponseTypeDef:  # (5)
    ...
  1. See CostCategoryRuleVersionType
  2. See CostCategoryRuleTypeDef
  3. See CostCategorySplitChargeRuleTypeDef
  4. See ResourceTagTypeDef
  5. See CreateCostCategoryDefinitionResponseTypeDef
Usage example with kwargs
kwargs: CreateCostCategoryDefinitionRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "RuleVersion": ...,
    "Rules": ...,
}

parent.create_cost_category_definition(**kwargs)
  1. See CreateCostCategoryDefinitionRequestRequestTypeDef

delete_anomaly_monitor

Deletes a cost anomaly monitor.

Type annotations and code completion for boto3.client("ce").delete_anomaly_monitor method. boto3 documentation

Method definition
def delete_anomaly_monitor(
    self,
    *,
    MonitorArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteAnomalyMonitorRequestRequestTypeDef = {  # (1)
    "MonitorArn": ...,
}

parent.delete_anomaly_monitor(**kwargs)
  1. See DeleteAnomalyMonitorRequestRequestTypeDef

delete_anomaly_subscription

Deletes a cost anomaly subscription.

Type annotations and code completion for boto3.client("ce").delete_anomaly_subscription method. boto3 documentation

Method definition
def delete_anomaly_subscription(
    self,
    *,
    SubscriptionArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteAnomalySubscriptionRequestRequestTypeDef = {  # (1)
    "SubscriptionArn": ...,
}

parent.delete_anomaly_subscription(**kwargs)
  1. See DeleteAnomalySubscriptionRequestRequestTypeDef

delete_cost_category_definition

Deletes a Cost Category.

Type annotations and code completion for boto3.client("ce").delete_cost_category_definition method. boto3 documentation

Method definition
def delete_cost_category_definition(
    self,
    *,
    CostCategoryArn: str,
) -> DeleteCostCategoryDefinitionResponseTypeDef:  # (1)
    ...
  1. See DeleteCostCategoryDefinitionResponseTypeDef
Usage example with kwargs
kwargs: DeleteCostCategoryDefinitionRequestRequestTypeDef = {  # (1)
    "CostCategoryArn": ...,
}

parent.delete_cost_category_definition(**kwargs)
  1. See DeleteCostCategoryDefinitionRequestRequestTypeDef

describe_cost_category_definition

Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.

Type annotations and code completion for boto3.client("ce").describe_cost_category_definition method. boto3 documentation

Method definition
def describe_cost_category_definition(
    self,
    *,
    CostCategoryArn: str,
    EffectiveOn: str = ...,
) -> DescribeCostCategoryDefinitionResponseTypeDef:  # (1)
    ...
  1. See DescribeCostCategoryDefinitionResponseTypeDef
Usage example with kwargs
kwargs: DescribeCostCategoryDefinitionRequestRequestTypeDef = {  # (1)
    "CostCategoryArn": ...,
}

parent.describe_cost_category_definition(**kwargs)
  1. See DescribeCostCategoryDefinitionRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("ce").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_anomalies

Retrieves all of the cost anomalies detected on your account during the time period that's specified by the DateInterval object.

Type annotations and code completion for boto3.client("ce").get_anomalies method. boto3 documentation

Method definition
def get_anomalies(
    self,
    *,
    DateInterval: AnomalyDateIntervalTypeDef,  # (1)
    MonitorArn: str = ...,
    Feedback: AnomalyFeedbackTypeType = ...,  # (2)
    TotalImpact: TotalImpactFilterTypeDef = ...,  # (3)
    NextPageToken: str = ...,
    MaxResults: int = ...,
) -> GetAnomaliesResponseTypeDef:  # (4)
    ...
  1. See AnomalyDateIntervalTypeDef
  2. See AnomalyFeedbackTypeType
  3. See TotalImpactFilterTypeDef
  4. See GetAnomaliesResponseTypeDef
Usage example with kwargs
kwargs: GetAnomaliesRequestRequestTypeDef = {  # (1)
    "DateInterval": ...,
}

parent.get_anomalies(**kwargs)
  1. See GetAnomaliesRequestRequestTypeDef

get_anomaly_monitors

Retrieves the cost anomaly monitor definitions for your account.

Type annotations and code completion for boto3.client("ce").get_anomaly_monitors method. boto3 documentation

Method definition
def get_anomaly_monitors(
    self,
    *,
    MonitorArnList: Sequence[str] = ...,
    NextPageToken: str = ...,
    MaxResults: int = ...,
) -> GetAnomalyMonitorsResponseTypeDef:  # (1)
    ...
  1. See GetAnomalyMonitorsResponseTypeDef
Usage example with kwargs
kwargs: GetAnomalyMonitorsRequestRequestTypeDef = {  # (1)
    "MonitorArnList": ...,
}

parent.get_anomaly_monitors(**kwargs)
  1. See GetAnomalyMonitorsRequestRequestTypeDef

get_anomaly_subscriptions

Retrieves the cost anomaly subscription objects for your account.

Type annotations and code completion for boto3.client("ce").get_anomaly_subscriptions method. boto3 documentation

Method definition
def get_anomaly_subscriptions(
    self,
    *,
    SubscriptionArnList: Sequence[str] = ...,
    MonitorArn: str = ...,
    NextPageToken: str = ...,
    MaxResults: int = ...,
) -> GetAnomalySubscriptionsResponseTypeDef:  # (1)
    ...
  1. See GetAnomalySubscriptionsResponseTypeDef
Usage example with kwargs
kwargs: GetAnomalySubscriptionsRequestRequestTypeDef = {  # (1)
    "SubscriptionArnList": ...,
}

parent.get_anomaly_subscriptions(**kwargs)
  1. See GetAnomalySubscriptionsRequestRequestTypeDef

get_cost_and_usage

Retrieves cost and usage metrics for your account.

Type annotations and code completion for boto3.client("ce").get_cost_and_usage method. boto3 documentation

Method definition
def get_cost_and_usage(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Granularity: GranularityType,  # (2)
    Metrics: Sequence[str],
    Filter: ExpressionTypeDef = ...,  # (3)
    GroupBy: Sequence[GroupDefinitionTypeDef] = ...,  # (4)
    NextPageToken: str = ...,
) -> GetCostAndUsageResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See GranularityType
  3. See ExpressionTypeDef
  4. See GroupDefinitionTypeDef
  5. See GetCostAndUsageResponseTypeDef
Usage example with kwargs
kwargs: GetCostAndUsageRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
    "Granularity": ...,
    "Metrics": ...,
}

parent.get_cost_and_usage(**kwargs)
  1. See GetCostAndUsageRequestRequestTypeDef

get_cost_and_usage_with_resources

Retrieves cost and usage metrics with resources for your account.

Type annotations and code completion for boto3.client("ce").get_cost_and_usage_with_resources method. boto3 documentation

Method definition
def get_cost_and_usage_with_resources(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Granularity: GranularityType,  # (2)
    Filter: ExpressionTypeDef,  # (3)
    Metrics: Sequence[str] = ...,
    GroupBy: Sequence[GroupDefinitionTypeDef] = ...,  # (4)
    NextPageToken: str = ...,
) -> GetCostAndUsageWithResourcesResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See GranularityType
  3. See ExpressionTypeDef
  4. See GroupDefinitionTypeDef
  5. See GetCostAndUsageWithResourcesResponseTypeDef
Usage example with kwargs
kwargs: GetCostAndUsageWithResourcesRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
    "Granularity": ...,
    "Filter": ...,
}

parent.get_cost_and_usage_with_resources(**kwargs)
  1. See GetCostAndUsageWithResourcesRequestRequestTypeDef

get_cost_categories

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

Type annotations and code completion for boto3.client("ce").get_cost_categories method. boto3 documentation

Method definition
def get_cost_categories(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    SearchString: str = ...,
    CostCategoryName: str = ...,
    Filter: ExpressionTypeDef = ...,  # (2)
    SortBy: Sequence[SortDefinitionTypeDef] = ...,  # (3)
    MaxResults: int = ...,
    NextPageToken: str = ...,
) -> GetCostCategoriesResponseTypeDef:  # (4)
    ...
  1. See DateIntervalTypeDef
  2. See ExpressionTypeDef
  3. See SortDefinitionTypeDef
  4. See GetCostCategoriesResponseTypeDef
Usage example with kwargs
kwargs: GetCostCategoriesRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_cost_categories(**kwargs)
  1. See GetCostCategoriesRequestRequestTypeDef

get_cost_forecast

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

Type annotations and code completion for boto3.client("ce").get_cost_forecast method. boto3 documentation

Method definition
def get_cost_forecast(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Metric: MetricType,  # (2)
    Granularity: GranularityType,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    PredictionIntervalLevel: int = ...,
) -> GetCostForecastResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See MetricType
  3. See GranularityType
  4. See ExpressionTypeDef
  5. See GetCostForecastResponseTypeDef
Usage example with kwargs
kwargs: GetCostForecastRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
    "Metric": ...,
    "Granularity": ...,
}

parent.get_cost_forecast(**kwargs)
  1. See GetCostForecastRequestRequestTypeDef

get_dimension_values

Retrieves all available filter values for a specified filter over a period of time.

Type annotations and code completion for boto3.client("ce").get_dimension_values method. boto3 documentation

Method definition
def get_dimension_values(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Dimension: DimensionType,  # (2)
    SearchString: str = ...,
    Context: ContextType = ...,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    SortBy: Sequence[SortDefinitionTypeDef] = ...,  # (5)
    MaxResults: int = ...,
    NextPageToken: str = ...,
) -> GetDimensionValuesResponseTypeDef:  # (6)
    ...
  1. See DateIntervalTypeDef
  2. See DimensionType
  3. See ContextType
  4. See ExpressionTypeDef
  5. See SortDefinitionTypeDef
  6. See GetDimensionValuesResponseTypeDef
Usage example with kwargs
kwargs: GetDimensionValuesRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
    "Dimension": ...,
}

parent.get_dimension_values(**kwargs)
  1. See GetDimensionValuesRequestRequestTypeDef

get_reservation_coverage

Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation.

Type annotations and code completion for boto3.client("ce").get_reservation_coverage method. boto3 documentation

Method definition
def get_reservation_coverage(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    GroupBy: Sequence[GroupDefinitionTypeDef] = ...,  # (2)
    Granularity: GranularityType = ...,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    Metrics: Sequence[str] = ...,
    NextPageToken: str = ...,
    SortBy: SortDefinitionTypeDef = ...,  # (5)
    MaxResults: int = ...,
) -> GetReservationCoverageResponseTypeDef:  # (6)
    ...
  1. See DateIntervalTypeDef
  2. See GroupDefinitionTypeDef
  3. See GranularityType
  4. See ExpressionTypeDef
  5. See SortDefinitionTypeDef
  6. See GetReservationCoverageResponseTypeDef
Usage example with kwargs
kwargs: GetReservationCoverageRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_reservation_coverage(**kwargs)
  1. See GetReservationCoverageRequestRequestTypeDef

get_reservation_purchase_recommendation

Gets recommendations for reservation purchases.

Type annotations and code completion for boto3.client("ce").get_reservation_purchase_recommendation method. boto3 documentation

Method definition
def get_reservation_purchase_recommendation(
    self,
    *,
    Service: str,
    AccountId: str = ...,
    Filter: ExpressionTypeDef = ...,  # (1)
    AccountScope: AccountScopeType = ...,  # (2)
    LookbackPeriodInDays: LookbackPeriodInDaysType = ...,  # (3)
    TermInYears: TermInYearsType = ...,  # (4)
    PaymentOption: PaymentOptionType = ...,  # (5)
    ServiceSpecification: ServiceSpecificationTypeDef = ...,  # (6)
    PageSize: int = ...,
    NextPageToken: str = ...,
) -> GetReservationPurchaseRecommendationResponseTypeDef:  # (7)
    ...
  1. See ExpressionTypeDef
  2. See AccountScopeType
  3. See LookbackPeriodInDaysType
  4. See TermInYearsType
  5. See PaymentOptionType
  6. See ServiceSpecificationTypeDef
  7. See GetReservationPurchaseRecommendationResponseTypeDef
Usage example with kwargs
kwargs: GetReservationPurchaseRecommendationRequestRequestTypeDef = {  # (1)
    "Service": ...,
}

parent.get_reservation_purchase_recommendation(**kwargs)
  1. See GetReservationPurchaseRecommendationRequestRequestTypeDef

get_reservation_utilization

Retrieves the reservation utilization for your account.

Type annotations and code completion for boto3.client("ce").get_reservation_utilization method. boto3 documentation

Method definition
def get_reservation_utilization(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    GroupBy: Sequence[GroupDefinitionTypeDef] = ...,  # (2)
    Granularity: GranularityType = ...,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    SortBy: SortDefinitionTypeDef = ...,  # (5)
    NextPageToken: str = ...,
    MaxResults: int = ...,
) -> GetReservationUtilizationResponseTypeDef:  # (6)
    ...
  1. See DateIntervalTypeDef
  2. See GroupDefinitionTypeDef
  3. See GranularityType
  4. See ExpressionTypeDef
  5. See SortDefinitionTypeDef
  6. See GetReservationUtilizationResponseTypeDef
Usage example with kwargs
kwargs: GetReservationUtilizationRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_reservation_utilization(**kwargs)
  1. See GetReservationUtilizationRequestRequestTypeDef

get_rightsizing_recommendation

Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.

Type annotations and code completion for boto3.client("ce").get_rightsizing_recommendation method. boto3 documentation

Method definition
def get_rightsizing_recommendation(
    self,
    *,
    Service: str,
    Filter: ExpressionTypeDef = ...,  # (1)
    Configuration: RightsizingRecommendationConfigurationTypeDef = ...,  # (2)
    PageSize: int = ...,
    NextPageToken: str = ...,
) -> GetRightsizingRecommendationResponseTypeDef:  # (3)
    ...
  1. See ExpressionTypeDef
  2. See RightsizingRecommendationConfigurationTypeDef
  3. See GetRightsizingRecommendationResponseTypeDef
Usage example with kwargs
kwargs: GetRightsizingRecommendationRequestRequestTypeDef = {  # (1)
    "Service": ...,
}

parent.get_rightsizing_recommendation(**kwargs)
  1. See GetRightsizingRecommendationRequestRequestTypeDef

get_savings_plans_coverage

Retrieves the Savings Plans covered for your account.

Type annotations and code completion for boto3.client("ce").get_savings_plans_coverage method. boto3 documentation

Method definition
def get_savings_plans_coverage(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    GroupBy: Sequence[GroupDefinitionTypeDef] = ...,  # (2)
    Granularity: GranularityType = ...,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    Metrics: Sequence[str] = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
    SortBy: SortDefinitionTypeDef = ...,  # (5)
) -> GetSavingsPlansCoverageResponseTypeDef:  # (6)
    ...
  1. See DateIntervalTypeDef
  2. See GroupDefinitionTypeDef
  3. See GranularityType
  4. See ExpressionTypeDef
  5. See SortDefinitionTypeDef
  6. See GetSavingsPlansCoverageResponseTypeDef
Usage example with kwargs
kwargs: GetSavingsPlansCoverageRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_savings_plans_coverage(**kwargs)
  1. See GetSavingsPlansCoverageRequestRequestTypeDef

get_savings_plans_purchase_recommendation

Retrieves the Savings Plans recommendations for your account.

Type annotations and code completion for boto3.client("ce").get_savings_plans_purchase_recommendation method. boto3 documentation

Method definition
def get_savings_plans_purchase_recommendation(
    self,
    *,
    SavingsPlansType: SupportedSavingsPlansTypeType,  # (1)
    TermInYears: TermInYearsType,  # (2)
    PaymentOption: PaymentOptionType,  # (3)
    LookbackPeriodInDays: LookbackPeriodInDaysType,  # (4)
    AccountScope: AccountScopeType = ...,  # (5)
    NextPageToken: str = ...,
    PageSize: int = ...,
    Filter: ExpressionTypeDef = ...,  # (6)
) -> GetSavingsPlansPurchaseRecommendationResponseTypeDef:  # (7)
    ...
  1. See SupportedSavingsPlansTypeType
  2. See TermInYearsType
  3. See PaymentOptionType
  4. See LookbackPeriodInDaysType
  5. See AccountScopeType
  6. See ExpressionTypeDef
  7. See GetSavingsPlansPurchaseRecommendationResponseTypeDef
Usage example with kwargs
kwargs: GetSavingsPlansPurchaseRecommendationRequestRequestTypeDef = {  # (1)
    "SavingsPlansType": ...,
    "TermInYears": ...,
    "PaymentOption": ...,
    "LookbackPeriodInDays": ...,
}

parent.get_savings_plans_purchase_recommendation(**kwargs)
  1. See GetSavingsPlansPurchaseRecommendationRequestRequestTypeDef

get_savings_plans_utilization

Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity.

Type annotations and code completion for boto3.client("ce").get_savings_plans_utilization method. boto3 documentation

Method definition
def get_savings_plans_utilization(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Granularity: GranularityType = ...,  # (2)
    Filter: ExpressionTypeDef = ...,  # (3)
    SortBy: SortDefinitionTypeDef = ...,  # (4)
) -> GetSavingsPlansUtilizationResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See GranularityType
  3. See ExpressionTypeDef
  4. See SortDefinitionTypeDef
  5. See GetSavingsPlansUtilizationResponseTypeDef
Usage example with kwargs
kwargs: GetSavingsPlansUtilizationRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_savings_plans_utilization(**kwargs)
  1. See GetSavingsPlansUtilizationRequestRequestTypeDef

get_savings_plans_utilization_details

Retrieves attribute data along with aggregate utilization and savings data for a given time period.

Type annotations and code completion for boto3.client("ce").get_savings_plans_utilization_details method. boto3 documentation

Method definition
def get_savings_plans_utilization_details(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Filter: ExpressionTypeDef = ...,  # (2)
    DataType: Sequence[SavingsPlansDataTypeType] = ...,  # (3)
    NextToken: str = ...,
    MaxResults: int = ...,
    SortBy: SortDefinitionTypeDef = ...,  # (4)
) -> GetSavingsPlansUtilizationDetailsResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See ExpressionTypeDef
  3. See SavingsPlansDataTypeType
  4. See SortDefinitionTypeDef
  5. See GetSavingsPlansUtilizationDetailsResponseTypeDef
Usage example with kwargs
kwargs: GetSavingsPlansUtilizationDetailsRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_savings_plans_utilization_details(**kwargs)
  1. See GetSavingsPlansUtilizationDetailsRequestRequestTypeDef

get_tags

Queries for available tag keys and tag values for a specified period.

Type annotations and code completion for boto3.client("ce").get_tags method. boto3 documentation

Method definition
def get_tags(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    SearchString: str = ...,
    TagKey: str = ...,
    Filter: ExpressionTypeDef = ...,  # (2)
    SortBy: Sequence[SortDefinitionTypeDef] = ...,  # (3)
    MaxResults: int = ...,
    NextPageToken: str = ...,
) -> GetTagsResponseTypeDef:  # (4)
    ...
  1. See DateIntervalTypeDef
  2. See ExpressionTypeDef
  3. See SortDefinitionTypeDef
  4. See GetTagsResponseTypeDef
Usage example with kwargs
kwargs: GetTagsRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
}

parent.get_tags(**kwargs)
  1. See GetTagsRequestRequestTypeDef

get_usage_forecast

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

Type annotations and code completion for boto3.client("ce").get_usage_forecast method. boto3 documentation

Method definition
def get_usage_forecast(
    self,
    *,
    TimePeriod: DateIntervalTypeDef,  # (1)
    Metric: MetricType,  # (2)
    Granularity: GranularityType,  # (3)
    Filter: ExpressionTypeDef = ...,  # (4)
    PredictionIntervalLevel: int = ...,
) -> GetUsageForecastResponseTypeDef:  # (5)
    ...
  1. See DateIntervalTypeDef
  2. See MetricType
  3. See GranularityType
  4. See ExpressionTypeDef
  5. See GetUsageForecastResponseTypeDef
Usage example with kwargs
kwargs: GetUsageForecastRequestRequestTypeDef = {  # (1)
    "TimePeriod": ...,
    "Metric": ...,
    "Granularity": ...,
}

parent.get_usage_forecast(**kwargs)
  1. See GetUsageForecastRequestRequestTypeDef

list_cost_allocation_tags

Get a list of cost allocation tags.

Type annotations and code completion for boto3.client("ce").list_cost_allocation_tags method. boto3 documentation

Method definition
def list_cost_allocation_tags(
    self,
    *,
    Status: CostAllocationTagStatusType = ...,  # (1)
    TagKeys: Sequence[str] = ...,
    Type: CostAllocationTagTypeType = ...,  # (2)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListCostAllocationTagsResponseTypeDef:  # (3)
    ...
  1. See CostAllocationTagStatusType
  2. See CostAllocationTagTypeType
  3. See ListCostAllocationTagsResponseTypeDef
Usage example with kwargs
kwargs: ListCostAllocationTagsRequestRequestTypeDef = {  # (1)
    "Status": ...,
}

parent.list_cost_allocation_tags(**kwargs)
  1. See ListCostAllocationTagsRequestRequestTypeDef

list_cost_category_definitions

Returns the name, Amazon Resource Name (ARN), NumberOfRules and effective dates of all Cost Categories defined in the account.

Type annotations and code completion for boto3.client("ce").list_cost_category_definitions method. boto3 documentation

Method definition
def list_cost_category_definitions(
    self,
    *,
    EffectiveOn: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListCostCategoryDefinitionsResponseTypeDef:  # (1)
    ...
  1. See ListCostCategoryDefinitionsResponseTypeDef
Usage example with kwargs
kwargs: ListCostCategoryDefinitionsRequestRequestTypeDef = {  # (1)
    "EffectiveOn": ...,
}

parent.list_cost_category_definitions(**kwargs)
  1. See ListCostCategoryDefinitionsRequestRequestTypeDef

list_savings_plans_purchase_recommendation_generation

Retrieves a list of your historical recommendation generations within the past 30 days.

Type annotations and code completion for boto3.client("ce").list_savings_plans_purchase_recommendation_generation method. boto3 documentation

Method definition
def list_savings_plans_purchase_recommendation_generation(
    self,
    *,
    GenerationStatus: GenerationStatusType = ...,  # (1)
    RecommendationIds: Sequence[str] = ...,
    PageSize: int = ...,
    NextPageToken: str = ...,
) -> ListSavingsPlansPurchaseRecommendationGenerationResponseTypeDef:  # (2)
    ...
  1. See GenerationStatusType
  2. See ListSavingsPlansPurchaseRecommendationGenerationResponseTypeDef
Usage example with kwargs
kwargs: ListSavingsPlansPurchaseRecommendationGenerationRequestRequestTypeDef = {  # (1)
    "GenerationStatus": ...,
}

parent.list_savings_plans_purchase_recommendation_generation(**kwargs)
  1. See ListSavingsPlansPurchaseRecommendationGenerationRequestRequestTypeDef

list_tags_for_resource

Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).

Type annotations and code completion for boto3.client("ce").list_tags_for_resource method. boto3 documentation

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

provide_anomaly_feedback

Modifies the feedback property of a given cost anomaly.

Type annotations and code completion for boto3.client("ce").provide_anomaly_feedback method. boto3 documentation

Method definition
def provide_anomaly_feedback(
    self,
    *,
    AnomalyId: str,
    Feedback: AnomalyFeedbackTypeType,  # (1)
) -> ProvideAnomalyFeedbackResponseTypeDef:  # (2)
    ...
  1. See AnomalyFeedbackTypeType
  2. See ProvideAnomalyFeedbackResponseTypeDef
Usage example with kwargs
kwargs: ProvideAnomalyFeedbackRequestRequestTypeDef = {  # (1)
    "AnomalyId": ...,
    "Feedback": ...,
}

parent.provide_anomaly_feedback(**kwargs)
  1. See ProvideAnomalyFeedbackRequestRequestTypeDef

start_savings_plans_purchase_recommendation_generation

Requests a Savings Plans recommendation generation.

Type annotations and code completion for boto3.client("ce").start_savings_plans_purchase_recommendation_generation method. boto3 documentation

Method definition
def start_savings_plans_purchase_recommendation_generation(
    self,
) -> StartSavingsPlansPurchaseRecommendationGenerationResponseTypeDef:  # (1)
    ...
  1. See StartSavingsPlansPurchaseRecommendationGenerationResponseTypeDef

tag_resource

An API operation for adding one or more tags (key-value pairs) to a resource.

Type annotations and code completion for boto3.client("ce").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    ResourceTags: Sequence[ResourceTagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See ResourceTagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "ResourceTags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes one or more tags from a resource.

Type annotations and code completion for boto3.client("ce").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    ResourceTagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "ResourceTagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_anomaly_monitor

Updates an existing cost anomaly monitor.

Type annotations and code completion for boto3.client("ce").update_anomaly_monitor method. boto3 documentation

Method definition
def update_anomaly_monitor(
    self,
    *,
    MonitorArn: str,
    MonitorName: str = ...,
) -> UpdateAnomalyMonitorResponseTypeDef:  # (1)
    ...
  1. See UpdateAnomalyMonitorResponseTypeDef
Usage example with kwargs
kwargs: UpdateAnomalyMonitorRequestRequestTypeDef = {  # (1)
    "MonitorArn": ...,
}

parent.update_anomaly_monitor(**kwargs)
  1. See UpdateAnomalyMonitorRequestRequestTypeDef

update_anomaly_subscription

Updates an existing cost anomaly monitor subscription.

Type annotations and code completion for boto3.client("ce").update_anomaly_subscription method. boto3 documentation

Method definition
def update_anomaly_subscription(
    self,
    *,
    SubscriptionArn: str,
    Threshold: float = ...,
    Frequency: AnomalySubscriptionFrequencyType = ...,  # (1)
    MonitorArnList: Sequence[str] = ...,
    Subscribers: Sequence[SubscriberTypeDef] = ...,  # (2)
    SubscriptionName: str = ...,
    ThresholdExpression: ExpressionTypeDef = ...,  # (3)
) -> UpdateAnomalySubscriptionResponseTypeDef:  # (4)
    ...
  1. See AnomalySubscriptionFrequencyType
  2. See SubscriberTypeDef
  3. See ExpressionTypeDef
  4. See UpdateAnomalySubscriptionResponseTypeDef
Usage example with kwargs
kwargs: UpdateAnomalySubscriptionRequestRequestTypeDef = {  # (1)
    "SubscriptionArn": ...,
}

parent.update_anomaly_subscription(**kwargs)
  1. See UpdateAnomalySubscriptionRequestRequestTypeDef

update_cost_allocation_tags_status

Updates status for cost allocation tags in bulk, with maximum batch size of 20.

Type annotations and code completion for boto3.client("ce").update_cost_allocation_tags_status method. boto3 documentation

Method definition
def update_cost_allocation_tags_status(
    self,
    *,
    CostAllocationTagsStatus: Sequence[CostAllocationTagStatusEntryTypeDef],  # (1)
) -> UpdateCostAllocationTagsStatusResponseTypeDef:  # (2)
    ...
  1. See CostAllocationTagStatusEntryTypeDef
  2. See UpdateCostAllocationTagsStatusResponseTypeDef
Usage example with kwargs
kwargs: UpdateCostAllocationTagsStatusRequestRequestTypeDef = {  # (1)
    "CostAllocationTagsStatus": ...,
}

parent.update_cost_allocation_tags_status(**kwargs)
  1. See UpdateCostAllocationTagsStatusRequestRequestTypeDef

update_cost_category_definition

Updates an existing Cost Category.

Type annotations and code completion for boto3.client("ce").update_cost_category_definition method. boto3 documentation

Method definition
def update_cost_category_definition(
    self,
    *,
    CostCategoryArn: str,
    RuleVersion: CostCategoryRuleVersionType,  # (1)
    Rules: Sequence[CostCategoryRuleTypeDef],  # (2)
    EffectiveStart: str = ...,
    DefaultValue: str = ...,
    SplitChargeRules: Sequence[CostCategorySplitChargeRuleTypeDef] = ...,  # (3)
) -> UpdateCostCategoryDefinitionResponseTypeDef:  # (4)
    ...
  1. See CostCategoryRuleVersionType
  2. See CostCategoryRuleTypeDef
  3. See CostCategorySplitChargeRuleTypeDef
  4. See UpdateCostCategoryDefinitionResponseTypeDef
Usage example with kwargs
kwargs: UpdateCostCategoryDefinitionRequestRequestTypeDef = {  # (1)
    "CostCategoryArn": ...,
    "RuleVersion": ...,
    "Rules": ...,
}

parent.update_cost_category_definition(**kwargs)
  1. See UpdateCostCategoryDefinitionRequestRequestTypeDef