Deletes tax registration for a single account.
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_id
(Optional[AccountId], default:
None
)
–
Unique account identifier for the TRN information that needs to be deleted. If this isn't passed, the account ID corresponding to the credentials of the API caller will be used for this parameter.
Raises:
Source code in docs_src/capo_taxsettings/_services/tax_settings.py
| def delete_tax_registration(
self,
*,
config_overrides: Optional[TaxSettingsClientConfig] = None,
account_id: Optional["capo_taxsettings.types.account_id.AccountId"] = None,
) -> "capo_taxsettings.types.delete_tax_registration_response.DeleteTaxRegistrationResponse":
"""<p>Deletes tax registration for a single account. </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_id: <p>Unique account identifier for the TRN information that needs to be deleted. If this isn't passed, the account ID corresponding to the credentials of the API caller will be used for this parameter.</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.resource_not_found_exception.ResourceNotFoundException: <p>The exception thrown when the input doesn't have a resource associated to it.</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.delete_tax_registration_request.DeleteTaxRegistrationRequest]",
) -> OperationResponse[
"capo_taxsettings.types.delete_tax_registration_response.DeleteTaxRegistrationResponse"
]:
import capo_taxsettings._operations.tax_settings.delete_tax_registration
output, http_response = (
capo_taxsettings._operations.tax_settings.delete_tax_registration.delete_tax_registration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteTaxRegistration")
)
input_: capo_taxsettings.types.delete_tax_registration_request.DeleteTaxRegistrationRequest = {}
if account_id is not None:
input_["account_id"] = account_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|