Skip to main content

invoice_units

Creates, updates, deletes or gets an invoice_unit resource or lists invoice_units in a region

Overview

Nameinvoice_units
TypeResource
DescriptionAn invoice unit is a set of mutually exclusive accounts that correspond to your business entity. Invoice units allow you to separate AWS account costs and configures your invoice for each business entity.
Idaws.invoicing.invoice_units

Fields

NameDatatypeDescription
invoice_unit_arnstring
invoice_receiverstring
namestring
descriptionstring
tax_inheritance_disabledboolean
ruleobject
last_modifiednumber
resource_tagsarray
regionstringAWS region.

For more information, see AWS::Invoicing::InvoiceUnit.

Methods

NameAccessible byRequired Params
create_resourceINSERTInvoiceReceiver, Name, Rule, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all invoice_units in a region.

SELECT
region,
invoice_unit_arn,
invoice_receiver,
name,
description,
tax_inheritance_disabled,
rule,
last_modified,
resource_tags
FROM aws.invoicing.invoice_units
WHERE region = 'us-east-1';

Gets all properties from an individual invoice_unit.

SELECT
region,
invoice_unit_arn,
invoice_receiver,
name,
description,
tax_inheritance_disabled,
rule,
last_modified,
resource_tags
FROM aws.invoicing.invoice_units
WHERE region = 'us-east-1' AND data__Identifier = '<InvoiceUnitArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.invoicing.invoice_units (
InvoiceReceiver,
Name,
Rule,
region
)
SELECT
'{{ InvoiceReceiver }}',
'{{ Name }}',
'{{ Rule }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.invoicing.invoice_units
WHERE data__Identifier = '<InvoiceUnitArn>'
AND region = 'us-east-1';

Permissions

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

Create

invoicing:CreateInvoiceUnit,
invoicing:TagResource

Read

invoicing:GetInvoiceUnit,
invoicing:ListTagsForResource

Update

invoicing:UpdateInvoiceUnit,
invoicing:UntagResource,
invoicing:TagResource

Delete

invoicing:DeleteInvoiceUnit

List

invoicing:ListInvoiceUnits