@asynccontextmanager
async def get_image_set_metadata(
self,
datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
image_set_id: "capo_medical_imaging.types.image_set_id.ImageSetId",
*,
config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
version_id: Optional[
"capo_medical_imaging.types.image_set_external_version_id.ImageSetExternalVersionId"
] = None,
) -> "AsyncGenerator[capo_medical_imaging.types.get_image_set_metadata_response.GetImageSetMetadataResponse]":
"""<p>Get metadata attributes for an image set.</p>
Args:
datastore_id: <p>The data store identifier.</p>
image_set_id: <p>The image set identifier.</p>
version_id: <p>The image set version identifier.</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.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.get_image_set_metadata_request.GetImageSetMetadataRequest]",
) -> AsyncOperationResponse[
"capo_medical_imaging.types.get_image_set_metadata_response.GetImageSetMetadataResponse"
]:
import capo_medical_imaging._operations.ahi_gateway_service.get_image_set_metadata
(
output,
http_response,
) = await capo_medical_imaging._operations.ahi_gateway_service.get_image_set_metadata.async_get_image_set_metadata(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_medical_imaging.types.get_image_set_metadata_response.GetImageSetMetadataResponse",
) -> dict[str, Any]:
import capo_medical_imaging.types.get_image_set_metadata_response
return capo_medical_imaging.types.get_image_set_metadata_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetImageSetMetadata", redact_output=_redact_output),
)
input_: capo_medical_imaging.types.get_image_set_metadata_request.GetImageSetMetadataRequest = {
"datastore_id": datastore_id,
"image_set_id": image_set_id,
}
if version_id is not None:
input_["version_id"] = version_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
try:
yield response.output
finally:
await response.response.aclose()