Class: Aws::HealthLake::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::HealthLake::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb
Overview
An API client for HealthLake. To construct a client, you need to configure a :region and :credentials.
client = Aws::HealthLake::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_fhir_datastore(params = {}) ⇒ Types::CreateFHIRDatastoreResponse
Create a FHIR-enabled data store.
-
#delete_fhir_datastore(params = {}) ⇒ Types::DeleteFHIRDatastoreResponse
Delete a FHIR-enabled data store.
-
#describe_fhir_datastore(params = {}) ⇒ Types::DescribeFHIRDatastoreResponse
Get properties for a FHIR-enabled data store.
-
#describe_fhir_export_job(params = {}) ⇒ Types::DescribeFHIRExportJobResponse
Get FHIR export job properties.
-
#describe_fhir_import_job(params = {}) ⇒ Types::DescribeFHIRImportJobResponse
Get the import job properties to learn more about the job or job progress.
-
#list_fhir_datastores(params = {}) ⇒ Types::ListFHIRDatastoresResponse
List all FHIR-enabled data stores in a user’s account, regardless of data store status.
-
#list_fhir_export_jobs(params = {}) ⇒ Types::ListFHIRExportJobsResponse
Lists all FHIR export jobs associated with an account and their statuses.
-
#list_fhir_import_jobs(params = {}) ⇒ Types::ListFHIRImportJobsResponse
List all FHIR import jobs associated with an account and their statuses.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of all existing tags associated with a data store.
-
#start_fhir_export_job(params = {}) ⇒ Types::StartFHIRExportJobResponse
Start a FHIR export job.
-
#start_fhir_import_job(params = {}) ⇒ Types::StartFHIRImportJobResponse
Start importing bulk FHIR data into an ACTIVE data store.
-
#tag_resource(params = {}) ⇒ Struct
Add a user-specifed key and value tag to a data store.
-
#untag_resource(params = {}) ⇒ Struct
Remove a user-specifed key and value tag from a data store.
-
#update_fhir_datastore(params = {}) ⇒ Types::UpdateFHIRDatastoreResponse
Update the properties of a FHIR-enabled data store.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 478 def initialize(*args) super end |
Instance Method Details
#create_fhir_datastore(params = {}) ⇒ Types::CreateFHIRDatastoreResponse
Create a FHIR-enabled data store.
579 580 581 582 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 579 def create_fhir_datastore(params = {}, = {}) req = build_request(:create_fhir_datastore, params) req.send_request() end |
#delete_fhir_datastore(params = {}) ⇒ Types::DeleteFHIRDatastoreResponse
Delete a FHIR-enabled data store.
613 614 615 616 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 613 def delete_fhir_datastore(params = {}, = {}) req = build_request(:delete_fhir_datastore, params) req.send_request() end |
#describe_fhir_datastore(params = {}) ⇒ Types::DescribeFHIRDatastoreResponse
Get properties for a FHIR-enabled data store.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- fhir_datastore_active
- fhir_datastore_deleted
666 667 668 669 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 666 def describe_fhir_datastore(params = {}, = {}) req = build_request(:describe_fhir_datastore, params) req.send_request() end |
#describe_fhir_export_job(params = {}) ⇒ Types::DescribeFHIRExportJobResponse
Get FHIR export job properties.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- fhir_export_job_completed
712 713 714 715 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 712 def describe_fhir_export_job(params = {}, = {}) req = build_request(:describe_fhir_export_job, params) req.send_request() end |
#describe_fhir_import_job(params = {}) ⇒ Types::DescribeFHIRImportJobResponse
Get the import job properties to learn more about the job or job progress.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- fhir_import_job_completed
769 770 771 772 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 769 def describe_fhir_import_job(params = {}, = {}) req = build_request(:describe_fhir_import_job, params) req.send_request() end |
#list_fhir_datastores(params = {}) ⇒ Types::ListFHIRDatastoresResponse
List all FHIR-enabled data stores in a user’s account, regardless of data store status.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
836 837 838 839 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 836 def list_fhir_datastores(params = {}, = {}) req = build_request(:list_fhir_datastores, params) req.send_request() end |
#list_fhir_export_jobs(params = {}) ⇒ Types::ListFHIRExportJobsResponse
Lists all FHIR export jobs associated with an account and their statuses.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
908 909 910 911 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 908 def list_fhir_export_jobs(params = {}, = {}) req = build_request(:list_fhir_export_jobs, params) req.send_request() end |
#list_fhir_import_jobs(params = {}) ⇒ Types::ListFHIRImportJobsResponse
List all FHIR import jobs associated with an account and their statuses.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
990 991 992 993 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 990 def list_fhir_import_jobs(params = {}, = {}) req = build_request(:list_fhir_import_jobs, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of all existing tags associated with a data store.
1021 1022 1023 1024 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1021 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#start_fhir_export_job(params = {}) ⇒ Types::StartFHIRExportJobResponse
Start a FHIR export job.
1079 1080 1081 1082 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1079 def start_fhir_export_job(params = {}, = {}) req = build_request(:start_fhir_export_job, params) req.send_request() end |
#start_fhir_import_job(params = {}) ⇒ Types::StartFHIRImportJobResponse
Start importing bulk FHIR data into an ACTIVE data store. The import
job imports FHIR data found in the InputDataConfig object and stores
processing results in the JobOutputDataConfig object.
1149 1150 1151 1152 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1149 def start_fhir_import_job(params = {}, = {}) req = build_request(:start_fhir_import_job, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Add a user-specifed key and value tag to a data store.
1182 1183 1184 1185 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1182 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Remove a user-specifed key and value tag from a data store.
1209 1210 1211 1212 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1209 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_fhir_datastore(params = {}) ⇒ Types::UpdateFHIRDatastoreResponse
Update the properties of a FHIR-enabled data store.
1288 1289 1290 1291 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1288 def update_fhir_datastore(params = {}, = {}) req = build_request(:update_fhir_datastore, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| fhir_datastore_active | #describe_fhir_datastore | 60 | 360 |
| fhir_datastore_deleted | #describe_fhir_datastore | 120 | 360 |
| fhir_export_job_completed | #describe_fhir_export_job | 120 | 360 |
| fhir_import_job_completed | #describe_fhir_import_job | 120 | 720 |
1406 1407 1408 1409 1410 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1406 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |