Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
See also: AWS API Documentation
Request Syntax
response = client.list_cost_allocation_tags(
Status='Active'|'Inactive',
TagKeys=[
'string',
],
Type='AWSGenerated'|'UserDefined',
NextToken='string',
MaxResults=123
)
The list of cost allocation tag keys that are returned for this request.
CostAllocationTag
object that are returned for this request. The AWSGenerated
type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes. The UserDefined
type tags are tags that you define, create, and apply to resources.dict
Response Syntax
{
'CostAllocationTags': [
{
'TagKey': 'string',
'Type': 'AWSGenerated'|'UserDefined',
'Status': 'Active'|'Inactive'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
CostAllocationTags (list) --
A list of cost allocation tags that includes the detailed metadata for each one.
(dict) --
The cost allocation tag structure. This includes detailed metadata for the CostAllocationTag
object.
TagKey (string) --
The key for the cost allocation tag.
Type (string) --
The type of cost allocation tag. You can use AWSGenerated
or UserDefined
type tags. AWSGenerated
type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes. UserDefined
type tags are tags that you define, create, and apply to resources.
Status (string) --
The status of a cost allocation tag.
NextToken (string) --
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Exceptions
CostExplorer.Client.exceptions.LimitExceededException
CostExplorer.Client.exceptions.InvalidNextTokenException