BillingConductor / Client / get_billing_group_cost_report

get_billing_group_cost_report#

BillingConductor.Client.get_billing_group_cost_report(**kwargs)#

Retrieves the margin summary report, which includes the Amazon Web Services cost and charged amount (pro forma cost) by Amazon Web Service for a specific billing group.

See also: AWS API Documentation

Request Syntax

response = client.get_billing_group_cost_report(
    Arn='string',
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    },
    GroupBy=[
        'PRODUCT_NAME'|'BILLING_PERIOD',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • Arn (string) –

    [REQUIRED]

    The Amazon Resource Number (ARN) that uniquely identifies the billing group.

  • BillingPeriodRange (dict) –

    A time range for which the margin summary is effective. You can specify up to 12 months.

    • InclusiveStartBillingPeriod (string) – [REQUIRED]

      The inclusive start billing period that defines a billing period range for the margin summary.

    • ExclusiveEndBillingPeriod (string) – [REQUIRED]

      The exclusive end billing period that defines a billing period range for the margin summary. For example, if you choose a billing period that starts in October 2023 and ends in December 2023, the margin summary will only include data from October 2023 and November 2023.

  • GroupBy (list) –

    A list of strings that specify the attributes that are used to break down costs in the margin summary reports for the billing group. For example, you can view your costs by the Amazon Web Service name or the billing period.

    • (string) –

  • MaxResults (integer) – The maximum number of margin summary reports to retrieve.

  • NextToken (string) – The pagination token used on subsequent calls to get reports.

Return type:

dict

Returns:

Response Syntax

{
    'BillingGroupCostReportResults': [
        {
            'Arn': 'string',
            'AWSCost': 'string',
            'ProformaCost': 'string',
            'Margin': 'string',
            'MarginPercentage': 'string',
            'Currency': 'string',
            'Attributes': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • BillingGroupCostReportResults (list) –

      The list of margin summary reports.

      • (dict) –

        A paginated call to retrieve a list of summary reports of actual Amazon Web Services charges and the calculated Amazon Web Services charges, broken down by attributes.

        • Arn (string) –

          The Amazon Resource Number (ARN) that uniquely identifies the billing group.

        • AWSCost (string) –

          The actual Amazon Web Services charges for the billing group.

        • ProformaCost (string) –

          The hypothetical Amazon Web Services charges based on the associated pricing plan of a billing group.

        • Margin (string) –

          The billing group margin.

        • MarginPercentage (string) –

          The percentage of the billing group margin.

        • Currency (string) –

          The displayed currency.

        • Attributes (list) –

          The list of key-value pairs that represent the attributes by which the BillingGroupCostReportResults are grouped. For example, if you want the Amazon S3 service-level breakdown of a billing group for November 2023, the attributes list will contain a key-value pair of "PRODUCT_NAME" and "S3" and a key-value pair of "BILLING_PERIOD" and "Nov 2023".

          • (dict) –

            The key-value pair that represents the attribute by which the BillingGroupCostReportResults are grouped. For example, if you want a service-level breakdown for Amazon Simple Storage Service (Amazon S3) of the billing group, the attribute will be a key-value pair of "PRODUCT_NAME" and "S3".

            • Key (string) –

              The key in a key-value pair that describes the margin summary.

            • Value (string) –

              The value in a key-value pair that describes the margin summary.

    • NextToken (string) –

      The pagination token used on subsequent calls to get reports.

Exceptions

  • BillingConductor.Client.exceptions.ThrottlingException

  • BillingConductor.Client.exceptions.AccessDeniedException

  • BillingConductor.Client.exceptions.ValidationException

  • BillingConductor.Client.exceptions.InternalServerException

  • BillingConductor.Client.exceptions.ResourceNotFoundException