Disassociates a batch of resources from a percentage custom line item.
Parameters:
Raises:
Source code in docs_src/capo_billingconductor/_services/billingconductor.py
| def batch_disassociate_resources_from_custom_line_item(
self,
target_arn: "capo_billingconductor.types.custom_line_item_arn.CustomLineItemArn",
resource_arns: "capo_billingconductor.types.custom_line_item_batch_disassociations_list.CustomLineItemBatchDisassociationsList",
*,
config_overrides: Optional[billingconductorClientConfig] = None,
billing_period_range: Optional[
"capo_billingconductor.types.custom_line_item_billing_period_range.CustomLineItemBillingPeriodRange"
] = None,
) -> "capo_billingconductor.types.batch_disassociate_resources_from_custom_line_item_output.BatchDisassociateResourcesFromCustomLineItemOutput":
"""<p> Disassociates a batch of resources from a percentage custom line item. </p>
Args:
target_arn: <p> A percentage custom line item ARN to disassociate the resources from. </p>
resource_arns: <p> A list containing the ARNs of resources to be disassociated. </p>
Raises:
capo_billingconductor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
capo_billingconductor.errors.conflict_exception.ConflictException: <p>You can cause an inconsistent state by updating or deleting a resource. </p>
capo_billingconductor.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request. </p>
capo_billingconductor.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist. </p>
capo_billingconductor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
capo_billingconductor.errors.validation_exception.ValidationException: <p>The input doesn't match with the constraints specified by Amazon Web Services services.</p>
capo_billingconductor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_billingconductor.types.batch_disassociate_resources_from_custom_line_item_input.BatchDisassociateResourcesFromCustomLineItemInput]",
) -> OperationResponse[
"capo_billingconductor.types.batch_disassociate_resources_from_custom_line_item_output.BatchDisassociateResourcesFromCustomLineItemOutput"
]:
import capo_billingconductor._operations.aws_billing_conductor.batch_disassociate_resources_from_custom_line_item
output, http_response = (
capo_billingconductor._operations.aws_billing_conductor.batch_disassociate_resources_from_custom_line_item.batch_disassociate_resources_from_custom_line_item(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("BatchDisassociateResourcesFromCustomLineItem"),
)
input_: capo_billingconductor.types.batch_disassociate_resources_from_custom_line_item_input.BatchDisassociateResourcesFromCustomLineItemInput = {
"target_arn": target_arn,
"resource_arns": resource_arns,
}
if billing_period_range is not None:
input_["billing_period_range"] = billing_period_range
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|