Asset

class Asset : KotlinCustomResource

Asset definition. Uses Azure REST API version 2024-11-01. In version 2.x of the Azure Native provider, it used API version 2023-11-01-preview. Other available API versions: 2023-11-01-preview, 2024-09-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native deviceregistry [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create_Asset_With_DiscoveredAssetRefs

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()
{
AssetEndpointProfileRef = "myAssetEndpointProfile",
AssetName = "my-asset",
Datasets = new[]
{
new AzureNative.DeviceRegistry.Inputs.DatasetArgs
{
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
Name = "dataPoint1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
Name = "dataPoint2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.None,
},
},
DatasetConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Name = "dataset1",
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/dataset1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
},
DefaultDatasetsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultTopic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/defaultTopic",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
Description = "This is a sample Asset",
DiscoveredAssetRefs = new[]
{
"discoveredAsset1",
"discoveredAsset2",
},
DisplayName = "AssetDisplayName",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
Name = "event1",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.None,
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/event1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
Name = "event2",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.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 (
deviceregistry "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{
AssetEndpointProfileRef: pulumi.String("myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
Datasets: deviceregistry.DatasetArray{
&deviceregistry.DatasetArgs{
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
Name: pulumi.String("dataPoint1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
Name: pulumi.String("dataPoint2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeNone),
},
},
DatasetConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Name: pulumi.String("dataset1"),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/dataset1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
},
DefaultDatasetsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultTopic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/defaultTopic"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
Description: pulumi.String("This is a sample Asset"),
DiscoveredAssetRefs: pulumi.StringArray{
pulumi.String("discoveredAsset1"),
pulumi.String("discoveredAsset2"),
},
DisplayName: pulumi.String("AssetDisplayName"),
DocumentationUri: pulumi.String("https://www.example.com/manual"),
Enabled: pulumi.Bool(true),
Events: deviceregistry.EventArray{
&deviceregistry.EventArgs{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
Name: pulumi.String("event1"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeNone),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/event1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
&deviceregistry.EventArgs{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
Name: pulumi.String("event2"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeLog),
},
},
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.DatasetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.TopicArgs;
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()
.assetEndpointProfileRef("myAssetEndpointProfile")
.assetName("my-asset")
.datasets(DatasetArgs.builder()
.dataPoints(
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.name("dataPoint1")
.observabilityMode("Counter")
.build(),
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.name("dataPoint2")
.observabilityMode("None")
.build())
.datasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.name("dataset1")
.topic(TopicArgs.builder()
.path("/path/dataset1")
.retain("Keep")
.build())
.build())
.defaultDatasetsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultTopic(TopicArgs.builder()
.path("/path/defaultTopic")
.retain("Keep")
.build())
.description("This is a sample Asset")
.discoveredAssetRefs(
"discoveredAsset1",
"discoveredAsset2")
.displayName("AssetDisplayName")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.name("event1")
.observabilityMode("None")
.topic(TopicArgs.builder()
.path("/path/event1")
.retain("Keep")
.build())
.build(),
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.name("event2")
.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_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()
{
AssetEndpointProfileRef = "myAssetEndpointProfile",
AssetName = "my-asset",
Datasets = new[]
{
new AzureNative.DeviceRegistry.Inputs.DatasetArgs
{
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
Name = "dataPoint1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
Name = "dataPoint2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.None,
},
},
DatasetConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Name = "dataset1",
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/dataset1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
},
DefaultDatasetsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultTopic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/defaultTopic",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
Description = "This is a sample Asset",
DisplayName = "AssetDisplayName",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
Name = "event1",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.None,
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/event1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
Name = "event2",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.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 (
deviceregistry "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{
AssetEndpointProfileRef: pulumi.String("myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
Datasets: deviceregistry.DatasetArray{
&deviceregistry.DatasetArgs{
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
Name: pulumi.String("dataPoint1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
Name: pulumi.String("dataPoint2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeNone),
},
},
DatasetConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Name: pulumi.String("dataset1"),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/dataset1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
},
DefaultDatasetsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultTopic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/defaultTopic"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
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{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
Name: pulumi.String("event1"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeNone),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/event1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
&deviceregistry.EventArgs{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
Name: pulumi.String("event2"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeLog),
},
},
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.DatasetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.TopicArgs;
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()
.assetEndpointProfileRef("myAssetEndpointProfile")
.assetName("my-asset")
.datasets(DatasetArgs.builder()
.dataPoints(
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.name("dataPoint1")
.observabilityMode("Counter")
.build(),
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.name("dataPoint2")
.observabilityMode("None")
.build())
.datasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.name("dataset1")
.topic(TopicArgs.builder()
.path("/path/dataset1")
.retain("Keep")
.build())
.build())
.defaultDatasetsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultTopic(TopicArgs.builder()
.path("/path/defaultTopic")
.retain("Keep")
.build())
.description("This is a sample Asset")
.displayName("AssetDisplayName")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.name("event1")
.observabilityMode("None")
.topic(TopicArgs.builder()
.path("/path/event1")
.retain("Keep")
.build())
.build(),
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.name("event2")
.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()
{
AssetEndpointProfileRef = "myAssetEndpointProfile",
AssetName = "my-asset",
Datasets = new[]
{
new AzureNative.DeviceRegistry.Inputs.DatasetArgs
{
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
Name = "dataPoint1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
Name = "dataPoint2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.None,
},
},
DatasetConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Name = "dataset1",
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/dataset1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
},
DefaultDatasetsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultTopic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/defaultTopic",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
Description = "This is a sample Asset",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
Name = "event1",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.None,
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/event1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
Name = "event2",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.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 (
deviceregistry "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{
AssetEndpointProfileRef: pulumi.String("myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
Datasets: deviceregistry.DatasetArray{
&deviceregistry.DatasetArgs{
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
Name: pulumi.String("dataPoint1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
Name: pulumi.String("dataPoint2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeNone),
},
},
DatasetConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Name: pulumi.String("dataset1"),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/dataset1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
},
DefaultDatasetsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultTopic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/defaultTopic"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
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{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
Name: pulumi.String("event1"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeNone),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/event1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
&deviceregistry.EventArgs{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
Name: pulumi.String("event2"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeLog),
},
},
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.DatasetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.TopicArgs;
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()
.assetEndpointProfileRef("myAssetEndpointProfile")
.assetName("my-asset")
.datasets(DatasetArgs.builder()
.dataPoints(
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.name("dataPoint1")
.observabilityMode("Counter")
.build(),
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.name("dataPoint2")
.observabilityMode("None")
.build())
.datasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.name("dataset1")
.topic(TopicArgs.builder()
.path("/path/dataset1")
.retain("Keep")
.build())
.build())
.defaultDatasetsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultTopic(TopicArgs.builder()
.path("/path/defaultTopic")
.retain("Keep")
.build())
.description("This is a sample Asset")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.name("event1")
.observabilityMode("None")
.topic(TopicArgs.builder()
.path("/path/event1")
.retain("Keep")
.build())
.build(),
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.name("event2")
.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()
{
AssetEndpointProfileRef = "myAssetEndpointProfile",
AssetName = "my-asset",
Datasets = new[]
{
new AzureNative.DeviceRegistry.Inputs.DatasetArgs
{
DataPoints = new[]
{
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1",
Name = "dataPoint1",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.Counter,
},
new AzureNative.DeviceRegistry.Inputs.DataPointArgs
{
DataPointConfiguration = "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}",
DataSource = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2",
Name = "dataPoint2",
ObservabilityMode = AzureNative.DeviceRegistry.DataPointObservabilityMode.None,
},
},
DatasetConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
Name = "dataset1",
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/dataset1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
},
DefaultDatasetsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultEventsConfiguration = "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}",
DefaultTopic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/defaultTopic",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
Description = "This is a sample Asset",
DisplayName = "AssetDisplayName",
DocumentationUri = "https://www.example.com/manual",
Enabled = true,
Events = new[]
{
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3",
Name = "event1",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.None,
Topic = new AzureNative.DeviceRegistry.Inputs.TopicArgs
{
Path = "/path/event1",
Retain = AzureNative.DeviceRegistry.TopicRetainType.Keep,
},
},
new AzureNative.DeviceRegistry.Inputs.EventArgs
{
EventConfiguration = "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}",
EventNotifier = "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4",
Name = "event2",
ObservabilityMode = AzureNative.DeviceRegistry.EventObservabilityMode.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 (
deviceregistry "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{
AssetEndpointProfileRef: pulumi.String("myAssetEndpointProfile"),
AssetName: pulumi.String("my-asset"),
Datasets: deviceregistry.DatasetArray{
&deviceregistry.DatasetArgs{
DataPoints: deviceregistry.DataPointArray{
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1"),
Name: pulumi.String("dataPoint1"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeCounter),
},
&deviceregistry.DataPointArgs{
DataPointConfiguration: pulumi.String("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}"),
DataSource: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2"),
Name: pulumi.String("dataPoint2"),
ObservabilityMode: pulumi.String(deviceregistry.DataPointObservabilityModeNone),
},
},
DatasetConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
Name: pulumi.String("dataset1"),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/dataset1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
},
DefaultDatasetsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultEventsConfiguration: pulumi.String("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}"),
DefaultTopic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/defaultTopic"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
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{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3"),
Name: pulumi.String("event1"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeNone),
Topic: &deviceregistry.TopicArgs{
Path: pulumi.String("/path/event1"),
Retain: pulumi.String(deviceregistry.TopicRetainTypeKeep),
},
},
&deviceregistry.EventArgs{
EventConfiguration: pulumi.String("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"),
EventNotifier: pulumi.String("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4"),
Name: pulumi.String("event2"),
ObservabilityMode: pulumi.String(deviceregistry.EventObservabilityModeLog),
},
},
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.DatasetArgs;
import com.pulumi.azurenative.deviceregistry.inputs.TopicArgs;
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()
.assetEndpointProfileRef("myAssetEndpointProfile")
.assetName("my-asset")
.datasets(DatasetArgs.builder()
.dataPoints(
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
.name("dataPoint1")
.observabilityMode("Counter")
.build(),
DataPointArgs.builder()
.dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
.dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
.name("dataPoint2")
.observabilityMode("None")
.build())
.datasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.name("dataset1")
.topic(TopicArgs.builder()
.path("/path/dataset1")
.retain("Keep")
.build())
.build())
.defaultDatasetsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.defaultTopic(TopicArgs.builder()
.path("/path/defaultTopic")
.retain("Keep")
.build())
.description("This is a sample Asset")
.displayName("AssetDisplayName")
.documentationUri("https://www.example.com/manual")
.enabled(true)
.events(
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
.name("event1")
.observabilityMode("None")
.topic(TopicArgs.builder()
.path("/path/event1")
.retain("Keep")
.build())
.build(),
EventArgs.builder()
.eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
.eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
.name("event2")
.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}

Properties

Link copied to clipboard

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 provide asset endpoint profile name.

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

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

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

Array of datasets that are part of the asset. Each dataset describes the data points that make up the set.

Link copied to clipboard

Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.

Link copied to clipboard

Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.

Link copied to clipboard

Object that describes the default topic information for the asset.

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

Human-readable description of the asset.

Link copied to clipboard

Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided.

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

Human-readable display name.

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

Reference to the documentation.

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

Enabled/Disabled status of the asset.

Link copied to clipboard
val events: Output<List<EventResponse>>?

Array of events that are part of the asset. Each event can have per-event configuration.

Link copied to clipboard

The extended location.

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

Asset id provided by the customer.

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

Revision number of the hardware.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

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

Asset manufacturer name.

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

Asset manufacturer URI.

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

Asset model name.

Link copied to clipboard
val name: Output<String>

The name of the resource

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

Asset product code.

Link copied to clipboard

Provisioning state of the resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serialNumber: Output<String>?

Asset serial number.

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

Revision number of the software.

Link copied to clipboard

Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

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

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val uuid: Output<String>

Globally unique, immutable, non-reusable id.

Link copied to clipboard
val version: Output<Double>

An integer that is incremented each time the resource is modified.