All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.deviceregistry.DiscoveredAsset Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.deviceregistry;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.deviceregistry.DiscoveredAssetArgs;
import com.pulumi.azurenative.deviceregistry.outputs.DiscoveredDatasetResponse;
import com.pulumi.azurenative.deviceregistry.outputs.DiscoveredEventResponse;
import com.pulumi.azurenative.deviceregistry.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.deviceregistry.outputs.SystemDataResponse;
import com.pulumi.azurenative.deviceregistry.outputs.TopicResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Discovered Asset definition.
 * Azure REST API version: 2024-09-01-preview.
 * 
 * ## Example Usage
 * ### Create_DiscoveredAsset
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.deviceregistry.DiscoveredAsset;
 * import com.pulumi.azurenative.deviceregistry.DiscoveredAssetArgs;
 * import com.pulumi.azurenative.deviceregistry.inputs.DiscoveredDatasetArgs;
 * import com.pulumi.azurenative.deviceregistry.inputs.TopicArgs;
 * import com.pulumi.azurenative.deviceregistry.inputs.DiscoveredEventArgs;
 * 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 discoveredAsset = new DiscoveredAsset("discoveredAsset", DiscoveredAssetArgs.builder()
 *             .assetEndpointProfileRef("myAssetEndpointProfile")
 *             .datasets(DiscoveredDatasetArgs.builder()
 *                 .dataPoints(                
 *                     DiscoveredDataPointArgs.builder()
 *                         .dataPointConfiguration("{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
 *                         .dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
 *                         .name("dataPoint1")
 *                         .build(),
 *                     DiscoveredDataPointArgs.builder()
 *                         .dataPointConfiguration("{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
 *                         .dataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
 *                         .name("dataPoint2")
 *                         .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())
 *             .discoveredAssetName("my-discoveredasset")
 *             .discoveryId("11111111-1111-1111-1111-111111111111")
 *             .documentationUri("https://www.example.com/manual")
 *             .events(            
 *                 DiscoveredEventArgs.builder()
 *                     .eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
 *                     .eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
 *                     .name("event1")
 *                     .topic(TopicArgs.builder()
 *                         .path("/path/event1")
 *                         .retain("Keep")
 *                         .build())
 *                     .build(),
 *                 DiscoveredEventArgs.builder()
 *                     .eventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
 *                     .eventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
 *                     .name("event2")
 *                     .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"))
 *             .version(73766)
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:deviceregistry:DiscoveredAsset my-discoveredasset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName} * ``` * */ @ResourceType(type="azure-native:deviceregistry:DiscoveredAsset") public class DiscoveredAsset extends com.pulumi.resources.CustomResource { /** * 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. * */ @Export(name="assetEndpointProfileRef", refs={String.class}, tree="[0]") private Output assetEndpointProfileRef; /** * @return 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. * */ public Output assetEndpointProfileRef() { return this.assetEndpointProfileRef; } /** * Array of datasets that are part of the asset. Each dataset spec describes the data points that make up the set. * */ @Export(name="datasets", refs={List.class,DiscoveredDatasetResponse.class}, tree="[0,1]") private Output> datasets; /** * @return Array of datasets that are part of the asset. Each dataset spec describes the data points that make up the set. * */ public Output>> datasets() { return Codegen.optional(this.datasets); } /** * Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. * */ @Export(name="defaultDatasetsConfiguration", refs={String.class}, tree="[0]") private Output defaultDatasetsConfiguration; /** * @return Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. * */ public Output> defaultDatasetsConfiguration() { return Codegen.optional(this.defaultDatasetsConfiguration); } /** * Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. * */ @Export(name="defaultEventsConfiguration", refs={String.class}, tree="[0]") private Output defaultEventsConfiguration; /** * @return Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. * */ public Output> defaultEventsConfiguration() { return Codegen.optional(this.defaultEventsConfiguration); } /** * Object that describes the default topic information for the asset. * */ @Export(name="defaultTopic", refs={TopicResponse.class}, tree="[0]") private Output defaultTopic; /** * @return Object that describes the default topic information for the asset. * */ public Output> defaultTopic() { return Codegen.optional(this.defaultTopic); } /** * Identifier used to detect changes in the asset. * */ @Export(name="discoveryId", refs={String.class}, tree="[0]") private Output discoveryId; /** * @return Identifier used to detect changes in the asset. * */ public Output discoveryId() { return this.discoveryId; } /** * Reference to the documentation. * */ @Export(name="documentationUri", refs={String.class}, tree="[0]") private Output documentationUri; /** * @return Reference to the documentation. * */ public Output> documentationUri() { return Codegen.optional(this.documentationUri); } /** * Array of events that are part of the asset. Each event can have per-event configuration. * */ @Export(name="events", refs={List.class,DiscoveredEventResponse.class}, tree="[0,1]") private Output> events; /** * @return Array of events that are part of the asset. Each event can have per-event configuration. * */ public Output>> events() { return Codegen.optional(this.events); } /** * The extended location. * */ @Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]") private Output extendedLocation; /** * @return The extended location. * */ public Output extendedLocation() { return this.extendedLocation; } /** * Revision number of the hardware. * */ @Export(name="hardwareRevision", refs={String.class}, tree="[0]") private Output hardwareRevision; /** * @return Revision number of the hardware. * */ public Output> hardwareRevision() { return Codegen.optional(this.hardwareRevision); } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * Asset manufacturer name. * */ @Export(name="manufacturer", refs={String.class}, tree="[0]") private Output manufacturer; /** * @return Asset manufacturer name. * */ public Output> manufacturer() { return Codegen.optional(this.manufacturer); } /** * Asset manufacturer URI. * */ @Export(name="manufacturerUri", refs={String.class}, tree="[0]") private Output manufacturerUri; /** * @return Asset manufacturer URI. * */ public Output> manufacturerUri() { return Codegen.optional(this.manufacturerUri); } /** * Asset model name. * */ @Export(name="model", refs={String.class}, tree="[0]") private Output model; /** * @return Asset model name. * */ public Output> model() { return Codegen.optional(this.model); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Asset product code. * */ @Export(name="productCode", refs={String.class}, tree="[0]") private Output productCode; /** * @return Asset product code. * */ public Output> productCode() { return Codegen.optional(this.productCode); } /** * Provisioning state of the resource. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the resource. * */ public Output provisioningState() { return this.provisioningState; } /** * Asset serial number. * */ @Export(name="serialNumber", refs={String.class}, tree="[0]") private Output serialNumber; /** * @return Asset serial number. * */ public Output> serialNumber() { return Codegen.optional(this.serialNumber); } /** * Revision number of the software. * */ @Export(name="softwareRevision", refs={String.class}, tree="[0]") private Output softwareRevision; /** * @return Revision number of the software. * */ public Output> softwareRevision() { return Codegen.optional(this.softwareRevision); } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * An integer that is incremented each time the resource is modified. * */ @Export(name="version", refs={Double.class}, tree="[0]") private Output version; /** * @return An integer that is incremented each time the resource is modified. * */ public Output version() { return this.version; } /** * * @param name The _unique_ name of the resulting resource. */ public DiscoveredAsset(java.lang.String name) { this(name, DiscoveredAssetArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DiscoveredAsset(java.lang.String name, DiscoveredAssetArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public DiscoveredAsset(java.lang.String name, DiscoveredAssetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:deviceregistry:DiscoveredAsset", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DiscoveredAsset(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:deviceregistry:DiscoveredAsset", name, null, makeResourceOptions(options, id), false); } private static DiscoveredAssetArgs makeArgs(DiscoveredAssetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DiscoveredAssetArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:deviceregistry/v20240901preview:DiscoveredAsset").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static DiscoveredAsset get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DiscoveredAsset(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy