Skip to main content

devices

Creates, updates, deletes or gets a device resource or lists devices in a region

Overview

Namedevices
TypeResource
DescriptionThe AWS::NetworkManager::Device type describes a device.
Idaws.networkmanager.devices

Fields

NameDatatypeDescription
device_arnstringThe Amazon Resource Name (ARN) of the device.
device_idstringThe ID of the device.
descriptionstringThe description of the device.
tagsarrayThe tags for the device.
global_network_idstringThe ID of the global network.
aws_locationobjectThe Amazon Web Services location of the device, if applicable.
locationobjectThe site location.
modelstringThe device model
serial_numberstringThe device serial number.
site_idstringThe site ID.
typestringThe device type.
vendorstringThe device vendor.
created_atstringThe date and time that the device was created.
statestringThe state of the device.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTGlobalNetworkId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all devices in a region.

SELECT
region,
device_arn,
device_id,
description,
tags,
global_network_id,
aws_location,
location,
model,
serial_number,
site_id,
type,
vendor,
created_at,
state
FROM aws.networkmanager.devices
WHERE region = 'us-east-1';

Gets all properties from an individual device.

SELECT
region,
device_arn,
device_id,
description,
tags,
global_network_id,
aws_location,
location,
model,
serial_number,
site_id,
type,
vendor,
created_at,
state
FROM aws.networkmanager.devices
WHERE region = 'us-east-1' AND data__Identifier = '<GlobalNetworkId>|<DeviceId>';

INSERT example

Use the following StackQL query and manifest file to create a new device resource, using stack-deploy.

/*+ create */
INSERT INTO aws.networkmanager.devices (
GlobalNetworkId,
region
)
SELECT
'{{ GlobalNetworkId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.networkmanager.devices
WHERE data__Identifier = '<GlobalNetworkId|DeviceId>'
AND region = 'us-east-1';

Permissions

To operate on the devices resource, the following permissions are required:

Create

networkmanager:CreateDevice,
networkmanager:GetDevices,
networkmanager:TagResource

Read

networkmanager:GetDevices

Update

networkmanager:UpdateDevice,
networkmanager:ListTagsForResource,
networkmanager:GetDevices,
networkmanager:TagResource,
networkmanager:UntagResource

Delete

networkmanager:GetDevices,
networkmanager:DeleteDevice

List

networkmanager:GetDevices