FallbackRouteArgs

data class FallbackRouteArgs(val condition: Output<String>? = null, val enabled: Output<Boolean>? = null, val endpointNames: Output<String>? = null, val iothubName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val source: Output<String>? = null) : ConvertibleToJava<FallbackRouteArgs>

Manages an IotHub Fallback Route

Disclaimers

Note: Fallback route can be defined either directly on the azure.iot.IoTHub resource, or using the azure.iot.FallbackRoute resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Note: Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.iot.IoTHub;
import com.pulumi.azure.iot.IoTHubArgs;
import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
import com.pulumi.azure.iot.EndpointStorageContainer;
import com.pulumi.azure.iot.EndpointStorageContainerArgs;
import com.pulumi.azure.iot.FallbackRoute;
import com.pulumi.azure.iot.FallbackRouteArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.storageAccountName(exampleAccount.name())
.containerAccessType("private")
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IoTHubSkuArgs.builder()
.name("S1")
.capacity("1")
.build())
.tags(Map.of("purpose", "testing"))
.build());
var exampleEndpointStorageContainer = new EndpointStorageContainer("exampleEndpointStorageContainer", EndpointStorageContainerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubId(exampleIoTHub.id())
.connectionString(exampleAccount.primaryBlobConnectionString())
.batchFrequencyInSeconds(60)
.maxChunkSizeInBytes(10485760)
.containerName(exampleContainer.name())
.encoding("Avro")
.fileNameFormat("{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}")
.build());
var exampleFallbackRoute = new FallbackRoute("exampleFallbackRoute", FallbackRouteArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubName(exampleIoTHub.name())
.condition("true")
.endpointNames(exampleEndpointStorageContainer.name())
.enabled(true)
.build());
}
}

Import

IoTHub Fallback Route can be imported using the resource id, e.g.

$ pulumi import azure:iot/fallbackRoute:FallbackRoute route1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/fallbackRoute/default

Constructors

Link copied to clipboard
fun FallbackRouteArgs(condition: Output<String>? = null, enabled: Output<Boolean>? = null, endpointNames: Output<String>? = null, iothubName: Output<String>? = null, resourceGroupName: Output<String>? = null, source: Output<String>? = null)

Functions

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

Properties

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

The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.

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

Used to specify whether the fallback route is enabled.

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

The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed.

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

The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created.

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

The name of the resource group under which the IotHub Storage Container Endpoint resource has to be created. Changing this forces a new resource to be created.

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

The source that the routing rule is to be applied to. Possible values include: DeviceConnectionStateEvents, DeviceJobLifecycleEvents, DeviceLifecycleEvents, DeviceMessages, DigitalTwinChangeEvents, Invalid, TwinChangeEvents.