Skip to content

aws.billingconductor.get_billing_group_cost_report

Example SQL Queries

SELECT * FROM
aws.billingconductor.get_billing_group_cost_report
WHERE
"arn" = 'VALUE';

Description

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.

Table Definition

Column NameColumn Data Type
arn Required Input Column

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

VARCHAR
billing_period_range Input Column

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

STRUCT(
"inclusive_start_billing_period" VARCHAR,
"exclusive_end_billing_period" VARCHAR
)
Show child fields
billing_period_range.exclusive_end_billing_period

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.

billing_period_range.inclusive_start_billing_period

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

group_by Input Column

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.

VARCHAR[]
Show child fields
group_by[]
max_results Input Column

The maximum number of margin summary reports to retrieve.

BIGINT
next_token Input Column

The pagination token used on subsequent calls to get reports.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

billing_group_cost_report_results

The list of margin summary reports.

STRUCT(
"arn" VARCHAR,
"aws_cost" VARCHAR,
"proforma_cost" VARCHAR,
"margin" VARCHAR,
"margin_percentage" VARCHAR,
"currency" VARCHAR,
"attributes" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
Show child fields
billing_group_cost_report_results[]
Show child fields
billing_group_cost_report_results[].arn

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

billing_group_cost_report_results[].attributes[]
Show child fields
billing_group_cost_report_results[].attributes[].key

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

billing_group_cost_report_results[].attributes[].value

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

billing_group_cost_report_results[].aws_cost

The actual Amazon Web Services charges for the billing group.

billing_group_cost_report_results[].currency

The displayed currency.

billing_group_cost_report_results[].margin

The billing group margin.

billing_group_cost_report_results[].margin_percentage

The percentage of the billing group margin.

billing_group_cost_report_results[].proforma_cost

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