Cost Management
APIs related to Cost Management.
📄️ List cost budgets accessible to the user
Returns a paginated list of cost budgets the caller can access, including notification/action configuration and BudgetAmountUsed. Caller must pass a valid role_id.
📄️ Create a cost budget for a tag
Creates an AWS Budgets-backed cost budget scoped to TagKey/TagValues, with 1–3 ActionConfigurations (email and/or stop_resources). Required body fields: BudgetName, BudgetAmount, BudgetPeriod, ActionConfigurations, TagKey, TagValues. Optional Description, CurrencyUnit (default USD), CreateSeparateBudgets (when true, creates one budget per TagValue and returns BudgetIds). BudgetPeriod is daily|monthly|quarterly|annually. ActionType is email|stop_resources; ThresholdType is percentage|absolute_value; stop_resources requires ResourceTypes from jobs|datalabs|data-pipelines|agents|ai-models (max one stop_resources). Not idempotent: duplicate tag+period returns CE-1003; duplicate AWS budget name returns CE-1004.
📄️ Get a cost budget by ID
Returns a single cost budget including BudgetAmountUsed and per-action Status from AWS Budget notifications. Handler loads details when no query parameters are present. Invalid budget_id returns IPV-1002.
📄️ Update a cost budget
Updates BudgetAmount, BudgetPeriod, ActionConfigurations, TagValues, and optional Description for an existing budget. TagKey is taken from the stored budget. Single-value budgets cannot freely retarget TagValues. Validation mirrors create (IPV-1045/IPV-1010/CE-1003). Success Message is 'Budget '<name>' has been updated'.
📄️ Delete a cost budget
Deletes the AWS Budget and Amorphic budget metadata for budget_id. Success Message is 'Budget '<name>' has been deleted'. Invalid id returns GE-1034; AWS delete failure returns GE-1032. Not idempotent after delete.
📄️ List cost allocation tags accessible to the user
Returns a paginated list of cost allocation tags the caller can access. Caller must pass a valid role_id.
📄️ Attach or detach cost tags on resources
Bulk-updates cost allocation tags on resources of a single ResourceType using MultiTagUpdationObj. Action is Attach or Detach. Optional Source Resource indicates the request originated from resource management (supports tag-value replacement on Attach).
📄️ Create a cost allocation tag
Creates a new cost allocation tag from CostTagsCreationObj. Required fields: TagKey, TagValues, TagName, TagDescription. Optional TagScope (application or a supported resource type). TagKey/TagValues must be lowercase letters, digits, or underscores (max 50). Reserved system default keys (for example createdby) cannot be created (GE-1034). Application/resource-scoped tags may allow only one value. Duplicate TagKey returns IPV-1002. Not idempotent.
📄️ Get cost tag metadata, assigned users, or resources
Without action, returns tag metadata for {key} (gzip supported via Accept-Encoding). With action=getusers or getresources, returns assignments for a TagValue. value is required for assignment queries unless retrieveall=yes (getresources only returns full tag resource details when retrieveall=yes). Invalid action returns IPV-1041. Response body is oneOf variants under CostTagByKeyResponseBody (metadata, users, or resources).
📄️ Update a cost tag or attach access tags/users
Without query action, updates tag values/metadata using CostTagsUpdationObj (TagValues required; TagName/TagDescription optional). System default keys cannot be updated (GE-1034).
📄️ Delete a cost allocation tag
Deletes all tag values and then deletes the tag key. System default tags cannot be deleted (GE-1034). Fails if a value is still attached to resources or budgets (GE-1034). Caller must have access to the tag.
📄️ Get cost tags attached to a resource
Returns cost allocation tags attached to the given resource_id. resourcetype is required and must be one of the supported cost-taggable types (matching is case-insensitive; handler lowercases the value). Response is ResourceTagsResponseBody with TagsAttached key/value pairs.