AssetArgs

data class AssetArgs(val assetEndpointProfileUri: Output<String>? = null, val assetName: Output<String>? = null, val assetType: Output<String>? = null, val attributes: Output<Any>? = null, val dataPoints: Output<List<DataPointArgs>>? = null, val defaultDataPointsConfiguration: Output<String>? = null, val defaultEventsConfiguration: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val documentationUri: Output<String>? = null, val enabled: Output<Boolean>? = null, val events: Output<List<EventArgs>>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val externalAssetId: Output<String>? = null, val hardwareRevision: Output<String>? = null, val location: Output<String>? = null, val manufacturer: Output<String>? = null, val manufacturerUri: Output<String>? = null, val model: Output<String>? = null, val productCode: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serialNumber: Output<String>? = null, val softwareRevision: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AssetArgs>

Asset definition. Azure REST API version: 2023-11-01-preview.

Example Usage

Create_Asset_With_ExternalAssetId

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var asset = new AzureNative.DeviceRegistry.Asset("asset", new()
{
AssetEndpointProfileUri = "https://www.example.com/myAssetEndpointProfile",
AssetName = "my-asset",
AssetType = "MyAssetType",
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.None,
},
},
DefaultDataPointsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Description = "This is a sample Asset",
DisplayName = "AssetDisplayName",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.None,
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.Log,
},
},
ExtendedLocation = new AzureNative.DeviceRegistry.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1",
Type = "CustomLocation",
},
ExternalAssetId = "8ZBA6LRHU0A458969",
HardwareRevision = "1.0",
Location = "West Europe",
Manufacturer = "Contoso",
ManufacturerUri = "https://www.contoso.com/manufacturerUri",
Model = "ContosoModel",
ProductCode = "SA34VDG",
ResourceGroupName = "myResourceGroup",
SerialNumber = "64-103816-519918-8",
SoftwareRevision = "2.0",
Tags =
{
{ "site", "building-1" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/deviceregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := deviceregistry.NewAsset(ctx, "asset", &deviceregistry.AssetArgs{
AssetEndpointProfileUri: pulumi.String("https://www.example.com/myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
AssetType: pulumi.String("MyAssetType"),
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeNone),
},
},
DefaultDataPointsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Description: pulumi.String("This is a sample Asset"),
DisplayName: pulumi.String("AssetDisplayName"),
DocumentationUri: pulumi.String("https://www.example.com/manual"),
Enabled: pulumi.Bool(true),
Events: deviceregistry.EventArray{
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeNone),
},
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeLog),
},
},
ExtendedLocation: &deviceregistry.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"),
Type: pulumi.String("CustomLocation"),
},
ExternalAssetId: pulumi.String("8ZBA6LRHU0A458969"),
HardwareRevision: pulumi.String("1.0"),
Location: pulumi.String("West Europe"),
Manufacturer: pulumi.String("Contoso"),
ManufacturerUri: pulumi.String("https://www.contoso.com/manufacturerUri"),
Model: pulumi.String("ContosoModel"),
ProductCode: pulumi.String("SA34VDG"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SerialNumber: pulumi.String("64-103816-519918-8"),
SoftwareRevision: pulumi.String("2.0"),
Tags: pulumi.StringMap{
"site": pulumi.String("building-1"),
},
})
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.deviceregistry.Asset;
import com.pulumi.azurenative.deviceregistry.AssetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.DataPointArgs;
import com.pulumi.azurenative.deviceregistry.inputs.EventArgs;
import com.pulumi.azurenative.deviceregistry.inputs.ExtendedLocationArgs;
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 asset = new Asset("asset", AssetArgs.builder()
.assetEndpointProfileUri("https://www.example.com/myAssetEndpointProfile")
.assetName("my-asset")
.assetType("MyAssetType")
.dataPoints(
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.observabilityMode("counter")
.build(),
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.observabilityMode("none")
.build())
.defaultDataPointsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.description("This is a sample Asset")
.displayName("AssetDisplayName")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.observabilityMode("none")
.build(),
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.observabilityMode("log")
.build())
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1")
.type("CustomLocation")
.build())
.externalAssetId("8ZBA6LRHU0A458969")
.hardwareRevision("1.0")
.location("West Europe")
.manufacturer("Contoso")
.manufacturerUri("https://www.contoso.com/manufacturerUri")
.model("ContosoModel")
.productCode("SA34VDG")
.resourceGroupName("myResourceGroup")
.serialNumber("64-103816-519918-8")
.softwareRevision("2.0")
.tags(Map.of("site", "building-1"))
.build());
}
}

Create_Asset_Without_DisplayName

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var asset = new AzureNative.DeviceRegistry.Asset("asset", new()
{
AssetEndpointProfileUri = "https://www.example.com/myAssetEndpointProfile",
AssetName = "my-asset",
AssetType = "MyAssetType",
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.None,
},
},
DefaultDataPointsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Description = "This is a sample Asset",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.None,
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.Log,
},
},
ExtendedLocation = new AzureNative.DeviceRegistry.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1",
Type = "CustomLocation",
},
ExternalAssetId = "8ZBA6LRHU0A458969",
HardwareRevision = "1.0",
Location = "West Europe",
Manufacturer = "Contoso",
ManufacturerUri = "https://www.contoso.com/manufacturerUri",
Model = "ContosoModel",
ProductCode = "SA34VDG",
ResourceGroupName = "myResourceGroup",
SerialNumber = "64-103816-519918-8",
SoftwareRevision = "2.0",
Tags =
{
{ "site", "building-1" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/deviceregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := deviceregistry.NewAsset(ctx, "asset", &deviceregistry.AssetArgs{
AssetEndpointProfileUri: pulumi.String("https://www.example.com/myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
AssetType: pulumi.String("MyAssetType"),
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeNone),
},
},
DefaultDataPointsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Description: pulumi.String("This is a sample Asset"),
DocumentationUri: pulumi.String("https://www.example.com/manual"),
Enabled: pulumi.Bool(true),
Events: deviceregistry.EventArray{
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeNone),
},
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeLog),
},
},
ExtendedLocation: &deviceregistry.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"),
Type: pulumi.String("CustomLocation"),
},
ExternalAssetId: pulumi.String("8ZBA6LRHU0A458969"),
HardwareRevision: pulumi.String("1.0"),
Location: pulumi.String("West Europe"),
Manufacturer: pulumi.String("Contoso"),
ManufacturerUri: pulumi.String("https://www.contoso.com/manufacturerUri"),
Model: pulumi.String("ContosoModel"),
ProductCode: pulumi.String("SA34VDG"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SerialNumber: pulumi.String("64-103816-519918-8"),
SoftwareRevision: pulumi.String("2.0"),
Tags: pulumi.StringMap{
"site": pulumi.String("building-1"),
},
})
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.deviceregistry.Asset;
import com.pulumi.azurenative.deviceregistry.AssetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.DataPointArgs;
import com.pulumi.azurenative.deviceregistry.inputs.EventArgs;
import com.pulumi.azurenative.deviceregistry.inputs.ExtendedLocationArgs;
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 asset = new Asset("asset", AssetArgs.builder()
.assetEndpointProfileUri("https://www.example.com/myAssetEndpointProfile")
.assetName("my-asset")
.assetType("MyAssetType")
.dataPoints(
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.observabilityMode("counter")
.build(),
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.observabilityMode("none")
.build())
.defaultDataPointsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.description("This is a sample Asset")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.observabilityMode("none")
.build(),
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.observabilityMode("log")
.build())
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1")
.type("CustomLocation")
.build())
.externalAssetId("8ZBA6LRHU0A458969")
.hardwareRevision("1.0")
.location("West Europe")
.manufacturer("Contoso")
.manufacturerUri("https://www.contoso.com/manufacturerUri")
.model("ContosoModel")
.productCode("SA34VDG")
.resourceGroupName("myResourceGroup")
.serialNumber("64-103816-519918-8")
.softwareRevision("2.0")
.tags(Map.of("site", "building-1"))
.build());
}
}

