devices
Creates, updates, deletes or gets a device
resource or lists devices
in a region
Overview
Name | devices |
Type | Resource |
Description | The AWS::NetworkManager::Device type describes a device. |
Id | aws.networkmanager.devices |
Fields
Name | Datatype | Description |
---|---|---|
device_arn | string | The Amazon Resource Name (ARN) of the device. |
device_id | string | The ID of the device. |
description | string | The description of the device. |
tags | array | The tags for the device. |
global_network_id | string | The ID of the global network. |
aws_location | object | The Amazon Web Services location of the device, if applicable. |
location | object | The site location. |
model | string | The device model |
serial_number | string | The device serial number. |
site_id | string | The site ID. |
type | string | The device type. |
vendor | string | The device vendor. |
created_at | string | The date and time that the device was created. |
state | string | The state of the device. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | GlobalNetworkId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.networkmanager.devices (
GlobalNetworkId,
region
)
SELECT
'{{ GlobalNetworkId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.networkmanager.devices (
Description,
Tags,
GlobalNetworkId,
AWSLocation,
Location,
Model,
SerialNumber,
SiteId,
Type,
Vendor,
region
)
SELECT
'{{ Description }}',
'{{ Tags }}',
'{{ GlobalNetworkId }}',
'{{ AWSLocation }}',
'{{ Location }}',
'{{ Model }}',
'{{ SerialNumber }}',
'{{ SiteId }}',
'{{ Type }}',
'{{ Vendor }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: device
props:
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: GlobalNetworkId
value: '{{ GlobalNetworkId }}'
- name: AWSLocation
value:
Zone: '{{ Zone }}'
SubnetArn: '{{ SubnetArn }}'
- name: Location
value:
Address: '{{ Address }}'
Latitude: '{{ Latitude }}'
Longitude: '{{ Longitude }}'
- name: Model
value: '{{ Model }}'
- name: SerialNumber
value: '{{ SerialNumber }}'
- name: SiteId
value: '{{ SiteId }}'
- name: Type
value: '{{ Type }}'
- name: Vendor
value: '{{ Vendor }}'
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