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_data_transformation_profile(params = {}) ⇒ Types::CreateDataTransformationProfileResponse
Creates a data transformation profile in DRAFT state.
-
#create_fhir_datastore(params = {}) ⇒ Types::CreateFHIRDatastoreResponse
Create a FHIR-enabled data store.
-
#delete_data_transformation_profile(params = {}) ⇒ Types::DeleteDataTransformationProfileResponse
Deletes a data transformation profile and all its versions, including the DRAFT and all published versions.
-
#delete_fhir_datastore(params = {}) ⇒ Types::DeleteFHIRDatastoreResponse
Delete a FHIR-enabled data store.
-
#describe_data_transformation_job(params = {}) ⇒ Types::DescribeDataTransformationJobResponse
Describes a data transformation job, including its current status, configuration, and progress information.
-
#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.
-
#get_data_transformation_profile(params = {}) ⇒ Types::GetDataTransformationProfileResponse
Retrieves a data transformation profile's metadata and profile content at a specific version.
-
#list_data_transformation_jobs(params = {}) ⇒ Types::ListDataTransformationJobsResponse
Lists data transformation jobs for your Amazon Web Services account.
-
#list_data_transformation_profile_versions(params = {}) ⇒ Types::ListDataTransformationProfileVersionsResponse
Lists all versions of a specific data transformation profile (DRAFT and published), in reverse chronological order (newest first).
-
#list_data_transformation_profiles(params = {}) ⇒ Types::ListDataTransformationProfilesResponse
Lists all data transformation profiles in your account, returning the latest version summary for each.
-
#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.
-
#publish_data_transformation_profile(params = {}) ⇒ Types::PublishDataTransformationProfileResponse
Promotes the current DRAFT version of a data transformation profile to a new immutable published version.
-
#restore_fhir_datastore(params = {}) ⇒ Types::RestoreFHIRDatastoreResponse
Restore a backup-enabled data store to a point in time.
-
#start_data_transformation_job(params = {}) ⇒ Types::StartDataTransformationJobResponse
Starts an asynchronous data transformation job that converts source files from Amazon Simple Storage Service (Amazon S3) and writes the output to Amazon S3 or HealthLake.
-
#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_data_transformation_profile(params = {}) ⇒ Types::UpdateDataTransformationProfileResponse
Updates the DRAFT version (version 0) of a data transformation profile with new profile content.
-
#update_fhir_datastore(params = {}) ⇒ Types::UpdateFHIRDatastoreResponse
Update the properties of a FHIR-enabled data store.
-
#update_profile_with_agent(params = {}) ⇒ Types::UpdateProfileWithAgentResponse
Updates a data transformation profile using chat-based interaction with an agent.
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.
496 497 498 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 496 def initialize(*args) super end |
Instance Method Details
#create_data_transformation_profile(params = {}) ⇒ Types::CreateDataTransformationProfileResponse
Creates a data transformation profile in DRAFT state. Specify a built-in starter profile, an existing profile version, raw profile content, or a sample data file as the source.
589 590 591 592 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 589 def create_data_transformation_profile(params = {}, = {}) req = build_request(:create_data_transformation_profile, params) req.send_request() end |
#create_fhir_datastore(params = {}) ⇒ Types::CreateFHIRDatastoreResponse
Create a FHIR-enabled data store.
698 699 700 701 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 698 def create_fhir_datastore(params = {}, = {}) req = build_request(:create_fhir_datastore, params) req.send_request() end |
#delete_data_transformation_profile(params = {}) ⇒ Types::DeleteDataTransformationProfileResponse
Deletes a data transformation profile and all its versions, including the DRAFT and all published versions.
731 732 733 734 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 731 def delete_data_transformation_profile(params = {}, = {}) req = build_request(:delete_data_transformation_profile, params) req.send_request() end |
#delete_fhir_datastore(params = {}) ⇒ Types::DeleteFHIRDatastoreResponse
Delete a FHIR-enabled data store.
766 767 768 769 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 766 def delete_fhir_datastore(params = {}, = {}) req = build_request(:delete_fhir_datastore, params) req.send_request() end |
#describe_data_transformation_job(params = {}) ⇒ Types::DescribeDataTransformationJobResponse
Describes a data transformation job, including its current status, configuration, and progress information.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- data_transformation_job_completed
819 820 821 822 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 819 def describe_data_transformation_job(params = {}, = {}) req = build_request(:describe_data_transformation_job, 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
880 881 882 883 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 880 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
926 927 928 929 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 926 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
992 993 994 995 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 992 def describe_fhir_import_job(params = {}, = {}) req = build_request(:describe_fhir_import_job, params) req.send_request() end |
#get_data_transformation_profile(params = {}) ⇒ Types::GetDataTransformationProfileResponse
Retrieves a data transformation profile's metadata and profile content at a specific version. Specify version 0 to retrieve the DRAFT, a version number between 1 and 99 to retrieve a specific published version, or omit the version to retrieve the latest published version.
1047 1048 1049 1050 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1047 def get_data_transformation_profile(params = {}, = {}) req = build_request(:get_data_transformation_profile, params) req.send_request() end |
#list_data_transformation_jobs(params = {}) ⇒ Types::ListDataTransformationJobsResponse
Lists data transformation jobs for your Amazon Web Services account.
Results can be filtered by status, job name, and submit time window.
Results are paginated. Use the NextToken parameter to retrieve
additional results.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1112 1113 1114 1115 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1112 def list_data_transformation_jobs(params = {}, = {}) req = build_request(:list_data_transformation_jobs, params) req.send_request() end |
#list_data_transformation_profile_versions(params = {}) ⇒ Types::ListDataTransformationProfileVersionsResponse
Lists all versions of a specific data transformation profile (DRAFT
and published), in reverse chronological order (newest first). Use
GetDataTransformationProfile to retrieve profile content. Results
are paginated. Use the NextToken parameter to retrieve additional
results.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1165 1166 1167 1168 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1165 def list_data_transformation_profile_versions(params = {}, = {}) req = build_request(:list_data_transformation_profile_versions, params) req.send_request() end |
#list_data_transformation_profiles(params = {}) ⇒ Types::ListDataTransformationProfilesResponse
Lists all data transformation profiles in your account, returning the
latest version summary for each. Use GetDataTransformationProfile to
retrieve profile content. Results are paginated. Use the NextToken
parameter to retrieve additional results.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1217 1218 1219 1220 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1217 def list_data_transformation_profiles(params = {}, = {}) req = build_request(:list_data_transformation_profiles, 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.
1292 1293 1294 1295 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1292 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.
1364 1365 1366 1367 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1364 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.
1455 1456 1457 1458 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1455 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.
1486 1487 1488 1489 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1486 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#publish_data_transformation_profile(params = {}) ⇒ Types::PublishDataTransformationProfileResponse
Promotes the current DRAFT version of a data transformation profile to a new immutable published version. Also supports rollback by publishing from a previously published version.
1541 1542 1543 1544 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1541 def publish_data_transformation_profile(params = {}, = {}) req = build_request(:publish_data_transformation_profile, params) req.send_request() end |
#restore_fhir_datastore(params = {}) ⇒ Types::RestoreFHIRDatastoreResponse
Restore a backup-enabled data store to a point in time. Creates a new data store from the backup.
1664 1665 1666 1667 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1664 def restore_fhir_datastore(params = {}, = {}) req = build_request(:restore_fhir_datastore, params) req.send_request() end |
#start_data_transformation_job(params = {}) ⇒ Types::StartDataTransformationJobResponse
Starts an asynchronous data transformation job that converts source files from Amazon Simple Storage Service (Amazon S3) and writes the output to Amazon S3 or HealthLake.
1744 1745 1746 1747 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1744 def start_data_transformation_job(params = {}, = {}) req = build_request(:start_data_transformation_job, params) req.send_request() end |
#start_fhir_export_job(params = {}) ⇒ Types::StartFHIRExportJobResponse
Start a FHIR export job.
1802 1803 1804 1805 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1802 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.
1888 1889 1890 1891 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1888 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.
1921 1922 1923 1924 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1921 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.
1948 1949 1950 1951 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1948 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_data_transformation_profile(params = {}) ⇒ Types::UpdateDataTransformationProfileResponse
Updates the DRAFT version (version 0) of a data transformation profile with new profile content. The update replaces all existing DRAFT content.
1997 1998 1999 2000 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 1997 def update_data_transformation_profile(params = {}, = {}) req = build_request(:update_data_transformation_profile, params) req.send_request() end |
#update_fhir_datastore(params = {}) ⇒ Types::UpdateFHIRDatastoreResponse
Update the properties of a FHIR-enabled data store.
2145 2146 2147 2148 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 2145 def update_fhir_datastore(params = {}, = {}) req = build_request(:update_fhir_datastore, params) req.send_request() end |
#update_profile_with_agent(params = {}) ⇒ Types::UpdateProfileWithAgentResponse
Updates a data transformation profile using chat-based interaction with an agent. Supports multi-turn conversations for iteratively customizing profiles.
2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 2332 def update_profile_with_agent(params = {}, = {}) params = params.dup event_stream_handler = case handler = params.delete(:event_stream_handler) when EventStreams::AgentOutputMessageStream then handler when Proc then EventStreams::AgentOutputMessageStream.new.tap(&handler) when nil then EventStreams::AgentOutputMessageStream.new else msg = "expected :event_stream_handler to be a block or "\ "instance of Aws::HealthLake::EventStreams::AgentOutputMessageStream"\ ", got `#{handler.inspect}` instead" raise ArgumentError, msg end yield(event_stream_handler) if block_given? req = build_request(:update_profile_with_agent, params) req.context[:event_stream_handler] = event_stream_handler req.handlers.add(Aws::Binary::DecodeHandler, priority: 95) 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 |
|---|---|---|---|
| data_transformation_job_completed | #describe_data_transformation_job | 30 | 5 |
| fhir_datastore_active | #describe_fhir_datastore | 60 | 5 |
| fhir_datastore_deleted | #describe_fhir_datastore | 120 | 5 |
| fhir_export_job_completed | #describe_fhir_export_job | 120 | 5 |
| fhir_import_job_completed | #describe_fhir_import_job | 120 | 5 |
2469 2470 2471 2472 2473 |
# File 'gems/aws-sdk-healthlake/lib/aws-sdk-healthlake/client.rb', line 2469 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |