1. Packages
  2. Azure Classic
  3. API Docs
  4. iot
  5. FallbackRoute

We recommend using Azure Native.

Azure Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi

azure.iot.FallbackRoute

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi

    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

    Coming soon!

    Coming soon!

    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());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleAccount:
        type: azure:storage:Account
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          accountTier: Standard
          accountReplicationType: LRS
      exampleContainer:
        type: azure:storage:Container
        properties:
          storageAccountName: ${exampleAccount.name}
          containerAccessType: private
      exampleIoTHub:
        type: azure:iot:IoTHub
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          sku:
            name: S1
            capacity: '1'
          tags:
            purpose: testing
      exampleEndpointStorageContainer:
        type: azure:iot:EndpointStorageContainer
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          iothubId: ${exampleIoTHub.id}
          connectionString: ${exampleAccount.primaryBlobConnectionString}
          batchFrequencyInSeconds: 60
          maxChunkSizeInBytes: 1.048576e+07
          containerName: ${exampleContainer.name}
          encoding: Avro
          fileNameFormat: '{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}'
      exampleFallbackRoute:
        type: azure:iot:FallbackRoute
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          iothubName: ${exampleIoTHub.name}
          condition: 'true'
          endpointNames:
            - ${exampleEndpointStorageContainer.name}
          enabled: true
    

    Create FallbackRoute Resource

    new FallbackRoute(name: string, args: FallbackRouteArgs, opts?: CustomResourceOptions);
    @overload
    def FallbackRoute(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      condition: Optional[str] = None,
                      enabled: Optional[bool] = None,
                      endpoint_names: Optional[str] = None,
                      iothub_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      source: Optional[str] = None)
    @overload
    def FallbackRoute(resource_name: str,
                      args: FallbackRouteArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewFallbackRoute(ctx *Context, name string, args FallbackRouteArgs, opts ...ResourceOption) (*FallbackRoute, error)
    public FallbackRoute(string name, FallbackRouteArgs args, CustomResourceOptions? opts = null)
    public FallbackRoute(String name, FallbackRouteArgs args)
    public FallbackRoute(String name, FallbackRouteArgs args, CustomResourceOptions options)
    
    type: azure:iot:FallbackRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FallbackRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FallbackRouteArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FallbackRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FallbackRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FallbackRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    FallbackRoute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The FallbackRoute resource accepts the following input properties:

    Enabled bool

    Used to specify whether the fallback route is enabled.

    EndpointNames string

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

    IothubName string

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

    ResourceGroupName string

    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.

    Condition string

    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.

    Source string

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

    Enabled bool

    Used to specify whether the fallback route is enabled.

    EndpointNames string

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

    IothubName string

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

    ResourceGroupName string

    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.

    Condition string

    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.

    Source string

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

    enabled Boolean

    Used to specify whether the fallback route is enabled.

    endpointNames String

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

    iothubName String

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

    resourceGroupName String

    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.

    condition String

    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.

    source String

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

    enabled boolean

    Used to specify whether the fallback route is enabled.

    endpointNames string

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

    iothubName string

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

    resourceGroupName string

    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.

    condition string

    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.

    source string

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

    enabled bool

    Used to specify whether the fallback route is enabled.

    endpoint_names str

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

    iothub_name str

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

    resource_group_name str

    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.

    condition str

    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.

    source str

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

    enabled Boolean

    Used to specify whether the fallback route is enabled.

    endpointNames String

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

    iothubName String

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

    resourceGroupName String

    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.

    condition String

    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.

    source String

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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FallbackRoute resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing FallbackRoute Resource

    Get an existing FallbackRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FallbackRouteState, opts?: CustomResourceOptions): FallbackRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            condition: Optional[str] = None,
            enabled: Optional[bool] = None,
            endpoint_names: Optional[str] = None,
            iothub_name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            source: Optional[str] = None) -> FallbackRoute
    func GetFallbackRoute(ctx *Context, name string, id IDInput, state *FallbackRouteState, opts ...ResourceOption) (*FallbackRoute, error)
    public static FallbackRoute Get(string name, Input<string> id, FallbackRouteState? state, CustomResourceOptions? opts = null)
    public static FallbackRoute get(String name, Output<String> id, FallbackRouteState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Condition string

    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.

    Enabled bool

    Used to specify whether the fallback route is enabled.

    EndpointNames string

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

    IothubName string

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

    ResourceGroupName string

    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.

    Source string

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

    Condition string

    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.

    Enabled bool

    Used to specify whether the fallback route is enabled.

    EndpointNames string

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

    IothubName string

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

    ResourceGroupName string

    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.

    Source string

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

    condition String

    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.

    enabled Boolean

    Used to specify whether the fallback route is enabled.

    endpointNames String

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

    iothubName String

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

    resourceGroupName String

    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.

    source String

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

    condition string

    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.

    enabled boolean

    Used to specify whether the fallback route is enabled.

    endpointNames string

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

    iothubName string

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

    resourceGroupName string

    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.

    source string

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

    condition str

    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.

    enabled bool

    Used to specify whether the fallback route is enabled.

    endpoint_names str

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

    iothub_name str

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

    resource_group_name str

    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.

    source str

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

    condition String

    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.

    enabled Boolean

    Used to specify whether the fallback route is enabled.

    endpointNames String

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

    iothubName String

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

    resourceGroupName String

    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.

    source String

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

    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
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi