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
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.
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)
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
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("ce").close
method.
boto3 documentation
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
def create_anomaly_monitor(
self,
*,
AnomalyMonitor: AnomalyMonitorTypeDef, # (1)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (2)
) -> CreateAnomalyMonitorResponseTypeDef: # (3)
...
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 boto3.client("ce").create_anomaly_subscription
method.
boto3 documentation
def create_anomaly_subscription(
self,
*,
AnomalySubscription: AnomalySubscriptionTypeDef, # (1)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (2)
) -> CreateAnomalySubscriptionResponseTypeDef: # (3)
...
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 boto3.client("ce").create_cost_category_definition
method.
boto3 documentation
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
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 boto3.client("ce").delete_anomaly_monitor
method.
boto3 documentation
kwargs: DeleteAnomalyMonitorRequestRequestTypeDef = { # (1)
"MonitorArn": ...,
}
parent.delete_anomaly_monitor(**kwargs)
delete_anomaly_subscription
Deletes a cost anomaly subscription.
Type annotations and code completion for boto3.client("ce").delete_anomaly_subscription
method.
boto3 documentation
def delete_anomaly_subscription(
self,
*,
SubscriptionArn: str,
) -> Dict[str, Any]:
...
kwargs: DeleteAnomalySubscriptionRequestRequestTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.delete_anomaly_subscription(**kwargs)
delete_cost_category_definition
Deletes a Cost Category.
Type annotations and code completion for boto3.client("ce").delete_cost_category_definition
method.
boto3 documentation
def delete_cost_category_definition(
self,
*,
CostCategoryArn: str,
) -> DeleteCostCategoryDefinitionResponseTypeDef: # (1)
...
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 boto3.client("ce").describe_cost_category_definition
method.
boto3 documentation
def describe_cost_category_definition(
self,
*,
CostCategoryArn: str,
EffectiveOn: str = ...,
) -> DescribeCostCategoryDefinitionResponseTypeDef: # (1)
...
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 boto3.client("ce").generate_presigned_url
method.
boto3 documentation
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
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
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 boto3.client("ce").get_anomaly_monitors
method.
boto3 documentation
def get_anomaly_monitors(
self,
*,
MonitorArnList: Sequence[str] = ...,
NextPageToken: str = ...,
MaxResults: int = ...,
) -> GetAnomalyMonitorsResponseTypeDef: # (1)
...
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 boto3.client("ce").get_anomaly_subscriptions
method.
boto3 documentation
def get_anomaly_subscriptions(
self,
*,
SubscriptionArnList: Sequence[str] = ...,
MonitorArn: str = ...,
NextPageToken: str = ...,
MaxResults: int = ...,
) -> GetAnomalySubscriptionsResponseTypeDef: # (1)
...
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 boto3.client("ce").get_cost_and_usage
method.
boto3 documentation
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
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 boto3.client("ce").get_cost_and_usage_with_resources
method.
boto3 documentation
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
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 boto3.client("ce").get_cost_categories
method.
boto3 documentation
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
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 boto3.client("ce").get_cost_forecast
method.
boto3 documentation
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
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 boto3.client("ce").get_dimension_values
method.
boto3 documentation
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
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 boto3.client("ce").get_reservation_coverage
method.
boto3 documentation
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
kwargs: GetReservationCoverageRequestRequestTypeDef = { # (1)
"TimePeriod": ...,
}
parent.get_reservation_coverage(**kwargs)
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
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
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 boto3.client("ce").get_reservation_utilization
method.
boto3 documentation
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
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 boto3.client("ce").get_rightsizing_recommendation
method.
boto3 documentation
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
kwargs: GetRightsizingRecommendationRequestRequestTypeDef = { # (1)
"Service": ...,
}
parent.get_rightsizing_recommendation(**kwargs)
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
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
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 boto3.client("ce").get_savings_plans_purchase_recommendation
method.
boto3 documentation
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
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 boto3.client("ce").get_savings_plans_utilization
method.
boto3 documentation
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
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 boto3.client("ce").get_savings_plans_utilization_details
method.
boto3 documentation
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
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 boto3.client("ce").get_tags
method.
boto3 documentation
def get_tags(
self,
*,
TimePeriod: DateIntervalTypeDef, # (1)
SearchString: str = ...,
TagKey: str = ...,
Filter: ExpressionTypeDef = ..., # (2)
SortBy: Sequence[SortDefinitionTypeDef] = ..., # (3)
MaxResults: int = ...,
NextPageToken: str = ...,
) -> GetTagsResponseTypeDef: # (4)
...
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 boto3.client("ce").get_usage_forecast
method.
boto3 documentation
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
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 boto3.client("ce").list_cost_allocation_tags
method.
boto3 documentation
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
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 boto3.client("ce").list_cost_category_definitions
method.
boto3 documentation
def list_cost_category_definitions(
self,
*,
EffectiveOn: str = ...,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListCostCategoryDefinitionsResponseTypeDef: # (1)
...
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 boto3.client("ce").list_savings_plans_purchase_recommendation_generation
method.
boto3 documentation
def list_savings_plans_purchase_recommendation_generation(
self,
*,
GenerationStatus: GenerationStatusType = ..., # (1)
RecommendationIds: Sequence[str] = ...,
PageSize: int = ...,
NextPageToken: str = ...,
) -> ListSavingsPlansPurchaseRecommendationGenerationResponseTypeDef: # (2)
...
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 boto3.client("ce").list_tags_for_resource
method.
boto3 documentation
def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
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 boto3.client("ce").provide_anomaly_feedback
method.
boto3 documentation
def provide_anomaly_feedback(
self,
*,
AnomalyId: str,
Feedback: AnomalyFeedbackTypeType, # (1)
) -> ProvideAnomalyFeedbackResponseTypeDef: # (2)
...
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 boto3.client("ce").start_savings_plans_purchase_recommendation_generation
method.
boto3 documentation
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 boto3.client("ce").tag_resource
method.
boto3 documentation
def tag_resource(
self,
*,
ResourceArn: str,
ResourceTags: Sequence[ResourceTagTypeDef], # (1)
) -> Dict[str, Any]:
...
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 boto3.client("ce").untag_resource
method.
boto3 documentation
def untag_resource(
self,
*,
ResourceArn: str,
ResourceTagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"ResourceTagKeys": ...,
}
parent.untag_resource(**kwargs)
update_anomaly_monitor
Updates an existing cost anomaly monitor.
Type annotations and code completion for boto3.client("ce").update_anomaly_monitor
method.
boto3 documentation
def update_anomaly_monitor(
self,
*,
MonitorArn: str,
MonitorName: str = ...,
) -> UpdateAnomalyMonitorResponseTypeDef: # (1)
...
kwargs: UpdateAnomalyMonitorRequestRequestTypeDef = { # (1)
"MonitorArn": ...,
}
parent.update_anomaly_monitor(**kwargs)
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
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
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 boto3.client("ce").update_cost_allocation_tags_status
method.
boto3 documentation
def update_cost_allocation_tags_status(
self,
*,
CostAllocationTagsStatus: Sequence[CostAllocationTagStatusEntryTypeDef], # (1)
) -> UpdateCostAllocationTagsStatusResponseTypeDef: # (2)
...
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 boto3.client("ce").update_cost_category_definition
method.
boto3 documentation
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)
...