Skip to main content

devices

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

Overview

Namedevices
TypeResource
Idaws.sagemaker.devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_versionstringEdge Manager agent version. (pattern: <code>[a-zA-Z0-9\ _.]+</code>)
descriptionstringA description of the device. (pattern: <code>[-a-zA-Z0-9_.,;:! ]*</code>)
device_arnstringThe Amazon Resource Name (ARN) of the device. (pattern: <code>arn:aws[a-z-]:[a-z-]:[a-z-]:\d{12}:[a-z-]/?[a-zA-Z_0-9+=,.@-_/]+</code>)
device_fleet_namestringThe name of the fleet the device belongs to. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
device_namestringThe unique identifier of the device. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
iot_thing_namestringThe Amazon Web Services Internet of Things (IoT) object thing name associated with the device. (pattern: <code>[a-zA-Z0-9:_-]+</code>)
latest_heartbeatstring (date-time)The last heartbeat received from the device.
max_modelsintegerThe maximum number of models.
modelsarrayModels on the device.
next_tokenstringThe response from the last list when returning a list large enough to need tokening. (pattern: <code>.*</code>)
registration_timestring (date-time)The timestamp of the last registration or de-reregistration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_deviceselectregionDescribes the device.
list_devicesselectregionA list of devices.
register_devicesinsertregion, DeviceFleetName, DevicesRegister devices.
update_devicesupdateregion, DeviceFleetName, DevicesUpdates one or more devices in a fleet.
deregister_devicesdeleteregionDeregisters the specified devices. After you deregister a device, you will need to re-register the devices.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the device.

SELECT
agent_version,
description,
device_arn,
device_fleet_name,
device_name,
iot_thing_name,
latest_heartbeat,
max_models,
models,
next_token,
registration_time
FROM aws.sagemaker.devices
WHERE region = '{{ region }}' -- required
;

INSERT examples

Register devices.

INSERT INTO aws.sagemaker.devices (
DeviceFleetName,
Devices,
Tags,
region
)
SELECT
'{{ DeviceFleetName }}' /* required */,
'{{ Devices }}' /* required */,
'{{ Tags }}',
'{{ region }}'
;

UPDATE examples

Updates one or more devices in a fleet.

UPDATE aws.sagemaker.devices
SET
DeviceFleetName = '{{ DeviceFleetName }}',
Devices = '{{ Devices }}'
WHERE
region = '{{ region }}' --required
AND DeviceFleetName = '{{ DeviceFleetName }}' --required
AND Devices = '{{ Devices }}' --required;

DELETE examples

Deregisters the specified devices. After you deregister a device, you will need to re-register the devices.

DELETE FROM aws.sagemaker.devices
WHERE region = '{{ region }}' --required
;