Google Cloud IoT Core is being retired on August 16, 2023. Contact your Google Cloud account team for more information.

REST Resource: projects.locations.registries

Resource: DeviceRegistry

A container for a group of devices.

JSON representation
{
  "id": string,
  "name": string,
  "eventNotificationConfigs": [
    {
      object(EventNotificationConfig)
    }
  ],
  "stateNotificationConfig": {
    object(StateNotificationConfig)
  },
  "mqttConfig": {
    object(MqttConfig)
  },
  "httpConfig": {
    object(HttpConfig)
  },
  "logLevel": enum(LogLevel),
  "credentials": [
    {
      object(RegistryCredential)
    }
  ]
}
Fields
id

string

The identifier of this device registry. For example, myRegistry.

name

string

The resource path name. For example, projects/example-project/locations/us-central1/registries/my-registry.

eventNotificationConfigs[]

object(EventNotificationConfig)

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

stateNotificationConfig

object(StateNotificationConfig)

The configuration for notification of new states received from the device. State updates are guaranteed to be stored in the state history, but notifications to Cloud Pub/Sub are not guaranteed. For example, if permissions are misconfigured or the specified topic doesn't exist, no notification will be published but the state will still be stored in Cloud IoT Core.

mqttConfig

object(MqttConfig)

The MQTT configuration for this device registry.

httpConfig

object(HttpConfig)

The DeviceService (HTTP) configuration for this device registry.

logLevel

enum(LogLevel)

The default logging verbosity for activity from devices in this registry. The verbosity level can be overridden by Device.log_level.

credentials[]

object(RegistryCredential)

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs when you create or update a device. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

EventNotificationConfig

The configuration for forwarding telemetry events.

JSON representation
{
  "subfolderMatches": string,
  "pubsubTopicName": string
}
Fields
subfolderMatches

string

If the subfolder name matches this string exactly, this configuration will be used. The string must not include the leading '/' character. If empty, all strings are matched. This field is used only for telemetry events; subfolders are not supported for state changes.

pubsubTopicName

string

A Cloud Pub/Sub topic name. For example, projects/myProject/topics/deviceEvents.

StateNotificationConfig

The configuration for notification of new states received from the device.

JSON representation
{
  "pubsubTopicName": string
}
Fields
pubsubTopicName

string

A Cloud Pub/Sub topic name. For example, projects/myProject/topics/deviceEvents.

MqttConfig

The configuration of MQTT for a device registry.

JSON representation
{
  "mqttEnabledState": enum(MqttState)
}
Fields
mqttEnabledState

enum(MqttState)

If enabled, allows connections using the MQTT protocol. Otherwise, MQTT connections to this registry will fail.

MqttState

Indicates whether an MQTT connection is enabled or disabled. See the field description for details.

Enums
MQTT_STATE_UNSPECIFIED No MQTT state specified. If not specified, MQTT will be enabled by default.
MQTT_ENABLED Enables a MQTT connection.
MQTT_DISABLED Disables a MQTT connection.

HttpConfig

The configuration of the HTTP bridge for a device registry.

JSON representation
{
  "httpEnabledState": enum(HttpState)
}
Fields
httpEnabledState

enum(HttpState)

If enabled, allows devices to use DeviceService via the HTTP protocol. Otherwise, any requests to DeviceService will fail for this registry.

HttpState

Indicates whether DeviceService (HTTP) is enabled or disabled for the registry. See the field description for details.

Enums
HTTP_STATE_UNSPECIFIED No HTTP state specified. If not specified, DeviceService will be enabled by default.
HTTP_ENABLED Enables DeviceService (HTTP) service for the registry.
HTTP_DISABLED Disables DeviceService (HTTP) service for the registry.

RegistryCredential

A server-stored registry credential used to validate device credentials.

JSON representation
{
  "publicKeyCertificate": {
    object(PublicKeyCertificate)
  }
}
Fields
publicKeyCertificate

object(PublicKeyCertificate)

A public key certificate used to verify the device credentials.

PublicKeyCertificate

A public key certificate format and data.

JSON representation
{
  "format": enum(PublicKeyCertificateFormat),
  "certificate": string,
  "x509Details": {
    object(X509CertificateDetails)
  }
}
Fields
format

enum(PublicKeyCertificateFormat)

The certificate format.

certificate

string

The certificate data.

x509Details

object(X509CertificateDetails)

[Output only] The certificate details. Used only for X.509 certificates.

PublicKeyCertificateFormat

The supported formats for the public key.

Enums
UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT The format has not been specified. This is an invalid default value and must not be used.
X509_CERTIFICATE_PEM An X.509v3 certificate (RFC5280), encoded in base64, and wrapped by -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.

X509CertificateDetails

Details of an X.509 certificate. For informational purposes only.

JSON representation
{
  "issuer": string,
  "subject": string,
  "startTime": string,
  "expiryTime": string,
  "signatureAlgorithm": string,
  "publicKeyType": string
}
Fields
issuer

string

The entity that signed the certificate.

subject

string

The entity the certificate and public key belong to.

startTime

string (Timestamp format)

The time the certificate becomes valid.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

expiryTime

string (Timestamp format)

The time the certificate becomes invalid.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

signatureAlgorithm

string

The algorithm used to sign the certificate.

publicKeyType

string

The type of public key in the certificate.

Methods

bindDeviceToGateway

Associates the device with the gateway.

create

Creates a device registry that contains devices.

delete

Deletes a device registry configuration.

get

Gets a device registry configuration.

getIamPolicy

Gets the access control policy for a resource.

list

Lists device registries.

patch

Updates a device registry configuration.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.

unbindDeviceFromGateway

Deletes the association between the device and the gateway.