AWSBillingConductor

2023/03/17 - AWSBillingConductor - 6 updated api methods

Changes  This release adds a new filter to ListAccountAssociations API and a new filter to ListBillingGroups API.

CreatePricingRule (updated) Link ¶
Changes (request)
{'Scope': {'SKU'}}

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'|'BILLING_ENTITY'|'SKU',
    Type='MARKUP'|'DISCOUNT'|'TIERING',
    ModifierPercentage=123.0,
    Service='string',
    Tags={
        'string': 'string'
    },
    BillingEntity='string',
    Tiering={
        'FreeTier': {
            'Activated': True|False
        }
    },
    UsageType='string',
    Operation='string'
)
type ClientToken

string

param ClientToken

The token that's 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's globally applicable, or it's service-specific.

type Type

string

param Type

[REQUIRED]

The type of pricing rule.

type ModifierPercentage

float

param ModifierPercentage

A percentage modifier that's applied on the public pricing rates.

type Service

string

param Service

If the Scope attribute is set to SERVICE or SKU , 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) --

type BillingEntity

string

param BillingEntity

The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.

type Tiering

dict

param Tiering

The set of tiering configurations for the pricing rule.

  • FreeTier (dict) -- [REQUIRED]

    The possible Amazon Web Services Free Tier configurations.

    • Activated (boolean) -- [REQUIRED]

      Activate or deactivate Amazon Web Services Free Tier.

type UsageType

string

param UsageType

Usage type is the unit that each service uses to measure the usage of a specific type of resource.

If the Scope attribute is set to SKU , this attribute indicates which usage type the PricingRule is modifying. For example, USW2-BoxUsage:m2.2xlarge describes an``M2 High Memory Double Extra Large`` instance in the US West (Oregon) Region. </p>

type Operation

string

param Operation

Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.

If the Scope attribute is set to SKU , this attribute indicates which operation the PricingRule is modifying. For example, a value of RunInstances:0202 indicates the operation of running an Amazon EC2 instance.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

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

ListAccountAssociations (updated) Link ¶
Changes (request)
{'Filters': {'AccountIds': ['string']}}

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 that's associated with the linked account.

See also: AWS API Documentation

Request Syntax

