devices
Creates, updates, deletes or gets a device
resource or lists devices
in a region
Overview
Name | devices |
Type | Resource |
Description | Resource schema for AWS::SageMaker::Device |
Id | aws.sagemaker.devices |
Fields
Name | Datatype | Description |
---|---|---|
device_fleet_name | string | The name of the edge device fleet |
device | object | The Edge Device you want to register against a device fleet |
tags | array | Associate tags with the resource |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DeviceFleetName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual device
.
SELECT
region,
device_fleet_name,
device,
tags
FROM aws.sagemaker.devices
WHERE region = 'us-east-1' AND data__Identifier = '<Device/DeviceName>';
INSERT
example
Use the following StackQL query and manifest file to create a new device
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.devices (
DeviceFleetName,
region
)
SELECT
'{{ DeviceFleetName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.devices (
DeviceFleetName,
Device,
Tags,
region
)
SELECT
'{{ DeviceFleetName }}',
'{{ Device }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: device
props:
- name: DeviceFleetName
value: '{{ DeviceFleetName }}'
- name: Device
value:
DeviceFleetName: '{{ DeviceFleetName }}'
Device: null
Tags:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: Tags
value:
- null
DELETE
example
/*+ delete */
DELETE FROM aws.sagemaker.devices
WHERE data__Identifier = '<Device/DeviceName>'
AND region = 'us-east-1';
Permissions
To operate on the devices
resource, the following permissions are required:
Create
sagemaker:RegisterDevices
Read
sagemaker:DescribeDevice
Update
sagemaker:UpdateDevices
Delete
sagemaker:DeregisterDevices