AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.
[ aws . medical-imaging ]
update-image-set-metadata
--datastore-id <value>
--image-set-id <value>
--latest-version-id <value>
[--force | --no-force]
--update-image-set-metadata-updates <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
--datastore-id
(string)
The data store identifier.
--image-set-id
(string)
The image set identifier.
--latest-version-id
(string)
The latest image set version identifier.
--force
| --no-force
(boolean)
Setting this flag will force the
UpdateImageSetMetadata
operation for the following attributes:
Tag.StudyInstanceUID
,Tag.SeriesInstanceUID
,Tag.SOPInstanceUID
, andTag.StudyID
- Adding, removing, or updating private tags for an individual SOP Instance
--update-image-set-metadata-updates
(tagged union structure)
Update image set metadata updates.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:DICOMUpdates
,revertToVersionId
.DICOMUpdates -> (structure)
The object containing
removableAttributes
andupdatableAttributes
.removableAttributes -> (blob)
The DICOM tags to be removed fromImageSetMetadata
.updatableAttributes -> (blob)
The DICOM tags that need to be updated inImageSetMetadata
.revertToVersionId -> (string)
Specifies the previous image set version ID to revert the current image set back to.
Note
You must provide eitherrevertToVersionId
orDICOMUpdates
in your request. AValidationException
error is thrown if both parameters are provided at the same time.
Shorthand Syntax:
DICOMUpdates={removableAttributes=blob,updatableAttributes=blob},revertToVersionId=string
JSON Syntax:
{
"DICOMUpdates": {
"removableAttributes": blob,
"updatableAttributes": blob
},
"revertToVersionId": "string"
}
--cli-input-json
(string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command's default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.
Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal's quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .
To insert or update an attribute in image set metadata
The following update-image-set-metadata
code example inserts or updates an attribute in image set metadata.
aws medical-imaging update-image-set-metadata \
--datastore-id 12345678901234567890123456789012 \
--image-set-id ea92b0d8838c72a3f25d00d13616f87e \
--latest-version-id 1 \
--update-image-set-metadata-updates file://metadata-updates.json
Contents of metadata-updates.json
{
"DICOMUpdates": {
"updatableAttributes": "eyJTY2hlbWFWZXJzaW9uIjoxLjEsIlBhdGllbnQiOnsiRElDT00iOnsiUGF0aWVudE5hbWUiOiJNWF5NWCJ9fX0="
}
}
Note: updatableAttributes
is a Base64 encoded JSON string. Here is the unencoded JSON string.
{"SchemaVersion":1.1,"Patient":{"DICOM":{"PatientName":"MX^MX"}}}
Output:
{
"latestVersionId": "2",
"imageSetWorkflowStatus": "UPDATING",
"updatedAt": 1680042257.908,
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e",
"imageSetState": "LOCKED",
"createdAt": 1680027126.436,
"datastoreId": "12345678901234567890123456789012"
}
To remove an attribute from image set metadata
The following update-image-set-metadata
code example removes an attribute from image set metadata.
aws medical-imaging update-image-set-metadata \
--datastore-id 12345678901234567890123456789012 \
--image-set-id ea92b0d8838c72a3f25d00d13616f87e \
--latest-version-id 1 \
--update-image-set-metadata-updates file://metadata-updates.json
Contents of metadata-updates.json
{
"DICOMUpdates": {
"removableAttributes": "e1NjaGVtYVZlcnNpb246MS4xLFN0dWR5OntESUNPTTp7U3R1ZHlEZXNjcmlwdGlvbjpDSEVTVH19fQo="
}
}
Note: removableAttributes
is a Base64 encoded JSON string. Here is the unencoded JSON string. The key and value must match the attribute to be removed.
{"SchemaVersion":1.1,"Study":{"DICOM":{"StudyDescription":"CHEST"}}}
Output:
{
"latestVersionId": "2",
"imageSetWorkflowStatus": "UPDATING",
"updatedAt": 1680042257.908,
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e",
"imageSetState": "LOCKED",
"createdAt": 1680027126.436,
"datastoreId": "12345678901234567890123456789012"
}
To remove an instance from image set metadata
The following update-image-set-metadata
code example removes an instance from image set metadata.
aws medical-imaging update-image-set-metadata \
--datastore-id 12345678901234567890123456789012 \
--image-set-id ea92b0d8838c72a3f25d00d13616f87e \
--latest-version-id 1 \
--update-image-set-metadata-updates file://metadata-updates.json
Contents of metadata-updates.json
{
"DICOMUpdates": {
"removableAttributes": "eezEuMS4xLjEuMS4xLjEyMzQ1LjEyMzQ1Njc4OTAxMi4xMjMuMTIzNDU2Nzg5MDEyMzQuMTp7SW5zdGFuY2VzOnsxLjEuMS4xLjEuMS4xMjM0NS4xMjM0NTY3ODkwMTIuMTIzLjEyMzQ1Njc4OTAxMjM0LjE6e319fX19fQo="
}
}
Note: removableAttributes
is a Base64 encoded JSON string. Here is the unencoded JSON string.
{"1.1.1.1.1.1.12345.123456789012.123.12345678901234.1":{"Instances":{"1.1.1.1.1.1.12345.123456789012.123.12345678901234.1":{}}}}}}
Output:
{
"latestVersionId": "2",
"imageSetWorkflowStatus": "UPDATING",
"updatedAt": 1680042257.908,
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e",
"imageSetState": "LOCKED",
"createdAt": 1680027126.436,
"datastoreId": "12345678901234567890123456789012"
}
For more information, see Updating image set metadata in the AWS HealthImaging Developer Guide.
datastoreId -> (string)
The data store identifier.
imageSetId -> (string)
The image set identifier.
latestVersionId -> (string)
The latest image set version identifier.
imageSetState -> (string)
The image set state.
imageSetWorkflowStatus -> (string)
The image set workflow status.
createdAt -> (timestamp)
The timestamp when image set metadata was created.
updatedAt -> (timestamp)
The timestamp when image set metadata was updated.
message -> (string)
The error message thrown if an update image set metadata action fails.