devices
Creates, updates, deletes, gets or lists a devices resource.
Overview
| Name | devices |
| Type | Resource |
| Id | aws.sagemaker.devices |
Fields
The following fields are returned by SELECT queries:
- describe_device
- list_devices
| Name | Datatype | Description |
|---|---|---|
agent_version | string | Edge Manager agent version. (pattern: <code>[a-zA-Z0-9\ _.]+</code>) |
description | string | A description of the device. (pattern: <code>[-a-zA-Z0-9_.,;:! ]*</code>) |
device_arn | string | The 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_name | string | The name of the fleet the device belongs to. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
device_name | string | The unique identifier of the device. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
iot_thing_name | string | The Amazon Web Services Internet of Things (IoT) object thing name associated with the device. (pattern: <code>[a-zA-Z0-9:_-]+</code>) |
latest_heartbeat | string (date-time) | The last heartbeat received from the device. |
max_models | integer | The maximum number of models. |
models | array | Models on the device. |
next_token | string | The response from the last list when returning a list large enough to need tokening. (pattern: <code>.*</code>) |
registration_time | string (date-time) | The timestamp of the last registration or de-reregistration. |
| Name | Datatype | Description |
|---|---|---|
agent_version | string | Edge Manager agent version. (pattern: <code>[a-zA-Z0-9\ _.]+</code>) |
description | string | A description of the device. (pattern: <code>[-a-zA-Z0-9_.,;:! ]*</code>) |
device_arn | string | 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_name | string | The name of the fleet the device belongs to. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
device_name | string | The unique identifier of the device. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
iot_thing_name | string | The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.. (pattern: <code>[a-zA-Z0-9:_-]+</code>) |
latest_heartbeat | string (date-time) | The last heartbeat received from the device. |
models | array | Models on the device. |
registration_time | string (date-time) | The timestamp of the last registration or de-reregistration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_device | select | region | Describes the device. | |
list_devices | select | region | A list of devices. | |
register_devices | insert | region, DeviceFleetName, Devices | Register devices. | |
update_devices | update | region, DeviceFleetName, Devices | Updates one or more devices in a fleet. | |
deregister_devices | delete | region | Deregisters 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_device
- list_devices
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
;
A list of devices.
SELECT
agent_version,
description,
device_arn,
device_fleet_name,
device_name,
iot_thing_name,
latest_heartbeat,
models,
registration_time
FROM aws.sagemaker.devices
WHERE region = '{{ region }}' -- required
;
INSERT examples
- register_devices
- Manifest
Register devices.
INSERT INTO aws.sagemaker.devices (
DeviceFleetName,
Devices,
Tags,
region
)
SELECT
'{{ DeviceFleetName }}' /* required */,
'{{ Devices }}' /* required */,
'{{ Tags }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: devices
props:
- name: region
value: "{{ region }}"
description: Required parameter for the devices resource.
- name: DeviceFleetName
value: "{{ DeviceFleetName }}"
description: |
The name of the fleet.
- name: Devices
description: |
A list of devices to register with SageMaker Edge Manager.
value:
- DeviceName: "{{ DeviceName }}"
Description: "{{ Description }}"
IotThingName: "{{ IotThingName }}"
- name: Tags
description: |
The tags associated with devices.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_devices
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
- deregister_devices
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
;