BillingConductor / Client / update_custom_line_item

update_custom_line_item#

BillingConductor.Client.update_custom_line_item(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.update_custom_line_item(
    Arn='string',
    Name='string',
    Description='string',
    ChargeDetails={
        'Flat': {
            'ChargeValue': 123.0
        },
        'Percentage': {
            'PercentageValue': 123.0
        },
        'LineItemFilters': [
            {
                'Attribute': 'LINE_ITEM_TYPE',
                'MatchOption': 'NOT_EQUAL',
                'Values': [
                    'SAVINGS_PLAN_NEGATION',
                ]
            },
        ]
    },
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
Parameters:
  • Arn (string) –

    [REQUIRED]

    The ARN of the custom line item to be updated.

  • Name (string) – The new name for the custom line item.

  • Description (string) – The new line item description of the custom line item.

  • ChargeDetails (dict) –

    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.

    • LineItemFilters (list) –

      A representation of the line item filter.

      • (dict) –

        A representation of the line item filter for your custom line item. You can use line item filters to include or exclude specific resource values from the billing group’s total cost. For example, if you create a custom line item and you want to filter out a value, such as Savings Plan discounts, you can update LineItemFilter to exclude it.

        • Attribute (string) – [REQUIRED]

          The attribute of the line item filter. This specifies what attribute that you can filter on.

        • MatchOption (string) – [REQUIRED]

          The match criteria of the line item filter. This parameter specifies whether not to include the resource value from the billing group total cost.

        • Values (list) – [REQUIRED]

          The values of the line item filter. This specifies the values to filter on. Currently, you can only exclude Savings Plan discounts.

          • (string) –

  • BillingPeriodRange (dict) –

    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) –

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

Return type:

dict

Returns:

Response Syntax

{
    'Arn': 'string',
    'BillingGroupArn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ChargeDetails': {
        'Flat': {
            'ChargeValue': 123.0
        },
        'Percentage': {
            'PercentageValue': 123.0
        },
        'Type': 'CREDIT'|'FEE',
        'LineItemFilters': [
            {
                'Attribute': 'LINE_ITEM_TYPE',
                'MatchOption': 'NOT_EQUAL',
                'Values': [
                    'SAVINGS_PLAN_NEGATION',
                ]
            },
        ]
    },
    '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.

      • LineItemFilters (list) –

        A representation of the line item filter.

        • (dict) –

          A representation of the line item filter for your custom line item. You can use line item filters to include or exclude specific resource values from the billing group’s total cost. For example, if you create a custom line item and you want to filter out a value, such as Savings Plan discounts, you can update LineItemFilter to exclude it.

          • Attribute (string) –

            The attribute of the line item filter. This specifies what attribute that you can filter on.

          • MatchOption (string) –

            The match criteria of the line item filter. This parameter specifies whether not to include the resource value from the billing group total cost.

          • Values (list) –

            The values of the line item filter. This specifies the values to filter on. Currently, you can only exclude Savings Plan discounts.

            • (string) –

    • LastModifiedTime (integer) –

      The most recent time when the custom line item was modified.

    • AssociationSize (integer) –

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

Exceptions