fhir_datastores
Creates, updates, deletes or gets a fhir_datastore resource or lists fhir_datastores in a region
Overview
| Name | fhir_datastores |
| Type | Resource |
| Description | HealthLake FHIR Datastore |
| Id | awscc.healthlake.fhir_datastores |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
created_at | object | The time that a Data Store was created. |
datastore_arn | string | The Amazon Resource Name used in the creation of the Data Store. |
datastore_endpoint | string | The AWS endpoint for the Data Store. Each Data Store will have it's own endpoint with Data Store ID in the endpoint URL. |
datastore_id | string | The AWS-generated ID number for the Data Store. |
datastore_name | string | The user-generated name for the Data Store. |
datastore_status | string | The status of the Data Store. Possible statuses are 'CREATING', 'ACTIVE', 'DELETING', or 'DELETED'. |
datastore_type_version | string | The FHIR version. Only R4 version data is supported. |
preload_data_config | object | The preloaded data configuration for the Data Store. Only data preloaded from Synthea is supported. |
sse_configuration | object | The server-side encryption key configuration for a customer provided encryption key. |
identity_provider_configuration | object | The identity provider configuration for the datastore |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
datastore_id | string | The AWS-generated ID number for the Data Store. |
region | string | AWS region. |
For more information, see AWS::HealthLake::FHIRDatastore.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | fhir_datastores | INSERT | DatastoreTypeVersion, region |
delete_resource | fhir_datastores | DELETE | Identifier, region |
update_resource | fhir_datastores | UPDATE | Identifier, PatchDocument, region |
list_resources | fhir_datastores_list_only | SELECT | region |
get_resource | fhir_datastores | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all fhir_datastores in a region.
SELECT
region,
datastore_id
FROM awscc.healthlake.fhir_datastores_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new fhir_datastore resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.healthlake.fhir_datastores (
DatastoreName,
DatastoreTypeVersion,
PreloadDataConfig,
SseConfiguration,
IdentityProviderConfiguration,
Tags,
region
)
SELECT
'{{ datastore_name }}',
'{{ datastore_type_version }}',
'{{ preload_data_config }}',
'{{ sse_configuration }}',
'{{ identity_provider_configuration }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: fhir_datastore
props:
- name: datastore_name
value: '{{ datastore_name }}'
- name: datastore_type_version
value: '{{ datastore_type_version }}'
- name: preload_data_config
value:
preload_data_type: '{{ preload_data_type }}'
- name: sse_configuration
value:
kms_encryption_config:
cmk_type: '{{ cmk_type }}'
kms_key_id: '{{ kms_key_id }}'
- name: identity_provider_configuration
value:
authorization_strategy: '{{ authorization_strategy }}'
fine_grained_authorization_enabled: '{{ fine_grained_authorization_enabled }}'
metadata: '{{ metadata }}'
idp_lambda_arn: '{{ idp_lambda_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
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
healthlake:DescribeFHIRDatastore,
healthlake:ListTagsForResource
healthlake:TagResource,
healthlake:UntagResource,
healthlake:ListTagsForResource,
healthlake:DescribeFHIRDatastore,
iam:PassRole,
iam:GetRole,
iam:CreateServiceLinkedRole
healthlake:DeleteFHIRDatastore,
healthlake:DescribeFHIRDatastore,
iam:PassRole,
iam:GetRole,
iam:CreateServiceLinkedRole,
ram:GetResourceShareInvitations,
ram:AcceptResourceShareInvitation,
glue:CreateDatabase,
glue:DeleteDatabase
healthlake:ListFHIRDatastores