create_custom_line_item

BillingConductor.Client.create_custom_line_item(**kwargs)

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

response = 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'
    }
)
Parameters
  • ClientToken (string) --

    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.

  • Name (string) --

    [REQUIRED]

    The name of the custom line item.

  • Description (string) --

    [REQUIRED]

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

  • BillingGroupArn (string) --

    [REQUIRED]

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

  • BillingPeriodRange (dict) --

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

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

  • Tags (dict) --

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

    • (string) --
      • (string) --
  • ChargeDetails (dict) --

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

Return type

dict

Returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

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

Exceptions

  • BillingConductor.Client.exceptions.ThrottlingException
  • BillingConductor.Client.exceptions.ConflictException
  • BillingConductor.Client.exceptions.AccessDeniedException
  • BillingConductor.Client.exceptions.ValidationException
  • BillingConductor.Client.exceptions.ServiceLimitExceededException
  • BillingConductor.Client.exceptions.InternalServerException