Class: Aws::HealthLake::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::HealthLake::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-healthlake/client.rb,
sig/client.rbs
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.
Defined Under Namespace
Modules: _CreateFHIRDatastoreResponseSuccess, _DeleteFHIRDatastoreResponseSuccess, _DescribeFHIRDatastoreResponseSuccess, _DescribeFHIRExportJobResponseSuccess, _DescribeFHIRImportJobResponseSuccess, _ListFHIRDatastoresResponseSuccess, _ListFHIRExportJobsResponseSuccess, _ListFHIRImportJobsResponseSuccess, _ListTagsForResourceResponseSuccess, _StartFHIRExportJobResponseSuccess, _StartFHIRImportJobResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateFHIRDatastoreResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
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.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#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.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'lib/aws-sdk-healthlake/client.rb', line 478 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1443 1444 1445 |
# File 'lib/aws-sdk-healthlake/client.rb', line 1443 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1446 1447 1448 |
# File 'lib/aws-sdk-healthlake/client.rb', line 1446 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'lib/aws-sdk-healthlake/client.rb', line 1297 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::HealthLake') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-healthlake' context[:gem_version] = '1.67.0' Seahorse::Client::Request.new(handlers, context) end |
#create_fhir_datastore(params = {}) ⇒ Types::CreateFHIRDatastoreResponse
Create a FHIR-enabled data store.
90 |
# File 'sig/client.rbs', line 90
def create_fhir_datastore: (
|
#delete_fhir_datastore(params = {}) ⇒ Types::DeleteFHIRDatastoreResponse
Delete a FHIR-enabled data store.
135 |
# File 'sig/client.rbs', line 135
def delete_fhir_datastore: (
|
#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
145 |
# File 'sig/client.rbs', line 145
def describe_fhir_datastore: (
|
#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
155 |
# File 'sig/client.rbs', line 155
def describe_fhir_export_job: (
|
#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
166 |
# File 'sig/client.rbs', line 166
def describe_fhir_import_job: (
|
#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.
178 |
# File 'sig/client.rbs', line 178
def list_fhir_datastores: (
|
#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.
196 |
# File 'sig/client.rbs', line 196
def list_fhir_export_jobs: (
|
#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.
213 |
# File 'sig/client.rbs', line 213
def list_fhir_import_jobs: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of all existing tags associated with a data store.
229 |
# File 'sig/client.rbs', line 229
def list_tags_for_resource: (
|
#start_fhir_export_job(params = {}) ⇒ Types::StartFHIRExportJobResponse
Start a FHIR export job.
241 |
# File 'sig/client.rbs', line 241
def start_fhir_export_job: (
|
#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.
262 |
# File 'sig/client.rbs', line 262
def start_fhir_import_job: (
|
#tag_resource(params = {}) ⇒ Struct
Add a user-specifed key and value tag to a data store.
284 |
# File 'sig/client.rbs', line 284
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Remove a user-specifed key and value tag from a data store.
299 |
# File 'sig/client.rbs', line 299
def untag_resource: (
|
#update_fhir_datastore(params = {}) ⇒ Types::UpdateFHIRDatastoreResponse
Update the properties of a FHIR-enabled data store.
310 |
# File 'sig/client.rbs', line 310
def update_fhir_datastore: (
|
#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 |
332 |
# File 'sig/client.rbs', line 332
def wait_until: (:fhir_datastore_active waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1414 1415 1416 |
# File 'lib/aws-sdk-healthlake/client.rb', line 1414 def waiter_names waiters.keys end |