CostExplorerClient#
Index > CostExplorer > CostExplorerClient
Auto-generated documentation for CostExplorer type annotations stubs module types-aiobotocore-ce.
CostExplorerClient#
Type annotations and code completion for session.client("ce")
boto3 documentation
# CostExplorerClient usage example
from aioboto3.session import Session
from types_aiobotocore_ce.client import CostExplorerClient
session = Session()
async with session.client("ce") as client:
client: CostExplorerClient
Exceptions#
aioboto3
client exceptions are generated in runtime.
This class provides code completion for session.client("ce").exceptions
structure.
# CostExplorerClient.exceptions usage example
async with session.client("ce") as client:
try:
do_something(client)
except (
client.exceptions.BillExpirationException,
client.exceptions.ClientError,
client.exceptions.DataUnavailableException,
client.exceptions.GenerationExistsException,
client.exceptions.InvalidNextTokenException,
client.exceptions.LimitExceededException,
client.exceptions.RequestChangedException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.TooManyTagsException,
client.exceptions.UnknownMonitorException,
client.exceptions.UnknownSubscriptionException,
client.exceptions.UnresolvableUsageUnitException,
) as e:
print(e)
# CostExplorerClient.exceptions type checking example
from types_aiobotocore_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 session.client("ce").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for session.client("ce").close
method.
boto3 documentation
# close method definition
await 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 session.client("ce").create_anomaly_monitor
method.
boto3 documentation
# create_anomaly_monitor method definition
await def create_anomaly_monitor(
self,
*,
AnomalyMonitor: AnomalyMonitorTypeDef, # (1)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (2)
) -> CreateAnomalyMonitorResponseTypeDef: # (3)
...
# create_anomaly_monitor method usage example with argument unpacking
kwargs: CreateAnomalyMonitorRequestRequestTypeDef = { # (1)
"AnomalyMonitor": ...,
}
parent.create_anomaly_monitor(**kwargs)
create_anomaly_subscription#
Adds an alert subscription to a cost anomaly detection monitor.
Type annotations and code completion for session.client("ce").create_anomaly_subscription
method.
boto3 documentation
# create_anomaly_subscription method definition
await def create_anomaly_subscription(
self,
*,
AnomalySubscription: AnomalySubscriptionTypeDef, # (1)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (2)
) -> CreateAnomalySubscriptionResponseTypeDef: # (3)
...
# create_anomaly_subscription method usage example with argument unpacking
kwargs: CreateAnomalySubscriptionRequestRequestTypeDef = { # (1)
"AnomalySubscription": ...,
}
parent.create_anomaly_subscription(**kwargs)
create_cost_category_definition#
Creates a new Cost Category with the requested name and rules.
Type annotations and code completion for session.client("ce").create_cost_category_definition
method.
boto3 documentation
# create_cost_category_definition method definition
await 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)
...
- See CostCategoryRuleVersionType
- See CostCategoryRuleTypeDef
- See CostCategorySplitChargeRuleTypeDef
- See ResourceTagTypeDef
- See CreateCostCategoryDefinitionResponseTypeDef
# create_cost_category_definition method usage example with argument unpacking
kwargs: CreateCostCategoryDefinitionRequestRequestTypeDef = { # (1)
"Name": ...,
"RuleVersion": ...,
"Rules": ...,
}
parent.create_cost_category_definition(**kwargs)
delete_anomaly_monitor#
Deletes a cost anomaly monitor.
Type annotations and code completion for session.client("ce").delete_anomaly_monitor
method.
boto3 documentation
# delete_anomaly_monitor method definition
await def delete_anomaly_monitor(
self,
*,
MonitorArn: str,
) -> Dict[str, Any]:
...
# delete_anomaly_monitor method usage example with argument unpacking
kwargs: DeleteAnomalyMonitorRequestRequestTypeDef = { # (1)
"MonitorArn": ...,
}
parent.delete_anomaly_monitor(**kwargs)
delete_anomaly_subscription#
Deletes a cost anomaly subscription.
Type annotations and code completion for session.client("ce").delete_anomaly_subscription
method.
boto3 documentation
# delete_anomaly_subscription method definition
await def delete_anomaly_subscription(
self,
*,
SubscriptionArn: str,
) -> Dict[str, Any]:
...
# delete_anomaly_subscription method usage example with argument unpacking
kwargs: DeleteAnomalySubscriptionRequestRequestTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.delete_anomaly_subscription(**kwargs)
delete_cost_category_definition#
Deletes a Cost Category.
Type annotations and code completion for session.client("ce").delete_cost_category_definition
method.
boto3 documentation
# delete_cost_category_definition method definition
await def delete_cost_category_definition(
self,
*,
CostCategoryArn: str,
) -> DeleteCostCategoryDefinitionResponseTypeDef: # (1)
...
# delete_cost_category_definition method usage example with argument unpacking
kwargs: DeleteCostCategoryDefinitionRequestRequestTypeDef = { # (1)
"CostCategoryArn": ...,
}
parent.delete_cost_category_definition(**kwargs)
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 session.client("ce").describe_cost_category_definition
method.
boto3 documentation
# describe_cost_category_definition method definition
await def describe_cost_category_definition(
self,
*,
CostCategoryArn: str,
EffectiveOn: str = ...,
) -> DescribeCostCategoryDefinitionResponseTypeDef: # (1)
...
# describe_cost_category_definition method usage example with argument unpacking
kwargs: DescribeCostCategoryDefinitionRequestRequestTypeDef = { # (1)
"CostCategoryArn": ...,
}
parent.describe_cost_category_definition(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.client("ce").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
await 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 session.client("ce").get_anomalies
method.
boto3 documentation
# get_anomalies method definition
await def get_anomalies(
self,
*,
DateInterval: AnomalyDateIntervalTypeDef, # (1)
MonitorArn: str = ...,
Feedback: AnomalyFeedbackTypeType = ..., # (2)
TotalImpact: TotalImpactFilterTypeDef = ..., # (3)
NextPageToken: str = ...,
MaxResults: int = ...,
) -> GetAnomaliesResponseTypeDef: # (4)
...
- See AnomalyDateIntervalTypeDef
- See AnomalyFeedbackTypeType
- See TotalImpactFilterTypeDef
- See GetAnomaliesResponseTypeDef
# get_anomalies method usage example with argument unpacking
kwargs: GetAnomaliesRequestRequestTypeDef = { # (1)
"DateInterval": ...,
}
parent.get_anomalies(**kwargs)
get_anomaly_monitors#
Retrieves the cost anomaly monitor definitions for your account.
Type annotations and code completion for session.client("ce").get_anomaly_monitors
method.
boto3 documentation
# get_anomaly_monitors method definition
await def get_anomaly_monitors(
self,
*,
MonitorArnList: Sequence[str] = ...,
NextPageToken: str = ...,
MaxResults: int = ...,
) -> GetAnomalyMonitorsResponseTypeDef: # (1)
...
# get_anomaly_monitors method usage example with argument unpacking
kwargs: GetAnomalyMonitorsRequestRequestTypeDef = { # (1)
"MonitorArnList": ...,
}
parent.get_anomaly_monitors(**kwargs)
get_anomaly_subscriptions#
Retrieves the cost anomaly subscription objects for your account.
Type annotations and code completion for session.client("ce").get_anomaly_subscriptions
method.
boto3 documentation
# get_anomaly_subscriptions method definition
await def get_anomaly_subscriptions(
self,
*,
SubscriptionArnList: Sequence[str] = ...,
MonitorArn: str = ...,
NextPageToken: str = ...,
MaxResults: int = ...,
) -> GetAnomalySubscriptionsResponseTypeDef: # (1)
...
# get_anomaly_subscriptions method usage example with argument unpacking
kwargs: GetAnomalySubscriptionsRequestRequestTypeDef = { # (1)
"SubscriptionArnList": ...,
}
parent.get_anomaly_subscriptions(**kwargs)
get_cost_and_usage#
Retrieves cost and usage metrics for your account.
Type annotations and code completion for session.client("ce").get_cost_and_usage
method.
boto3 documentation
# get_cost_and_usage method definition
await 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)
...
- See DateIntervalTypeDef
- See GranularityType
- See ExpressionTypeDef
- See GroupDefinitionTypeDef
- See GetCostAndUsageResponseTypeDef
# get_cost_and_usage method usage example with argument unpacking
kwargs: GetCostAndUsageRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
"Granularity": ...,
"Metrics": ...,
}
parent.get_cost_and_usage(**kwargs)
get_cost_and_usage_with_resources#
Retrieves cost and usage metrics with resources for your account.
Type annotations and code completion for session.client("ce").get_cost_and_usage_with_resources
method.
boto3 documentation
# get_cost_and_usage_with_resources method definition
await 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)
...
- See DateIntervalTypeDef
- See GranularityType
- See ExpressionTypeDef
- See GroupDefinitionTypeDef
- See GetCostAndUsageWithResourcesResponseTypeDef
# get_cost_and_usage_with_resources method usage example with argument unpacking
kwargs: GetCostAndUsageWithResourcesRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
"Granularity": ...,
"Filter": ...,
}
parent.get_cost_and_usage_with_resources(**kwargs)
get_cost_categories#
Retrieves an array of Cost Category names and values incurred cost.
Type annotations and code completion for session.client("ce").get_cost_categories
method.
boto3 documentation
# get_cost_categories method definition
await 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)
...
- See DateIntervalTypeDef
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetCostCategoriesResponseTypeDef
# get_cost_categories method usage example with argument unpacking
kwargs: GetCostCategoriesRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_cost_categories(**kwargs)
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 session.client("ce").get_cost_forecast
method.
boto3 documentation
# get_cost_forecast method definition
await def get_cost_forecast(
self,
*,
TimePeriod: DateIntervalTypeDef, # (1)
Metric: MetricType, # (2)
Granularity: GranularityType, # (3)
Filter: ExpressionTypeDef = ..., # (4)
PredictionIntervalLevel: int = ...,
) -> GetCostForecastResponseTypeDef: # (5)
...
- See DateIntervalTypeDef
- See MetricType
- See GranularityType
- See ExpressionTypeDef
- See GetCostForecastResponseTypeDef
# get_cost_forecast method usage example with argument unpacking
kwargs: GetCostForecastRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
"Metric": ...,
"Granularity": ...,
}
parent.get_cost_forecast(**kwargs)
get_dimension_values#
Retrieves all available filter values for a specified filter over a period of time.
Type annotations and code completion for session.client("ce").get_dimension_values
method.
boto3 documentation
# get_dimension_values method definition
await 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)
...
- See DateIntervalTypeDef
- See DimensionType
- See ContextType
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetDimensionValuesResponseTypeDef
# get_dimension_values method usage example with argument unpacking
kwargs: GetDimensionValuesRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
"Dimension": ...,
}
parent.get_dimension_values(**kwargs)
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 session.client("ce").get_reservation_coverage
method.
boto3 documentation
# get_reservation_coverage method definition
await 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)
...
- See DateIntervalTypeDef
- See GroupDefinitionTypeDef
- See GranularityType
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetReservationCoverageResponseTypeDef
# get_reservation_coverage method usage example with argument unpacking
kwargs: GetReservationCoverageRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_reservation_coverage(**kwargs)
get_reservation_purchase_recommendation#
Gets recommendations for reservation purchases.
Type annotations and code completion for session.client("ce").get_reservation_purchase_recommendation
method.
boto3 documentation
# get_reservation_purchase_recommendation method definition
await 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)
...
- See ExpressionTypeDef
- See AccountScopeType
- See LookbackPeriodInDaysType
- See TermInYearsType
- See PaymentOptionType
- See ServiceSpecificationTypeDef
- See GetReservationPurchaseRecommendationResponseTypeDef
# get_reservation_purchase_recommendation method usage example with argument unpacking
kwargs: GetReservationPurchaseRecommendationRequestRequestTypeDef = { # (1)
"Service": ...,
}
parent.get_reservation_purchase_recommendation(**kwargs)
get_reservation_utilization#
Retrieves the reservation utilization for your account.
Type annotations and code completion for session.client("ce").get_reservation_utilization
method.
boto3 documentation
# get_reservation_utilization method definition
await 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)
...
- See DateIntervalTypeDef
- See GroupDefinitionTypeDef
- See GranularityType
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetReservationUtilizationResponseTypeDef
# get_reservation_utilization method usage example with argument unpacking
kwargs: GetReservationUtilizationRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_reservation_utilization(**kwargs)
get_rightsizing_recommendation#
Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
Type annotations and code completion for session.client("ce").get_rightsizing_recommendation
method.
boto3 documentation
# get_rightsizing_recommendation method definition
await def get_rightsizing_recommendation(
self,
*,
Service: str,
Filter: ExpressionTypeDef = ..., # (1)
Configuration: RightsizingRecommendationConfigurationTypeDef = ..., # (2)
PageSize: int = ...,
NextPageToken: str = ...,
) -> GetRightsizingRecommendationResponseTypeDef: # (3)
...
- See ExpressionTypeDef
- See RightsizingRecommendationConfigurationTypeDef
- See GetRightsizingRecommendationResponseTypeDef
# get_rightsizing_recommendation method usage example with argument unpacking
kwargs: GetRightsizingRecommendationRequestRequestTypeDef = { # (1)
"Service": ...,
}
parent.get_rightsizing_recommendation(**kwargs)
get_savings_plan_purchase_recommendation_details#
Retrieves the details for a Savings Plan recommendation.
Type annotations and code completion for session.client("ce").get_savings_plan_purchase_recommendation_details
method.
boto3 documentation
# get_savings_plan_purchase_recommendation_details method definition
await def get_savings_plan_purchase_recommendation_details(
self,
*,
RecommendationDetailId: str,
) -> GetSavingsPlanPurchaseRecommendationDetailsResponseTypeDef: # (1)
...
# get_savings_plan_purchase_recommendation_details method usage example with argument unpacking
kwargs: GetSavingsPlanPurchaseRecommendationDetailsRequestRequestTypeDef = { # (1)
"RecommendationDetailId": ...,
}
parent.get_savings_plan_purchase_recommendation_details(**kwargs)
get_savings_plans_coverage#
Retrieves the Savings Plans covered for your account.
Type annotations and code completion for session.client("ce").get_savings_plans_coverage
method.
boto3 documentation
# get_savings_plans_coverage method definition
await 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)
...
- See DateIntervalTypeDef
- See GroupDefinitionTypeDef
- See GranularityType
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetSavingsPlansCoverageResponseTypeDef
# get_savings_plans_coverage method usage example with argument unpacking
kwargs: GetSavingsPlansCoverageRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_savings_plans_coverage(**kwargs)
get_savings_plans_purchase_recommendation#
Retrieves the Savings Plans recommendations for your account.
Type annotations and code completion for session.client("ce").get_savings_plans_purchase_recommendation
method.
boto3 documentation
# get_savings_plans_purchase_recommendation method definition
await 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)
...
- See SupportedSavingsPlansTypeType
- See TermInYearsType
- See PaymentOptionType
- See LookbackPeriodInDaysType
- See AccountScopeType
- See ExpressionTypeDef
- See GetSavingsPlansPurchaseRecommendationResponseTypeDef
# get_savings_plans_purchase_recommendation method usage example with argument unpacking
kwargs: GetSavingsPlansPurchaseRecommendationRequestRequestTypeDef = { # (1)
"SavingsPlansType": ...,
"TermInYears": ...,
"PaymentOption": ...,
"LookbackPeriodInDays": ...,
}
parent.get_savings_plans_purchase_recommendation(**kwargs)
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 session.client("ce").get_savings_plans_utilization
method.
boto3 documentation
# get_savings_plans_utilization method definition
await def get_savings_plans_utilization(
self,
*,
TimePeriod: DateIntervalTypeDef, # (1)
Granularity: GranularityType = ..., # (2)
Filter: ExpressionTypeDef = ..., # (3)
SortBy: SortDefinitionTypeDef = ..., # (4)
) -> GetSavingsPlansUtilizationResponseTypeDef: # (5)
...
- See DateIntervalTypeDef
- See GranularityType
- See ExpressionTypeDef
- See SortDefinitionTypeDef
- See GetSavingsPlansUtilizationResponseTypeDef
# get_savings_plans_utilization method usage example with argument unpacking
kwargs: GetSavingsPlansUtilizationRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_savings_plans_utilization(**kwargs)
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 session.client("ce").get_savings_plans_utilization_details
method.
boto3 documentation
# get_savings_plans_utilization_details method definition
await 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)
...
- See DateIntervalTypeDef
- See ExpressionTypeDef
- See SavingsPlansDataTypeType
- See SortDefinitionTypeDef
- See GetSavingsPlansUtilizationDetailsResponseTypeDef
# get_savings_plans_utilization_details method usage example with argument unpacking
kwargs: GetSavingsPlansUtilizationDetailsRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_savings_plans_utilization_details(**kwargs)
get_tags#
Queries for available tag keys and tag values for a specified period.
Type annotations and code completion for session.client("ce").get_tags
method.
boto3 documentation
# get_tags method definition
await def get_tags(
self,
*,
TimePeriod: DateIntervalTypeDef, # (1)
SearchString: str = ...,
TagKey: str = ...,
Filter: ExpressionTypeDef = ..., # (2)
SortBy: Sequence[SortDefinitionTypeDef] = ..., # (3)
MaxResults: int = ...,
NextPageToken: str = ...,
) -> GetTagsResponseTypeDef: # (4)
...
# get_tags method usage example with argument unpacking
kwargs: GetTagsRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_tags(**kwargs)
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 session.client("ce").get_usage_forecast
method.
boto3 documentation
# get_usage_forecast method definition
await def get_usage_forecast(
self,
*,
TimePeriod: DateIntervalTypeDef, # (1)
Metric: MetricType, # (2)
Granularity: GranularityType, # (3)
Filter: ExpressionTypeDef = ..., # (4)
PredictionIntervalLevel: int = ...,
) -> GetUsageForecastResponseTypeDef: # (5)
...
- See DateIntervalTypeDef
- See MetricType
- See GranularityType
- See ExpressionTypeDef
- See GetUsageForecastResponseTypeDef
# get_usage_forecast method usage example with argument unpacking
kwargs: GetUsageForecastRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
"Metric": ...,
"Granularity": ...,
}
parent.get_usage_forecast(**kwargs)
list_cost_allocation_tags#
Get a list of cost allocation tags.
Type annotations and code completion for session.client("ce").list_cost_allocation_tags
method.
boto3 documentation
# list_cost_allocation_tags method definition
await def list_cost_allocation_tags(
self,
*,
Status: CostAllocationTagStatusType = ..., # (1)
TagKeys: Sequence[str] = ...,
Type: CostAllocationTagTypeType = ..., # (2)
NextToken: str = ...,
MaxResults: int = ...,
) -> ListCostAllocationTagsResponseTypeDef: # (3)
...
- See CostAllocationTagStatusType
- See CostAllocationTagTypeType
- See ListCostAllocationTagsResponseTypeDef
# list_cost_allocation_tags method usage example with argument unpacking
kwargs: ListCostAllocationTagsRequestRequestTypeDef = { # (1)
"Status": ...,
}
parent.list_cost_allocation_tags(**kwargs)
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 session.client("ce").list_cost_category_definitions
method.
boto3 documentation
# list_cost_category_definitions method definition
await def list_cost_category_definitions(
self,
*,
EffectiveOn: str = ...,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListCostCategoryDefinitionsResponseTypeDef: # (1)
...
# list_cost_category_definitions method usage example with argument unpacking
kwargs: ListCostCategoryDefinitionsRequestRequestTypeDef = { # (1)
"EffectiveOn": ...,
}
parent.list_cost_category_definitions(**kwargs)
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 session.client("ce").list_savings_plans_purchase_recommendation_generation
method.
boto3 documentation
# list_savings_plans_purchase_recommendation_generation method definition
await def list_savings_plans_purchase_recommendation_generation(
self,
*,
GenerationStatus: GenerationStatusType = ..., # (1)
RecommendationIds: Sequence[str] = ...,
PageSize: int = ...,
NextPageToken: str = ...,
) -> ListSavingsPlansPurchaseRecommendationGenerationResponseTypeDef: # (2)
...
# list_savings_plans_purchase_recommendation_generation method usage example with argument unpacking
kwargs: ListSavingsPlansPurchaseRecommendationGenerationRequestRequestTypeDef = { # (1)
"GenerationStatus": ...,
}
parent.list_savings_plans_purchase_recommendation_generation(**kwargs)
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 session.client("ce").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
await def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
provide_anomaly_feedback#
Modifies the feedback property of a given cost anomaly.
Type annotations and code completion for session.client("ce").provide_anomaly_feedback
method.
boto3 documentation
# provide_anomaly_feedback method definition
await def provide_anomaly_feedback(
self,
*,
AnomalyId: str,
Feedback: AnomalyFeedbackTypeType, # (1)
) -> ProvideAnomalyFeedbackResponseTypeDef: # (2)
...
# provide_anomaly_feedback method usage example with argument unpacking
kwargs: ProvideAnomalyFeedbackRequestRequestTypeDef = { # (1)
"AnomalyId": ...,
"Feedback": ...,
}
parent.provide_anomaly_feedback(**kwargs)
start_savings_plans_purchase_recommendation_generation#
Requests a Savings Plans recommendation generation.
Type annotations and code completion for session.client("ce").start_savings_plans_purchase_recommendation_generation
method.
boto3 documentation
# start_savings_plans_purchase_recommendation_generation method definition
await def start_savings_plans_purchase_recommendation_generation(
self,
) -> StartSavingsPlansPurchaseRecommendationGenerationResponseTypeDef: # (1)
...
tag_resource#
An API operation for adding one or more tags (key-value pairs) to a resource.
Type annotations and code completion for session.client("ce").tag_resource
method.
boto3 documentation
# tag_resource method definition
await def tag_resource(
self,
*,
ResourceArn: str,
ResourceTags: Sequence[ResourceTagTypeDef], # (1)
) -> Dict[str, Any]:
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"ResourceTags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes one or more tags from a resource.
Type annotations and code completion for session.client("ce").untag_resource
method.
boto3 documentation
# untag_resource method definition
await def untag_resource(
self,
*,
ResourceArn: str,
ResourceTagKeys: Sequence[str],
) -> Dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"ResourceTagKeys": ...,
}
parent.untag_resource(**kwargs)
update_anomaly_monitor#
Updates an existing cost anomaly monitor.
Type annotations and code completion for session.client("ce").update_anomaly_monitor
method.
boto3 documentation
# update_anomaly_monitor method definition
await def update_anomaly_monitor(
self,
*,
MonitorArn: str,
MonitorName: str = ...,
) -> UpdateAnomalyMonitorResponseTypeDef: # (1)
...
# update_anomaly_monitor method usage example with argument unpacking
kwargs: UpdateAnomalyMonitorRequestRequestTypeDef = { # (1)
"MonitorArn": ...,
}
parent.update_anomaly_monitor(**kwargs)
update_anomaly_subscription#
Updates an existing cost anomaly subscription.
Type annotations and code completion for session.client("ce").update_anomaly_subscription
method.
boto3 documentation
# update_anomaly_subscription method definition
await 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)
...
- See AnomalySubscriptionFrequencyType
- See SubscriberTypeDef
- See ExpressionTypeDef
- See UpdateAnomalySubscriptionResponseTypeDef
# update_anomaly_subscription method usage example with argument unpacking
kwargs: UpdateAnomalySubscriptionRequestRequestTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.update_anomaly_subscription(**kwargs)
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 session.client("ce").update_cost_allocation_tags_status
method.
boto3 documentation
# update_cost_allocation_tags_status method definition
await def update_cost_allocation_tags_status(
self,
*,
CostAllocationTagsStatus: Sequence[CostAllocationTagStatusEntryTypeDef], # (1)
) -> UpdateCostAllocationTagsStatusResponseTypeDef: # (2)
...
# update_cost_allocation_tags_status method usage example with argument unpacking
kwargs: UpdateCostAllocationTagsStatusRequestRequestTypeDef = { # (1)
"CostAllocationTagsStatus": ...,
}
parent.update_cost_allocation_tags_status(**kwargs)
update_cost_category_definition#
Updates an existing Cost Category.
Type annotations and code completion for session.client("ce").update_cost_category_definition
method.
boto3 documentation
# update_cost_category_definition method definition
await 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)
...
- See CostCategoryRuleVersionType
- See CostCategoryRuleTypeDef
- See CostCategorySplitChargeRuleTypeDef
- See UpdateCostCategoryDefinitionResponseTypeDef
# update_cost_category_definition method usage example with argument unpacking
kwargs: UpdateCostCategoryDefinitionRequestRequestTypeDef = { # (1)
"CostCategoryArn": ...,
"RuleVersion": ...,
"Rules": ...,
}
parent.update_cost_category_definition(**kwargs)
__aenter__#
Type annotations and code completion for session.client("ce").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> CostExplorerClient:
...
__aexit__#
Type annotations and code completion for session.client("ce").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Any,
exc_val: Any,
exc_tb: Any,
) -> Any:
...