---
title: "PUT /batch-associate-resources-to-custom-line-item"
method: PUT
path: "/batch-associate-resources-to-custom-line-item"
---

# PUT /batch-associate-resources-to-custom-line-item

`PUT /batch-associate-resources-to-custom-line-item`

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

## Request body

- object
  - `TargetArn` string, required — A percentage custom line item ARN to associate the resources to.
  - `ResourceArns` CustomLineItemAssociationElement[], required — A list containing the ARNs of the resources to be associated.
  - `BillingPeriodRange` object — The billing period range in which the custom line item request will be applied.
    - `InclusiveStartBillingPeriod` string — 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.

## Response `200`

Success

- BatchAssociateResourcesToCustomLineItemOutput
  - `SuccessfullyAssociatedResources` AssociateResourceResponseElement[] — A list of <code>AssociateResourceResponseElement</code> for each resource that's been associated to a percentage custom line item successfully.
    - `Arn` string — The resource ARN that was associated to the custom line item.
    - `Error` object — An <code>AssociateResourceError</code> that will populate if the resource association fails.
      - `Message` string — The reason why the resource association failed.
      - `Reason` 'INVALID_ARN' | 'SERVICE_LIMIT_EXCEEDED' | 'ILLEGAL_CUSTOMLINEITEM' | 'INTERNAL_SERVER_EXCEPTION' | 'INVALID_BILLING_PERIOD_RANGE' — A static error code that's used to classify the type of failure.
  - `FailedAssociatedResources` AssociateResourceResponseElement[] — A list of <code>AssociateResourceResponseElement</code> for each resource that failed association to a percentage custom line item.
    - `Arn` string — The resource ARN that was associated to the custom line item.
    - `Error` object — An <code>AssociateResourceError</code> that will populate if the resource association fails.
      - `Message` string — The reason why the resource association failed.
      - `Reason` 'INVALID_ARN' | 'SERVICE_LIMIT_EXCEEDED' | 'ILLEGAL_CUSTOMLINEITEM' | 'INTERNAL_SERVER_EXCEPTION' | 'INVALID_BILLING_PERIOD_RANGE' — A static error code that's used to classify the type of failure.

## Other responses

- `480` — ConflictException
- `481` — ThrottlingException
- `482` — AccessDeniedException
- `483` — ValidationException
- `484` — ServiceLimitExceededException
- `485` — InternalServerException
- `486` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/billingconductor.md) · [All operations](https://skmtc.net/aws/apis/billingconductor/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/billingconductor/versions/2cc5849dea95/schema)
