Skip to content

get_address_list_import_job

get_address_list_import_job(
    job_id: JobId, *, config_overrides: Optional[MailManagerClientConfig] = None
) -> GetAddressListImportJobResponse

Fetch attributes of an import job.

Parameters:

  • job_id (JobId) –

    The identifier of the import job that needs to be retrieved.

Raises:

Source code in docs_src/capo_mailmanager/_services/mail_manager.py
def get_address_list_import_job(
    self,
    job_id: "capo_mailmanager.types.job_id.JobId",
    *,
    config_overrides: Optional[MailManagerClientConfig] = None,
) -> "capo_mailmanager.types.get_address_list_import_job_response.GetAddressListImportJobResponse":
    """<p>Fetch attributes of an import job.</p>

    Args:
        job_id: <p>The identifier of the import job that needs to be retrieved.</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.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when a requested resource is not found.</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.
    """

    def _handler(
        req: "OperationRequest[capo_mailmanager.types.get_address_list_import_job_request.GetAddressListImportJobRequest]",
    ) -> OperationResponse[
        "capo_mailmanager.types.get_address_list_import_job_response.GetAddressListImportJobResponse"
    ]:
        import capo_mailmanager._operations.mail_manager_svc.get_address_list_import_job

        output, http_response = (
            capo_mailmanager._operations.mail_manager_svc.get_address_list_import_job.get_address_list_import_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_mailmanager.types.get_address_list_import_job_response.GetAddressListImportJobResponse",
    ) -> dict[str, Any]:
        import capo_mailmanager.types.get_address_list_import_job_response

        return capo_mailmanager.types.get_address_list_import_job_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetAddressListImportJob", redact_output=_redact_output),
    )
    input_: capo_mailmanager.types.get_address_list_import_job_request.GetAddressListImportJobRequest = {
        "job_id": job_id
    }

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