BillingConductor / Client / batch_associate_resources_to_custom_line_item

batch_associate_resources_to_custom_line_item#

BillingConductor.Client.batch_associate_resources_to_custom_line_item(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_resources_to_custom_line_item(
    TargetArn='string',
    ResourceArns=[
        'string',
    ],
    BillingPeriodRange={
        'InclusiveStartBillingPeriod': 'string',
        'ExclusiveEndBillingPeriod': 'string'
    }
)
Parameters:
  • TargetArn (string) –

    [REQUIRED]

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

  • ResourceArns (list) –

    [REQUIRED]

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

    • (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

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

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 why the resource association failed.

          • Reason (string) –

            A static error code that’s 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 why the resource association failed.

          • Reason (string) –

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

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

  • BillingConductor.Client.exceptions.ResourceNotFoundException