CostExplorer / Client / list_cost_category_resource_associations

list_cost_category_resource_associations

CostExplorer.Client.list_cost_category_resource_associations(**kwargs)

Returns resource associations of all cost categories defined in the account. You have the option to use CostCategoryArn to get the association for a specific cost category. ListCostCategoryResourceAssociations supports pagination. The request can have a MaxResults range up to 100.

See also: AWS API Documentation

Request Syntax

response = client.list_cost_category_resource_associations(
    CostCategoryArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • CostCategoryArn (string) – The unique identifier for your cost category.

  • 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.

  • MaxResults (integer) – The number of entries a paginated response contains.

Return type:

dict

Returns:

Response Syntax

{
    'CostCategoryResourceAssociations': [
        {
            'ResourceArn': 'string',
            'CostCategoryName': 'string',
            'CostCategoryArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • CostCategoryResourceAssociations (list) –

      A reference to a cost category association that contains information on an associated resource.

      • (dict) –

        A reference to a cost category association that contains information on an associated resource.

        • ResourceArn (string) –

          The unique identifier for an associated resource.

        • CostCategoryName (string) –

          The unique name of the cost category.

        • CostCategoryArn (string) –

          The unique identifier for your cost category.

    • 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.ResourceNotFoundException