Skip to main content

devices

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

Overview

Namedevices
TypeResource
Idaws.networkmanager.devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aws_locationobjectSpecifies a location in Amazon Web Services.
created_atstring (date-time)The date and time that the site was created.
descriptionstringThe description of the device. (pattern: <code>[\s\S]*</code>)
device_arnstringThe Amazon Resource Name (ARN) of the device. (pattern: <code>[\s\S]*</code>)
device_idstringThe ID of the device. (pattern: <code>[\s\S]*</code>)
global_network_idstringThe ID of the global network. (pattern: <code>[\s\S]*</code>)
locationobjectDescribes a location.
modelstringThe device model. (pattern: <code>[\s\S]*</code>)
serial_numberstringThe device serial number. (pattern: <code>[\s\S]*</code>)
site_idstringThe site ID. (pattern: <code>[\s\S]*</code>)
statestringThe device state. (PENDING, AVAILABLE, DELETING, UPDATING)
tagsarrayThe tags for the device.
typestringThe device type. (pattern: <code>[\s\S]*</code>)
vendorstringThe device vendor. (pattern: <code>[\s\S]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_devicesselectglobal_network_id, regiondeviceIds, siteId, maxResults, nextTokenGets information about one or more of your devices in a global network.
create_deviceinsertglobal_network_id, regionCreates a new device in a global network. If you specify both a site ID and a location, the location of the site is used for visualization in the Network Manager console.
update_deviceupdateglobal_network_id, device_id, regionUpdates the details for an existing device. To remove information for any of the parameters, specify an empty string.
delete_devicedeleteglobal_network_id, device_id, regionDeletes an existing device. You must first disassociate the device from any links and customer gateways.

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
device_idstringThe ID of the device.
global_network_idstringThe ID of the global network.
regionstringAWS region (default: us-east-1)
deviceIdsarrayOne or more device IDs. The maximum is 10.
maxResultsintegerThe maximum number of results to return.
nextTokenstringThe token for the next page of results.
siteIdstringThe ID of the site.

SELECT examples

Gets information about one or more of your devices in a global network.

SELECT
aws_location,
created_at,
description,
device_arn,
device_id,
global_network_id,
location,
model,
serial_number,
site_id,
state,
tags,
type,
vendor
FROM aws.networkmanager.devices
WHERE global_network_id = '{{ global_network_id }}' -- required
AND region = '{{ region }}' -- required
AND deviceIds = '{{ deviceIds }}'
AND siteId = '{{ siteId }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Creates a new device in a global network. If you specify both a site ID and a location, the location of the site is used for visualization in the Network Manager console.

INSERT INTO aws.networkmanager.devices (
AWSLocation,
Description,
Type,
Vendor,
Model,
SerialNumber,
Location,
SiteId,
Tags,
global_network_id,
region
)
SELECT
'{{ AWSLocation }}',
'{{ Description }}',
'{{ Type }}',
'{{ Vendor }}',
'{{ Model }}',
'{{ SerialNumber }}',
'{{ Location }}',
'{{ SiteId }}',
'{{ Tags }}',
'{{ global_network_id }}',
'{{ region }}'
RETURNING
device
;

UPDATE examples

Updates the details for an existing device. To remove information for any of the parameters, specify an empty string.

UPDATE aws.networkmanager.devices
SET
AWSLocation = '{{ AWSLocation }}',
Description = '{{ Description }}',
Type = '{{ Type }}',
Vendor = '{{ Vendor }}',
Model = '{{ Model }}',
SerialNumber = '{{ SerialNumber }}',
Location = '{{ Location }}',
SiteId = '{{ SiteId }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND device_id = '{{ device_id }}' --required
AND region = '{{ region }}' --required
RETURNING
device;

DELETE examples

Deletes an existing device. You must first disassociate the device from any links and customer gateways.

DELETE FROM aws.networkmanager.devices
WHERE global_network_id = '{{ global_network_id }}' --required
AND device_id = '{{ device_id }}' --required
AND region = '{{ region }}' --required
;