CE (Cost Explorer API)

Implementation details for API ce

Coverage Overview

Cost Explorer API (CE) is supported by LocalStack only in the pro image.

AvailabilityTesting*
OperationImplementedImageInternal Test SuiteExternal Test SuiteTerraform ValidatedAWS ValidatedSnapshot TestedDetails
CreateAnomalyMonitor✔️pro✔️Show Tests
CreateAnomalySubscription✔️pro✔️Show Tests
CreateCostCategoryDefinition✔️pro✔️✔️Show Tests
DeleteAnomalyMonitor✔️pro✔️Show Tests
DeleteAnomalySubscription✔️pro✔️Show Tests
DeleteCostCategoryDefinition✔️pro✔️Show Tests
DescribeCostCategoryDefinition✔️pro✔️✔️Show Tests
GetAnomalies
GetAnomalyMonitors✔️pro✔️Show Tests
GetAnomalySubscriptions✔️pro✔️Show Tests
GetApproximateUsageRecords
GetCostAndUsage✔️pro✔️
GetCostAndUsageWithResources
GetCostCategories
GetCostForecast
GetDimensionValues
GetReservationCoverage
GetReservationPurchaseRecommendation
GetReservationUtilization
GetRightsizingRecommendation
GetSavingsPlanPurchaseRecommendationDetails
GetSavingsPlansCoverage
GetSavingsPlansPurchaseRecommendation
GetSavingsPlansUtilization
GetSavingsPlansUtilizationDetails
GetTags
GetUsageForecast
ListCostAllocationTagBackfillHistory
ListCostAllocationTags
ListCostCategoryDefinitions✔️pro✔️Show Tests
ListSavingsPlansPurchaseRecommendationGeneration
ListTagsForResource✔️pro✔️
ProvideAnomalyFeedback
StartCostAllocationTagBackfill
StartSavingsPlansPurchaseRecommendationGeneration
TagResource✔️pro✔️
UntagResource✔️pro
UpdateAnomalyMonitor✔️pro✔️Show Tests
UpdateAnomalySubscription✔️pro✔️Show Tests
UpdateCostAllocationTagsStatus
UpdateCostCategoryDefinition✔️pro✔️✔️Show Tests

Terminology

  • Internal Test Suite: tested by LocalStack's internal integration test suite
  • External Test Suite: covered by an external integration test suite, that runs against LocalStack
  • Terraform Validated: operation tested with Terraform
  • AWS Validated: the integration test that includes this operation call was validated against AWS
  • Snapshot Tested: the operation is part of a snapshot parity test, which verifies the responses by LocalStack and AWS are the same

Testing Details

This section gives an overview about the internal integration test suite and the specific test cases that recorded the API call.

How to read the test details?

For each operation we put up a list of the related integration test cases.
Those operation calls have been recorded during the exeuction of the outlined test cases. Some calls might be internal, i.e., they are not explicitly called in the test, but are triggered implicitly by the LocalStack framework.

  • Parameters: The tests are ordered by the parameters used, which are highlighted in bold.
  • Test Details: LocalStack Community or LocalStack Pro indicates where the test originates. For each test you see:
    • test name
    • status code returned (which is the expected one for the test case)
    • information about validation:
      • AWS validated the test is validated against AWS, meaning it run successfully against real AWS as well
      • Snapshot Tested this is a snapshot parity test, meaning the responses are validated against AWS


CreateAnomalyMonitor

Parameters: AnomalyMonitor
  • LocalStack Pro
    • test_anomaly_monitors LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_monitors HTTP Status Code: 200

CreateAnomalySubscription

Parameters: AnomalySubscription
  • LocalStack Pro
    • test_anomaly_subscriptions LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_subscriptions HTTP Status Code: 200

CreateCostCategoryDefinition

Parameters: Name, RuleVersion, Rules
  • LocalStack Pro
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 200

DeleteAnomalyMonitor

Parameters: MonitorArn
  • LocalStack Pro
    • test_anomaly_monitors LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_monitors HTTP Status Code: 200

DeleteAnomalySubscription

Parameters: SubscriptionArn
  • LocalStack Pro
    • test_anomaly_subscriptions LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_subscriptions HTTP Status Code: 200

DeleteCostCategoryDefinition

Parameters: CostCategoryArn
  • LocalStack Pro
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 200

DescribeCostCategoryDefinition

Parameters: CostCategoryArn
  • LocalStack Pro
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 200
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 400 (ResourceNotFoundException)

GetAnomalyMonitors

Parameters: - (without any parameters)
  • LocalStack Pro
    • test_anomaly_monitors LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_monitors HTTP Status Code: 200

GetAnomalySubscriptions

Parameters: - (without any parameters)
  • LocalStack Pro
    • test_anomaly_subscriptions LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_subscriptions HTTP Status Code: 200

ListCostCategoryDefinitions

Parameters: - (without any parameters)
  • LocalStack Pro
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 200

UpdateAnomalyMonitor

Parameters: MonitorArn, MonitorName
  • LocalStack Pro
    • test_anomaly_monitors LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_monitors HTTP Status Code: 200

UpdateAnomalySubscription

Parameters: Frequency, SubscriptionArn, Threshold
  • LocalStack Pro
    • test_anomaly_subscriptions LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_anomaly_subscriptions HTTP Status Code: 200

UpdateCostCategoryDefinition

Parameters: CostCategoryArn, RuleVersion, Rules
  • LocalStack Pro
    • test_cost_categories LocalStack Pro: tests/aws/services/ce/test_costexplorer.py::TestCostExplorer::test_cost_categories HTTP Status Code: 200


Last modified March 20, 2023: improve Coverage Docs (#505) (46f2fb0c0)