Skip to main content

devices

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

Overview

Namedevices
TypeResource
Idgoogle.prod_tt_sasportal.devices

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource path name.
activeConfigobjectOutput only. Current configuration of the device as registered to the SAS. (id: SasPortalDeviceConfig)
currentChannelsarrayOutput only. Current channels with scores.
deviceMetadataobjectDevice parameters that can be overridden by both SAS Portal and SAS registration requests. (id: SasPortalDeviceMetadata)
displayNamestringDevice display name.
fccIdstringThe FCC identifier of the device. Refer to https://www.fcc.gov/oet/ea/fccid for FccID format. Accept underscores and periods because some test-SAS customers use them.
grantRangeAllowlistsarrayOnly ranges that are within the allowlists are available for new grants.
grantsarrayOutput only. Grants held by the device.
preloadedConfigobjectConfiguration of the device, as specified via SAS Portal API. (id: SasPortalDeviceConfig)
serialNumberstringA serial number assigned to the device by the device manufacturer.
statestringOutput only. Device state.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
customers_devices_getselectcustomersId, devicesIdGets details about a device.
customers_nodes_devices_listselectcustomersId, nodesIdpageSize, pageToken, filterLists devices under a node or customer.
customers_deployments_devices_listselectcustomersId, deploymentsIdpageSize, pageToken, filterLists devices under a node or customer.
nodes_devices_getselectnodesId, devicesIdGets details about a device.
nodes_nodes_devices_listselectnodesId, nodesId1pageSize, pageToken, filterLists devices under a node or customer.
nodes_deployments_devices_listselectnodesId, deploymentsIdpageSize, pageToken, filterLists devices under a node or customer.
deployments_devices_getselectdeploymentsId, devicesIdGets details about a device.
customers_devices_listselectcustomersIdpageSize, pageToken, filterLists devices under a node or customer.
nodes_devices_listselectnodesIdpageSize, pageToken, filterLists devices under a node or customer.
customers_nodes_devices_createinsertcustomersId, nodesIdCreates a device under a node or customer.
customers_deployments_devices_createinsertcustomersId, deploymentsIdCreates a device under a node or customer.
nodes_nodes_devices_createinsertnodesId, nodesId1Creates a device under a node or customer.
nodes_deployments_devices_createinsertnodesId, deploymentsIdCreates a device under a node or customer.
customers_devices_createinsertcustomersIdCreates a device under a node or customer.
nodes_devices_createinsertnodesIdCreates a device under a node or customer.
customers_devices_patchupdatecustomersId, devicesIdupdateMaskUpdates a device.
nodes_devices_patchupdatenodesId, devicesIdupdateMaskUpdates a device.
deployments_devices_patchupdatedeploymentsId, devicesIdupdateMaskUpdates a device.
customers_devices_deletedeletecustomersId, devicesIdDeletes a device.
nodes_devices_deletedeletenodesId, devicesIdDeletes a device.
deployments_devices_deletedeletedeploymentsId, devicesIdDeletes a device.
customers_devices_moveexeccustomersId, devicesIdMoves a device under another node or customer.
customers_devices_sign_deviceexeccustomersId, devicesIdSigns a device.
nodes_devices_moveexecnodesId, devicesIdMoves a device under another node or customer.
nodes_devices_sign_deviceexecnodesId, devicesIdSigns a device.
deployments_devices_moveexecdeploymentsId, devicesIdMoves a device under another node or customer.
deployments_devices_sign_deviceexecdeploymentsId, devicesIdSigns a device.

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
customersIdstring
deploymentsIdstring
devicesIdstring
nodesIdstring
nodesId1string
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details about a device.

SELECT
name,
activeConfig,
currentChannels,
deviceMetadata,
displayName,
fccId,
grantRangeAllowlists,
grants,
preloadedConfig,
serialNumber,
state
FROM google.prod_tt_sasportal.devices
WHERE customersId = '{{ customersId }}' -- required
AND devicesId = '{{ devicesId }}' -- required;

INSERT examples

Creates a device under a node or customer.

INSERT INTO google.prod_tt_sasportal.devices (
data__name,
data__fccId,
data__serialNumber,
data__preloadedConfig,
data__activeConfig,
data__state,
data__grants,
data__displayName,
data__deviceMetadata,
data__grantRangeAllowlists,
customersId,
nodesId
)
SELECT
'{{ name }}',
'{{ fccId }}',
'{{ serialNumber }}',
'{{ preloadedConfig }}',
'{{ activeConfig }}',
'{{ state }}',
'{{ grants }}',
'{{ displayName }}',
'{{ deviceMetadata }}',
'{{ grantRangeAllowlists }}',
'{{ customersId }}',
'{{ nodesId }}'
RETURNING
name,
activeConfig,
currentChannels,
deviceMetadata,
displayName,
fccId,
grantRangeAllowlists,
grants,
preloadedConfig,
serialNumber,
state
;

UPDATE examples

Updates a device.

UPDATE google.prod_tt_sasportal.devices
SET
data__name = '{{ name }}',
data__fccId = '{{ fccId }}',
data__serialNumber = '{{ serialNumber }}',
data__preloadedConfig = '{{ preloadedConfig }}',
data__activeConfig = '{{ activeConfig }}',
data__state = '{{ state }}',
data__grants = '{{ grants }}',
data__displayName = '{{ displayName }}',
data__deviceMetadata = '{{ deviceMetadata }}',
data__grantRangeAllowlists = '{{ grantRangeAllowlists }}'
WHERE
customersId = '{{ customersId }}' --required
AND devicesId = '{{ devicesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
activeConfig,
currentChannels,
deviceMetadata,
displayName,
fccId,
grantRangeAllowlists,
grants,
preloadedConfig,
serialNumber,
state;

DELETE examples

Deletes a device.

DELETE FROM google.prod_tt_sasportal.devices
WHERE customersId = '{{ customersId }}' --required
AND devicesId = '{{ devicesId }}' --required;

Lifecycle Methods

Moves a device under another node or customer.

EXEC google.prod_tt_sasportal.devices.customers_devices_move 
@customersId='{{ customersId }}' --required,
@devicesId='{{ devicesId }}' --required
@@json=
'{
"destination": "{{ destination }}"
}';