Struct aws_sdk_medicalimaging::client::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for AWS Health Imaging
Client for invoking operations on AWS Health Imaging. Each operation on AWS Health Imaging is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_medicalimaging::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_medicalimaging::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CopyImageSet
operation has
a Client::copy_image_set
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.copy_image_set()
.datastore_id("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn copy_image_set(&self) -> CopyImageSetFluentBuilder
pub fn copy_image_set(&self) -> CopyImageSetFluentBuilder
Constructs a fluent builder for the CopyImageSet
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
source_image_set_id(impl Into<String>)
/set_source_image_set_id(Option<String>)
:
required: trueThe source image set identifier.
copy_image_set_information(CopyImageSetInformation)
/set_copy_image_set_information(Option<CopyImageSetInformation>)
:
required: trueCopy image set information.
- On success, responds with
CopyImageSetOutput
with field(s):datastore_id(String)
:The data store identifier.
source_image_set_properties(Option<CopySourceImageSetProperties>)
:The properties of the source image set.
destination_image_set_properties(Option<CopyDestinationImageSetProperties>)
:The properties of the destination image set.
- On failure, responds with
SdkError<CopyImageSetError>
source§impl Client
impl Client
sourcepub fn create_datastore(&self) -> CreateDatastoreFluentBuilder
pub fn create_datastore(&self) -> CreateDatastoreFluentBuilder
Constructs a fluent builder for the CreateDatastore
operation.
- The fluent builder is configurable:
datastore_name(impl Into<String>)
/set_datastore_name(Option<String>)
:
required: falseThe data store name.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueA unique identifier for API idempotency.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags provided when creating a data store.
kms_key_arn(impl Into<String>)
/set_kms_key_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) assigned to the Key Management Service (KMS) key for accessing encrypted data.
- On success, responds with
CreateDatastoreOutput
with field(s):datastore_id(String)
:The data store identifier.
datastore_status(DatastoreStatus)
:The data store status.
- On failure, responds with
SdkError<CreateDatastoreError>
source§impl Client
impl Client
sourcepub fn delete_datastore(&self) -> DeleteDatastoreFluentBuilder
pub fn delete_datastore(&self) -> DeleteDatastoreFluentBuilder
Constructs a fluent builder for the DeleteDatastore
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
- On success, responds with
DeleteDatastoreOutput
with field(s):datastore_id(String)
:The data store identifier.
datastore_status(DatastoreStatus)
:The data store status.
- On failure, responds with
SdkError<DeleteDatastoreError>
source§impl Client
impl Client
sourcepub fn delete_image_set(&self) -> DeleteImageSetFluentBuilder
pub fn delete_image_set(&self) -> DeleteImageSetFluentBuilder
Constructs a fluent builder for the DeleteImageSet
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
- On success, responds with
DeleteImageSetOutput
with field(s):datastore_id(String)
:The data store identifier.
image_set_id(String)
:The image set identifier.
image_set_state(ImageSetState)
:The image set state.
image_set_workflow_status(ImageSetWorkflowStatus)
:The image set workflow status.
- On failure, responds with
SdkError<DeleteImageSetError>
source§impl Client
impl Client
sourcepub fn get_datastore(&self) -> GetDatastoreFluentBuilder
pub fn get_datastore(&self) -> GetDatastoreFluentBuilder
Constructs a fluent builder for the GetDatastore
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
- On success, responds with
GetDatastoreOutput
with field(s):datastore_properties(Option<DatastoreProperties>)
:The data store properties.
- On failure, responds with
SdkError<GetDatastoreError>
source§impl Client
impl Client
sourcepub fn get_dicom_import_job(&self) -> GetDICOMImportJobFluentBuilder
pub fn get_dicom_import_job(&self) -> GetDICOMImportJobFluentBuilder
Constructs a fluent builder for the GetDICOMImportJob
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe import job identifier.
- On success, responds with
GetDicomImportJobOutput
with field(s):job_properties(Option<DicomImportJobProperties>)
:The properties of the import job.
- On failure, responds with
SdkError<GetDICOMImportJobError>
source§impl Client
impl Client
sourcepub fn get_image_frame(&self) -> GetImageFrameFluentBuilder
pub fn get_image_frame(&self) -> GetImageFrameFluentBuilder
Constructs a fluent builder for the GetImageFrame
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
image_frame_information(ImageFrameInformation)
/set_image_frame_information(Option<ImageFrameInformation>)
:
required: trueInformation about the image frame (pixel data) identifier.
- On success, responds with
GetImageFrameOutput
with field(s):image_frame_blob(ByteStream)
:The blob containing the aggregated image frame information.
content_type(Option<String>)
:The format in which the image frame information is returned to the customer. Default is
application/octet-stream
.
- On failure, responds with
SdkError<GetImageFrameError>
source§impl Client
impl Client
sourcepub fn get_image_set(&self) -> GetImageSetFluentBuilder
pub fn get_image_set(&self) -> GetImageSetFluentBuilder
Constructs a fluent builder for the GetImageSet
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
version_id(impl Into<String>)
/set_version_id(Option<String>)
:
required: falseThe image set version identifier.
- On success, responds with
GetImageSetOutput
with field(s):datastore_id(String)
:The data store identifier.
image_set_id(String)
:The image set identifier.
version_id(String)
:The image set version identifier.
image_set_state(ImageSetState)
:The image set state.
image_set_workflow_status(Option<ImageSetWorkflowStatus>)
:The image set workflow status.
created_at(Option<DateTime>)
:The timestamp when image set properties were created.
updated_at(Option<DateTime>)
:The timestamp when image set properties were updated.
deleted_at(Option<DateTime>)
:The timestamp when the image set properties were deleted.
message(Option<String>)
:The error message thrown if an image set action fails.
image_set_arn(Option<String>)
:The Amazon Resource Name (ARN) assigned to the image set.
- On failure, responds with
SdkError<GetImageSetError>
source§impl Client
impl Client
sourcepub fn get_image_set_metadata(&self) -> GetImageSetMetadataFluentBuilder
pub fn get_image_set_metadata(&self) -> GetImageSetMetadataFluentBuilder
Constructs a fluent builder for the GetImageSetMetadata
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
version_id(impl Into<String>)
/set_version_id(Option<String>)
:
required: falseThe image set version identifier.
- On success, responds with
GetImageSetMetadataOutput
with field(s):image_set_metadata_blob(ByteStream)
:The blob containing the aggregated metadata information for the image set.
content_type(Option<String>)
:The format in which the study metadata is returned to the customer. Default is
text/plain
.content_encoding(Option<String>)
:The compression format in which image set metadata attributes are returned.
- On failure, responds with
SdkError<GetImageSetMetadataError>
source§impl Client
impl Client
sourcepub fn list_datastores(&self) -> ListDatastoresFluentBuilder
pub fn list_datastores(&self) -> ListDatastoresFluentBuilder
Constructs a fluent builder for the ListDatastores
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_status(DatastoreStatus)
/set_datastore_status(Option<DatastoreStatus>)
:
required: falseThe data store status.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token used to request the list of data stores on the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseValid Range: Minimum value of 1. Maximum value of 50.
- On success, responds with
ListDatastoresOutput
with field(s):datastore_summaries(Option<Vec::<DatastoreSummary>>)
:The list of summaries of data stores.
next_token(Option<String>)
:The pagination token used to retrieve the list of data stores on the next page.
- On failure, responds with
SdkError<ListDatastoresError>
source§impl Client
impl Client
sourcepub fn list_dicom_import_jobs(&self) -> ListDICOMImportJobsFluentBuilder
pub fn list_dicom_import_jobs(&self) -> ListDICOMImportJobsFluentBuilder
Constructs a fluent builder for the ListDICOMImportJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
job_status(JobStatus)
/set_job_status(Option<JobStatus>)
:
required: falseThe filters for listing import jobs based on status.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token used to request the list of import jobs on the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe max results count. The upper bound is determined by load testing.
- On success, responds with
ListDicomImportJobsOutput
with field(s):job_summaries(Vec::<DicomImportJobSummary>)
:A list of job summaries.
next_token(Option<String>)
:The pagination token used to retrieve the list of import jobs on the next page.
- On failure, responds with
SdkError<ListDICOMImportJobsError>
source§impl Client
impl Client
sourcepub fn list_image_set_versions(&self) -> ListImageSetVersionsFluentBuilder
pub fn list_image_set_versions(&self) -> ListImageSetVersionsFluentBuilder
Constructs a fluent builder for the ListImageSetVersions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token used to request the list of image set versions on the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe max results count.
- On success, responds with
ListImageSetVersionsOutput
with field(s):image_set_properties_list(Vec::<ImageSetProperties>)
:Lists all properties associated with an image set.
next_token(Option<String>)
:The pagination token used to retrieve the list of image set versions on the next page.
- On failure, responds with
SdkError<ListImageSetVersionsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the medical imaging resource to list tags for.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(HashMap::<String, String>)
:A list of all tags associated with a medical imaging resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn search_image_sets(&self) -> SearchImageSetsFluentBuilder
pub fn search_image_sets(&self) -> SearchImageSetsFluentBuilder
Constructs a fluent builder for the SearchImageSets
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe identifier of the data store where the image sets reside.
search_criteria(SearchCriteria)
/set_search_criteria(Option<SearchCriteria>)
:
required: falseThe search criteria that filters by applying a maximum of 1 item to
SearchByAttribute
.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results that can be returned in a search.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token used for pagination of results returned in the response. Use the token returned from the previous request to continue results where the previous request ended.
- On success, responds with
SearchImageSetsOutput
with field(s):image_sets_metadata_summaries(Vec::<ImageSetsMetadataSummary>)
:The model containing the image set results.
sort(Option<Sort>)
:The sort order for image set search results.
next_token(Option<String>)
:The token for pagination results.
- On failure, responds with
SdkError<SearchImageSetsError>
source§impl Client
impl Client
sourcepub fn start_dicom_import_job(&self) -> StartDICOMImportJobFluentBuilder
pub fn start_dicom_import_job(&self) -> StartDICOMImportJobFluentBuilder
Constructs a fluent builder for the StartDICOMImportJob
operation.
- The fluent builder is configurable:
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThe import job name.
data_access_role_arn(impl Into<String>)
/set_data_access_role_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants permission to access medical imaging resources.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueA unique identifier for API idempotency.
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
input_s3_uri(impl Into<String>)
/set_input_s3_uri(Option<String>)
:
required: trueThe input prefix path for the S3 bucket that contains the DICOM files to be imported.
output_s3_uri(impl Into<String>)
/set_output_s3_uri(Option<String>)
:
required: trueThe output prefix of the S3 bucket to upload the results of the DICOM import job.
- On success, responds with
StartDicomImportJobOutput
with field(s):datastore_id(String)
:The data store identifier.
job_id(String)
:The import job identifier.
job_status(JobStatus)
:The import job status.
submitted_at(DateTime)
:The timestamp when the import job was submitted.
- On failure, responds with
SdkError<StartDICOMImportJobError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the medical imaging resource that tags are being added to.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe user-specified key and value tag pairs added to a medical imaging resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the medical imaging resource that tags are being removed from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys for the tags to be removed from the medical imaging resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_image_set_metadata(&self) -> UpdateImageSetMetadataFluentBuilder
pub fn update_image_set_metadata(&self) -> UpdateImageSetMetadataFluentBuilder
Constructs a fluent builder for the UpdateImageSetMetadata
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe data store identifier.
image_set_id(impl Into<String>)
/set_image_set_id(Option<String>)
:
required: trueThe image set identifier.
latest_version_id(impl Into<String>)
/set_latest_version_id(Option<String>)
:
required: trueThe latest image set version identifier.
update_image_set_metadata_updates(MetadataUpdates)
/set_update_image_set_metadata_updates(Option<MetadataUpdates>)
:
required: trueUpdate image set metadata updates.
- On success, responds with
UpdateImageSetMetadataOutput
with field(s):datastore_id(String)
:The data store identifier.
image_set_id(String)
:The image set identifier.
latest_version_id(String)
:The latest image set version identifier.
image_set_state(ImageSetState)
:The image set state.
image_set_workflow_status(Option<ImageSetWorkflowStatus>)
:The image set workflow status.
created_at(Option<DateTime>)
:The timestamp when image set metadata was created.
updated_at(Option<DateTime>)
:The timestamp when image set metadata was updated.
message(Option<String>)
:The error message thrown if an update image set metadata action fails.
- On failure, responds with
SdkError<UpdateImageSetMetadataError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more