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

com.pulumi.azurenative.devices.IotHubResource Maven / Gradle / Ivy

There is a newer version: 2.78.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.devices;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.devices.IotHubResourceArgs;
import com.pulumi.azurenative.devices.outputs.ArmIdentityResponse;
import com.pulumi.azurenative.devices.outputs.IotHubPropertiesResponse;
import com.pulumi.azurenative.devices.outputs.IotHubSkuInfoResponse;
import com.pulumi.azurenative.devices.outputs.SystemDataResponse;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The description of the IoT hub.
 * Azure REST API version: 2022-04-30-preview. Prior API version in Azure Native 1.x: 2020-08-31.
 * 
 * Other available API versions: 2017-07-01, 2022-11-15-preview, 2023-06-30, 2023-06-30-preview.
 * 
 * ## Example Usage
 * ### IotHubResource_CreateOrUpdate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.devices.IotHubResource;
 * import com.pulumi.azurenative.devices.IotHubResourceArgs;
 * import com.pulumi.azurenative.devices.inputs.IotHubPropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.CloudToDevicePropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.FeedbackPropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.NetworkRuleSetPropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.RootCertificatePropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.RoutingPropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.RoutingEndpointsArgs;
 * import com.pulumi.azurenative.devices.inputs.FallbackRoutePropertiesArgs;
 * import com.pulumi.azurenative.devices.inputs.IotHubSkuInfoArgs;
 * 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 iotHubResource = new IotHubResource("iotHubResource", IotHubResourceArgs.builder()
 *             .location("centraluseuap")
 *             .properties(IotHubPropertiesArgs.builder()
 *                 .cloudToDevice(CloudToDevicePropertiesArgs.builder()
 *                     .defaultTtlAsIso8601("PT1H")
 *                     .feedback(FeedbackPropertiesArgs.builder()
 *                         .lockDurationAsIso8601("PT1M")
 *                         .maxDeliveryCount(10)
 *                         .ttlAsIso8601("PT1H")
 *                         .build())
 *                     .maxDeliveryCount(10)
 *                     .build())
 *                 .enableDataResidency(true)
 *                 .enableFileUploadNotifications(false)
 *                 .eventHubEndpoints(Map.of("events", Map.ofEntries(
 *                     Map.entry("partitionCount", 2),
 *                     Map.entry("retentionTimeInDays", 1)
 *                 )))
 *                 .features("None")
 *                 .ipFilterRules()
 *                 .messagingEndpoints(Map.of("fileNotifications", Map.ofEntries(
 *                     Map.entry("lockDurationAsIso8601", "PT1M"),
 *                     Map.entry("maxDeliveryCount", 10),
 *                     Map.entry("ttlAsIso8601", "PT1H")
 *                 )))
 *                 .minTlsVersion("1.2")
 *                 .networkRuleSets(NetworkRuleSetPropertiesArgs.builder()
 *                     .applyToBuiltInEventHubEndpoint(true)
 *                     .defaultAction("Deny")
 *                     .ipRules(                    
 *                         NetworkRuleSetIpRuleArgs.builder()
 *                             .action("Allow")
 *                             .filterName("rule1")
 *                             .ipMask("131.117.159.53")
 *                             .build(),
 *                         NetworkRuleSetIpRuleArgs.builder()
 *                             .action("Allow")
 *                             .filterName("rule2")
 *                             .ipMask("157.55.59.128/25")
 *                             .build())
 *                     .build())
 *                 .rootCertificate(RootCertificatePropertiesArgs.builder()
 *                     .enableRootCertificateV2(true)
 *                     .build())
 *                 .routing(RoutingPropertiesArgs.builder()
 *                     .endpoints(RoutingEndpointsArgs.builder()
 *                         .eventHubs()
 *                         .serviceBusQueues()
 *                         .serviceBusTopics()
 *                         .storageContainers()
 *                         .build())
 *                     .fallbackRoute(FallbackRoutePropertiesArgs.builder()
 *                         .condition("true")
 *                         .endpointNames("events")
 *                         .isEnabled(true)
 *                         .name("$fallback")
 *                         .source("DeviceMessages")
 *                         .build())
 *                     .routes()
 *                     .build())
 *                 .storageEndpoints(Map.of("$default", Map.ofEntries(
 *                     Map.entry("connectionString", ""),
 *                     Map.entry("containerName", ""),
 *                     Map.entry("sasTtlAsIso8601", "PT1H")
 *                 )))
 *                 .build())
 *             .resourceGroupName("myResourceGroup")
 *             .resourceName("testHub")
 *             .sku(IotHubSkuInfoArgs.builder()
 *                 .capacity(1)
 *                 .name("S1")
 *                 .build())
 *             .tags()
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:devices:IotHubResource testHub /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName} * ``` * */ @ResourceType(type="azure-native:devices:IotHubResource") public class IotHubResource extends com.pulumi.resources.CustomResource { /** * The Etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return The Etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention. * */ public Output> etag() { return Codegen.optional(this.etag); } /** * The managed identities for the IotHub. * */ @Export(name="identity", refs={ArmIdentityResponse.class}, tree="[0]") private Output identity; /** * @return The managed identities for the IotHub. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The resource location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The resource location. * */ public Output location() { return this.location; } /** * The resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The resource name. * */ public Output name() { return this.name; } /** * IotHub properties * */ @Export(name="properties", refs={IotHubPropertiesResponse.class}, tree="[0]") private Output properties; /** * @return IotHub properties * */ public Output properties() { return this.properties; } /** * IotHub SKU info * */ @Export(name="sku", refs={IotHubSkuInfoResponse.class}, tree="[0]") private Output sku; /** * @return IotHub SKU info * */ public Output sku() { return this.sku; } /** * The system meta data relating to this resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system meta data relating to this resource. * */ public Output systemData() { return this.systemData; } /** * The resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return The resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public IotHubResource(java.lang.String name) { this(name, IotHubResourceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public IotHubResource(java.lang.String name, IotHubResourceArgs 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 IotHubResource(java.lang.String name, IotHubResourceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devices:IotHubResource", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private IotHubResource(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devices:IotHubResource", name, null, makeResourceOptions(options, id), false); } private static IotHubResourceArgs makeArgs(IotHubResourceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? IotHubResourceArgs.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:devices/v20160203:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20170119:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20170701:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20180122:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20180401:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20181201preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20190322:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20190322preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20190701preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20191104:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200301:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200401:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200615:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200710preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200801:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200831:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20200831preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210201preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210303preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210331:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210701:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210701preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210702:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20210702preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20220430preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20221115preview:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20230630:IotHubResource").build()), Output.of(Alias.builder().type("azure-native:devices/v20230630preview:IotHubResource").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 IotHubResource get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IotHubResource(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy