datastores
Creates, updates, deletes, gets or lists a datastores resource.
Overview
| Name | datastores |
| Type | Resource |
| Id | aws.medical_imaging.datastores |
Fields
The following fields are returned by SELECT queries:
- get_datastore
- list_datastores
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp when the data store was created. |
datastore_arn | string | The Amazon Resource Name (ARN) for the data store. (pattern: <code>arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:medical-imaging:[a-z0-9-]+:[0-9]{12}:datastore/[0-9a-z]{32}(/imageset/[0-9a-z]{32})?</code>) |
datastore_id | string | The data store identifier. (pattern: <code>[0-9a-z]{32}</code>) |
datastore_name | string | The data store name. (pattern: <code>[A-Za-z0-9._/#-]+</code>) |
datastore_status | string | The data store status. (CREATING, CREATE_FAILED, ACTIVE, DELETING, DELETED) |
kms_key_arn | string | ARN referencing a KMS key or KMS key alias. (pattern: <code>arn:aws[a-zA-Z-]{0,16}:kms:[a-z]{2}(-[a-z]{1,16}){1,3}-\d{1}:\d{12}:((key/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})|(alias/[a-zA-Z0-9:/_-]{1,256}))</code>) |
lambda_authorizer_arn | string | The ARN of the authorizer's Lambda function. (pattern: <code>arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-]+(:($LATEST|[a-zA-Z0-9-]+))?</code>) |
lossless_storage_format | string | The datastore's lossless storage format. (HTJ2K, JPEG_2000_LOSSLESS) |
updated_at | string (date-time) | The timestamp when the data store was last updated. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp when the data store was created. |
datastore_arn | string | The Amazon Resource Name (ARN) for the data store. (pattern: <code>arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:medical-imaging:[a-z0-9-]+:[0-9]{12}:datastore/[0-9a-z]{32}(/imageset/[0-9a-z]{32})?</code>) |
datastore_id | string | The data store identifier. (pattern: <code>[0-9a-z]{32}</code>) |
datastore_name | string | The data store name. (pattern: <code>[A-Za-z0-9._/#-]+</code>) |
datastore_status | string | The data store status. (CREATING, CREATE_FAILED, ACTIVE, DELETING, DELETED) |
updated_at | string (date-time) | The timestamp when the data store was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_datastore | select | datastore_id, region | Get data store properties. | |
list_datastores | select | region | datastoreStatus, nextToken, maxResults | List data stores. |
create_datastore | insert | region, clientToken | Create a data store. | |
delete_datastore | delete | datastore_id, region | Delete a data store. Before a data store can be deleted, you must first delete all image sets within it. | |
copy_image_set | exec | datastore_id, source_image_set_id, region, copyImageSetInformation | force, promoteToPrimary | Copy an image set. |
start_dicom_import_job | exec | datastore_id, region, dataAccessRoleArn, clientToken, inputS3Uri, outputS3Uri | Start importing bulk data into an ACTIVE data store. The import job imports DICOM P10 files or enhances existing DICOM files with JSON metadata. The importConfiguration parameter specifies the import type. The data is found in the S3 prefix specified by the inputS3Uri parameter. The import job stores processing results in the file specified by the outputS3Uri parameter. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
datastore_id | string | The data store identifier. |
region | string | AWS region (default: us-east-1) |
source_image_set_id | string | The source image set identifier. |
datastoreStatus | string | The data store status. |
force | boolean | Providing this parameter will force completion of the CopyImageSet operation, even if there are inconsistent Patient, Study, and/or Series level metadata elements between the sourceImageSet and destinationImageSet. |
maxResults | integer | Valid Range: Minimum value of 1. Maximum value of 50. |
nextToken | string | The pagination token used to request the list of data stores on the next page. |
promoteToPrimary | boolean | Providing this parameter will configure the CopyImageSet operation to promote the given image set to the primary DICOM hierarchy. If successful, a new primary image set ID will be returned as the destination image set. |
SELECT examples
- get_datastore
- list_datastores
Get data store properties.
SELECT
created_at,
datastore_arn,
datastore_id,
datastore_name,
datastore_status,
kms_key_arn,
lambda_authorizer_arn,
lossless_storage_format,
updated_at
FROM aws.medical_imaging.datastores
WHERE datastore_id = '{{ datastore_id }}' -- required
AND region = '{{ region }}' -- required
;
List data stores.
SELECT
created_at,
datastore_arn,
datastore_id,
datastore_name,
datastore_status,
updated_at
FROM aws.medical_imaging.datastores
WHERE region = '{{ region }}' -- required
AND datastoreStatus = '{{ datastoreStatus }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_datastore
- Manifest
Create a data store.
INSERT INTO aws.medical_imaging.datastores (
datastoreName,
clientToken,
tags,
kmsKeyArn,
lambdaAuthorizerArn,
losslessStorageFormat,
region
)
SELECT
'{{ datastoreName }}',
'{{ clientToken }}' /* required */,
'{{ tags }}',
'{{ kmsKeyArn }}',
'{{ lambdaAuthorizerArn }}',
'{{ losslessStorageFormat }}',
'{{ region }}'
RETURNING
datastore_id,
datastore_status
;
# Description fields are for documentation purposes
- name: datastores
props:
- name: region
value: "{{ region }}"
description: Required parameter for the datastores resource.
- name: datastoreName
value: "{{ datastoreName }}"
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
description: |
ARN referencing a KMS key or KMS key alias.
- name: lambdaAuthorizerArn
value: "{{ lambdaAuthorizerArn }}"
- name: losslessStorageFormat
value: "{{ losslessStorageFormat }}"
valid_values: ['HTJ2K', 'JPEG_2000_LOSSLESS']
DELETE examples
- delete_datastore
Delete a data store. Before a data store can be deleted, you must first delete all image sets within it.
DELETE FROM aws.medical_imaging.datastores
WHERE datastore_id = '{{ datastore_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- copy_image_set
- start_dicom_import_job
Copy an image set.
EXEC aws.medical_imaging.datastores.copy_image_set
@datastore_id='{{ datastore_id }}' --required,
@source_image_set_id='{{ source_image_set_id }}' --required,
@region='{{ region }}' --required,
@force={{ force }},
@promoteToPrimary={{ promoteToPrimary }}
@@json=
'{
"copyImageSetInformation": "{{ copyImageSetInformation }}"
}'
;
Start importing bulk data into an ACTIVE data store. The import job imports DICOM P10 files or enhances existing DICOM files with JSON metadata. The importConfiguration parameter specifies the import type. The data is found in the S3 prefix specified by the inputS3Uri parameter. The import job stores processing results in the file specified by the outputS3Uri parameter.
EXEC aws.medical_imaging.datastores.start_dicom_import_job
@datastore_id='{{ datastore_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"jobName": "{{ jobName }}",
"dataAccessRoleArn": "{{ dataAccessRoleArn }}",
"clientToken": "{{ clientToken }}",
"inputS3Uri": "{{ inputS3Uri }}",
"outputS3Uri": "{{ outputS3Uri }}",
"inputOwnerAccountId": "{{ inputOwnerAccountId }}",
"importConfiguration": "{{ importConfiguration }}"
}'
;