Skip to content

start_search_result_export_job

start_search_result_export_job(
    search_job_identifier: GenericId,
    export_specification: ExportSpecification,
    *,
    config_overrides: Optional[BackupSearchClientConfig] = None,
    client_token: Optional[str] = None,
    tags: Optional[TagMap] = None,
    role_arn: Optional[IamRoleArn] = None,
) -> StartSearchResultExportJobOutput

This operations starts a job to export the results of search job to a designated S3 bucket.

Parameters:

  • search_job_identifier (GenericId) –

    The unique string that specifies the search job.

  • export_specification (ExportSpecification) –

    This specification contains a required string of the destination bucket; optionally, you can include the destination prefix.

  • client_token (Optional[str], default: None ) –

    Include this parameter to allow multiple identical calls for idempotency.

    A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.

  • tags (Optional[TagMap], default: None ) –

    Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

  • role_arn (Optional[IamRoleArn], default: None ) –

    This parameter specifies the role ARN used to start the search results export jobs.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by a service.

  • ConflictException –

    This exception occurs when a conflict with a previous successful operation is detected. This generally occurs when the previous operation did not have time to propagate to the host serving the current request.

    A retry (with appropriate backoff logic) is the recommended response to this exception.

  • ResourceNotFoundException –

    The resource was not found for this request.

    Confirm the resource information, such as the ARN or type is correct and exists, then retry the request.

  • ServiceQuotaExceededException –

    The request denied due to exceeding the quota limits permitted.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_backupsearch/_services/backup_search.py
def start_search_result_export_job(
    self,
    search_job_identifier: "capo_backupsearch.types.generic_id.GenericId",
    export_specification: "capo_backupsearch.types.export_specification.ExportSpecification",
    *,
    config_overrides: Optional[BackupSearchClientConfig] = None,
    client_token: Optional[str] = None,
    tags: Optional["capo_backupsearch.types.tag_map.TagMap"] = None,
    role_arn: Optional["capo_backupsearch.types.iam_role_arn.IamRoleArn"] = None,
) -> "capo_backupsearch.types.start_search_result_export_job_output.StartSearchResultExportJobOutput":
    """<p>This operations starts a job to export the results of search job to a designated S3 bucket.</p>

    Args:
        search_job_identifier: <p>The unique string that specifies the search job.</p>
        export_specification: <p>This specification contains a required string of the destination bucket; optionally, you can include the destination prefix.</p>
        client_token: <p>Include this parameter to allow multiple identical calls for idempotency.</p> <p>A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.</p>
        tags: <p>Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /. </p>
        role_arn: <p>This parameter specifies the role ARN used to start the search results export jobs.</p>

    Raises:
        capo_backupsearch.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_backupsearch.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_backupsearch.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_backupsearch.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_backupsearch.errors.conflict_exception.ConflictException: <p>This exception occurs when a conflict with a previous successful operation is detected. This generally occurs when the previous operation did not have time to propagate to the host serving the current request.</p> <p>A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_backupsearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found for this request.</p> <p>Confirm the resource information, such as the ARN or type is correct and exists, then retry the request.</p>
        capo_backupsearch.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request denied due to exceeding the quota limits permitted.</p>
        capo_backupsearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_backupsearch.types.start_search_result_export_job_input.StartSearchResultExportJobInput]",
    ) -> OperationResponse[
        "capo_backupsearch.types.start_search_result_export_job_output.StartSearchResultExportJobOutput"
    ]:
        import capo_backupsearch._operations.cryo_backup_search_service.start_search_result_export_job

        output, http_response = (
            capo_backupsearch._operations.cryo_backup_search_service.start_search_result_export_job.start_search_result_export_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartSearchResultExportJob")
    )
    input_: capo_backupsearch.types.start_search_result_export_job_input.StartSearchResultExportJobInput = {
        "search_job_identifier": search_job_identifier,
        "export_specification": export_specification,
    }
    if client_token is not None:
        input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags
    if role_arn is not None:
        input_["role_arn"] = role_arn

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