Skip to content

delete_billing_view

delete_billing_view(
    arn: BillingViewArn,
    *,
    config_overrides: Optional[BillingClientConfig] = None,
    force: Optional[bool] = None,
) -> DeleteBillingViewResponse

Deletes the specified billing view.

Parameters:

  • arn (BillingViewArn) –

    The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.

  • force (Optional[bool], default: None ) –

    If set to true, forces deletion of the billing view even if it has derived resources (e.g. other billing views or budgets). Use with caution as this may break dependent resources.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action.

  • ConflictException –

    The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

  • InternalServerException –

    The request processing failed because of an unknown error, exception, or failure.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Invoke DeleteBillingView

>>> client.delete_billing_view(arn='arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899')
Source code in docs_src/capo_billing/_services/billing.py
def delete_billing_view(
    self,
    arn: "capo_billing.types.billing_view_arn.BillingViewArn",
    *,
    config_overrides: Optional[BillingClientConfig] = None,
    force: Optional[bool] = None,
) -> "capo_billing.types.delete_billing_view_response.DeleteBillingViewResponse":
    """<p>Deletes the specified billing view.</p>

    Args:
        arn: <p> The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. </p>
        force: <p> If set to true, forces deletion of the billing view even if it has derived resources (e.g. other billing views or budgets). Use with caution as this may break dependent resources. </p>

    Raises:
        capo_billing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_billing.errors.conflict_exception.ConflictException: <p> The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
        capo_billing.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an unknown error, exception, or failure. </p>
        capo_billing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billing.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_billing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke DeleteBillingView

        >>> client.delete_billing_view(arn='arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899')
    """

    def _handler(
        req: "OperationRequest[capo_billing.types.delete_billing_view_request.DeleteBillingViewRequest]",
    ) -> OperationResponse[
        "capo_billing.types.delete_billing_view_response.DeleteBillingViewResponse"
    ]:
        import capo_billing._operations.aws_billing.delete_billing_view

        output, http_response = (
            capo_billing._operations.aws_billing.delete_billing_view.delete_billing_view(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteBillingView")
    )
    input_: capo_billing.types.delete_billing_view_request.DeleteBillingViewRequest = {
        "arn": arn
    }
    if force is not None:
        input_["force"] = force

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output