Skip to main content

fhir_datastores

Creates, updates, deletes or gets a fhir_datastore resource or lists fhir_datastores in a region

Overview

Namefhir_datastores
TypeResource
DescriptionHealthLake FHIR Datastore
Idawscc.healthlake.fhir_datastores

Fields

NameDatatypeDescription
created_atobjectThe time that a Data Store was created.
datastore_arnstringThe Amazon Resource Name used in the creation of the Data Store.
datastore_endpointstringThe AWS endpoint for the Data Store. Each Data Store will have it's own endpoint with Data Store ID in the endpoint URL.
datastore_idstringThe AWS-generated ID number for the Data Store.
datastore_namestringThe user-generated name for the Data Store.
datastore_statusstringThe status of the Data Store. Possible statuses are 'CREATING', 'ACTIVE', 'DELETING', or 'DELETED'.
datastore_type_versionstringThe FHIR version. Only R4 version data is supported.
preload_data_configobjectThe preloaded data configuration for the Data Store. Only data preloaded from Synthea is supported.
sse_configurationobjectThe server-side encryption key configuration for a customer provided encryption key.
identity_provider_configurationobjectThe identity provider configuration for the datastore
tagsarray
regionstringAWS region.

For more information, see AWS::HealthLake::FHIRDatastore.

Methods

NameResourceAccessible byRequired Params
create_resourcefhir_datastoresINSERTDatastoreTypeVersion, region
delete_resourcefhir_datastoresDELETEIdentifier, region
update_resourcefhir_datastoresUPDATEIdentifier, PatchDocument, region
list_resourcesfhir_datastores_list_onlySELECTregion
get_resourcefhir_datastoresSELECTIdentifier, region

SELECT examples

Gets all properties from an individual fhir_datastore.

SELECT
region,
created_at,
datastore_arn,
datastore_endpoint,
datastore_id,
datastore_name,
datastore_status,
datastore_type_version,
preload_data_config,
sse_configuration,
identity_provider_configuration,
tags
FROM awscc.healthlake.fhir_datastores
WHERE
region = '{{ region }}' AND
Identifier = '{{ datastore_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new fhir_datastore resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.healthlake.fhir_datastores (
DatastoreTypeVersion,
region
)
SELECT
'{{ datastore_type_version }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a fhir_datastore resource, using stack-deploy.

/*+ update */
UPDATE awscc.healthlake.fhir_datastores
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ datastore_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.healthlake.fhir_datastores
WHERE
Identifier = '{{ datastore_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the fhir_datastores resource, the following permissions are required:

healthlake:CreateFHIRDatastore,
healthlake:DescribeFHIRDatastore,
iam:PassRole,
kms:DescribeKey,
kms:CreateGrant,
kms:GenerateDataKey,
kms:Decrypt,
iam:GetRole,
iam:CreateServiceLinkedRole,
ram:GetResourceShareInvitations,
ram:AcceptResourceShareInvitation,
glue:CreateDatabase,
glue:DeleteDatabase,
lambda:InvokeFunction,
healthlake:TagResource,
healthlake:UntagResource,
healthlake:ListTagsForResource