Skip to content

put_tax_exemption

put_tax_exemption(
    account_ids: AccountIds,
    authority: Authority,
    exemption_type: GenericString,
    exemption_certificate: ExemptionCertificate,
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
) -> PutTaxExemptionResponse

Adds the tax exemption for a single account or all accounts listed in a consolidated billing family. The IAM action is tax:UpdateExemptions.

Parameters:

  • account_ids (AccountIds) –

    The list of unique account identifiers.

  • exemption_type (GenericString) –

    The exemption type. Use the supported tax exemption type description.

Raises:

Source code in docs_src/capo_taxsettings/_services/tax_settings.py
def put_tax_exemption(
    self,
    account_ids: "capo_taxsettings.types.account_ids.AccountIds",
    authority: "capo_taxsettings.types.authority.Authority",
    exemption_type: "capo_taxsettings.types.generic_string.GenericString",
    exemption_certificate: "capo_taxsettings.types.exemption_certificate.ExemptionCertificate",
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
) -> "capo_taxsettings.types.put_tax_exemption_response.PutTaxExemptionResponse":
    """<p>Adds the tax exemption for a single account or all accounts listed in a consolidated billing family. The IAM action is <code>tax:UpdateExemptions</code>. </p>

    Args:
        account_ids: <p> The list of unique account identifiers. </p>
        exemption_type: <p>The exemption type. Use the supported tax exemption type description. </p>

    Raises:
        capo_taxsettings.errors.access_denied_exception.AccessDeniedException: <p>The access is denied for the Amazon Web Services Support API. </p>
        capo_taxsettings.errors.attachment_upload_exception.AttachmentUploadException: <p>Failed to upload the tax exemption document to Amazon Web Services Support case. </p>
        capo_taxsettings.errors.case_creation_limit_exceeded_exception.CaseCreationLimitExceededException: <p>You've exceeded the Amazon Web Services Support case creation limit for your account. </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.put_tax_exemption_request.PutTaxExemptionRequest]",
    ) -> OperationResponse[
        "capo_taxsettings.types.put_tax_exemption_response.PutTaxExemptionResponse"
    ]:
        import capo_taxsettings._operations.tax_settings.put_tax_exemption

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutTaxExemption")
    )
    input_: capo_taxsettings.types.put_tax_exemption_request.PutTaxExemptionRequest = {
        "account_ids": account_ids,
        "authority": authority,
        "exemption_type": exemption_type,
        "exemption_certificate": exemption_certificate,
    }

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