Sensor
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
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
Learning mode status of the IoT sensor
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Status of the IoT sensor
Link copied to clipboard
Type of sensor
Link copied to clipboard
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