SensorArgs

data class SensorArgs(val scope: Output<String>? = null, val sensorName: Output<String>? = null, val sensorType: Output<Either<String, SensorType>>? = null, val tiAutomaticUpdates: Output<Boolean>? = null, val zone: Output<String>? = null) : ConvertibleToJava<SensorArgs>

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

Constructors

Link copied to clipboard
constructor(scope: Output<String>? = null, sensorName: Output<String>? = null, sensorType: Output<Either<String, SensorType>>? = null, tiAutomaticUpdates: Output<Boolean>? = null, zone: Output<String>? = null)

Properties

Link copied to clipboard
val scope: Output<String>? = null

Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)

Link copied to clipboard
val sensorName: Output<String>? = null

Name of the IoT sensor

Link copied to clipboard
val sensorType: Output<Either<String, SensorType>>? = null

Type of sensor

Link copied to clipboard
val tiAutomaticUpdates: Output<Boolean>? = null

TI Automatic mode status of the IoT sensor

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

Zone of the IoT sensor

Functions

Link copied to clipboard
open override fun toJava(): SensorArgs