1. Packages
  2. Azure Native v1
  3. API Docs
  4. iotsecurity
  5. Sensor
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.iotsecurity.Sensor

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    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 pulumi
    import pulumi_azure_native as azure_native
    
    sensor = azure_native.iotsecurity.Sensor("sensor",
        scope="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
        sensor_name="mySensor",
        sensor_type="Ot",
        ti_automatic_updates=True,
        zone="Zone Name")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const sensor = new azure_native.iotsecurity.Sensor("sensor", {
        scope: "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
        sensorName: "mySensor",
        sensorType: "Ot",
        tiAutomaticUpdates: true,
        zone: "Zone Name",
    });
    
    resources:
      sensor:
        type: azure-native:iotsecurity:Sensor
        properties:
          scope: subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub
          sensorName: mySensor
          sensorType: Ot
          tiAutomaticUpdates: true
          zone: Zone Name
    

    Create Sensor Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Sensor(name: string, args: SensorArgs, opts?: CustomResourceOptions);
    @overload
    def Sensor(resource_name: str,
               args: SensorArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Sensor(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               scope: Optional[str] = None,
               sensor_name: Optional[str] = None,
               sensor_type: Optional[Union[str, SensorType]] = None,
               ti_automatic_updates: Optional[bool] = None,
               zone: Optional[str] = None)
    func NewSensor(ctx *Context, name string, args SensorArgs, opts ...ResourceOption) (*Sensor, error)
    public Sensor(string name, SensorArgs args, CustomResourceOptions? opts = null)
    public Sensor(String name, SensorArgs args)
    public Sensor(String name, SensorArgs args, CustomResourceOptions options)
    
    type: azure-native:iotsecurity:Sensor
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SensorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SensorArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SensorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SensorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SensorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sensorResource = new AzureNative.Iotsecurity.Sensor("sensorResource", new()
    {
        Scope = "string",
        SensorName = "string",
        SensorType = "string",
        TiAutomaticUpdates = false,
        Zone = "string",
    });
    
    example, err := iotsecurity.NewSensor(ctx, "sensorResource", &iotsecurity.SensorArgs{
    	Scope:              "string",
    	SensorName:         "string",
    	SensorType:         "string",
    	TiAutomaticUpdates: false,
    	Zone:               "string",
    })
    
    var sensorResource = new Sensor("sensorResource", SensorArgs.builder()
        .scope("string")
        .sensorName("string")
        .sensorType("string")
        .tiAutomaticUpdates(false)
        .zone("string")
        .build());
    
    sensor_resource = azure_native.iotsecurity.Sensor("sensorResource",
        scope=string,
        sensor_name=string,
        sensor_type=string,
        ti_automatic_updates=False,
        zone=string)
    
    const sensorResource = new azure_native.iotsecurity.Sensor("sensorResource", {
        scope: "string",
        sensorName: "string",
        sensorType: "string",
        tiAutomaticUpdates: false,
        zone: "string",
    });
    
    type: azure-native:iotsecurity:Sensor
    properties:
        scope: string
        sensorName: string
        sensorType: string
        tiAutomaticUpdates: false
        zone: string
    

    Sensor Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Sensor resource accepts the following input properties:

    Scope string
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    SensorName string
    Name of the IoT sensor
    SensorType string | Pulumi.AzureNative.IoTSecurity.SensorType
    Type of sensor
    TiAutomaticUpdates bool
    TI Automatic mode status of the IoT sensor
    Zone string
    Zone of the IoT sensor
    Scope string
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    SensorName string
    Name of the IoT sensor
    SensorType string | SensorType
    Type of sensor
    TiAutomaticUpdates bool
    TI Automatic mode status of the IoT sensor
    Zone string
    Zone of the IoT sensor
    scope String
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    sensorName String
    Name of the IoT sensor
    sensorType String | SensorType
    Type of sensor
    tiAutomaticUpdates Boolean
    TI Automatic mode status of the IoT sensor
    zone String
    Zone of the IoT sensor
    scope string
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    sensorName string
    Name of the IoT sensor
    sensorType string | SensorType
    Type of sensor
    tiAutomaticUpdates boolean
    TI Automatic mode status of the IoT sensor
    zone string
    Zone of the IoT sensor
    scope str
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    sensor_name str
    Name of the IoT sensor
    sensor_type str | SensorType
    Type of sensor
    ti_automatic_updates bool
    TI Automatic mode status of the IoT sensor
    zone str
    Zone of the IoT sensor
    scope String
    Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
    sensorName String
    Name of the IoT sensor
    sensorType String | "Ot" | "Enterprise"
    Type of sensor
    tiAutomaticUpdates Boolean
    TI Automatic mode status of the IoT sensor
    zone String
    Zone of the IoT sensor

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Sensor resource produces the following output properties:

    ConnectivityTime string
    Last connectivity time of the IoT sensor
    DynamicLearning bool
    Dynamic mode status of the IoT sensor
    Id string
    The provider-assigned unique ID for this managed resource.
    LearningMode bool
    Learning mode status of the IoT sensor
    Name string
    The name of the resource
    SensorStatus string
    Status of the IoT sensor
    SensorVersion string
    Version of the IoT sensor
    SystemData Pulumi.AzureNative.IoTSecurity.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    TiStatus string
    TI Status of the IoT sensor
    TiVersion string
    TI Version of the IoT sensor
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    ConnectivityTime string
    Last connectivity time of the IoT sensor
    DynamicLearning bool
    Dynamic mode status of the IoT sensor
    Id string
    The provider-assigned unique ID for this managed resource.
    LearningMode bool
    Learning mode status of the IoT sensor
    Name string
    The name of the resource
    SensorStatus string
    Status of the IoT sensor
    SensorVersion string
    Version of the IoT sensor
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    TiStatus string
    TI Status of the IoT sensor
    TiVersion string
    TI Version of the IoT sensor
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    connectivityTime String
    Last connectivity time of the IoT sensor
    dynamicLearning Boolean
    Dynamic mode status of the IoT sensor
    id String
    The provider-assigned unique ID for this managed resource.
    learningMode Boolean
    Learning mode status of the IoT sensor
    name String
    The name of the resource
    sensorStatus String
    Status of the IoT sensor
    sensorVersion String
    Version of the IoT sensor
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    tiStatus String
    TI Status of the IoT sensor
    tiVersion String
    TI Version of the IoT sensor
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    connectivityTime string
    Last connectivity time of the IoT sensor
    dynamicLearning boolean
    Dynamic mode status of the IoT sensor
    id string
    The provider-assigned unique ID for this managed resource.
    learningMode boolean
    Learning mode status of the IoT sensor
    name string
    The name of the resource
    sensorStatus string
    Status of the IoT sensor
    sensorVersion string
    Version of the IoT sensor
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    tiStatus string
    TI Status of the IoT sensor
    tiVersion string
    TI Version of the IoT sensor
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    connectivity_time str
    Last connectivity time of the IoT sensor
    dynamic_learning bool
    Dynamic mode status of the IoT sensor
    id str
    The provider-assigned unique ID for this managed resource.
    learning_mode bool
    Learning mode status of the IoT sensor
    name str
    The name of the resource
    sensor_status str
    Status of the IoT sensor
    sensor_version str
    Version of the IoT sensor
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    ti_status str
    TI Status of the IoT sensor
    ti_version str
    TI Version of the IoT sensor
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    connectivityTime String
    Last connectivity time of the IoT sensor
    dynamicLearning Boolean
    Dynamic mode status of the IoT sensor
    id String
    The provider-assigned unique ID for this managed resource.
    learningMode Boolean
    Learning mode status of the IoT sensor
    name String
    The name of the resource
    sensorStatus String
    Status of the IoT sensor
    sensorVersion String
    Version of the IoT sensor
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    tiStatus String
    TI Status of the IoT sensor
    tiVersion String
    TI Version of the IoT sensor
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    SensorType, SensorTypeArgs

    Ot
    Ot
    Enterprise
    Enterprise
    SensorTypeOt
    Ot
    SensorTypeEnterprise
    Enterprise
    Ot
    Ot
    Enterprise
    Enterprise
    Ot
    Ot
    Enterprise
    Enterprise
    OT
    Ot
    ENTERPRISE
    Enterprise
    "Ot"
    Ot
    "Enterprise"
    Enterprise

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    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 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi