Menu
AWS Greengrass
API Reference

/greengrass/definition/devices/DeviceDefinitionId/versions

POST

POST /greengrass/definition/devices/DeviceDefinitionId/versions

Operation ID: CreateDeviceDefinitionVersion

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

Produces: application/json

Body Parameters

CreateDeviceDefinitionVersionRequestBody

where used: body; required: true

Copy
{ "Devices": [ { "Id": "string", "ThingArn": "string", "CertificateArn": "string", "SyncShadow": true } ] }
DeviceDefinitionVersion

Information about a device definition version.

type: object

Devices

A list of devices in the definition version.

type: array

items: Device

Device

Information about a device.

type: object

required: ["Id", "ThingArn", "CertificateArn"]

Id

The ID of the device.

type: string

ThingArn

The thing ARN of the device.

type: string

CertificateArn

The ARN of the certificate associated with the device.

type: string

SyncShadow

If true, the device's local shadow will be automatically synced with the cloud.

type: boolean

Header Parameters

X-Amzn-Client-Token

A client token used to make idempotent requests. Provide a unique token to help prevent duplicate updates from being created due to internal retries.

where used: header; required: false

type: string

Path Parameters

DeviceDefinitionId

The ID of the device definition.

where used: path; required: true

type: string

CLI

Copy
aws greengrass create-device-definition-version \ --device-definition-id <value> \ [--devices <value>] \ [--amzn-client-token <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

Copy
{ "DeviceDefinitionId": "string", "Devices": [ { "Id": "string", "ThingArn": "string", "CertificateArn": "string", "SyncShadow": "boolean" } ], "AmznClientToken": "string" }

Responses

200 (CreateDeviceDefinitionVersionResponse)

VersionInformation

Copy
{ "Arn": "string", "Id": "string", "Version": "string", "CreationTimestamp": "string" }
VersionInformation

Information about a version.

type: object

Arn

The ARN of the version.

type: string

Id

The ID of the version.

type: string

Version

The unique ID of the version.

type: string

CreationTimestamp

The time, in milliseconds since the epoch, when the version was created.

type: string

400

invalid request

GeneralError

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string

GET

GET /greengrass/definition/devices/DeviceDefinitionId/versions

Operation ID: ListDeviceDefinitionVersions

Lists the versions of a device definition.

Produces: application/json

Path Parameters

DeviceDefinitionId

The ID of the device definition.

where used: path; required: true

type: string

Query Parameters

NextToken

The token for the next set of results, or null if there are no additional results.

where used: query; required: false

type: string

MaxResults

The maximum number of results to be returned per request.

where used: query; required: false

type: integer

CLI

Copy
aws greengrass list-device-definition-versions \ --device-definition-id <value> \ [--next-token <value>] \ [--max-results <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

Copy
{ "DeviceDefinitionId": "string", "NextToken": "string", "MaxResults": "integer" }

Responses

200 (ListDeviceDefinitionVersionsResponse)

ListVersionsResponse

Copy
{ "Versions": [ { "Arn": "string", "Id": "string", "Version": "string", "CreationTimestamp": "string" } ], "NextToken": "string" }
ListVersionsResponse

A list of versions.

type: object

Versions

Information about a version.

type: array

items: VersionInformation

VersionInformation

Information about a version.

type: object

Arn

The ARN of the version.

type: string

Id

The ID of the version.

type: string

Version

The unique ID of the version.

type: string

CreationTimestamp

The time, in milliseconds since the epoch, when the version was created.

type: string

NextToken

The token for the next set of results, or null if there are no additional results.

type: string

400

invalid request

GeneralError

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string

On this page: