IotHubResourceArgs

data class IotHubResourceArgs(val location: Output<String>? = null, val properties: Output<IotHubPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null, val sku: Output<IotHubSkuInfoArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<IotHubResourceArgs>

The description of the IoT hub. API Version: 2020-08-31.

Example Usage

IotHubResource_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var iotHubResource = new AzureNative.Devices.IotHubResource("iotHubResource", new()
{
Location = "centraluseuap",
Properties = new AzureNative.Devices.Inputs.IotHubPropertiesArgs
{
CloudToDevice = new AzureNative.Devices.Inputs.CloudToDevicePropertiesArgs
{
DefaultTtlAsIso8601 = "PT1H",
Feedback = new AzureNative.Devices.Inputs.FeedbackPropertiesArgs
{
LockDurationAsIso8601 = "PT1M",
MaxDeliveryCount = 10,
TtlAsIso8601 = "PT1H",
},
MaxDeliveryCount = 10,
},
EnableFileUploadNotifications = false,
EventHubEndpoints =
{
{ "events", new AzureNative.Devices.Inputs.EventHubPropertiesArgs
{
PartitionCount = 2,
RetentionTimeInDays = 1,
} },
},
Features = "None",
IpFilterRules = new[] {},
MessagingEndpoints =
{
{ "fileNotifications", new AzureNative.Devices.Inputs.MessagingEndpointPropertiesArgs
{
LockDurationAsIso8601 = "PT1M",
MaxDeliveryCount = 10,
TtlAsIso8601 = "PT1H",
} },
},
MinTlsVersion = "1.2",
NetworkRuleSets = new AzureNative.Devices.Inputs.NetworkRuleSetPropertiesArgs
{
ApplyToBuiltInEventHubEndpoint = true,
DefaultAction = "Deny",
IpRules = new[]
{
new AzureNative.Devices.Inputs.NetworkRuleSetIpRuleArgs
{
Action = "Allow",
FilterName = "rule1",
IpMask = "131.117.159.53",
},
new AzureNative.Devices.Inputs.NetworkRuleSetIpRuleArgs
{
Action = "Allow",
FilterName = "rule2",
IpMask = "157.55.59.128/25",
},
},
},
Routing = new AzureNative.Devices.Inputs.RoutingPropertiesArgs
{
Endpoints = new AzureNative.Devices.Inputs.RoutingEndpointsArgs
{
EventHubs = new[] {},
ServiceBusQueues = new[] {},
ServiceBusTopics = new[] {},
StorageContainers = new[] {},
},
FallbackRoute = new AzureNative.Devices.Inputs.FallbackRoutePropertiesArgs
{
Condition = "true",
EndpointNames = new[]
{
"events",
},
IsEnabled = true,
Name = "$fallback",
Source = "DeviceMessages",
},
Routes = new[] {},
},
StorageEndpoints =
{
{ "$default", new AzureNative.Devices.Inputs.StorageEndpointPropertiesArgs
{
ConnectionString = "",
ContainerName = "",
SasTtlAsIso8601 = "PT1H",
} },
},
},
ResourceGroupName = "myResourceGroup",
ResourceName = "testHub",
Sku = new AzureNative.Devices.Inputs.IotHubSkuInfoArgs
{
Capacity = 1,
Name = "S1",
},
Tags = null,
});
});
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 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(Map.ofEntries(
Map.entry("cloudToDevice", Map.ofEntries(
Map.entry("defaultTtlAsIso8601", "PT1H"),
Map.entry("feedback", Map.ofEntries(
Map.entry("lockDurationAsIso8601", "PT1M"),
Map.entry("maxDeliveryCount", 10),
Map.entry("ttlAsIso8601", "PT1H")
)),
Map.entry("maxDeliveryCount", 10)
)),
Map.entry("enableFileUploadNotifications", false),
Map.entry("eventHubEndpoints", Map.of("events", Map.ofEntries(
Map.entry("partitionCount", 2),
Map.entry("retentionTimeInDays", 1)
))),
Map.entry("features", "None"),
Map.entry("ipFilterRules", ),
Map.entry("messagingEndpoints", Map.of("fileNotifications", Map.ofEntries(
Map.entry("lockDurationAsIso8601", "PT1M"),
Map.entry("maxDeliveryCount", 10),
Map.entry("ttlAsIso8601", "PT1H")
))),
Map.entry("minTlsVersion", "1.2"),
Map.entry("networkRuleSets", Map.ofEntries(
Map.entry("applyToBuiltInEventHubEndpoint", true),
Map.entry("defaultAction", "Deny"),
Map.entry("ipRules",
Map.ofEntries(
Map.entry("action", "Allow"),
Map.entry("filterName", "rule1"),
Map.entry("ipMask", "131.117.159.53")
),
Map.ofEntries(
Map.entry("action", "Allow"),
Map.entry("filterName", "rule2"),
Map.entry("ipMask", "157.55.59.128/25")
))
)),
Map.entry("routing", Map.ofEntries(
Map.entry("endpoints", Map.ofEntries(
Map.entry("eventHubs", ),
Map.entry("serviceBusQueues", ),
Map.entry("serviceBusTopics", ),
Map.entry("storageContainers", )
)),
Map.entry("fallbackRoute", Map.ofEntries(
Map.entry("condition", "true"),
Map.entry("endpointNames", "events"),
Map.entry("isEnabled", true),
Map.entry("name", "$fallback"),
Map.entry("source", "DeviceMessages")
)),
Map.entry("routes", )
)),
Map.entry("storageEndpoints", Map.of("$default", Map.ofEntries(
Map.entry("connectionString", ""),
Map.entry("containerName", ""),
Map.entry("sasTtlAsIso8601", "PT1H")
)))
))
.resourceGroupName("myResourceGroup")
.resourceName("testHub")
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("name", "S1")
))
.tags()
.build());
}
}

Import

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

$ pulumi import azure-native:devices:IotHubResource testHub /subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub

Constructors

Link copied to clipboard
constructor(location: Output<String>? = null, properties: Output<IotHubPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, resourceName: Output<String>? = null, sku: Output<IotHubSkuInfoArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The resource location.

Link copied to clipboard
val properties: Output<IotHubPropertiesArgs>? = null

IotHub properties

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

The name of the resource group that contains the IoT hub.

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

The name of the IoT hub.

Link copied to clipboard
val sku: Output<IotHubSkuInfoArgs>? = null

IotHub SKU info

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

The resource tags.

Functions

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