AWSBillingConductor

2022/03/16 - AWSBillingConductor - 30 new api methods

Changes  This is the initial SDK release for AWS Billing Conductor. The AWS Billing Conductor is a customizable billing service, allowing you to customize your billing data to match your desired business structure.

ListAccountAssociations (new) Link ¶
  • Amazon Web Services Billing Conductor is in beta release and is subject to change. Your use of Amazon Web Services Billing Conductor is subject to the Beta Service Participation terms of the `Amazon Web Services Service Terms <https://aws.amazon.com/service-terms/>`__ (Section 1.10). *

This is a paginated call to list linked accounts that are linked to the payer account for the specified time period. If no information is provided, the current billing period is used. The response will optionally include the billing group associated with the linked account.

See also: AWS API Documentation

Request Syntax

client.list_account_associations(
    BillingPeriod='string',
    Filters={
        'Association': 'string',
        'AccountId': 'string'
    },
    NextToken='string'
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period to get account associations.

type Filters

dict

param Filters

The filter on the account ID of the linked account, or any of the following:

MONITORED : linked accounts that are associated to billing groups.

UNMONITORED : linked accounts that are not associated to billing groups.

Billing Group Arn : linked accounts that are associated to the provided billing group Arn.

  • Association (string) --

    MONITORED : linked accounts that are associated to billing groups.

    UNMONITORED : linked accounts that are not associated to billing groups.

    Billing Group Arn : linked accounts that are associated to the provided Billing Group Arn.

  • AccountId (string) --

    The Amazon Web Services account ID to filter on.

type NextToken

string

param NextToken

The pagination token used on subsequent calls to retrieve accounts.

rtype

dict

returns

Response Syntax

{
    'LinkedAccounts': [
        {
            'AccountId': 'string',
            'BillingGroupArn': 'string',
            'AccountName': 'string',
            'AccountEmail': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LinkedAccounts (list) --

      The list of linked accounts in the payer account.

      • (dict) --

        • Amazon Web Services Billing Conductor is in beta release and is subject to change. Your use of Amazon Web Services Billing Conductor is subject to the Beta Service Participation terms of the `Amazon Web Services Service Terms <https://aws.amazon.com/service-terms/>`__ (Section 1.10). *

        A representation of a linked account.

        • AccountId (string) --

          The associating array of account IDs.

        • BillingGroupArn (string) --

          The Billing Group Arn that the linked account is associated to.

        • AccountName (string) --

          The Amazon Web Services account name.

        • AccountEmail (string) --

          The Amazon Web Services account email.

    • NextToken (string) --

      The pagination token used on subsequent calls to get accounts.

TagResource (new) Link ¶

Associates the specified tags to a resource with the specified resourceArn . If existing tags on a resource are not specified in the request parameters, they are not changed.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to which to add tags.

type Tags

dict

param Tags

[REQUIRED]

The tags to add to the resource as a list of key-value pairs.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

BatchAssociateResourcesToCustomLineItem (new) Link ¶

Associates a batch of resources to a percentage custom line item.

See also: AWS API Documentation

Request Syntax

client.batch_associate_resources_to_custom_line_item(
    TargetArn='string',
    ResourceArns=[
        'string',
    ],
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
type TargetArn

string

param TargetArn

[REQUIRED]

A percentage custom line item ARN to associate the resources to.

type ResourceArns

list

param ResourceArns

[REQUIRED]

A list containing the ARNs of the resources to be associated.

  • (string) --

type BillingPeriodRange

dict

param BillingPeriodRange

The billing period range in which the custom line item request will be applied.

  • InclusiveStartBillingPeriod (string) -- [REQUIRED]

    The inclusive start billing period that defines a billing period range where a custom line is applied.

  • ExclusiveEndBillingPeriod (string) -- [REQUIRED]

    The inclusive end billing period that defines a billing period range where a custom line is applied.

rtype

dict

returns

Response Syntax

{
    'SuccessfullyAssociatedResources': [
        {
            'Arn': 'string',
            'Error': {
                'Message': 'string',
                'Reason': 'INVALID_ARN'|'SERVICE_LIMIT_EXCEEDED'|'ILLEGAL_CUSTOMLINEITEM'|'INTERNAL_SERVER_EXCEPTION'
            }
        },
    ],
    'FailedAssociatedResources': [
        {
            'Arn': 'string',
            'Error': {
                'Message': 'string',
                'Reason': 'INVALID_ARN'|'SERVICE_LIMIT_EXCEEDED'|'ILLEGAL_CUSTOMLINEITEM'|'INTERNAL_SERVER_EXCEPTION'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfullyAssociatedResources (list) --

      A list of AssociateResourceResponseElement for each resource that's been associated to a percentage custom line item successfully.

      • (dict) --

        A resource association result for a percentage custom line item.

        • Arn (string) --

          The resource ARN that was associated to the custom line item.

        • Error (dict) --

          An AssociateResourceError that will populate if the resource association fails.

          • Message (string) --

            The reason the resource association failed.

          • Reason (string) --

            A static error code that used to classify the type of failure.

    • FailedAssociatedResources (list) --

      A list of AssociateResourceResponseElement for each resource that failed association to a percentage custom line item.

      • (dict) --

        A resource association result for a percentage custom line item.

        • Arn (string) --

          The resource ARN that was associated to the custom line item.

        • Error (dict) --

          An AssociateResourceError that will populate if the resource association fails.

          • Message (string) --

            The reason the resource association failed.

          • Reason (string) --

            A static error code that used to classify the type of failure.

ListPricingPlansAssociatedWithPricingRule (new) Link ¶

A list of the pricing plans associated with a pricing rule.

See also: AWS API Documentation

Request Syntax

client.list_pricing_plans_associated_with_pricing_rule(
    BillingPeriod='string',
    PricingRuleArn='string',
    MaxResults=123,
    NextToken='string'
)
type BillingPeriod

string

param BillingPeriod

The pricing plan billing period for which associations will be listed.

type PricingRuleArn

string

param PricingRuleArn

[REQUIRED]

The pricing rule Amazon Resource Name (ARN) for which associations will be listed.

type MaxResults

integer

param MaxResults

The optional maximum number of pricing rule associations to retrieve.

type NextToken

string

param NextToken

The optional pagination token returned by a previous call.

rtype

dict

returns

Response Syntax

{
    'BillingPeriod': 'string',
    'PricingRuleArn': 'string',
    'PricingPlanArns': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingPeriod (string) --

      The pricing plan billing period for which associations will be listed.

    • PricingRuleArn (string) --

      The pricing rule Amazon Resource Name (ARN) for which associations will be listed.

    • PricingPlanArns (list) --

      The list containing pricing plans associated with the requested pricing rule.

      • (string) --

    • NextToken (string) --

      The pagination token to be used on subsequent calls.

ListTagsForResource (new) Link ¶

A list the tags for a resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) that identifies the resource to list the tags.

rtype

dict

returns

Response Syntax

{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Tags (dict) --

      The tags for the resource.

      • (string) --

        • (string) --

DisassociatePricingRules (new) Link ¶

Disassociates a list of pricing rules from a pricing plan.

See also: AWS API Documentation

Request Syntax

client.disassociate_pricing_rules(
    Arn='string',
    PricingRuleArns=[
        'string',
    ]
)
type Arn

string

param Arn

[REQUIRED]

The pricing plan Amazon Resource Name (ARN) to disassociate pricing rules from.

type PricingRuleArns

list

param PricingRuleArns

[REQUIRED]

A list containing the Amazon Resource Name (ARN) of the pricing rules that will be disassociated.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the pricing plan that the pricing rules successfully disassociated from.

UpdateBillingGroup (new) Link ¶

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'
)
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 used to compute the Amazon Web Services charges for a billing group.

type Description

string

param Description

A description of the billing group.

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'
}

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

CreateCustomLineItem (new) Link ¶

Creates a custom line item that can be used to create a one-time fixed charge that can be applied to a single billing group for the current or previous billing period. The one-time fixed charge is either a fee or discount.

See also: AWS API Documentation

Request Syntax

client.create_custom_line_item(
    ClientToken='string',
    Name='string',
    Description='string',
    BillingGroupArn='string',
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    },
    Tags={
        'string': 'string'
    },
    ChargeDetails={
        'Flat': {
            'ChargeValue': 123.0
        },
        'Percentage': {
            'PercentageValue': 123.0,
            'AssociatedValues': [
                'string',
            ]
        },
        'Type': 'CREDIT'|'FEE'
    }
)
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 name of the custom line item.

type Description

string

param Description

[REQUIRED]

The description of the custom line item. This is shown on the Bills page in association with the charge value.

type BillingGroupArn

string

param BillingGroupArn

[REQUIRED]

The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

type BillingPeriodRange

dict

param BillingPeriodRange

A time range for which the custom line item is effective.

  • InclusiveStartBillingPeriod (string) -- [REQUIRED]

    The inclusive start billing period that defines a billing period range where a custom line is applied.

  • ExclusiveEndBillingPeriod (string) -- [REQUIRED]

    The inclusive end billing period that defines a billing period range where a custom line is applied.

type Tags

dict

param Tags

A map that contains tag keys and tag values that are attached to a custom line item.

  • (string) --

    • (string) --

type ChargeDetails

dict

param ChargeDetails

[REQUIRED]

A CustomLineItemChargeDetails that describes the charge details for a custom line item.

  • Flat (dict) --

    A CustomLineItemFlatChargeDetails that describes the charge details of a flat custom line item.

    • ChargeValue (float) -- [REQUIRED]

      The custom line item's fixed charge value in USD.

  • Percentage (dict) --

    A CustomLineItemPercentageChargeDetails that describes the charge details of a percentage custom line item.

    • PercentageValue (float) -- [REQUIRED]

      The custom line item's percentage value. This will be multiplied against the combined value of its associated resources to determine its charge value.

    • AssociatedValues (list) --

      A list of resource ARNs to associate to the percentage custom line item.

      • (string) --

  • Type (string) -- [REQUIRED]

    The type of the custom line item that indicates whether the charge is a fee or credit.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the created custom line item.

DeletePricingPlan (new) Link ¶

Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully.

See also: AWS API Documentation

Request Syntax

client.delete_pricing_plan(
    Arn='string'
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the pricing plan you're deleting.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the deleted pricing plan.

AssociatePricingRules (new) Link ¶

Connects an array of PricingRuleArns to a defined PricingPlan . The maximum number PricingRuleArn that can be associated in one call is 30.

See also: AWS API Documentation

Request Syntax

client.associate_pricing_rules(
    Arn='string',
    PricingRuleArns=[
        'string',
    ]
)
type Arn

string

param Arn

[REQUIRED]

The PricingPlanArn that the PricingRuleArns are associated with.

type PricingRuleArns

list

param PricingRuleArns

[REQUIRED]

The PricingRuleArns that are associated with the Pricing Plan.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The PricingPlanArn that the PricingRuleArns are associated with.

CreatePricingPlan (new) Link ¶

Creates a pricing plan that is used for computing Amazon Web Services charges for billing groups.

See also: AWS API Documentation

Request Syntax

client.create_pricing_plan(
    ClientToken='string',
    Name='string',
    Description='string',
    PricingRuleArns=[
        '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 pricing plan name. The names must be unique to each pricing plan.

type Description

string

param Description

The pricing plan description.

type PricingRuleArns

list

param PricingRuleArns

A list of Amazon Resource Names (ARNs) that define the pricing plan parameters.

  • (string) --

type Tags

dict

param Tags

A map that contains tag keys and tag values that are attached to a pricing plan.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the created pricing plan.

UpdatePricingRule (new) Link ¶

Updates an existing pricing rule.

See also: AWS API Documentation

Request Syntax

client.update_pricing_rule(
    Arn='string',
    Name='string',
    Description='string',
    Type='MARKUP'|'DISCOUNT',
    ModifierPercentage=123.0
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the pricing rule to update.

type Name

string

param Name

The new name of the pricing rule. The name must be unique to each pricing rule.

type Description

string

param Description

The new description for the pricing rule.

type Type

string

param Type

The new pricing rule type.

type ModifierPercentage

float

param ModifierPercentage

The new modifier to show pricing plan rates as a percentage.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'Scope': 'GLOBAL'|'SERVICE',
    'Type': 'MARKUP'|'DISCOUNT',
    'ModifierPercentage': 123.0,
    'Service': 'string',
    'AssociatedPricingPlanCount': 123,
    'LastModifiedTime': 123
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the successfully updated pricing rule.

    • Name (string) --

      The new name of the pricing rule. The name must be unique to each pricing rule.

    • Description (string) --

      The new description for the pricing rule.

    • Scope (string) --

      The scope of pricing rule that indicates if it is globally applicable, or is service-specific.

    • Type (string) --

      The new pricing rule type.

    • ModifierPercentage (float) --

      The new modifier to show pricing plan rates as a percentage.

    • Service (string) --

      If the Scope attribute is set to SERVICE , the attribute indicates which service the PricingRule is applicable for.

    • AssociatedPricingPlanCount (integer) --

      The pricing plans count that this pricing rule is associated with.

    • LastModifiedTime (integer) --

      The most recent time the pricing rule was modified.

ListBillingGroups (new) Link ¶

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'
    }
)
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 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.

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'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingGroups (list) --

      A list of BillingGroupListElement retrieved.

      • (dict) --

        A representation of a billing group.

        • Name (string) --

          The billing group's name.

        • Arn (string) --

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

        • Description (string) --

          The billing group description.

        • 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 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 the billing group was created.

        • LastModifiedTime (integer) --

          The most recent time 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.

    • NextToken (string) --

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

ListResourcesAssociatedToCustomLineItem (new) Link ¶

List the resources associated to a custom line item.

See also: AWS API Documentation

Request Syntax

client.list_resources_associated_to_custom_line_item(
    BillingPeriod='string',
    Arn='string',
    MaxResults=123,
    NextToken='string',
    Filters={
        'Relationship': 'PARENT'|'CHILD'
    }
)
type BillingPeriod

string

param BillingPeriod

The billing period for which the resource associations will be listed.

type Arn

string

param Arn

[REQUIRED]

The ARN of the custom line item for which the resource associations will be listed.

type MaxResults

integer

param MaxResults

(Optional) The maximum number of resource associations to be retrieved.

type NextToken

string

param NextToken

(Optional) The pagination token returned by a previous request.

type Filters

dict

param Filters

(Optional) A ListResourcesAssociatedToCustomLineItemFilter that can specify the types of resources that should be retrieved.

  • Relationship (string) --

    The type of relationship between the custom line item and the associated resource.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'AssociatedResources': [
        {
            'Arn': 'string',
            'Relationship': 'PARENT'|'CHILD'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The custom line item ARN for which the resource associations are listed.

    • AssociatedResources (list) --

      A list of ListResourcesAssociatedToCustomLineItemResponseElement for each resource association retrieved.

      • (dict) --

        A representation of a resource association for a custom line item.

        • Arn (string) --

          The ARN of the associated resource.

        • Relationship (string) --

          The type of relationship between the custom line item and the associated resource.

    • NextToken (string) --

      The pagination token to be used in subsequent requests to retrieve additional results.

ListCustomLineItems (new) Link ¶

A paginated call to get a list of all custom line items (FFLIs) for the given billing period. If you don't provide a billing period, the current billing period is used.

See also: AWS API Documentation

Request Syntax

client.list_custom_line_items(
    BillingPeriod='string',
    MaxResults=123,
    NextToken='string',
    Filters={
        'Names': [
            'string',
        ],
        'BillingGroups': [
            'string',
        ],
        'Arns': [
            'string',
        ]
    }
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period to get custom line items (FFLIs).

type MaxResults

integer

param MaxResults

The maximum number of billing groups to retrieve.

type NextToken

string

param NextToken

The pagination token used on subsequent calls to get custom line items (FFLIs).

type Filters

dict

param Filters

A ListCustomLineItemsFilter that specifies the custom line item names and/or billing group Amazon Resource Names (ARNs) to retrieve FFLI information.

  • Names (list) --

    A list of custom line items to retrieve information.

    • (string) --

  • BillingGroups (list) --

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

    • (string) --

  • Arns (list) --

    A list of custom line item ARNs to retrieve information.

    • (string) --

rtype

dict

returns

Response Syntax

{
    'CustomLineItems': [
        {
            'Arn': 'string',
            'Name': 'string',
            'ChargeDetails': {
                'Flat': {
                    'ChargeValue': 123.0
                },
                'Percentage': {
                    'PercentageValue': 123.0
                },
                'Type': 'CREDIT'|'FEE'
            },
            'CurrencyCode': 'USD'|'CNY',
            'Description': 'string',
            'ProductCode': 'string',
            'BillingGroupArn': 'string',
            'CreationTime': 123,
            'LastModifiedTime': 123,
            'AssociationSize': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CustomLineItems (list) --

      A list of FreeFormLineItemListElements received.

      • (dict) --

        A representation of a custom line item.

        • Arn (string) --

          The Amazon Resource Names (ARNs) for custom line items.

        • Name (string) --

          The custom line item's name.

        • ChargeDetails (dict) --

          A ListCustomLineItemChargeDetails that describes the charge details of a custom line item.

          • Flat (dict) --

            A ListCustomLineItemFlatChargeDetails that describes the charge details of a flat custom line item.

            • ChargeValue (float) --

              The custom line item's fixed charge value in USD.

          • Percentage (dict) --

            A ListCustomLineItemPercentageChargeDetails that describes the charge details of a percentage custom line item.

            • PercentageValue (float) --

              The custom line item's percentage value. This will be multiplied against the combined value of its associated resources to determine its charge value.

          • Type (string) --

            The type of the custom line item that indicates whether the charge is a fee or credit .

        • CurrencyCode (string) --

          The custom line item's charge value currency. Only one of the valid values can be used.

        • Description (string) --

          The custom line item's description. This is shown on the Bills page in association with the charge value.

        • ProductCode (string) --

          The product code associated with the custom line item.

        • BillingGroupArn (string) --

          The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

        • CreationTime (integer) --

          The time created.

        • LastModifiedTime (integer) --

          The most recent time the custom line item was modified.

        • AssociationSize (integer) --

          The number of resources that are associated to the custom line item.

    • NextToken (string) --

      The pagination token used on subsequent calls to get custom line items (FFLIs).

CreatePricingRule (new) Link ¶

Creates a pricing rule can be associated to a pricing plan, or a set of pricing plans.

See also: AWS API Documentation

Request Syntax

client.create_pricing_rule(
    ClientToken='string',
    Name='string',
    Description='string',
    Scope='GLOBAL'|'SERVICE',
    Type='MARKUP'|'DISCOUNT',
    ModifierPercentage=123.0,
    Service='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 pricing rule name. The names must be unique to each pricing rule.

type Description

string

param Description

The pricing rule description.

type Scope

string

param Scope

[REQUIRED]

The scope of pricing rule that indicates if it is globally applicable, or is service-specific.

type Type

string

param Type

[REQUIRED]

The type of pricing rule.

type ModifierPercentage

float

param ModifierPercentage

[REQUIRED]

A percentage modifier applied on the public pricing rates.

type Service

string

param Service

If the Scope attribute is set to SERVICE , the attribute indicates which service the PricingRule is applicable for.

type Tags

dict

param Tags

A map that contains tag keys and tag values that are attached to a pricing rule.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the created pricing rule.

UpdateCustomLineItem (new) Link ¶

Update an existing custom line item in the current or previous billing period.

See also: AWS API Documentation

Request Syntax

client.update_custom_line_item(
    Arn='string',
    Name='string',
    Description='string',
    ChargeDetails={
        'Flat': {
            'ChargeValue': 123.0
        },
        'Percentage': {
            'PercentageValue': 123.0
        }
    },
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
type Arn

string

param Arn

[REQUIRED]

The ARN of the custom line item to be updated.

type Name

string

param Name

The new name for the custom line item.

type Description

string

param Description

The new line item description of the custom line item.

type ChargeDetails

dict

param ChargeDetails

A ListCustomLineItemChargeDetails containing the new charge details for the custom line item.

  • Flat (dict) --

    An UpdateCustomLineItemFlatChargeDetails that describes the new charge details of a flat custom line item.

    • ChargeValue (float) -- [REQUIRED]

      The custom line item's new fixed charge value in USD.

  • Percentage (dict) --

    An UpdateCustomLineItemPercentageChargeDetails that describes the new charge details of a percentage custom line item.

    • PercentageValue (float) -- [REQUIRED]

      The custom line item's new percentage value. This will be multiplied against the combined value of its associated resources to determine its charge value.

type BillingPeriodRange

dict

param BillingPeriodRange

The billing period range in which the custom line item request will be applied.

  • InclusiveStartBillingPeriod (string) -- [REQUIRED]

    The inclusive start billing period that defines a billing period range where a custom line is applied.

  • ExclusiveEndBillingPeriod (string) -- [REQUIRED]

    The inclusive end billing period that defines a billing period range where a custom line is applied.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'BillingGroupArn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ChargeDetails': {
        'Flat': {
            'ChargeValue': 123.0
        },
        'Percentage': {
            'PercentageValue': 123.0
        },
        'Type': 'CREDIT'|'FEE'
    },
    'LastModifiedTime': 123,
    'AssociationSize': 123
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN of the successfully updated custom line item.

    • BillingGroupArn (string) --

      The ARN of the billing group that the custom line item is applied to.

    • Name (string) --

      The name of the successfully updated custom line item.

    • Description (string) --

      The description of the successfully updated custom line item.

    • ChargeDetails (dict) --

      A ListCustomLineItemChargeDetails containing the charge details of the successfully updated custom line item.

      • Flat (dict) --

        A ListCustomLineItemFlatChargeDetails that describes the charge details of a flat custom line item.

        • ChargeValue (float) --

          The custom line item's fixed charge value in USD.

      • Percentage (dict) --

        A ListCustomLineItemPercentageChargeDetails that describes the charge details of a percentage custom line item.

        • PercentageValue (float) --

          The custom line item's percentage value. This will be multiplied against the combined value of its associated resources to determine its charge value.

      • Type (string) --

        The type of the custom line item that indicates whether the charge is a fee or credit .

    • LastModifiedTime (integer) --

      The most recent time the custom line item was modified.

    • AssociationSize (integer) --

      The number of resources that are associated to the custom line item.

ListBillingGroupCostReports (new) Link ¶

A paginated call to retrieve a summary report of actual Amazon Web Services charges and the calculated Amazon Web Services charges based on the associated pricing plan of a billing group.

See also: AWS API Documentation

Request Syntax

client.list_billing_group_cost_reports(
    BillingPeriod='string',
    MaxResults=123,
    NextToken='string',
    Filters={
        'BillingGroupArns': [
            'string',
        ]
    }
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period for your report.

type MaxResults

integer

param MaxResults

The maximum number of reports to retrieve.

type NextToken

string

param NextToken

The pagination token used on subsequent calls to get reports.

type Filters

dict

param Filters

A ListBillingGroupCostReportsFilter to specify billing groups to retrieve reports from.

  • BillingGroupArns (list) --

    The list of Amazon Resource Names (ARNs) used to filter billing groups to retrieve reports.

    • (string) --

rtype

dict

returns

Response Syntax

{
    'BillingGroupCostReports': [
        {
            'Arn': 'string',
            'AWSCost': 'string',
            'ProformaCost': 'string',
            'Margin': 'string',
            'MarginPercentage': 'string',
            'Currency': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingGroupCostReports (list) --

      A list of BillingGroupCostReportElement retrieved.

      • (dict) --

        A summary report of actual Amazon Web Services charges and calculated Amazon Web Services charges, based on the associated pricing plan of a billing group.

        • Arn (string) --

          The Amazon Resource Name (ARN) of a billing group.

        • AWSCost (string) --

          The actual Amazon Web Services charges for the billing group.

        • ProformaCost (string) --

          The hypothetical Amazon Web Services charges based on the associated pricing plan of a billing group.

        • Margin (string) --

          The billing group margin.

        • MarginPercentage (string) --

          The percentage of billing group margin.

        • Currency (string) --

          The displayed currency.

    • NextToken (string) --

      The pagination token used on subsequent calls to get reports.

ListPricingRulesAssociatedToPricingPlan (new) Link ¶

Lists the pricing rules associated with a pricing plan.

See also: AWS API Documentation

Request Syntax

client.list_pricing_rules_associated_to_pricing_plan(
    BillingPeriod='string',
    PricingPlanArn='string',
    MaxResults=123,
    NextToken='string'
)
type BillingPeriod

string

param BillingPeriod

The billing period for which the pricing rule associations are to be listed.

type PricingPlanArn

string

param PricingPlanArn

[REQUIRED]

The Amazon Resource Name (ARN) of the pricing plan for which associations are to be listed.

type MaxResults

integer

param MaxResults

The optional maximum number of pricing rule associations to retrieve.

type NextToken

string

param NextToken

The optional pagination token returned by a previous call.

rtype

dict

returns

Response Syntax

{
    'BillingPeriod': 'string',
    'PricingPlanArn': 'string',
    'PricingRuleArns': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingPeriod (string) --

      The billing period for which the pricing rule associations are listed.

    • PricingPlanArn (string) --

      The Amazon Resource Name (ARN) of the pricing plan for which associations are listed.

    • PricingRuleArns (list) --

      A list containing pricing rules associated with the requested pricing plan.

      • (string) --

    • NextToken (string) --

      The pagination token to be used on subsequent calls.

DisassociateAccounts (new) Link ¶

Removes the specified list of account IDs from the given billing group.

See also: AWS API Documentation

Request Syntax

client.disassociate_accounts(
    Arn='string',
    AccountIds=[
        'string',
    ]
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the billing group that the array of account IDs will disassociate from.

type AccountIds

list

param AccountIds

[REQUIRED]

The array of account IDs to disassociate.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the billing group that the array of account IDs is disassociated from.

ListPricingRules (new) Link ¶

Describes a pricing rule that can be associated to a pricing plan, or set of pricing plans.

See also: AWS API Documentation

Request Syntax

client.list_pricing_rules(
    BillingPeriod='string',
    Filters={
        'Arns': [
            'string',
        ]
    },
    MaxResults=123,
    NextToken='string'
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period to get the pricing plan.

type Filters

dict

param Filters

A DescribePricingRuleFilter that specifies the Amazon Resource Name (ARNs) of pricing rules to retrieve pricing rules information.

  • Arns (list) --

    A list containing the pricing rule Amazon Resource Names (ARNs) to include in the API response.

    • (string) --

type MaxResults

integer

param MaxResults

The maximum number of pricing rules to retrieve.

type NextToken

string

param NextToken

The pagination token used on subsequent call to get pricing rules.

rtype

dict

returns

Response Syntax

{
    'BillingPeriod': 'string',
    'PricingRules': [
        {
            'Name': 'string',
            'Arn': 'string',
            'Description': 'string',
            'Scope': 'GLOBAL'|'SERVICE',
            'Type': 'MARKUP'|'DISCOUNT',
            'ModifierPercentage': 123.0,
            'Service': 'string',
            'AssociatedPricingPlanCount': 123,
            'CreationTime': 123,
            'LastModifiedTime': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingPeriod (string) --

      The billing period for which the described pricing rules are applicable.

    • PricingRules (list) --

      A list containing the described pricing rules.

      • (dict) --

        A representation of a pricing rule.

        • Name (string) --

          The name of a pricing rule.

        • Arn (string) --

          The Amazon Resource Name (ARN) used to uniquely identify a pricing rule.

        • Description (string) --

          The pricing rule description.

        • Scope (string) --

          The scope of pricing rule that indicates if it is globally applicable, or if it is service-specific.

        • Type (string) --

          The type of pricing rule.

        • ModifierPercentage (float) --

          A percentage modifier applied on the public pricing rates.

        • Service (string) --

          If the Scope attribute is SERVICE , this attribute indicates which service the PricingRule is applicable for.

        • AssociatedPricingPlanCount (integer) --

          The pricing plans count that this pricing rule is associated with.

        • CreationTime (integer) --

          The time the pricing rule was created.

        • LastModifiedTime (integer) --

          The most recent time the pricing rule was modified.

    • NextToken (string) --

      The pagination token used on subsequent calls to get pricing rules.

DeletePricingRule (new) Link ¶

Deletes the pricing rule identified by the input Amazon Resource Name (ARN).

See also: AWS API Documentation

Request Syntax

client.delete_pricing_rule(
    Arn='string'
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the pricing rule you are deleting.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the deleted pricing rule.

UpdatePricingPlan (new) Link ¶

This updates an existing pricing plan.

See also: AWS API Documentation

Request Syntax

client.update_pricing_plan(
    Arn='string',
    Name='string',
    Description='string'
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the pricing plan you're updating.

type Name

string

param Name

The name of the pricing plan. The name must be unique to each pricing plan.

type Description

string

param Description

The pricing plan description.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'Size': 123,
    'LastModifiedTime': 123
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the updated pricing plan.

    • Name (string) --

      The name of the pricing plan. The name must be unique to each pricing plan.

    • Description (string) --

      The new description for the pricing rule.

    • Size (integer) --

      The pricing rules count currently associated with this pricing plan list.

    • LastModifiedTime (integer) --

      The most recent time the pricing plan was modified.

AssociateAccounts (new) Link ¶

Connects an array of account IDs in a consolidated billing family to a predefined billing group. The account IDs must be a part of the consolidated billing family during the current month, and not already associated with another billing group. The maximum number of accounts that can be associated in one call is 30.

See also: AWS API Documentation

Request Syntax

client.associate_accounts(
    Arn='string',
    AccountIds=[
        'string',
    ]
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the billing group that associates the array of account IDs.

type AccountIds

list

param AccountIds

[REQUIRED]

The associating array of account IDs.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the billing group that associates the array of account IDs.

DeleteBillingGroup (new) Link ¶

Deletes a billing group.

See also: AWS API Documentation

Request Syntax

client.delete_billing_group(
    Arn='string'
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) of the billing group you're deleting.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

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

ListPricingPlans (new) Link ¶

A paginated call to get pricing plans for the given billing period. If you don't provide a billing period, the current billing period is used.

See also: AWS API Documentation

Request Syntax

client.list_pricing_plans(
    BillingPeriod='string',
    Filters={
        'Arns': [
            'string',
        ]
    },
    MaxResults=123,
    NextToken='string'
)
type BillingPeriod

string

param BillingPeriod

The preferred billing period to get pricing plan.

type Filters

dict

param Filters

A ListPricingPlansFilter that specifies the Amazon Resource Name (ARNs) of pricing plans to retrieve pricing plans information.

  • Arns (list) --

    A list of pricing plan Amazon Resource Names (ARNs) to retrieve information.

    • (string) --

type MaxResults

integer

param MaxResults

The maximum number of pricing plans to retrieve.

type NextToken

string

param NextToken

The pagination token used on subsequent call to get pricing plans.

rtype

dict

returns

Response Syntax

{
    'BillingPeriod': 'string',
    'PricingPlans': [
        {
            'Name': 'string',
            'Arn': 'string',
            'Description': 'string',
            'Size': 123,
            'CreationTime': 123,
            'LastModifiedTime': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BillingPeriod (string) --

      The billing period for which the described pricing plans are applicable.

    • PricingPlans (list) --

      A list of PricingPlanListElement retrieved.

      • (dict) --

        A representation of a pricing plan.

        • Name (string) --

          The name of a pricing plan.

        • Arn (string) --

          The pricing plan Amazon Resource Names (ARN). This can be used to uniquely identify a pricing plan.

        • Description (string) --

          The pricing plan description.

        • Size (integer) --

          The pricing rules count currently associated with this pricing plan list element.

        • CreationTime (integer) --

          The time the pricing plan was created.

        • LastModifiedTime (integer) --

          The most recent time the pricing plan was modified.

    • NextToken (string) --

      The pagination token used on subsequent calls to get pricing plans.

UntagResource (new) Link ¶

Deletes specified tags from a resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to which to delete tags.

type TagKeys

list

param TagKeys

[REQUIRED]

The tags to delete from the resource as a list of key-value pairs.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

BatchDisassociateResourcesFromCustomLineItem (new) Link ¶

Disassociates a batch of resources from a percentage custom line item.

See also: AWS API Documentation

Request Syntax

client.batch_disassociate_resources_from_custom_line_item(
    TargetArn='string',
    ResourceArns=[
        'string',
    ],
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
type TargetArn

string

param TargetArn

[REQUIRED]

A percentage custom line item ARN to disassociate the resources from.

type ResourceArns

list

param ResourceArns

[REQUIRED]

A list containing the ARNs of resources to be disassociated.

  • (string) --

type BillingPeriodRange

dict

param BillingPeriodRange

The billing period range in which the custom line item request will be applied.

  • InclusiveStartBillingPeriod (string) -- [REQUIRED]

    The inclusive start billing period that defines a billing period range where a custom line is applied.

  • ExclusiveEndBillingPeriod (string) -- [REQUIRED]

    The inclusive end billing period that defines a billing period range where a custom line is applied.

rtype

dict

returns

Response Syntax

{
    'SuccessfullyDisassociatedResources': [
        {
            'Arn': 'string',
            'Error': {
                'Message': 'string',
                'Reason': 'INVALID_ARN'|'SERVICE_LIMIT_EXCEEDED'|'ILLEGAL_CUSTOMLINEITEM'|'INTERNAL_SERVER_EXCEPTION'
            }
        },
    ],
    'FailedDisassociatedResources': [
        {
            'Arn': 'string',
            'Error': {
                'Message': 'string',
                'Reason': 'INVALID_ARN'|'SERVICE_LIMIT_EXCEEDED'|'ILLEGAL_CUSTOMLINEITEM'|'INTERNAL_SERVER_EXCEPTION'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfullyDisassociatedResources (list) --

      A list of DisassociateResourceResponseElement for each resource that's been disassociated from a percentage custom line item successfully.

      • (dict) --

        A resource disassociation result for a percentage custom line item.

        • Arn (string) --

          The resource ARN that was disassociated from the custom line item.

        • Error (dict) --

          An AssociateResourceError shown if the resource disassociation fails.

          • Message (string) --

            The reason the resource association failed.

          • Reason (string) --

            A static error code that used to classify the type of failure.

    • FailedDisassociatedResources (list) --

      A list of DisassociateResourceResponseElement for each resource that failed disassociation from a percentage custom line item.

      • (dict) --

        A resource disassociation result for a percentage custom line item.

        • Arn (string) --

          The resource ARN that was disassociated from the custom line item.

        • Error (dict) --

          An AssociateResourceError shown if the resource disassociation fails.

          • Message (string) --

            The reason the resource association failed.

          • Reason (string) --

            A static error code that used to classify the type of failure.

DeleteCustomLineItem (new) Link ¶

Deletes the custom line item identified by the given ARN in the current, or previous billing period.

See also: AWS API Documentation

Request Syntax

client.delete_custom_line_item(
    Arn='string',
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
type Arn

string

param Arn

[REQUIRED]

The ARN of the custom line item to be deleted.

type BillingPeriodRange

dict

param BillingPeriodRange

The billing period range in which the custom line item request will be applied.

  • InclusiveStartBillingPeriod (string) -- [REQUIRED]

    The inclusive start billing period that defines a billing period range where a custom line is applied.

  • ExclusiveEndBillingPeriod (string) -- [REQUIRED]

    The inclusive end billing period that defines a billing period range where a custom line is applied.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      Then ARN of the deleted custom line item.

CreateBillingGroup (new) Link ¶

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',
        ]
    },
    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 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) --

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 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 billing group description.

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.