Skip to content

update_image_set_metadata async

update_image_set_metadata(
    datastore_id: DatastoreId,
    image_set_id: ImageSetId,
    latest_version_id: ImageSetExternalVersionId,
    update_image_set_metadata_updates: MetadataUpdates,
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
    force: Optional[bool] = None,
    include_study_image_sets: Optional[bool] = None,
) -> UpdateImageSetMetadataResponse

Update image set metadata attributes.

Parameters:

  • datastore_id (DatastoreId) –

    The data store identifier.

  • image_set_id (ImageSetId) –

    The image set identifier.

  • latest_version_id (ImageSetExternalVersionId) –

    The latest image set version identifier.

  • force (Optional[bool], default: None ) –

    Setting this flag will force the UpdateImageSetMetadata operation for the following attributes:

    • Tag.StudyInstanceUID, Tag.SeriesInstanceUID, Tag.SOPInstanceUID, and Tag.StudyID

    • Adding, removing, or updating private tags for an individual SOP Instance

  • include_study_image_sets (Optional[bool], default: None ) –

    Flag to apply the metadata updates to all image sets in the same Study as the requested image set ID.

  • update_image_set_metadata_updates (MetadataUpdates) –

    Update image set metadata updates.

Raises:

Source code in docs_src/capo_medical_imaging/_services/async_medical_imaging.py
async def update_image_set_metadata(
    self,
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    image_set_id: "capo_medical_imaging.types.image_set_id.ImageSetId",
    latest_version_id: "capo_medical_imaging.types.image_set_external_version_id.ImageSetExternalVersionId",
    update_image_set_metadata_updates: "capo_medical_imaging.types.metadata_updates.MetadataUpdates",
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
    force: Optional[bool] = None,
    include_study_image_sets: Optional[bool] = None,
) -> "capo_medical_imaging.types.update_image_set_metadata_response.UpdateImageSetMetadataResponse":
    """<p>Update image set metadata attributes.</p>

    Args:
        datastore_id: <p>The data store identifier.</p>
        image_set_id: <p>The image set identifier.</p>
        latest_version_id: <p>The latest image set version identifier.</p>
        force: <p>Setting this flag will force the <code>UpdateImageSetMetadata</code> operation for the following attributes:</p> <ul> <li> <p> <code>Tag.StudyInstanceUID</code>, <code>Tag.SeriesInstanceUID</code>, <code>Tag.SOPInstanceUID</code>, and <code>Tag.StudyID</code> </p> </li> <li> <p>Adding, removing, or updating private tags for an individual SOP Instance</p> </li> </ul>
        include_study_image_sets: <p>Flag to apply the metadata updates to all image sets in the same Study as the requested image set ID.</p>
        update_image_set_metadata_updates: <p>Update image set metadata updates.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_medical_imaging.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request caused a service quota to be exceeded.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medical_imaging.types.update_image_set_metadata_request.UpdateImageSetMetadataRequest]",
    ) -> AsyncOperationResponse[
        "capo_medical_imaging.types.update_image_set_metadata_response.UpdateImageSetMetadataResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.update_image_set_metadata

        (
            output,
            http_response,
        ) = await capo_medical_imaging._operations.ahi_gateway_service.update_image_set_metadata.async_update_image_set_metadata(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_medical_imaging.types.update_image_set_metadata_request.UpdateImageSetMetadataRequest",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.update_image_set_metadata_request

        return capo_medical_imaging.types.update_image_set_metadata_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateImageSetMetadata", redact_input=_redact_input),
    )
    input_: capo_medical_imaging.types.update_image_set_metadata_request.UpdateImageSetMetadataRequest = {
        "datastore_id": datastore_id,
        "image_set_id": image_set_id,
        "latest_version_id": latest_version_id,
        "update_image_set_metadata_updates": update_image_set_metadata_updates,
    }
    if force is not None:
        input_["force"] = force
    if include_study_image_sets is not None:
        input_["include_study_image_sets"] = include_study_image_sets

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output