Sensor

class Sensor : KotlinCustomResource

IoT sensor model API Version: 2021-02-01-preview.

Example Usage

Create or update IoT sensor

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sensor = new AzureNative.IoTSecurity.Sensor("sensor", new()
{
Scope = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
SensorName = "mySensor",
SensorType = "Ot",
TiAutomaticUpdates = true,
Zone = "Zone Name",
});
});
package main
import (
iotsecurity "github.com/pulumi/pulumi-azure-native-sdk/iotsecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iotsecurity.NewSensor(ctx, "sensor", &iotsecurity.SensorArgs{
Scope: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub"),
SensorName: pulumi.String("mySensor"),
SensorType: pulumi.String("Ot"),
TiAutomaticUpdates: pulumi.Bool(true),
Zone: pulumi.String("Zone Name"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.iotsecurity.Sensor;
import com.pulumi.azurenative.iotsecurity.SensorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var sensor = new Sensor("sensor", SensorArgs.builder()
.scope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub")
.sensorName("mySensor")
.sensorType("Ot")
.tiAutomaticUpdates(true)
.zone("Zone Name")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:iotsecurity:Sensor mySensor /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor

Properties

Link copied to clipboard

Last connectivity time of the IoT sensor

Link copied to clipboard

Dynamic mode status of the IoT sensor

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val learningMode: Output<Boolean>

Learning mode status of the IoT sensor

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sensorStatus: Output<String>

Status of the IoT sensor

Link copied to clipboard
val sensorType: Output<String>?

Type of sensor

Link copied to clipboard
val sensorVersion: Output<String>

Version of the IoT sensor

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard

TI Automatic mode status of the IoT sensor

Link copied to clipboard
val tiStatus: Output<String>

TI Status of the IoT sensor

Link copied to clipboard
val tiVersion: Output<String>

TI Version of the IoT sensor

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val zone: Output<String>?

Zone of the IoT sensor