Skip to content

upload_read_set_part

upload_read_set_part(
    sequence_store_id: SequenceStoreId,
    upload_id: UploadId,
    part_source: ReadSetPartSource,
    part_number: int,
    payload: Body[Iterator[bytes]] | Iterator[bytes] | bytes,
    *,
    config_overrides: Optional[OmicsClientConfig] = None,
) -> UploadReadSetPartResponse

Uploads a specific part of a read set into a sequence store. When you a upload a read set part with a part number that already exists, the new part replaces the existing one. This operation returns a JSON formatted response containing a string identifier that is used to confirm that parts are being added to the intended upload.

For more information, see Direct upload to a sequence store in the Amazon Web Services HealthOmics User Guide.

Parameters:

  • sequence_store_id (SequenceStoreId) –

    The Sequence Store ID used for the multipart upload.

  • upload_id (UploadId) –

    The ID for the initiated multipart upload.

  • part_source (ReadSetPartSource) –

    The source file for an upload part.

  • part_number (int) –

    The number of the part being uploaded.

  • payload (Body[Iterator[bytes]] | Iterator[bytes] | bytes) –

    The read set data to upload for a part.

Raises:

Source code in docs_src/capo_omics/_services/omics.py
def upload_read_set_part(
    self,
    sequence_store_id: "capo_omics.types.sequence_store_id.SequenceStoreId",
    upload_id: "capo_omics.types.upload_id.UploadId",
    part_source: "capo_omics.types.read_set_part_source.ReadSetPartSource",
    part_number: int,
    payload: Body[Iterator[bytes]] | Iterator[bytes] | bytes,
    *,
    config_overrides: Optional[OmicsClientConfig] = None,
) -> "capo_omics.types.upload_read_set_part_response.UploadReadSetPartResponse":
    """<p>Uploads a specific part of a read set into a sequence store. When you a upload a read set part with a part number that already exists, the new part replaces the existing one. This operation returns a JSON formatted response containing a string identifier that is used to confirm that parts are being added to the intended upload.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/synchronous-uploads.html">Direct upload to a sequence store</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>

    Args:
        sequence_store_id: <p>The Sequence Store ID used for the multipart upload.</p>
        upload_id: <p>The ID for the initiated multipart upload.</p>
        part_source: <p>The source file for an upload part.</p>
        part_number: <p>The number of the part being uploaded.</p>
        payload: <p>The read set data to upload for a part.</p>

    Raises:
        capo_omics.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_omics.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred. Try the request again.</p>
        capo_omics.errors.not_supported_operation_exception.NotSupportedOperationException: <p> The operation is not supported by Amazon Omics, or the API does not exist. </p>
        capo_omics.errors.request_timeout_exception.RequestTimeoutException: <p>The request timed out.</p>
        capo_omics.errors.resource_not_found_exception.ResourceNotFoundException: <p>The target resource was not found in the current Region.</p>
        capo_omics.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota.</p>
        capo_omics.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_omics.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_omics.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_omics.types.upload_read_set_part_request.UploadReadSetPartRequest]",
    ) -> OperationResponse[
        "capo_omics.types.upload_read_set_part_response.UploadReadSetPartResponse"
    ]:
        import capo_omics._operations.omics.upload_read_set_part

        output, http_response = (
            capo_omics._operations.omics.upload_read_set_part.upload_read_set_part(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_omics.types.upload_read_set_part_request.UploadReadSetPartRequest",
    ) -> dict[str, Any]:
        import capo_omics.types.upload_read_set_part_request

        return capo_omics.types.upload_read_set_part_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UploadReadSetPart", redact_input=_redact_input),
    )
    input_: capo_omics.types.upload_read_set_part_request.UploadReadSetPartRequest = {
        "sequence_store_id": sequence_store_id,
        "upload_id": upload_id,
        "part_source": part_source,
        "part_number": part_number,
        "payload": ensure_sync_iterator(payload),
    }

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