Skip to main content

devices

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

Overview​

Namedevices
TypeResource
Idgoogle.sasportal.devices

Fields​

The following fields are returned by SELECT queries:

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. (DEVICE_STATE_UNSPECIFIED, RESERVED, REGISTERED, DEREGISTERED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
customers_deployments_devices_listselectcustomersId, deploymentsIdfilter, pageSize, pageTokenLists devices under a node or customer.
customers_devices_getselectcustomersId, devicesIdGets details about a device.
customers_nodes_devices_listselectcustomersId, nodesIdfilter, pageSize, pageTokenLists devices under a node or customer.
deployments_devices_getselectdeploymentsId, devicesIdGets details about a device.
nodes_deployments_devices_listselectnodesId, deploymentsIdfilter, pageSize, pageTokenLists devices under a node or customer.
nodes_devices_getselectnodesId, devicesIdGets details about a device.
nodes_nodes_devices_listselectnodesId, nodesId1filter, pageSize, pageTokenLists devices under a node or customer.
customers_devices_listselectcustomersIdfilter, pageSize, pageTokenLists devices under a node or customer.
nodes_devices_listselectnodesIdfilter, pageSize, pageTokenLists devices under a node or customer.
customers_deployments_devices_createinsertcustomersId, deploymentsIdCreates a device under a node or customer.
customers_nodes_devices_createinsertcustomersId, nodesIdCreates a device under a node or customer.
nodes_deployments_devices_createinsertnodesId, deploymentsIdCreates a device under a node or customer.
nodes_nodes_devices_createinsertnodesId, nodesId1Creates 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.
deployments_devices_patchupdatedeploymentsId, devicesIdupdateMaskUpdates a device.
nodes_devices_patchupdatenodesId, devicesIdupdateMaskUpdates a device.
customers_devices_deletedeletecustomersId, devicesIdDeletes a device.
deployments_devices_deletedeletedeploymentsId, devicesIdDeletes a device.
nodes_devices_deletedeletenodesId, devicesIdDeletes a device.
customers_devices_moveexeccustomersId, devicesIdMoves a device under another node or customer.
customers_devices_sign_deviceexeccustomersId, devicesIdSigns a device.
deployments_devices_moveexecdeploymentsId, devicesIdMoves a device under another node or customer.
deployments_devices_sign_deviceexecdeploymentsId, devicesIdSigns a device.
nodes_devices_moveexecnodesId, devicesIdMoves a device under another node or customer.
nodes_devices_sign_deviceexecnodesId, 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​

Lists devices under a node or customer.

SELECT
name,
activeConfig,
currentChannels,
deviceMetadata,
displayName,
fccId,
grantRangeAllowlists,
grants,
preloadedConfig,
serialNumber,
state
FROM google.sasportal.devices
WHERE customersId = '{{ customersId }}' -- required
AND deploymentsId = '{{ deploymentsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;

INSERT examples​

Creates a device under a node or customer.

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

UPDATE examples​

Updates a device.

UPDATE google.sasportal.devices
SET
data__activeConfig = '{{ activeConfig }}',
data__deviceMetadata = '{{ deviceMetadata }}',
data__displayName = '{{ displayName }}',
data__fccId = '{{ fccId }}',
data__grantRangeAllowlists = '{{ grantRangeAllowlists }}',
data__grants = '{{ grants }}',
data__name = '{{ name }}',
data__preloadedConfig = '{{ preloadedConfig }}',
data__serialNumber = '{{ serialNumber }}',
data__state = '{{ state }}'
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.sasportal.devices
WHERE customersId = '{{ customersId }}' --required
AND devicesId = '{{ devicesId }}' --required
;

Lifecycle Methods​

Moves a device under another node or customer.

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