Create_Asset_Without_ExternalAssetId

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var asset = new AzureNative.DeviceRegistry.Asset("asset", new()
{
AssetEndpointProfileUri = "https://www.example.com/myAssetEndpointProfile",
AssetName = "my-asset",
AssetType = "MyAssetType",
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointsObservabilityMode.None,
},
},
DefaultDataPointsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Description = "This is a sample Asset",
DisplayName = "AssetDisplayName",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__temperature;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.None,
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
CapabilityId = "dtmi:com:example:Thermostat:__pressure;1",
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
ObservabilityMode = AzureNative.DeviceRegistry.EventsObservabilityMode.Log,
},
},
ExtendedLocation = new AzureNative.DeviceRegistry.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1",
Type = "CustomLocation",
},
HardwareRevision = "1.0",
Location = "West Europe",
Manufacturer = "Contoso",
ManufacturerUri = "https://www.contoso.com/manufacturerUri",
Model = "ContosoModel",
ProductCode = "SA34VDG",
ResourceGroupName = "myResourceGroup",
SerialNumber = "64-103816-519918-8",
SoftwareRevision = "2.0",
Tags =
{
{ "site", "building-1" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/deviceregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := deviceregistry.NewAsset(ctx, "asset", &deviceregistry.AssetArgs{
AssetEndpointProfileUri: pulumi.String("https://www.example.com/myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
AssetType: pulumi.String("MyAssetType"),
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointsObservabilityModeNone),
},
},
DefaultDataPointsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Description: pulumi.String("This is a sample Asset"),
DisplayName: pulumi.String("AssetDisplayName"),
DocumentationUri: pulumi.String("https://www.example.com/manual"),
Enabled: pulumi.Bool(true),
Events: deviceregistry.EventArray{
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__temperature;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeNone),
},
&deviceregistry.EventArgs{
CapabilityId: pulumi.String("dtmi:com:example:Thermostat:__pressure;1"),
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
ObservabilityMode: pulumi.String(deviceregistry.EventsObservabilityModeLog),
},
},
ExtendedLocation: &deviceregistry.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"),
Type: pulumi.String("CustomLocation"),
},
HardwareRevision: pulumi.String("1.0"),
Location: pulumi.String("West Europe"),
Manufacturer: pulumi.String("Contoso"),
ManufacturerUri: pulumi.String("https://www.contoso.com/manufacturerUri"),
Model: pulumi.String("ContosoModel"),
ProductCode: pulumi.String("SA34VDG"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SerialNumber: pulumi.String("64-103816-519918-8"),
SoftwareRevision: pulumi.String("2.0"),
Tags: pulumi.StringMap{
"site": pulumi.String("building-1"),
},
})
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.deviceregistry.Asset;
import com.pulumi.azurenative.deviceregistry.AssetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.DataPointArgs;
import com.pulumi.azurenative.deviceregistry.inputs.EventArgs;
import com.pulumi.azurenative.deviceregistry.inputs.ExtendedLocationArgs;
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 asset = new Asset("asset", AssetArgs.builder()
.assetEndpointProfileUri("https://www.example.com/myAssetEndpointProfile")
.assetName("my-asset")
.assetType("MyAssetType")
.dataPoints(
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.observabilityMode("counter")
.build(),
DataPointArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.observabilityMode("none")
.build())
.defaultDataPointsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.description("This is a sample Asset")
.displayName("AssetDisplayName")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__temperature;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.observabilityMode("none")
.build(),
EventArgs.builder()
.capabilityId("dtmi:com:example:Thermostat:__pressure;1")
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.observabilityMode("log")
.build())
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1")
.type("CustomLocation")
.build())
.hardwareRevision("1.0")
.location("West Europe")
.manufacturer("Contoso")
.manufacturerUri("https://www.contoso.com/manufacturerUri")
.model("ContosoModel")
.productCode("SA34VDG")
.resourceGroupName("myResourceGroup")
.serialNumber("64-103816-519918-8")
.softwareRevision("2.0")
.tags(Map.of("site", "building-1"))
.build());
}
}

Import

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

$ pulumi import azure-native:deviceregistry:Asset my-asset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}

Constructors

Link copied to clipboard
constructor(assetEndpointProfileUri: Output<String>? = null, assetName: Output<String>? = null, assetType: Output<String>? = null, attributes: Output<Any>? = null, dataPoints: Output<List<DataPointArgs>>? = null, defaultDataPointsConfiguration: Output<String>? = null, defaultEventsConfiguration: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, documentationUri: Output<String>? = null, enabled: Output<Boolean>? = null, events: Output<List<EventArgs>>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, externalAssetId: Output<String>? = null, hardwareRevision: Output<String>? = null, location: Output<String>? = null, manufacturer: Output<String>? = null, manufacturerUri: Output<String>? = null, model: Output<String>? = null, productCode: Output<String>? = null, resourceGroupName: Output<String>? = null, serialNumber: Output<String>? = null, softwareRevision: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must have the format /.

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

Asset name parameter.

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

Resource path to asset type (model) definition.

Link copied to clipboard
val attributes: Output<Any>? = null

A set of key-value pairs that contain custom attributes set by the customer.

Link copied to clipboard
val dataPoints: Output<List<DataPointArgs>>? = null

Array of data points that are part of the asset. Each data point can reference an asset type capability and have per-data point configuration. See below for more details for the definition of the dataPoints element.

Link copied to clipboard

Protocol-specific default configuration for all data points. Each data point can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol.

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

Protocol-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. This assumes that each asset instance has one protocol.

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

Human-readable description of the asset.

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

Human-readable display name.

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

Reference to the documentation.

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

Enabled/Disabled status of the asset.

Link copied to clipboard
val events: Output<List<EventArgs>>? = null

Array of events that are part of the asset. Each event can reference an asset type capability and have per-event configuration. See below for more details about the definition of the events element.

Link copied to clipboard

The extended location.

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

Asset id provided by the customer.

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

Revision number of the hardware.

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

The geo-location where the resource lives

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

Asset manufacturer name.

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

Asset manufacturer URI.

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

Asset model name.

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

Asset product code.

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

The name of the resource group. The name is case insensitive.

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

Asset serial number.

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

Revision number of the software.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

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