client.list_account_associations(
    BillingPeriod='string',
    Filters={
        'Association': 'string',
        'AccountId': 'string',
        'AccountIds': [
            '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 aren't 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.

  • AccountIds (list) --

    The list of Amazon Web Services IDs to retrieve their associated billing group for a given time range.

    • (string) --

type NextToken

string

param NextToken

The pagination token that's 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) --

        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 that's used on subsequent calls to get accounts.

ListBillingGroups (updated) Link ¶
Changes (request)
{'Filters': {'Statuses': ['ACTIVE | PRIMARY_ACCOUNT_MISSING']}}

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

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

    • NextToken (string) --

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

ListCustomLineItemVersions (updated) Link ¶
Changes (response)
{'CustomLineItemVersions': {'Arn': 'string', 'StartTime': 'long'}}

A paginated call to get a list of all custom line item versions.

See also: AWS API Documentation

Request Syntax

client.list_custom_line_item_versions(
    Arn='string',
    MaxResults=123,
    NextToken='string',
    Filters={
        'BillingPeriodRange': {
            'StartBillingPeriod': 'string',
            'EndBillingPeriod': 'string'
        }
    }
)
type Arn

string

param Arn

[REQUIRED]

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

type MaxResults

integer

param MaxResults

The maximum number of custom line item versions to retrieve.

type NextToken

string

param NextToken

The pagination token that's used on subsequent calls to retrieve custom line item versions.

type Filters

dict

param Filters

A ListCustomLineItemVersionsFilter that specifies the billing period range in which the custom line item versions are applied.

  • BillingPeriodRange (dict) --

    The billing period range in which the custom line item version is applied.

    • StartBillingPeriod (string) --

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

    • EndBillingPeriod (string) --

      The exclusive end billing period that defines a billing period range where a custom line item version is applied.

rtype

dict

returns

Response Syntax

{
    'CustomLineItemVersions': [
        {
            '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,
            'StartBillingPeriod': 'string',
            'EndBillingPeriod': 'string',
            'Arn': 'string',
            'StartTime': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CustomLineItemVersions (list) --

      A list of CustomLineItemVersionListElements that are received.

      • (dict) --

        A representation of a custom line item version.

        • Name (string) --

          The name of the custom line item.

        • ChargeDetails (dict) --

          A representation of 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 charge value currency of the custom line item.

        • Description (string) --

          The description of the custom line item.

        • ProductCode (string) --

          The product code that’s associated with the custom line item.

        • BillingGroupArn (string) --

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

        • CreationTime (integer) --

          The time when the custom line item version was created.

        • LastModifiedTime (integer) --

          The most recent time that the custom line item version was modified.

        • AssociationSize (integer) --

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

        • StartBillingPeriod (string) --

          The start billing period of the custom line item version.

        • EndBillingPeriod (string) --

          The end billing period of the custom line item version.

        • Arn (string) --

          A list of custom line item Amazon Resource Names (ARNs) to retrieve information.

        • StartTime (integer) --

          The inclusive start time.

    • NextToken (string) --

      The pagination token that's used on subsequent calls to retrieve custom line item versions.

ListPricingRules (updated) Link ¶
Changes (response)
{'PricingRules': {'Operation': 'string',
                  'Scope': {'SKU'},
                  'UsageType': 'string'}}

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 that's 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'|'BILLING_ENTITY'|'SKU',
            'Type': 'MARKUP'|'DISCOUNT'|'TIERING',
            'ModifierPercentage': 123.0,
            'Service': 'string',
            'AssociatedPricingPlanCount': 123,
            'CreationTime': 123,
            'LastModifiedTime': 123,
            'BillingEntity': 'string',
            'Tiering': {
                'FreeTier': {
                    'Activated': True|False
                }
            },
            'UsageType': 'string',
            'Operation': 'string'
        },
    ],
    '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 when the pricing rule was created.

        • LastModifiedTime (integer) --

          The most recent time when the pricing rule was modified.

        • BillingEntity (string) --

          The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.

        • Tiering (dict) --

          The set of tiering configurations for the pricing rule.

          • FreeTier (dict) --

            The possible Amazon Web Services Free Tier configurations.

            • Activated (boolean) --

              Activate or deactivate Amazon Web Services Free Tier application.

        • UsageType (string) --

          Usage type is the unit that each service uses to measure the usage of a specific type of resource.

          If the Scope attribute is set to SKU , this attribute indicates which usage type the PricingRule is modifying. For example, USW2-BoxUsage:m2.2xlarge describes an``M2 High Memory Double Extra Large`` instance in the US West (Oregon) Region. </p>

        • Operation (string) --

          Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.

          If the Scope attribute is set to SKU , this attribute indicates which operation the PricingRule is modifying. For example, a value of RunInstances:0202 indicates the operation of running an Amazon EC2 instance.

    • NextToken (string) --

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

UpdatePricingRule (updated) Link ¶
Changes (response)
{'Scope': {'SKU'}}

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'|'TIERING',
    ModifierPercentage=123.0,
    Tiering={
        'FreeTier': {
            'Activated': True|False
        }
    }
)
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.

type Tiering

dict

param Tiering

The set of tiering configurations for the pricing rule.

  • FreeTier (dict) -- [REQUIRED]

    The possible Amazon Web Services Free Tier configurations.

    • Activated (boolean) -- [REQUIRED]

      Activate or deactivate application of Amazon Web Services Free Tier.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'Scope': 'GLOBAL'|'SERVICE'|'BILLING_ENTITY'|'SKU',
    'Type': 'MARKUP'|'DISCOUNT'|'TIERING',
    'ModifierPercentage': 123.0,
    'Service': 'string',
    'AssociatedPricingPlanCount': 123,
    'LastModifiedTime': 123,
    'BillingEntity': 'string',
    'Tiering': {
        'FreeTier': {
            'Activated': True|False
        }
    },
    'UsageType': 'string',
    'Operation': 'string'
}

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's globally applicable, or it's 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.

    • BillingEntity (string) --

      The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.

    • Tiering (dict) --

      The set of tiering configurations for the pricing rule.

      • FreeTier (dict) --

        The possible Amazon Web Services Free Tier configurations.

        • Activated (boolean) --

          Activate or deactivate application of Amazon Web Services Free Tier.

    • UsageType (string) --

      Usage type is the unit that each service uses to measure the usage of a specific type of resource.

      If the Scope attribute is set to SKU , this attribute indicates which usage type the PricingRule is modifying. For example, USW2-BoxUsage:m2.2xlarge describes an M2 High Memory Double Extra Large instance in the US West (Oregon) Region.

    • Operation (string) --

      Operation refers to the specific Amazon Web Services covered by this line item. This describes the specific usage of the line item.

      If the Scope attribute is set to SKU , this attribute indicates which operation the PricingRule is modifying. For example, a value of RunInstances:0202 indicates the operation of running an Amazon EC2 instance.