AWS Invoicing

2025/11/19 - AWS Invoicing - 4 updated api methods

Changes  Add support for adding Billing transfers in Invoice configuration

CreateInvoiceUnit (updated) Link ¶
Changes (request)
{'Rule': {'BillSourceAccounts': ['string']}}

This creates a new invoice unit with the provided definition.

See also: AWS API Documentation

Request Syntax

client.create_invoice_unit(
    Name='string',
    InvoiceReceiver='string',
    Description='string',
    TaxInheritanceDisabled=True|False,
    Rule={
        'LinkedAccounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    },
    ResourceTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type Name:

string

param Name:

[REQUIRED]

The unique name of the invoice unit that is shown on the generated invoice. This can't be changed once it is set. To change this name, you must delete the invoice unit recreate.

type InvoiceReceiver:

string

param InvoiceReceiver:

[REQUIRED]

The 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.

type Description:

string

param Description:

The invoice unit's description. This can be changed at a later time.

type TaxInheritanceDisabled:

boolean

param TaxInheritanceDisabled:

Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

type Rule:

dict

param Rule:

[REQUIRED]

The InvoiceUnitRule object used to create invoice units.

  • LinkedAccounts (list) --

    The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

    • (string) --

  • BillSourceAccounts (list) --

    A list of Amazon Web Services account account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

    • (string) --

type ResourceTags:

list

param ResourceTags:

The tag structure that contains a tag key and value.

  • (dict) --

    The tag structure that contains a tag key and value.

    • Key (string) -- [REQUIRED]

      The object key of your of your resource tag.

    • Value (string) -- [REQUIRED]

      The specific value of the resource tag.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.

GetInvoiceUnit (updated) Link ¶
Changes (response)
{'Rule': {'BillSourceAccounts': ['string']}}

This retrieves the invoice unit definition.

See also: AWS API Documentation

Request Syntax

client.get_invoice_unit(
    InvoiceUnitArn='string',
    AsOf=datetime(2015, 1, 1)
)
type InvoiceUnitArn:

string

param InvoiceUnitArn:

[REQUIRED]

The ARN to identify an invoice unit. This information can't be modified or deleted.

type AsOf:

datetime

param AsOf:

The state of an invoice unit at a specified time. You can see legacy invoice units that are currently deleted if the AsOf time is set to before it was deleted. If an AsOf is not provided, the default value is the current time.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string',
    'InvoiceReceiver': 'string',
    'Name': 'string',
    'Description': 'string',
    'TaxInheritanceDisabled': True|False,
    'Rule': {
        'LinkedAccounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    },
    'LastModified': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.

    • InvoiceReceiver (string) --

      The 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.

    • Name (string) --

      The unique name of the invoice unit that is shown on the generated invoice.

    • Description (string) --

      The assigned description for an invoice unit.

    • TaxInheritanceDisabled (boolean) --

      Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

    • Rule (dict) --

      This is used to categorize the invoice unit. Values are Amazon Web Services account IDs. Currently, the only supported rule is LINKED_ACCOUNT.

      • LinkedAccounts (list) --

        The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

        • (string) --

      • BillSourceAccounts (list) --

        A list of Amazon Web Services account account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

        • (string) --

    • LastModified (datetime) --

      The most recent date the invoice unit response was updated.

ListInvoiceUnits (updated) Link ¶
Changes (request, response)
Request
{'Filters': {'BillSourceAccounts': ['string']}}
Response
{'InvoiceUnits': {'Rule': {'BillSourceAccounts': ['string']}}}

This fetches a list of all invoice unit definitions for a given account, as of the provided AsOf date.

See also: AWS API Documentation

Request Syntax

client.list_invoice_units(
    Filters={
        'Names': [
            'string',
        ],
        'InvoiceReceivers': [
            'string',
        ],
        'Accounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    },
    NextToken='string',
    MaxResults=123,
    AsOf=datetime(2015, 1, 1)
)
type Filters:

dict

param Filters:

An optional input to the list API. If multiple filters are specified, the returned list will be a configuration that match all of the provided filters. Supported filter types are InvoiceReceivers, Names, and Accounts.

  • Names (list) --

    An optional input to the list API. You can specify a list of invoice unit names inside filters to return invoice units that match only the specified invoice unit names. If multiple names are provided, the result is an OR condition (match any) of the specified invoice unit names.

    • (string) --

  • InvoiceReceivers (list) --

    You can specify a list of Amazon Web Services account IDs inside filters to return invoice units that match only the specified accounts. If multiple accounts are provided, the result is an OR condition (match any) of the specified accounts. This filter only matches the specified accounts on the invoice receivers of the invoice units.

    • (string) --

  • Accounts (list) --

    You can specify a list of Amazon Web Services account IDs inside filters to return invoice units that match only the specified accounts. If multiple accounts are provided, the result is an OR condition (match any) of the specified accounts. The specified account IDs are matched with either the receiver or the linked accounts in the rules.

    • (string) --

  • BillSourceAccounts (list) --

    A list of Amazon Web Services account account IDs used to filter invoice units. These are payer accounts from other Organizations that have delegated their billing responsibility to the receiver account through the billing transfer feature.

    • (string) --

type NextToken:

string

param NextToken:

The next token used to indicate where the returned list should start from.

type MaxResults:

integer

param MaxResults:

The maximum number of invoice units that can be returned.

type AsOf:

datetime

param AsOf:

The state of an invoice unit at a specified time. You can see legacy invoice units that are currently deleted if the AsOf time is set to before it was deleted. If an AsOf is not provided, the default value is the current time.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnits': [
        {
            'InvoiceUnitArn': 'string',
            'InvoiceReceiver': 'string',
            'Name': 'string',
            'Description': 'string',
            'TaxInheritanceDisabled': True|False,
            'Rule': {
                'LinkedAccounts': [
                    'string',
                ],
                'BillSourceAccounts': [
                    'string',
                ]
            },
            'LastModified': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnits (list) --

      An invoice unit is a set of mutually exclusive accounts that correspond to your business entity.

      • (dict) --

        An invoice unit is a set of mutually exclusive accounts that correspond to your business entity. Invoice units allow you separate Amazon Web Services account costs and configures your invoice for each business entity going forward.

        • InvoiceUnitArn (string) --

          ARN to identify an invoice unit. This information can't be modified or deleted.

        • InvoiceReceiver (string) --

          The account that receives invoices related to the invoice unit.

        • Name (string) --

          A unique name that is distinctive within your Amazon Web Services.

        • Description (string) --

          The assigned description for an invoice unit. This information can't be modified or deleted.

        • TaxInheritanceDisabled (boolean) --

          Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

        • Rule (dict) --

          An InvoiceUnitRule object used the categorize invoice units.

          • LinkedAccounts (list) --

            The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

            • (string) --

          • BillSourceAccounts (list) --

            A list of Amazon Web Services account account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

            • (string) --

        • LastModified (datetime) --

          The last time the invoice unit was updated. This is important to determine the version of invoice unit configuration used to create the invoices. Any invoice created after this modified time will use this invoice unit configuration.

    • NextToken (string) --

      The next token used to indicate where the returned list should start from.

UpdateInvoiceUnit (updated) Link ¶
Changes (request)
{'Rule': {'BillSourceAccounts': ['string']}}

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.

See also: AWS API Documentation

Request Syntax

client.update_invoice_unit(
    InvoiceUnitArn='string',
    Description='string',
    TaxInheritanceDisabled=True|False,
    Rule={
        'LinkedAccounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    }
)
type InvoiceUnitArn:

string

param InvoiceUnitArn:

[REQUIRED]

The ARN to identify an invoice unit. This information can't be modified or deleted.

type Description:

string

param Description:

The assigned description for an invoice unit. This information can't be modified or deleted.

type TaxInheritanceDisabled:

boolean

param TaxInheritanceDisabled:

Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

type Rule:

dict

param Rule:

The InvoiceUnitRule object used to update invoice units.

  • LinkedAccounts (list) --

    The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

    • (string) --

  • BillSourceAccounts (list) --

    A list of Amazon Web Services account account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.