datastores
Creates, updates, deletes or gets a datastore resource or lists datastores in a region
Overview
| Name | datastores |
| Type | Resource |
| Description | Definition of AWS::HealthImaging::Datastore Resource Type |
| Id | awscc.healthimaging.datastores |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
datastore_arn | string | The Datastore's ARN. |
datastore_name | string | User friendly name for Datastore. |
datastore_id | string | |
datastore_status | string | A string to denote the Datastore's state. |
kms_key_arn | string | ARN referencing a KMS key or KMS key alias. |
created_at | string | The timestamp when the data store was created. |
updated_at | string | The timestamp when the data store was created. |
tags | object | A Map of key value pairs for Tags. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
datastore_id | string | |
region | string | AWS region. |
For more information, see AWS::HealthImaging::Datastore.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | datastores | INSERT | , region |
delete_resource | datastores | DELETE | Identifier, region |
list_resources | datastores_list_only | SELECT | region |
get_resource | datastores | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual datastore.
SELECT
region,
datastore_arn,
datastore_name,
datastore_id,
datastore_status,
kms_key_arn,
created_at,
updated_at,
tags
FROM awscc.healthimaging.datastores
WHERE
region = '{{ region }}' AND
Identifier = '{{ datastore_id }}';
Lists all datastores in a region.
SELECT
region,
datastore_id
FROM awscc.healthimaging.datastores_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new datastore resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.healthimaging.datastores (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.healthimaging.datastores (
DatastoreName,
KmsKeyArn,
Tags,
region
)
SELECT
'{{ datastore_name }}',
'{{ kms_key_arn }}',
'{{ 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: datastore
props:
- name: datastore_name
value: '{{ datastore_name }}'
- name: kms_key_arn
value: '{{ kms_key_arn }}'
- name: tags
value: {}
DELETE example
/*+ delete */
DELETE FROM awscc.healthimaging.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 datastores resource, the following permissions are required:
- Create
- Read
- Delete
- List
medical-imaging:CreateDatastore,
medical-imaging:GetDatastore,
kms:DescribeKey,
kms:CreateGrant,
kms:RetireGrant,
kms:GenerateDataKey,
kms:Decrypt,
lambda:InvokeFunction,
medical-imaging:TagResource,
medical-imaging:UntagResource,
medical-imaging:ListTagsForResource
medical-imaging:GetDatastore,
medical-imaging:ListTagsForResource
medical-imaging:DeleteDatastore,
medical-imaging:GetDatastore,
medical-imaging:UntagResource,
kms:DescribeKey,
kms:RetireGrant,
kms:GenerateDataKey,
kms:Decrypt
medical-imaging:ListDatastores