Struct aws_sdk_healthlake::client::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for Amazon HealthLake
Client for invoking operations on Amazon HealthLake. Each operation on Amazon HealthLake 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_healthlake::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_healthlake::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 CreateFHIRDatastore
operation has
a Client::create_fhir_datastore
, 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.create_fhir_datastore()
.datastore_name("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 create_fhir_datastore(&self) -> CreateFHIRDatastoreFluentBuilder
pub fn create_fhir_datastore(&self) -> CreateFHIRDatastoreFluentBuilder
Constructs a fluent builder for the CreateFHIRDatastore
operation.
- The fluent builder is configurable:
datastore_name(impl Into<String>)
/set_datastore_name(Option<String>)
:
required: falseThe user generated name for the data store.
datastore_type_version(FhirVersion)
/set_datastore_type_version(Option<FhirVersion>)
:
required: trueThe FHIR version of the data store. The only supported version is R4.
sse_configuration(SseConfiguration)
/set_sse_configuration(Option<SseConfiguration>)
:
required: falseThe server-side encryption key configuration for a customer provided encryption key specified for creating a data store.
preload_data_config(PreloadDataConfig)
/set_preload_data_config(Option<PreloadDataConfig>)
:
required: falseOptional parameter to preload data upon creation of the data store. Currently, the only supported preloaded data is synthetic data generated from Synthea.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseOptional user provided token used for ensuring idempotency.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseResource tags that are applied to a data store when it is created.
identity_provider_configuration(IdentityProviderConfiguration)
/set_identity_provider_configuration(Option<IdentityProviderConfiguration>)
:
required: falseThe configuration of the identity provider that you want to use for your data store.
- On success, responds with
CreateFhirDatastoreOutput
with field(s):datastore_id(String)
:The AWS-generated data store id. This id is in the output from the initial data store creation call.
datastore_arn(String)
:The data store ARN is generated during the creation of the data store and can be found in the output from the initial data store creation call.
datastore_status(DatastoreStatus)
:The status of the FHIR data store.
datastore_endpoint(String)
:The AWS endpoint for the created data store.
- On failure, responds with
SdkError<CreateFHIRDatastoreError>
source§impl Client
impl Client
sourcepub fn delete_fhir_datastore(&self) -> DeleteFHIRDatastoreFluentBuilder
pub fn delete_fhir_datastore(&self) -> DeleteFHIRDatastoreFluentBuilder
Constructs a fluent builder for the DeleteFHIRDatastore
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS-generated ID for the data store to be deleted.
- On success, responds with
DeleteFhirDatastoreOutput
with field(s):datastore_id(String)
:The AWS-generated ID for the data store to be deleted.
datastore_arn(String)
:The Amazon Resource Name (ARN) that gives AWS HealthLake access permission.
datastore_status(DatastoreStatus)
:The status of the data store that the user has requested to be deleted.
datastore_endpoint(String)
:The AWS endpoint for the data store the user has requested to be deleted.
- On failure, responds with
SdkError<DeleteFHIRDatastoreError>
source§impl Client
impl Client
sourcepub fn describe_fhir_datastore(&self) -> DescribeFHIRDatastoreFluentBuilder
pub fn describe_fhir_datastore(&self) -> DescribeFHIRDatastoreFluentBuilder
Constructs a fluent builder for the DescribeFHIRDatastore
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS-generated data store ID.
- On success, responds with
DescribeFhirDatastoreOutput
with field(s):datastore_properties(Option<DatastoreProperties>)
:All properties associated with a data store, including the data store ID, data store ARN, data store name, data store status, when the data store was created, data store type version, and the data store’s endpoint.
- On failure, responds with
SdkError<DescribeFHIRDatastoreError>
source§impl Client
impl Client
sourcepub fn describe_fhir_export_job(&self) -> DescribeFHIRExportJobFluentBuilder
pub fn describe_fhir_export_job(&self) -> DescribeFHIRExportJobFluentBuilder
Constructs a fluent builder for the DescribeFHIRExportJob
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS generated ID for the data store from which files are being exported from for an export job.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe AWS generated ID for an export job.
- On success, responds with
DescribeFhirExportJobOutput
with field(s):export_job_properties(Option<ExportJobProperties>)
:Displays the properties of the export job, including the ID, Arn, Name, and the status of the job.
- On failure, responds with
SdkError<DescribeFHIRExportJobError>
source§impl Client
impl Client
sourcepub fn describe_fhir_import_job(&self) -> DescribeFHIRImportJobFluentBuilder
pub fn describe_fhir_import_job(&self) -> DescribeFHIRImportJobFluentBuilder
Constructs a fluent builder for the DescribeFHIRImportJob
operation.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS-generated ID of the data store.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe AWS-generated job ID.
- On success, responds with
DescribeFhirImportJobOutput
with field(s):import_job_properties(Option<ImportJobProperties>)
:The properties of the Import job request, including the ID, ARN, name, status of the job, and the progress report of the job.
- On failure, responds with
SdkError<DescribeFHIRImportJobError>
source§impl Client
impl Client
sourcepub fn list_fhir_datastores(&self) -> ListFHIRDatastoresFluentBuilder
pub fn list_fhir_datastores(&self) -> ListFHIRDatastoresFluentBuilder
Constructs a fluent builder for the ListFHIRDatastores
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(DatastoreFilter)
/set_filter(Option<DatastoreFilter>)
:
required: falseLists all filters associated with a FHIR data store request.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFetches the next page of data stores when results are paginated.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of data stores returned in a single page of a ListFHIRDatastoresRequest call.
- On success, responds with
ListFhirDatastoresOutput
with field(s):datastore_properties_list(Vec::<DatastoreProperties>)
:All properties associated with the listed data stores.
next_token(Option<String>)
:Pagination token that can be used to retrieve the next page of results.
- On failure, responds with
SdkError<ListFHIRDatastoresError>
source§impl Client
impl Client
sourcepub fn list_fhir_export_jobs(&self) -> ListFHIRExportJobsFluentBuilder
pub fn list_fhir_export_jobs(&self) -> ListFHIRExportJobsFluentBuilder
Constructs a fluent builder for the ListFHIRExportJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThis parameter limits the response to the export job with the specified data store ID.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token used to identify the next page of results to return for a ListFHIRExportJobs query.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThis parameter limits the number of results returned for a ListFHIRExportJobs to a maximum quantity specified by the user.
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThis parameter limits the response to the export job with the specified job name.
job_status(JobStatus)
/set_job_status(Option<JobStatus>)
:
required: falseThis parameter limits the response to the export jobs with the specified job status.
submitted_before(DateTime)
/set_submitted_before(Option<DateTime>)
:
required: falseThis parameter limits the response to FHIR export jobs submitted before a user specified date.
submitted_after(DateTime)
/set_submitted_after(Option<DateTime>)
:
required: falseThis parameter limits the response to FHIR export jobs submitted after a user specified date.
- On success, responds with
ListFhirExportJobsOutput
with field(s):export_job_properties_list(Vec::<ExportJobProperties>)
:The properties of listed FHIR export jobs, including the ID, ARN, name, and the status of the job.
next_token(Option<String>)
:A pagination token used to identify the next page of results to return for a ListFHIRExportJobs query.
- On failure, responds with
SdkError<ListFHIRExportJobsError>
source§impl Client
impl Client
sourcepub fn list_fhir_import_jobs(&self) -> ListFHIRImportJobsFluentBuilder
pub fn list_fhir_import_jobs(&self) -> ListFHIRImportJobsFluentBuilder
Constructs a fluent builder for the ListFHIRImportJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThis parameter limits the response to the import job with the specified data store ID.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token used to identify the next page of results to return for a ListFHIRImportJobs query.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThis parameter limits the number of results returned for a ListFHIRImportJobs to a maximum quantity specified by the user.
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThis parameter limits the response to the import job with the specified job name.
job_status(JobStatus)
/set_job_status(Option<JobStatus>)
:
required: falseThis parameter limits the response to the import job with the specified job status.
submitted_before(DateTime)
/set_submitted_before(Option<DateTime>)
:
required: falseThis parameter limits the response to FHIR import jobs submitted before a user specified date.
submitted_after(DateTime)
/set_submitted_after(Option<DateTime>)
:
required: falseThis parameter limits the response to FHIR import jobs submitted after a user specified date.
- On success, responds with
ListFhirImportJobsOutput
with field(s):import_job_properties_list(Vec::<ImportJobProperties>)
:The properties of a listed FHIR import jobs, including the ID, ARN, name, the status of the job, and the progress report of the job.
next_token(Option<String>)
:A pagination token used to identify the next page of results to return for a ListFHIRImportJobs query.
- On failure, responds with
SdkError<ListFHIRImportJobsError>
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 data store for which tags are being added.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:Returns a list of tags associated with a data store.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn start_fhir_export_job(&self) -> StartFHIRExportJobFluentBuilder
pub fn start_fhir_export_job(&self) -> StartFHIRExportJobFluentBuilder
Constructs a fluent builder for the StartFHIRExportJob
operation.
- The fluent builder is configurable:
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThe user generated name for an export job.
output_data_config(OutputDataConfig)
/set_output_data_config(Option<OutputDataConfig>)
:
required: trueThe output data configuration that was supplied when the export job was created.
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS generated ID for the data store from which files are being exported for an export job.
data_access_role_arn(impl Into<String>)
/set_data_access_role_arn(Option<String>)
:
required: trueThe Amazon Resource Name used during the initiation of the job.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueAn optional user provided token used for ensuring idempotency.
- On success, responds with
StartFhirExportJobOutput
with field(s):job_id(String)
:The AWS generated ID for an export job.
job_status(JobStatus)
:The status of a FHIR export job. Possible statuses are SUBMITTED, IN_PROGRESS, COMPLETED, or FAILED.
datastore_id(Option<String>)
:The AWS generated ID for the data store from which files are being exported for an export job.
- On failure, responds with
SdkError<StartFHIRExportJobError>
source§impl Client
impl Client
sourcepub fn start_fhir_import_job(&self) -> StartFHIRImportJobFluentBuilder
pub fn start_fhir_import_job(&self) -> StartFHIRImportJobFluentBuilder
Constructs a fluent builder for the StartFHIRImportJob
operation.
- The fluent builder is configurable:
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThe name of the FHIR Import job in the StartFHIRImport job request.
input_data_config(InputDataConfig)
/set_input_data_config(Option<InputDataConfig>)
:
required: trueThe input properties of the FHIR Import job in the StartFHIRImport job request.
job_output_data_config(OutputDataConfig)
/set_job_output_data_config(Option<OutputDataConfig>)
:
required: trueThe output data configuration that was supplied when the export job was created.
datastore_id(impl Into<String>)
/set_datastore_id(Option<String>)
:
required: trueThe AWS-generated data store ID.
data_access_role_arn(impl Into<String>)
/set_data_access_role_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) that gives AWS HealthLake access permission.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueOptional user provided token used for ensuring idempotency.
- On success, responds with
StartFhirImportJobOutput
with field(s):job_id(String)
:The AWS-generated job ID.
job_status(JobStatus)
:The status of an import job.
datastore_id(Option<String>)
:The AWS-generated data store ID.
- On failure, responds with
SdkError<StartFHIRImportJobError>
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)that gives AWS HealthLake access to the data store which tags are being added to.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe user specified key and value pair tags being added to a data store.
- 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 data store for which tags are being removed.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys for the tags to be removed from the HealthLake data store.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
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