File: //lib/google-cloud-sdk/lib/surface/iot/devices/list.yaml
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List devices.
description: List devices.
examples: |
To list all devices in the device registry 'my-registry' and region 'us-central1', run:
$ {command} --region=us-central1 --registry=my-registry
request:
collection: cloudiot.projects.locations.registries.devices
static_fields:
fieldMask: blocked,name,gatewayConfig
# TODO (b/124063772): Remove this mapping fix once apitools base fix is applied
modify_request_hooks:
- googlecloudsdk.command_lib.iot.util:RegistriesDevicesListRequestHook
response:
id_field: name
arguments:
resource:
help_text: The registry you want to list the devices for.
spec: !REF googlecloudsdk.command_lib.iot.resources:registry
params:
- api_field: deviceIds
arg_name: device-ids
help_text: If given, show only devices with one of the provided IDs.
- api_field: deviceNumIds
arg_name: device-num-ids
help_text: |
If given, show only devices with one of the provided numerical IDs.
- api_field: gatewayListOptions_gatewayType
arg_name: device-type
required: false
choices:
- arg_value: gateway
enum_value: GATEWAY
- arg_value: non-gateway
enum_value: NON_GATEWAY
help_text: |
If specified, show only devices of that type. If left unspecified,
show devices of any type.
output:
format: table(id, numId, blocked,
gatewayConfig.gatewayType:optional, gatewayConfig.gatewayAuthMethod:optional)