Skip to main content

billing_groups

Creates, updates, deletes or gets a billing_group resource or lists billing_groups in a region

Overview

Namebilling_groups
TypeResource
DescriptionA billing group is a set of linked account which belong to the same end customer. It can be seen as a virtual consolidated billing family.
Idaws.billingconductor.billing_groups

Fields

NameDatatypeDescription
arnstringBilling Group ARN
namestring
descriptionstring
primary_account_idstringThis account will act as a virtual payer account of the billing group
computation_preferenceobject
account_groupingobject
sizeintegerNumber of accounts in the billing group
statusstring
status_reasonstring
creation_timeintegerCreation timestamp in UNIX epoch time format
last_modified_timeintegerLatest modified timestamp in UNIX epoch time format
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, AccountGrouping, PrimaryAccountId, ComputationPreference, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all billing_groups in a region.

SELECT
region,
arn,
name,
description,
primary_account_id,
computation_preference,
account_grouping,
size,
status,
status_reason,
creation_time,
last_modified_time,
tags
FROM aws.billingconductor.billing_groups
WHERE region = 'us-east-1';

Gets all properties from an individual billing_group.

SELECT
region,
arn,
name,
description,
primary_account_id,
computation_preference,
account_grouping,
size,
status,
status_reason,
creation_time,
last_modified_time,
tags
FROM aws.billingconductor.billing_groups
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new billing_group resource, using stack-deploy.

/*+ create */
INSERT INTO aws.billingconductor.billing_groups (
Name,
PrimaryAccountId,
ComputationPreference,
AccountGrouping,
region
)
SELECT
'{{ Name }}',
'{{ PrimaryAccountId }}',
'{{ ComputationPreference }}',
'{{ AccountGrouping }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.billingconductor.billing_groups
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the billing_groups resource, the following permissions are required:

Create

billingconductor:CreateBillingGroup,
billingconductor:AssociateAccounts,
billingconductor:ListBillingGroups,
billingconductor:TagResource,
billingconductor:ListTagsForResource

Read

billingconductor:ListBillingGroups,
billingconductor:ListAccountAssociations,
organizations:ListAccounts,
billingconductor:ListTagsForResource

List

billingconductor:ListBillingGroups,
billingconductor:ListAccountAssociations,
organizations:ListAccounts,
billingconductor:ListTagsForResource

Update

billingconductor:UpdateBillingGroup,
billingconductor:ListAccountAssociations,
organizations:ListAccounts,
billingconductor:AssociateAccounts,
billingconductor:DisassociateAccounts,
billingconductor:ListBillingGroups,
billingconductor:TagResource,
billingconductor:UntagResource

Delete

billingconductor:DeleteBillingGroup,
billingconductor:ListBillingGroups,
billingconductor:UntagResource,
billingconductor:UpdateBillingGroup