AWSBillingConductor

2023/07/25 - AWSBillingConductor - 3 updated api methods

Changes  Added support for Auto-Assocate Billing Groups for CreateBillingGroup, UpdateBillingGroup, and ListBillingGroups.

CreateBillingGroup (updated) Link ¶
Changes (request)
{'AccountGrouping': {'AutoAssociate': 'boolean'}}

Creates a billing group that resembles a consolidated billing family that Amazon Web Services charges, based off of the predefined pricing plan computation.

See also: AWS API Documentation

Request Syntax

client.create_billing_group(
    ClientToken='string',
    Name='string',
    AccountGrouping={
        'LinkedAccountIds': [
            'string',
        ],
        'AutoAssociate': True|False
    },
    ComputationPreference={
        'PricingPlanArn': 'string'
    },
    PrimaryAccountId='string',
    Description='string',
    Tags={
        'string': 'string'
    }
)
type ClientToken

string

param ClientToken

The token that is needed to support idempotency. Idempotency isn't currently supported, but will be implemented in a future update.

This field is autopopulated if not provided.

type Name

string

param Name

[REQUIRED]

The billing group name. The names must be unique.

type AccountGrouping

dict

param AccountGrouping

[REQUIRED]

The set of accounts that will be under the billing group. The set of accounts resemble the linked accounts in a consolidated billing family.

  • LinkedAccountIds (list) -- [REQUIRED]

    The account IDs that make up the billing group. Account IDs must be a part of the consolidated billing family, and not associated with another billing group.

    • (string) --

  • AutoAssociate (boolean) --

    Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

type ComputationPreference

dict

param ComputationPreference

[REQUIRED]

The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

  • PricingPlanArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the pricing plan that's used to compute the Amazon Web Services charges for a billing group.

type PrimaryAccountId

string

param PrimaryAccountId

The account ID that serves as the main account in a billing group.

type Description

string

param Description

The description of the billing group.

type Tags

dict

param Tags

A map that contains tag keys and tag values that are attached to a billing group. This feature isn't available during the beta.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the created billing group.

ListBillingGroups (updated) Link ¶
Changes (request, response)
Request
{'Filters': {'AutoAssociate': 'boolean'}}
Response
{'BillingGroups': {'AccountGrouping': {'AutoAssociate': 'boolean'}}}

A paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.

See also: AWS API Documentation

Request Syntax

client.list_billing_groups(
    BillingPeriod='string',
    MaxResults=123,
    NextToken='string',
    Filters={
        'Arns': [
            'string',
        ],
        'PricingPlan': 'string',
        'Statuses': [
            'ACTIVE'|'PRIMARY_ACCOUNT_MISSING',
        ],
        'AutoAssociate': True|False
    }
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period to get billing groups.

type MaxResults

integer

param MaxResults

The maximum number of billing groups to retrieve.

type NextToken

string

param NextToken

The pagination token that's used on subsequent calls to get billing groups.

type Filters

dict

param Filters

A ListBillingGroupsFilter that specifies the billing group and pricing plan to retrieve billing group information.

  • Arns (list) --

    The list of billing group Amazon Resource Names (ARNs) to retrieve information.

    • (string) --

  • PricingPlan (string) --

    The pricing plan Amazon Resource Names (ARNs) to retrieve information.

  • Statuses (list) --

    A list of billing groups to retrieve their current status for a specific time range

    • (string) --

  • AutoAssociate (boolean) --

    Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

rtype

dict

returns

Response Syntax

{
    'BillingGroups': [
        {
            'Name': 'string',
            'Arn': 'string',
            'Description': 'string',
            'PrimaryAccountId': 'string',
            'ComputationPreference': {
                'PricingPlanArn': 'string'
            },
            'Size': 123,
            'CreationTime': 123,
            'LastModifiedTime': 123,
            'Status': 'ACTIVE'|'PRIMARY_ACCOUNT_MISSING',
            'StatusReason': 'string',
            'AccountGrouping': {
                'AutoAssociate': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingGroups (list) --

      A list of BillingGroupListElement retrieved.

      • (dict) --

        A representation of a billing group.

        • Name (string) --

          The name of the billing group.

        • Arn (string) --

          The Amazon Resource Number (ARN) that can be used to uniquely identify the billing group.

        • Description (string) --

          The description of the billing group.

        • PrimaryAccountId (string) --

          The account ID that serves as the main account in a billing group.

        • ComputationPreference (dict) --

          The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

          • PricingPlanArn (string) --

            The Amazon Resource Name (ARN) of the pricing plan that's used to compute the Amazon Web Services charges for a billing group.

        • Size (integer) --

          The number of accounts in the particular billing group.

        • CreationTime (integer) --

          The time when the billing group was created.

        • LastModifiedTime (integer) --

          The most recent time when the billing group was modified.

        • Status (string) --

          The billing group status. Only one of the valid values can be used.

        • StatusReason (string) --

          The reason why the billing group is in its current status.

        • AccountGrouping (dict) --

          Specifies if the billing group has automatic account association (AutoAssociate ) enabled.

          • AutoAssociate (boolean) --

            Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

    • NextToken (string) --

      The pagination token that's used on subsequent calls to get billing groups.

UpdateBillingGroup (updated) Link ¶
Changes (both)
{'AccountGrouping': {'AutoAssociate': 'boolean'}}

This updates an existing billing group.

See also: AWS API Documentation

Request Syntax

client.update_billing_group(
    Arn='string',
    Name='string',
    Status='ACTIVE'|'PRIMARY_ACCOUNT_MISSING',
    ComputationPreference={
        'PricingPlanArn': 'string'
    },
    Description='string',
    AccountGrouping={
        'AutoAssociate': True|False
    }
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the billing group being updated.

type Name

string

param Name

The name of the billing group. The names must be unique to each billing group.

type Status

string

param Status

The status of the billing group. Only one of the valid values can be used.

type ComputationPreference

dict

param ComputationPreference

The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

  • PricingPlanArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the pricing plan that's used to compute the Amazon Web Services charges for a billing group.

type Description

string

param Description

A description of the billing group.

type AccountGrouping

dict

param AccountGrouping

Specifies if the billing group has automatic account association (AutoAssociate ) enabled.

  • AutoAssociate (boolean) --

    Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'PrimaryAccountId': 'string',
    'PricingPlanArn': 'string',
    'Size': 123,
    'LastModifiedTime': 123,
    'Status': 'ACTIVE'|'PRIMARY_ACCOUNT_MISSING',
    'StatusReason': 'string',
    'AccountGrouping': {
        'AutoAssociate': True|False
    }
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the billing group that was updated.

    • Name (string) --

      The name of the billing group. The names must be unique to each billing group.

    • Description (string) --

      A description of the billing group.

    • PrimaryAccountId (string) --

      The account ID that serves as the main account in a billing group.

    • PricingPlanArn (string) --

      The Amazon Resource Name (ARN) of the pricing plan to compute Amazon Web Services charges for the billing group.

    • Size (integer) --

      The number of accounts in the particular billing group.

    • LastModifiedTime (integer) --

      The most recent time when the billing group was modified.

    • Status (string) --

      The status of the billing group. Only one of the valid values can be used.

    • StatusReason (string) --

      The reason why the billing group is in its current status.

    • AccountGrouping (dict) --

      Specifies if the billing group has automatic account association (AutoAssociate ) enabled.

      • AutoAssociate (boolean) --

        Specifies if this billing group will automatically associate newly added Amazon Web Services accounts that join your consolidated billing family.