Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a cost category that's defined in the account.
You have the option to use EffectiveOn to return a cost category that's active on a specific date. If there's no EffectiveOn specified, you see a Cost Category that's effective on the current date. If cost category is still effective, EffectiveEnd is omitted in the response.
Parameters:
-
cost_category_arn
(Arn)
–
The unique identifier for your cost category.
-
effective_on
(Optional[ZonedDateTime], default:
None
)
–
The date when the cost category was effective.
Raises:
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
| def describe_cost_category_definition(
self,
cost_category_arn: "capo_cost_explorer.types.arn.Arn",
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
effective_on: Optional[
"capo_cost_explorer.types.zoned_date_time.ZonedDateTime"
] = None,
) -> "capo_cost_explorer.types.describe_cost_category_definition_response.DescribeCostCategoryDefinitionResponse":
"""<p>Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a cost category that's defined in the account.</p> <p>You have the option to use <code>EffectiveOn</code> to return a cost category that's active on a specific date. If there's no <code>EffectiveOn</code> specified, you see a Cost Category that's effective on the current date. If cost category is still effective, <code>EffectiveEnd</code> is omitted in the response. </p>
Args:
cost_category_arn: <p>The unique identifier for your cost category. </p>
effective_on: <p>The date when the cost category was effective. </p>
Raises:
capo_cost_explorer.errors.limit_exceeded_exception.LimitExceededException: <p>You made too many calls in a short period of time. Try again later.</p>
capo_cost_explorer.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
capo_cost_explorer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cost_explorer.types.describe_cost_category_definition_request.DescribeCostCategoryDefinitionRequest]",
) -> OperationResponse[
"capo_cost_explorer.types.describe_cost_category_definition_response.DescribeCostCategoryDefinitionResponse"
]:
import capo_cost_explorer._operations.aws_insights_index_service.describe_cost_category_definition
output, http_response = (
capo_cost_explorer._operations.aws_insights_index_service.describe_cost_category_definition.describe_cost_category_definition(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeCostCategoryDefinition")
)
input_: capo_cost_explorer.types.describe_cost_category_definition_request.DescribeCostCategoryDefinitionRequest = {
"cost_category_arn": cost_category_arn
}
if effective_on is not None:
input_["effective_on"] = effective_on
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|