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
# CostExplorerClient 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.
# Exceptions.exceptions usage example
client = boto3.client("ce")
try:
do_something(client)
except (
client.exceptions.BackfillLimitExceededException,
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)
# Exceptions.exceptions type checking example
from mypy_boto3_ce.client import Exceptions
def handle_error(exc: Exceptions.BackfillLimitExceededException) -> 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
# can_paginate 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
# close 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
# create_anomaly_monitor method definition
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 boto3.client("ce").create_anomaly_subscription
method.
boto3 documentation
# create_anomaly_subscription method definition
def create_anomaly_subscription(
self,
*,
AnomalySubscription: Union[AnomalySubscriptionTypeDef, AnomalySubscriptionOutputTypeDef], # (1)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (2)
) -> CreateAnomalySubscriptionResponseTypeDef: # (3)
...
- See AnomalySubscriptionTypeDef AnomalySubscriptionOutputTypeDef
- See ResourceTagTypeDef
- See CreateAnomalySubscriptionResponseTypeDef
# 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 boto3.client("ce").create_cost_category_definition
method.
boto3 documentation
# create_cost_category_definition method definition
def create_cost_category_definition(
self,
*,
Name: str,
RuleVersion: CostCategoryRuleVersionType, # (1)
Rules: Sequence[CostCategoryRuleTypeDef], # (2)
EffectiveStart: str = ...,
DefaultValue: str = ...,
SplitChargeRules: Sequence[Union[CostCategorySplitChargeRuleTypeDef, CostCategorySplitChargeRuleOutputTypeDef]] = ..., # (3)
ResourceTags: Sequence[ResourceTagTypeDef] = ..., # (4)
) -> CreateCostCategoryDefinitionResponseTypeDef: # (5)
...
- See CostCategoryRuleVersionType
- See CostCategoryRuleTypeDef
- See CostCategorySplitChargeRuleTypeDef CostCategorySplitChargeRuleOutputTypeDef
- 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 boto3.client("ce").delete_anomaly_monitor
method.