Module iot
This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
Resources
Others
Resources
Resource Registry
class Registry extends CustomResourceA Google Cloud IoT Core device registry.
To get more information about DeviceRegistry, see:
- API documentation
- How-to Guides
Example Usage - Cloudiot Device Registry Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testRegistry = new gcp.iot.Registry("test-registry", {});Example Usage - Cloudiot Device Registry Single Event Notification Configs
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultTelemetry = new gcp.pubsub.Topic("default-telemetry", {});
const testRegistry = new gcp.iot.Registry("test-registry", {event_notification_configs: [{
pubsubTopicName: default_telemetry.id,
subfolderMatches: "",
}]});Example Usage - Cloudiot Device Registry Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * from "fs";
const defaultDevicestatus = new gcp.pubsub.Topic("default-devicestatus", {});
const defaultTelemetry = new gcp.pubsub.Topic("default-telemetry", {});
const additionalTelemetry = new gcp.pubsub.Topic("additional-telemetry", {});
const testRegistry = new gcp.iot.Registry("test-registry", {
event_notification_configs: [
{
pubsubTopicName: additional_telemetry.id,
subfolderMatches: "test/path",
},
{
pubsubTopicName: default_telemetry.id,
subfolderMatches: "",
},
],
stateNotificationConfig: {
pubsub_topic_name: default_devicestatus.id,
},
mqttConfig: {
mqtt_enabled_state: "MQTT_ENABLED",
},
httpConfig: {
http_enabled_state: "HTTP_ENABLED",
},
logLevel: "INFO",
credentials: [{
publicKeyCertificate: {
format: "X509_CERTIFICATE_PEM",
certificate: fs.readFileSync("test-fixtures/rsa_cert.pem"),
},
}],
});constructor
new Registry(name: string, args?: RegistryArgs, opts?: pulumi.CustomResourceOptions)Create a Registry resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegistryState, opts?: pulumi.CustomResourceOptions): RegistryGet an existing Registry resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is RegistryReturns true if the given object is an instance of Registry. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property credentials
public credentials: pulumi.Output<RegistryCredential[] | undefined>;List of public key certificates to authenticate devices. The structure is documented below.
property eventNotificationConfigs
public eventNotificationConfigs: pulumi.Output<RegistryEventNotificationConfigItem[]>;List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
property httpConfig
public httpConfig: pulumi.Output<RegistryHttpConfig>;Activate or deactivate HTTP. The structure is documented below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property logLevel
public logLevel: pulumi.Output<string | undefined>;The default logging verbosity for activity from devices in this registry. Specifies which events should be written to logs. For example, if the LogLevel is ERROR, only events that terminate in errors will be logged. LogLevel is inclusive; enabling INFO logging will also enable ERROR logging.
property mqttConfig
public mqttConfig: pulumi.Output<RegistryMqttConfig>;Activate or deactivate MQTT. The structure is documented below.
property name
public name: pulumi.Output<string>;A unique name for the resource, required by device registry.
property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property region
public region: pulumi.Output<string>;The region in which the created registry should reside. If it is not provided, the provider region is used.
property stateNotificationConfig
public stateNotificationConfig: pulumi.Output<RegistryStateNotificationConfig | undefined>;A PubSub topic to publish device state updates. The structure is documented below.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Others
interface RegistryArgs
interface RegistryArgsThe set of arguments for constructing a Registry resource.
property credentials
credentials?: pulumi.Input<pulumi.Input<RegistryCredential>[]>;List of public key certificates to authenticate devices. The structure is documented below.
property eventNotificationConfigs
eventNotificationConfigs?: pulumi.Input<pulumi.Input<RegistryEventNotificationConfigItem>[]>;List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
property httpConfig
httpConfig?: pulumi.Input<RegistryHttpConfig>;Activate or deactivate HTTP. The structure is documented below.
property logLevel
logLevel?: pulumi.Input<string>;The default logging verbosity for activity from devices in this registry. Specifies which events should be written to logs. For example, if the LogLevel is ERROR, only events that terminate in errors will be logged. LogLevel is inclusive; enabling INFO logging will also enable ERROR logging.
property mqttConfig
mqttConfig?: pulumi.Input<RegistryMqttConfig>;Activate or deactivate MQTT. The structure is documented below.
property name
name?: pulumi.Input<string>;A unique name for the resource, required by device registry.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;The region in which the created registry should reside. If it is not provided, the provider region is used.
property stateNotificationConfig
stateNotificationConfig?: pulumi.Input<RegistryStateNotificationConfig>;A PubSub topic to publish device state updates. The structure is documented below.
interface RegistryState
interface RegistryStateInput properties used for looking up and filtering Registry resources.
property credentials
credentials?: pulumi.Input<pulumi.Input<RegistryCredential>[]>;List of public key certificates to authenticate devices. The structure is documented below.
property eventNotificationConfigs
eventNotificationConfigs?: pulumi.Input<pulumi.Input<RegistryEventNotificationConfigItem>[]>;List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
property httpConfig
httpConfig?: pulumi.Input<RegistryHttpConfig>;Activate or deactivate HTTP. The structure is documented below.
property logLevel
logLevel?: pulumi.Input<string>;The default logging verbosity for activity from devices in this registry. Specifies which events should be written to logs. For example, if the LogLevel is ERROR, only events that terminate in errors will be logged. LogLevel is inclusive; enabling INFO logging will also enable ERROR logging.
property mqttConfig
mqttConfig?: pulumi.Input<RegistryMqttConfig>;Activate or deactivate MQTT. The structure is documented below.
property name
name?: pulumi.Input<string>;A unique name for the resource, required by device registry.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;The region in which the created registry should reside. If it is not provided, the provider region is used.
property stateNotificationConfig
stateNotificationConfig?: pulumi.Input<RegistryStateNotificationConfig>;A PubSub topic to publish device state updates. The structure is documented below.