Skip to main content

billing_groups

Creates, updates, deletes, gets or lists a billing_groups resource.

Overview

Namebilling_groups
TypeResource
Idaws.billingconductor.billing_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_groupingobjectSpecifies if the billing group has automatic account association (AutoAssociate) enabled.
arnstringThe Amazon Resource Number (ARN) that can be used to uniquely identify the billing group. (pattern: <code>(arn:aws(-cn)?:billingconductor::[0-9]{12}:billinggroup/)?[a-zA-Z0-9]{10,12}</code>)
billing_group_typestringThe type of billing group. (STANDARD, TRANSFER_BILLING)
computation_preferenceobjectThe preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.
creation_timeinteger (int64)The time when the billing group was created.
descriptionstringThe description of the billing group.
last_modified_timeinteger (int64)The most recent time when the billing group was modified.
namestringThe name of the billing group. (pattern: <code>[a-zA-Z0-9_+=.-@]+</code>)
primary_account_idstringThe account ID that serves as the main account in a billing group. (pattern: <code>[0-9]{12}</code>)
sizeinteger (int64)The number of accounts in the particular billing group.
statusstringThe billing group status. Only one of the valid values can be used. (ACTIVE, PRIMARY_ACCOUNT_MISSING, PENDING)
status_reasonstringThe reason why the billing group is in its current status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_billing_groupsselectregionA paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.
create_billing_groupinsertregion, AccountGrouping, ComputationPreferenceX-Amzn-Client-TokenCreates a billing group that resembles a consolidated billing family that Amazon Web Services charges, based off of the predefined pricing plan computation.
update_billing_groupupdateregionThis updates an existing billing group.
delete_billing_groupdeleteregionDeletes a billing group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
X-Amzn-Client-TokenstringA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.

SELECT examples

A paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.

SELECT
account_grouping,
arn,
billing_group_type,
computation_preference,
creation_time,
description,
last_modified_time,
name,
primary_account_id,
size,
status,
status_reason
FROM aws.billingconductor.billing_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a billing group that resembles a consolidated billing family that Amazon Web Services charges, based off of the predefined pricing plan computation.

INSERT INTO aws.billingconductor.billing_groups (
Name,
AccountGrouping,
ComputationPreference,
PrimaryAccountId,
Description,
Tags,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ Name }}',
'{{ AccountGrouping }}' /* required */,
'{{ ComputationPreference }}' /* required */,
'{{ PrimaryAccountId }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn
;

UPDATE examples

This updates an existing billing group.

UPDATE aws.billingconductor.billing_groups
SET
Arn = '{{ Arn }}',
Name = '{{ Name }}',
Status = '{{ Status }}',
ComputationPreference = '{{ ComputationPreference }}',
Description = '{{ Description }}',
AccountGrouping = '{{ AccountGrouping }}'
WHERE
region = '{{ region }}' --required
RETURNING
account_grouping,
arn,
description,
last_modified_time,
name,
pricing_plan_arn,
primary_account_id,
size,
status,
status_reason;

DELETE examples

Deletes a billing group.

DELETE FROM aws.billingconductor.billing_groups
WHERE region = '{{ region }}' --required
;