Downloads your tax documents to the Amazon S3 bucket that you specify in your request.
Parameters:
Raises:
-
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/async_tax_settings.py
| async def get_tax_registration_document(
self,
tax_document_metadata: "capo_taxsettings.types.tax_document_metadata.TaxDocumentMetadata",
*,
config_overrides: Optional[AsyncTaxSettingsClientConfig] = None,
destination_s3_location: Optional[
"capo_taxsettings.types.destination_s3_location.DestinationS3Location"
] = None,
) -> "capo_taxsettings.types.get_tax_registration_document_response.GetTaxRegistrationDocumentResponse":
"""<p>Downloads your tax documents to the Amazon S3 bucket that you specify in your request.</p>
Args:
destination_s3_location: <p>The Amazon S3 bucket that you specify to download your tax documents to.</p>
tax_document_metadata: <p>The metadata for your tax document.</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.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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_taxsettings.types.get_tax_registration_document_request.GetTaxRegistrationDocumentRequest]",
) -> AsyncOperationResponse[
"capo_taxsettings.types.get_tax_registration_document_response.GetTaxRegistrationDocumentResponse"
]:
import capo_taxsettings._operations.tax_settings.get_tax_registration_document
(
output,
http_response,
) = await capo_taxsettings._operations.tax_settings.get_tax_registration_document.async_get_tax_registration_document(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTaxRegistrationDocument")
)
input_: capo_taxsettings.types.get_tax_registration_document_request.GetTaxRegistrationDocumentRequest = {
"tax_document_metadata": tax_document_metadata
}
if destination_s3_location is not None:
input_["destination_s3_location"] = destination_s3_location
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|