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.
iot¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.iot.Registry(resource_name, opts=None, credentials=None, event_notification_configs=None, http_config=None, log_level=None, mqtt_config=None, name=None, project=None, region=None, state_notification_config=None, __props__=None, __name__=None, __opts__=None)¶ A Google Cloud IoT Core device registry.
To get more information about DeviceRegistry, see:
How-to Guides
import pulumi import pulumi_gcp as gcp test_registry = gcp.iot.Registry("test-registry")
import pulumi import pulumi_gcp as gcp default_telemetry = gcp.pubsub.Topic("default-telemetry") test_registry = gcp.iot.Registry("test-registry", event_notification_configs=[{ "pubsub_topic_name": default_telemetry.id, "subfolderMatches": "", }])
import pulumi import pulumi_gcp as gcp default_devicestatus = gcp.pubsub.Topic("default-devicestatus") default_telemetry = gcp.pubsub.Topic("default-telemetry") additional_telemetry = gcp.pubsub.Topic("additional-telemetry") test_registry = gcp.iot.Registry("test-registry", event_notification_configs=[ { "pubsub_topic_name": additional_telemetry.id, "subfolderMatches": "test/path", }, { "pubsub_topic_name": default_telemetry.id, "subfolderMatches": "", }, ], state_notification_config={ "pubsub_topic_name": default_devicestatus.id, }, mqtt_config={ "mqtt_enabled_state": "MQTT_ENABLED", }, http_config={ "http_enabled_state": "HTTP_ENABLED", }, log_level="INFO", credentials=[{ "publicKeyCertificate": { "format": "X509_CERTIFICATE_PEM", "certificate": (lambda path: open(path).read())("test-fixtures/rsa_cert.pem"), }, }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
credentials (pulumi.Input[list]) – List of public key certificates to authenticate devices. The structure is documented below.
event_notification_configs (pulumi.Input[list]) – List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
http_config (pulumi.Input[dict]) – Activate or deactivate HTTP. The structure is documented below.
log_level (pulumi.Input[str]) – 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.
mqtt_config (pulumi.Input[dict]) – Activate or deactivate MQTT. The structure is documented below.
name (pulumi.Input[str]) – A unique name for the resource, required by device registry.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region in which the created registry should reside. If it is not provided, the provider region is used.
state_notification_config (pulumi.Input[dict]) – A PubSub topic to publish device state updates. The structure is documented below.
The credentials object supports the following:
publicKeyCertificate(pulumi.Input[dict]) - A public key certificate format and data.certificate(pulumi.Input[str]) - The certificate data.format(pulumi.Input[str]) - The field allows onlyX509_CERTIFICATE_PEM.
The event_notification_configs object supports the following:
pubsub_topic_name(pulumi.Input[str]) - PubSub topic name to publish device events.subfolderMatches(pulumi.Input[str]) - 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. Empty value can only be used for the lastevent_notification_configsitem.
The http_config object supports the following:
http_enabled_state(pulumi.Input[str]) - The field allowsHTTP_ENABLEDorHTTP_DISABLED.
The mqtt_config object supports the following:
mqtt_enabled_state(pulumi.Input[str]) - The field allowsMQTT_ENABLEDorMQTT_DISABLED.
The state_notification_config object supports the following:
pubsub_topic_name(pulumi.Input[str]) - PubSub topic name to publish device events.
credentials: pulumi.Output[list] = None¶List of public key certificates to authenticate devices. The structure is documented below.
publicKeyCertificate(dict) - A public key certificate format and data.certificate(str) - The certificate data.format(str) - The field allows onlyX509_CERTIFICATE_PEM.
event_notification_configs: pulumi.Output[list] = None¶List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
pubsub_topic_name(str) - PubSub topic name to publish device events.subfolderMatches(str) - 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. Empty value can only be used for the lastevent_notification_configsitem.
http_config: pulumi.Output[dict] = None¶Activate or deactivate HTTP. The structure is documented below.
http_enabled_state(str) - The field allowsHTTP_ENABLEDorHTTP_DISABLED.
log_level: pulumi.Output[str] = None¶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.
mqtt_config: pulumi.Output[dict] = None¶Activate or deactivate MQTT. The structure is documented below.
mqtt_enabled_state(str) - The field allowsMQTT_ENABLEDorMQTT_DISABLED.
name: pulumi.Output[str] = None¶A unique name for the resource, required by device registry.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The region in which the created registry should reside. If it is not provided, the provider region is used.
state_notification_config: pulumi.Output[dict] = None¶A PubSub topic to publish device state updates. The structure is documented below.
pubsub_topic_name(str) - PubSub topic name to publish device events.
- static
get(resource_name, id, opts=None, credentials=None, event_notification_configs=None, http_config=None, log_level=None, mqtt_config=None, name=None, project=None, region=None, state_notification_config=None)¶ Get an existing Registry resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
credentials (pulumi.Input[list]) – List of public key certificates to authenticate devices. The structure is documented below.
event_notification_configs (pulumi.Input[list]) – List of configurations for event notifications, such as PubSub topics to publish device events to. Structure is documented below.
http_config (pulumi.Input[dict]) – Activate or deactivate HTTP. The structure is documented below.
log_level (pulumi.Input[str]) – 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.
mqtt_config (pulumi.Input[dict]) – Activate or deactivate MQTT. The structure is documented below.
name (pulumi.Input[str]) – A unique name for the resource, required by device registry.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region in which the created registry should reside. If it is not provided, the provider region is used.
state_notification_config (pulumi.Input[dict]) – A PubSub topic to publish device state updates. The structure is documented below.
The credentials object supports the following:
publicKeyCertificate(pulumi.Input[dict]) - A public key certificate format and data.certificate(pulumi.Input[str]) - The certificate data.format(pulumi.Input[str]) - The field allows onlyX509_CERTIFICATE_PEM.
The event_notification_configs object supports the following:
pubsub_topic_name(pulumi.Input[str]) - PubSub topic name to publish device events.subfolderMatches(pulumi.Input[str]) - 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. Empty value can only be used for the lastevent_notification_configsitem.
The http_config object supports the following:
http_enabled_state(pulumi.Input[str]) - The field allowsHTTP_ENABLEDorHTTP_DISABLED.
The mqtt_config object supports the following:
mqtt_enabled_state(pulumi.Input[str]) - The field allowsMQTT_ENABLEDorMQTT_DISABLED.
The state_notification_config object supports the following:
pubsub_topic_name(pulumi.Input[str]) - PubSub topic name to publish device events.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str