Starts an import job for an address list.
Parameters:
-
job_id
(JobId)
–
The identifier of the import job that needs to be started.
Raises:
Source code in docs_src/capo_mailmanager/_services/async_mail_manager.py
| async def start_address_list_import_job(
self,
job_id: "capo_mailmanager.types.job_id.JobId",
*,
config_overrides: Optional[AsyncMailManagerClientConfig] = None,
) -> "capo_mailmanager.types.start_address_list_import_job_response.StartAddressListImportJobResponse":
"""<p>Starts an import job for an address list.</p>
Args:
job_id: <p>The identifier of the import job that needs to be started.</p>
Raises:
capo_mailmanager.errors.access_denied_exception.AccessDeniedException: <p>Occurs when a user is denied access to a specific resource or action.</p>
capo_mailmanager.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
capo_mailmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when a requested resource is not found.</p>
capo_mailmanager.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Occurs when an operation exceeds a predefined service quota or limit.</p>
capo_mailmanager.errors.throttling_exception.ThrottlingException: <p>Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.</p>
capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mailmanager.types.start_address_list_import_job_request.StartAddressListImportJobRequest]",
) -> AsyncOperationResponse[
"capo_mailmanager.types.start_address_list_import_job_response.StartAddressListImportJobResponse"
]:
import capo_mailmanager._operations.mail_manager_svc.start_address_list_import_job
(
output,
http_response,
) = await capo_mailmanager._operations.mail_manager_svc.start_address_list_import_job.async_start_address_list_import_job(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartAddressListImportJob")
)
input_: capo_mailmanager.types.start_address_list_import_job_request.StartAddressListImportJobRequest = {
"job_id": job_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|