Skip to main content

device_definition_versions

Creates, updates, deletes, gets or lists a device_definition_versions resource.

Overview

Namedevice_definition_versions
TypeResource
Idaws.greengrass.device_definition_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the device definition version.
creation_timestampstringThe time, in milliseconds since the epoch, when the device definition version was created.
definitionobjectInformation about a device definition version.
idstringThe ID of the device definition version.
next_tokenstringThe token for the next set of results, or ''null'' if there are no additional results.
versionstringThe version of the device definition version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_device_definition_versionselectdevice_definition_id, device_definition_version_id, regionNextTokenRetrieves information about a device definition version.
list_device_definition_versionsselectdevice_definition_id, regionMaxResults, NextTokenLists the versions of a device definition.
create_device_definition_versioninsertdevice_definition_id, regionX-Amzn-Client-TokenCreates a version of a device definition that has already been defined.

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.

NameDatatypeDescription
device_definition_idstringThe ID of the device definition.
device_definition_version_idstringThe ID of the device definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListDeviceDefinitionVersions'' requests. If the version is the last one that was associated with a device definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
regionstringAWS region (default: us-east-1)
MaxResultsstringThe maximum number of results to be returned per request.
NextTokenstringThe token for the next set of results, or ''null'' if there are no additional results.
X-Amzn-Client-TokenstringA client token used to correlate requests and responses.

SELECT examples

Retrieves information about a device definition version.

SELECT
arn,
creation_timestamp,
definition,
id,
next_token,
version
FROM aws.greengrass.device_definition_versions
WHERE device_definition_id = '{{ device_definition_id }}' -- required
AND device_definition_version_id = '{{ device_definition_version_id }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
;

INSERT examples

Creates a version of a device definition that has already been defined.

INSERT INTO aws.greengrass.device_definition_versions (
Devices,
device_definition_id,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ Devices }}',
'{{ device_definition_id }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn,
creation_timestamp,
id,
version
;