Skip to content

batch_delete_tax_registration

batch_delete_tax_registration(
    account_ids: AccountIds,
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
) -> BatchDeleteTaxRegistrationResponse

Deletes tax registration for multiple accounts in batch. This can be used to delete tax registrations for up to five accounts in one batch.

This API operation can't be used to delete your tax registration in Brazil. Use the Payment preferences page in the Billing and Cost Management console instead.

Parameters:

  • account_ids (AccountIds) –

    List of unique account identifiers.

Raises:

  • ConflictException –

    The exception when the input is creating conflict with the given state.

  • InternalServerException –

    The exception thrown when an unexpected error occurs when processing a request.

  • ValidationException –

    The exception when the input doesn't pass validation for at least one of the input parameters.

  • UnknownServiceError –

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

Source code in docs_src/capo_taxsettings/_services/tax_settings.py
def batch_delete_tax_registration(
    self,
    account_ids: "capo_taxsettings.types.account_ids.AccountIds",
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
) -> "capo_taxsettings.types.batch_delete_tax_registration_response.BatchDeleteTaxRegistrationResponse":
    """<p>Deletes tax registration for multiple accounts in batch. This can be used to delete tax registrations for up to five accounts in one batch. </p> <note> <p>This API operation can't be used to delete your tax registration in Brazil. Use the <a href="https://console.aws.amazon.com/billing/home#/paymentpreferences/paymentmethods">Payment preferences</a> page in the Billing and Cost Management console instead.</p> </note>

    Args:
        account_ids: <p>List of unique account identifiers. </p>

    Raises:
        capo_taxsettings.errors.conflict_exception.ConflictException: <p>The exception when the input is creating conflict with the given state.</p>
        capo_taxsettings.errors.internal_server_exception.InternalServerException: <p>The exception thrown when an unexpected error occurs when processing a request.</p>
        capo_taxsettings.errors.validation_exception.ValidationException: <p>The exception when the input doesn't pass validation for at least one of the input parameters. </p>
        capo_taxsettings.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_taxsettings.types.batch_delete_tax_registration_request.BatchDeleteTaxRegistrationRequest]",
    ) -> OperationResponse[
        "capo_taxsettings.types.batch_delete_tax_registration_response.BatchDeleteTaxRegistrationResponse"
    ]:
        import capo_taxsettings._operations.tax_settings.batch_delete_tax_registration

        output, http_response = (
            capo_taxsettings._operations.tax_settings.batch_delete_tax_registration.batch_delete_tax_registration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_taxsettings.types.batch_delete_tax_registration_response.BatchDeleteTaxRegistrationResponse",
    ) -> dict[str, Any]:
        import capo_taxsettings.types.batch_delete_tax_registration_response

        return capo_taxsettings.types.batch_delete_tax_registration_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "BatchDeleteTaxRegistration", redact_output=_redact_output
        ),
    )
    input_: capo_taxsettings.types.batch_delete_tax_registration_request.BatchDeleteTaxRegistrationRequest = {
        "account_ids": account_ids
    }

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