Skip to main content

invoice_units

Creates, updates, deletes, gets or lists an invoice_units resource.

Overview

Nameinvoice_units
TypeResource
Idaws.invoicing.invoice_units

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe assigned description for an invoice unit. (pattern: <code>[\S\s]*</code>)
invoice_receiverstringThe Amazon Web Services account ID chosen to be the receiver of an invoice unit. All invoices generated for that invoice unit will be sent to this account ID. (pattern: <code>\d{12}</code>)
invoice_unit_arnstringThe ARN to identify an invoice unit. This information can't be modified or deleted. (pattern: <code>arn:aws[-a-z0-9]:[a-z0-9]+:[-a-z0-9]:[0-9]{12}:[-a-zA-Z0-9/:_]+</code>)
last_modifiedstring (date-time)The most recent date the invoice unit response was updated.
namestringThe unique name of the invoice unit that is shown on the generated invoice. (pattern: <code>(?! )[\p{L}\p{N}\p{Z}-_]*(?<! )</code>)
ruleobjectThis is used to categorize the invoice unit. Values are Amazon Web Services account IDs. Currently, the only supported rule is LINKED_ACCOUNT.
tax_inheritance_disabledbooleanWhether the invoice unit based tax inheritance is/ should be enabled or disabled.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_invoice_unitselectregionThis retrieves the invoice unit definition.
list_invoice_unitsselectregionThis fetches a list of all invoice unit definitions for a given account, as of the provided AsOf date.
create_invoice_unitinsertregion, InvoiceReceiverThis creates a new invoice unit with the provided definition.
update_invoice_unitupdateregion, InvoiceUnitArnYou can update the invoice unit configuration at any time, and Amazon Web Services will use the latest configuration at the end of the month.
delete_invoice_unitdeleteregionThis deletes an invoice unit with the provided invoice unit ARN.

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)

SELECT examples

This retrieves the invoice unit definition.

SELECT
description,
invoice_receiver,
invoice_unit_arn,
last_modified,
name,
rule,
tax_inheritance_disabled
FROM aws.invoicing.invoice_units
WHERE region = '{{ region }}' -- required
;

INSERT examples

This creates a new invoice unit with the provided definition.

INSERT INTO aws.invoicing.invoice_units (
Name,
InvoiceReceiver,
Description,
TaxInheritanceDisabled,
Rule,
ResourceTags,
ClientToken,
region
)
SELECT
'{{ Name }}',
'{{ InvoiceReceiver }}' /* required */,
'{{ Description }}',
{{ TaxInheritanceDisabled }},
'{{ Rule }}',
'{{ ResourceTags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
invoice_unit_arn
;

UPDATE examples

You can update the invoice unit configuration at any time, and Amazon Web Services will use the latest configuration at the end of the month.

UPDATE aws.invoicing.invoice_units
SET
InvoiceUnitArn = '{{ InvoiceUnitArn }}',
Description = '{{ Description }}',
TaxInheritanceDisabled = {{ TaxInheritanceDisabled }},
Rule = '{{ Rule }}',
ClientToken = '{{ ClientToken }}'
WHERE
region = '{{ region }}' --required
AND InvoiceUnitArn = '{{ InvoiceUnitArn }}' --required
RETURNING
invoice_unit_arn;

DELETE examples

This deletes an invoice unit with the provided invoice unit ARN.

DELETE FROM aws.invoicing.invoice_units
WHERE region = '{{ region }}' --required
;