azure-native.iotsecurity.Sensor
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Sensor resource accepts the following input properties:
- Scope string
- Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
- Sensor
Name string - Name of the IoT sensor
- Sensor
Type string | Pulumi.Azure Native. Io TSecurity. Sensor Type - Type of sensor
- Ti
Automatic boolUpdates - 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)
- Sensor
Name string - Name of the IoT sensor
- Sensor
Type string | SensorType - Type of sensor
- Ti
Automatic boolUpdates - 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)
- sensor
Name String - Name of the IoT sensor
- sensor
Type String | SensorType - Type of sensor
- ti
Automatic BooleanUpdates - 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)
- sensor
Name string - Name of the IoT sensor
- sensor
Type string | SensorType - Type of sensor
- ti
Automatic booleanUpdates - 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_ boolupdates - 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)
- sensor
Name String - Name of the IoT sensor
- sensor
Type String | "Ot" | "Enterprise" - Type of sensor
- ti
Automatic BooleanUpdates - 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:
- Connectivity
Time string - Last connectivity time of the IoT sensor
- Dynamic
Learning bool - Dynamic mode status of the IoT sensor
- Id string
- The provider-assigned unique ID for this managed resource.
- Learning
Mode bool - Learning mode status of the IoT sensor
- Name string
- The name of the resource
- Sensor
Status string - Status of the IoT sensor
- Sensor
Version string - Version of the IoT sensor
- System
Data Pulumi.Azure Native. Io TSecurity. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Ti
Status string - TI Status of the IoT sensor
- Ti
Version 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 string - Last connectivity time of the IoT sensor
- Dynamic
Learning bool - Dynamic mode status of the IoT sensor
- Id string
- The provider-assigned unique ID for this managed resource.
- Learning
Mode bool - Learning mode status of the IoT sensor
- Name string
- The name of the resource
- Sensor
Status string - Status of the IoT sensor
- Sensor
Version string - Version of the IoT sensor
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Ti
Status string - TI Status of the IoT sensor
- Ti
Version 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 String - Last connectivity time of the IoT sensor
- dynamic
Learning Boolean - Dynamic mode status of the IoT sensor
- id String
- The provider-assigned unique ID for this managed resource.
- learning
Mode Boolean - Learning mode status of the IoT sensor
- name String
- The name of the resource
- sensor
Status String - Status of the IoT sensor
- sensor
Version String - Version of the IoT sensor
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- ti
Status String - TI Status of the IoT sensor
- ti
Version 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 string - Last connectivity time of the IoT sensor
- dynamic
Learning boolean - Dynamic mode status of the IoT sensor
- id string
- The provider-assigned unique ID for this managed resource.
- learning
Mode boolean - Learning mode status of the IoT sensor
- name string
- The name of the resource
- sensor
Status string - Status of the IoT sensor
- sensor
Version string - Version of the IoT sensor
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- ti
Status string - TI Status of the IoT sensor
- ti
Version 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 SystemData Response - 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"
- connectivity
Time String - Last connectivity time of the IoT sensor
- dynamic
Learning Boolean - Dynamic mode status of the IoT sensor
- id String
- The provider-assigned unique ID for this managed resource.
- learning
Mode Boolean - Learning mode status of the IoT sensor
- name String
- The name of the resource
- sensor
Status String - Status of the IoT sensor
- sensor
Version String - Version of the IoT sensor
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- ti
Status String - TI Status of the IoT sensor
- ti
Version 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
- Sensor
Type Ot - Ot
- Sensor
Type Enterprise - Enterprise
- Ot
- Ot
- Enterprise
- Enterprise
- Ot
- Ot
- Enterprise
- Enterprise
- OT
- Ot
- ENTERPRISE
- Enterprise
- "Ot"
- Ot
- "Enterprise"
- Enterprise
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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