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.
Idawscc.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.

For more information, see AWS::NetworkManager::Device.

Methods

NameResourceAccessible byRequired Params
create_resourcedevicesINSERTGlobalNetworkId, region
delete_resourcedevicesDELETEIdentifier, region
update_resourcedevicesUPDATEIdentifier, PatchDocument, region
list_resourcesdevices_list_onlySELECTregion
get_resourcedevicesSELECTIdentifier, region

SELECT examples

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 awscc.networkmanager.devices
WHERE
region = 'us-east-1' AND
Identifier = '{{ global_network_id }}|{{ device_id }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.networkmanager.devices
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags,
"AWSLocation": aws_location,
"Location": location,
"Model": model,
"SerialNumber": serial_number,
"SiteId": site_id,
"Type": type,
"Vendor": vendor
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ global_network_id }}|{{ device_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.networkmanager.devices
WHERE
Identifier = '{{ global_network_id }}|{{ device_id }}' AND
region = 'us-east-1';

Permissions

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

networkmanager:CreateDevice,
networkmanager:GetDevices,
networkmanager:TagResource