device_definition_versions
Creates, updates, deletes, gets or lists a device_definition_versions resource.
Overview
| Name | device_definition_versions |
| Type | Resource |
| Id | aws.greengrass.device_definition_versions |
Fields
The following fields are returned by SELECT queries:
- get_device_definition_version
- list_device_definition_versions
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the device definition version. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the device definition version was created. |
definition | object | Information about a device definition version. |
id | string | The ID of the device definition version. |
next_token | string | The token for the next set of results, or ''null'' if there are no additional results. |
version | string | The version of the device definition version. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the version. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the version was created. |
id | string | The ID of the parent definition that the version is associated with. |
version | string | The ID of the version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_device_definition_version | select | device_definition_id, device_definition_version_id, region | NextToken | Retrieves information about a device definition version. |
list_device_definition_versions | select | device_definition_id, region | MaxResults, NextToken | Lists the versions of a device definition. |
create_device_definition_version | insert | device_definition_id, region | X-Amzn-Client-Token | Creates 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.
| Name | Datatype | Description |
|---|---|---|
device_definition_id | string | The ID of the device definition. |
device_definition_version_id | string | The 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. |
region | string | AWS region (default: us-east-1) |
MaxResults | string | The maximum number of results to be returned per request. |
NextToken | string | The token for the next set of results, or ''null'' if there are no additional results. |
X-Amzn-Client-Token | string | A client token used to correlate requests and responses. |
SELECT examples
- get_device_definition_version
- list_device_definition_versions
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 }}'
;
Lists the versions of a device definition.
SELECT
arn,
creation_timestamp,
id,
version
FROM aws.greengrass.device_definition_versions
WHERE device_definition_id = '{{ device_definition_id }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_device_definition_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: device_definition_versions
props:
- name: device_definition_id
value: "{{ device_definition_id }}"
description: Required parameter for the device_definition_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the device_definition_versions resource.
- name: Devices
value:
- CertificateArn: "{{ CertificateArn }}"
Id: "{{ Id }}"
SyncShadow: {{ SyncShadow }}
ThingArn: "{{ ThingArn }}"
- name: X-Amzn-Client-Token
value: "{{ X-Amzn-Client-Token }}"
description: A client token used to correlate requests and responses.
description: A client token used to correlate requests and responses.