This deletes an invoice unit with the provided invoice unit ARN.
Parameters:
-
invoice_unit_arn
(InvoiceUnitArnString)
–
The ARN to identify an invoice unit. This information can't be modified or deleted.
-
client_token
(Optional[BasicStringWithoutSpace], default:
None
)
–
A unique, case-sensitive identifier that you provide to ensure idempotency of the request.
Raises:
Examples:
DeleteInvoiceUnit
>>> client.delete_invoice_unit(invoice_unit_arn='arn:aws:invoicing::000000000000:invoice-unit/12345678', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b44')
Source code in docs_src/capo_invoicing/_services/invoicing.py
| def delete_invoice_unit(
self,
invoice_unit_arn: "capo_invoicing.types.invoice_unit_arn_string.InvoiceUnitArnString",
*,
config_overrides: Optional[InvoicingClientConfig] = None,
client_token: Optional[
"capo_invoicing.types.basic_string_without_space.BasicStringWithoutSpace"
] = None,
) -> "capo_invoicing.types.delete_invoice_unit_response.DeleteInvoiceUnitResponse":
"""<p>This deletes an invoice unit with the provided invoice unit ARN. </p>
Args:
invoice_unit_arn: <p> The ARN to identify an invoice unit. This information can't be modified or deleted. </p>
client_token: <p> A unique, case-sensitive identifier that you provide to ensure idempotency of the request. </p>
Raises:
capo_invoicing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_invoicing.errors.internal_server_exception.InternalServerException: <p>The processing request failed because of an unknown error, exception, or failure. </p>
capo_invoicing.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found. </p>
capo_invoicing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_invoicing.errors.validation_exception.ValidationException: <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
capo_invoicing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
DeleteInvoiceUnit
>>> client.delete_invoice_unit(invoice_unit_arn='arn:aws:invoicing::000000000000:invoice-unit/12345678', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b44')
"""
def _handler(
req: "OperationRequest[capo_invoicing.types.delete_invoice_unit_request.DeleteInvoiceUnitRequest]",
) -> OperationResponse[
"capo_invoicing.types.delete_invoice_unit_response.DeleteInvoiceUnitResponse"
]:
import capo_invoicing._operations.invoicing.delete_invoice_unit
output, http_response = (
capo_invoicing._operations.invoicing.delete_invoice_unit.delete_invoice_unit(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInvoiceUnit")
)
input_: capo_invoicing.types.delete_invoice_unit_request.DeleteInvoiceUnitRequest = {
"invoice_unit_arn": invoice_unit_arn
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|