import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Creates a device in a device registry. */ export declare class Device extends pulumi.CustomResource { /** * Get an existing Device resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Device; /** * Returns true if the given object is an instance of Device. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Device; /** * If a device is blocked, connections or requests from this device will fail. Can be used to temporarily prevent the device from connecting if, for example, the sensor is generating bad data and needs maintenance. */ readonly blocked: pulumi.Output; /** * The most recent device configuration, which is eventually sent from Cloud IoT Core to the device. If not present on creation, the configuration will be initialized with an empty payload and version value of `1`. To update this field after creation, use the `DeviceManager.ModifyCloudToDeviceConfig` method. */ readonly config: pulumi.Output; /** * The credentials used to authenticate this device. To allow credential rotation without interruption, multiple device credentials can be bound to this device. No more than 3 credentials can be bound to a single device at a time. When new credentials are added to a device, they are verified against the registry credentials. For details, see the description of the `DeviceRegistry.credentials` field. */ readonly credentials: pulumi.Output; /** * Gateway-related configuration and state. */ readonly gatewayConfig: pulumi.Output; /** * [Output only] The last time a cloud-to-device config version acknowledgment was received from the device. This field is only for configurations sent through MQTT. */ readonly lastConfigAckTime: pulumi.Output; /** * [Output only] The last time a cloud-to-device config version was sent to the device. */ readonly lastConfigSendTime: pulumi.Output; /** * [Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. If no errors have occurred, this field has an empty message and the status code 0 == OK. Otherwise, this field is expected to have a status code other than OK. */ readonly lastErrorStatus: pulumi.Output; /** * [Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub. This field is the timestamp of 'last_error_status'. */ readonly lastErrorTime: pulumi.Output; /** * [Output only] The last time a telemetry event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes. */ readonly lastEventTime: pulumi.Output; /** * [Output only] The last time an MQTT `PINGREQ` was received. This field applies only to devices connecting through MQTT. MQTT clients usually only send `PINGREQ` messages if the connection is idle, and no other messages have been sent. Timestamps are periodically collected and written to storage; they may be stale by a few minutes. */ readonly lastHeartbeatTime: pulumi.Output; /** * [Output only] The last time a state event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes. */ readonly lastStateTime: pulumi.Output; readonly location: pulumi.Output; /** * **Beta Feature** The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used. */ readonly logLevel: pulumi.Output; /** * The metadata key-value pairs assigned to the device. This metadata is not interpreted or indexed by Cloud IoT Core. It can be used to add contextual information for the device. Keys must conform to the regular expression a-zA-Z+ and be less than 128 bytes in length. Values are free-form strings. Each value must be less than or equal to 32 KB in size. The total size of all keys and values must be less than 256 KB, and the maximum number of key-value pairs is 500. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * The resource path name. For example, `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. When `name` is populated as a response from the service, it always ends in the device numeric ID. */ readonly name: pulumi.Output; /** * [Output only] A server-defined unique numeric ID for the device. This is a more compact way to identify devices, and it is globally unique. */ readonly numId: pulumi.Output; readonly project: pulumi.Output; readonly registryId: pulumi.Output; /** * [Output only] The state most recently received from the device. If no state has been reported, this field is not present. */ readonly state: pulumi.Output; /** * Create a Device resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DeviceArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Device resource. */ export interface DeviceArgs { /** * If a device is blocked, connections or requests from this device will fail. Can be used to temporarily prevent the device from connecting if, for example, the sensor is generating bad data and needs maintenance. */ blocked?: pulumi.Input; /** * The most recent device configuration, which is eventually sent from Cloud IoT Core to the device. If not present on creation, the configuration will be initialized with an empty payload and version value of `1`. To update this field after creation, use the `DeviceManager.ModifyCloudToDeviceConfig` method. */ config?: pulumi.Input; /** * The credentials used to authenticate this device. To allow credential rotation without interruption, multiple device credentials can be bound to this device. No more than 3 credentials can be bound to a single device at a time. When new credentials are added to a device, they are verified against the registry credentials. For details, see the description of the `DeviceRegistry.credentials` field. */ credentials?: pulumi.Input[]>; /** * Gateway-related configuration and state. */ gatewayConfig?: pulumi.Input; /** * The user-defined device identifier. The device ID must be unique within a device registry. */ id?: pulumi.Input; location?: pulumi.Input; /** * **Beta Feature** The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used. */ logLevel?: pulumi.Input; /** * The metadata key-value pairs assigned to the device. This metadata is not interpreted or indexed by Cloud IoT Core. It can be used to add contextual information for the device. Keys must conform to the regular expression a-zA-Z+ and be less than 128 bytes in length. Values are free-form strings. Each value must be less than or equal to 32 KB in size. The total size of all keys and values must be less than 256 KB, and the maximum number of key-value pairs is 500. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The resource path name. For example, `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. When `name` is populated as a response from the service, it always ends in the device numeric ID. */ name?: pulumi.Input; project?: pulumi.Input; registryId: pulumi.Input; }