Retrieves the tax exemption of accounts listed in a consolidated billing family. The IAM action is tax:GetExemptions.
Parameters:
Raises:
Source code in docs_src/capo_taxsettings/_services/tax_settings.py
| def list_tax_exemptions(
self,
*,
config_overrides: Optional[TaxSettingsClientConfig] = None,
max_results: Optional["capo_taxsettings.types.max_results.MaxResults"] = None,
next_token: Optional[
"capo_taxsettings.types.pagination_token_string.PaginationTokenString"
] = None,
) -> (
"capo_taxsettings.types.list_tax_exemptions_response.ListTaxExemptionsResponse"
):
"""<p>Retrieves the tax exemption of accounts listed in a consolidated billing family. The IAM action is <code>tax:GetExemptions</code>.</p>
Args:
max_results: <p>The number of results you want in one response. </p>
next_token: <p>The token to retrieve the next set of results. </p>
Raises:
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.list_tax_exemptions_request.ListTaxExemptionsRequest]",
) -> OperationResponse[
"capo_taxsettings.types.list_tax_exemptions_response.ListTaxExemptionsResponse"
]:
import capo_taxsettings._operations.tax_settings.list_tax_exemptions
output, http_response = (
capo_taxsettings._operations.tax_settings.list_tax_exemptions.list_tax_exemptions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListTaxExemptions")
)
input_: capo_taxsettings.types.list_tax_exemptions_request.ListTaxExemptionsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|