Class RouteProperties
java.lang.Object
com.azure.resourcemanager.iothub.models.RouteProperties
The properties of a routing rule that your IoT hub uses to route messages to endpoints.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the condition property: The condition that is evaluated to apply the routing rule.Get the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed.boolean
Get the isEnabled property: Used to specify whether a route is enabled.name()
Get the name property: The name of the route.source()
Get the source property: The source that the routing rule is to be applied to, such as DeviceMessages.void
validate()
Validates the instance.withCondition
(String condition) Set the condition property: The condition that is evaluated to apply the routing rule.withEndpointNames
(List<String> endpointNames) Set the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed.withIsEnabled
(boolean isEnabled) Set the isEnabled property: Used to specify whether a route is enabled.Set the name property: The name of the route.withSource
(RoutingSource source) Set the source property: The source that the routing rule is to be applied to, such as DeviceMessages.
-
Constructor Details
-
RouteProperties
public RouteProperties()
-
-
Method Details
-
name
Get the name property: The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.- Returns:
- the name value.
-
withName
Set the name property: The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.- Parameters:
name
- the name value to set.- Returns:
- the RouteProperties object itself.
-
source
Get the source property: The source that the routing rule is to be applied to, such as DeviceMessages.- Returns:
- the source value.
-
withSource
Set the source property: The source that the routing rule is to be applied to, such as DeviceMessages.- Parameters:
source
- the source value to set.- Returns:
- the RouteProperties object itself.
-
condition
Get the condition property: 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.- Returns:
- the condition value.
-
withCondition
Set the condition property: 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.- Parameters:
condition
- the condition value to set.- Returns:
- the RouteProperties object itself.
-
endpointNames
Get the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.- Returns:
- the endpointNames value.
-
withEndpointNames
Set the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.- Parameters:
endpointNames
- the endpointNames value to set.- Returns:
- the RouteProperties object itself.
-
isEnabled
public boolean isEnabled()Get the isEnabled property: Used to specify whether a route is enabled.- Returns:
- the isEnabled value.
-
withIsEnabled
Set the isEnabled property: Used to specify whether a route is enabled.- Parameters:
isEnabled
- the isEnabled value to set.- Returns:
- the RouteProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-