invoice_units
Creates, updates, deletes or gets an invoice_unit resource or lists invoice_units in a region
Overview
| Name | invoice_units |
| Type | Resource |
| Description | An 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. |
| Id | aws.invoicing.invoice_units |
Fields
| Name | Datatype | Description |
|---|---|---|
invoice_unit_arn | string | |
invoice_receiver | string | |
name | string | |
description | string | |
tax_inheritance_disabled | boolean | |
rule | object | |
last_modified | number | |
resource_tags | array | |
region | string | AWS region. |
For more information, see AWS::Invoicing::InvoiceUnit.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | InvoiceReceiver, Name, Rule, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.invoicing.invoice_units (
InvoiceReceiver,
Name,
Rule,
region
)
SELECT
'{{ InvoiceReceiver }}',
'{{ Name }}',
'{{ Rule }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.invoicing.invoice_units (
InvoiceReceiver,
Name,
Description,
TaxInheritanceDisabled,
Rule,
ResourceTags,
region
)
SELECT
'{{ InvoiceReceiver }}',
'{{ Name }}',
'{{ Description }}',
'{{ TaxInheritanceDisabled }}',
'{{ Rule }}',
'{{ ResourceTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: invoice_unit
props:
- name: InvoiceReceiver
value: '{{ InvoiceReceiver }}'
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: TaxInheritanceDisabled
value: '{{ TaxInheritanceDisabled }}'
- name: Rule
value:
LinkedAccounts:
- '{{ LinkedAccounts[0] }}'
- name: ResourceTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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