RoutingRule
Provides a Spotinst Multai Routing Rule.
Example Usage
using Pulumi;
using SpotInst = Pulumi.SpotInst;
class MyStack : Stack
{
public MyStack()
{
var myRoutingRule = new SpotInst.Multai.RoutingRule("myRoutingRule", new SpotInst.Multai.RoutingRuleArgs
{
BalancerId = "b-12345",
ListenerId = "l-98765",
Route = "Path(`/bar`)",
Strategy = "LEASTCONN",
Tags =
{
new SpotInst.Multai.Inputs.RoutingRuleTagArgs
{
Key = "env",
Value = "prod",
},
},
});
}
}
Coming soon!
import pulumi
import pulumi_spotinst as spotinst
my_routing_rule = spotinst.multai.RoutingRule("myRoutingRule",
balancer_id="b-12345",
listener_id="l-98765",
route="Path(`/bar`)",
strategy="LEASTCONN",
tags=[{
"key": "env",
"value": "prod",
}])import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";
const myRoutingRule = new spotinst.multai.RoutingRule("my_routing_rule", {
balancerId: "b-12345",
listenerId: "l-98765",
route: "Path(`/bar`)",
strategy: "LEASTCONN",
tags: [{
key: "env",
value: "prod",
}],
});Create a RoutingRule Resource
new RoutingRule(name: string, args: RoutingRuleArgs, opts?: CustomResourceOptions);def RoutingRule(resource_name, opts=None, balancer_id=None, listener_id=None, middleware_ids=None, priority=None, route=None, strategy=None, tags=None, target_set_ids=None, __props__=None);func NewRoutingRule(ctx *Context, name string, args RoutingRuleArgs, opts ...ResourceOption) (*RoutingRule, error)public RoutingRule(string name, RoutingRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RoutingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RoutingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RoutingRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RoutingRule resource accepts the following input properties:
- Balancer
Id string The ID of the balancer.
- Listener
Id string The ID of the listener.
- Route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- Target
Set List<string>Ids - Middleware
Ids List<string> - Priority int
- Strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
List<Pulumi.
Spot Inst. Multai. Inputs. Routing Rule Tag Args> A list of key:value paired tags.
- Balancer
Id string The ID of the balancer.
- Listener
Id string The ID of the listener.
- Route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- Target
Set []stringIds - Middleware
Ids []string - Priority int
- Strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
[]Routing
Rule Tag A list of key:value paired tags.
- balancer
Id string The ID of the balancer.
- listener
Id string The ID of the listener.
- route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- target
Set string[]Ids - middleware
Ids string[] - priority number
- strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
Routing
Rule Tag[] A list of key:value paired tags.
- balancer_
id str The ID of the balancer.
- listener_
id str The ID of the listener.
- route str
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- target_
set_ List[str]ids - middleware_
ids List[str] - priority float
- strategy str
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
List[Routing
Rule Tag] A list of key:value paired tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutingRule resource produces the following output properties:
Look up an Existing RoutingRule Resource
Get an existing RoutingRule 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?: RoutingRuleState, opts?: CustomResourceOptions): RoutingRulestatic get(resource_name, id, opts=None, balancer_id=None, listener_id=None, middleware_ids=None, priority=None, route=None, strategy=None, tags=None, target_set_ids=None, __props__=None);func GetRoutingRule(ctx *Context, name string, id IDInput, state *RoutingRuleState, opts ...ResourceOption) (*RoutingRule, error)public static RoutingRule Get(string name, Input<string> id, RoutingRuleState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Balancer
Id string The ID of the balancer.
- Listener
Id string The ID of the listener.
- Middleware
Ids List<string> - Priority int
- Route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- Strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
List<Pulumi.
Spot Inst. Multai. Inputs. Routing Rule Tag Args> A list of key:value paired tags.
- Target
Set List<string>Ids
- Balancer
Id string The ID of the balancer.
- Listener
Id string The ID of the listener.
- Middleware
Ids []string - Priority int
- Route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- Strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
[]Routing
Rule Tag A list of key:value paired tags.
- Target
Set []stringIds
- balancer
Id string The ID of the balancer.
- listener
Id string The ID of the listener.
- middleware
Ids string[] - priority number
- route string
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- strategy string
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
Routing
Rule Tag[] A list of key:value paired tags.
- target
Set string[]Ids
- balancer_
id str The ID of the balancer.
- listener_
id str The ID of the listener.
- middleware_
ids List[str] - priority float
- route str
Route defines a simple language for matching HTTP requests and route the traffic accordingly. Route provides series of matchers that follow the syntax: Path matcher: — Path(“/foo/bar”) // trie-based PathRegexp(“/foo/.*”) // regexp-based Method matcher: — Method(“GET”) // trie-based MethodRegexp(“POST|PUT”) // regexp based Header matcher: — Header(“Content-Type”, “application/json”) // trie-based HeaderRegexp(“Content-Type”, “application/.*”) // regexp based Matchers can be combined using && operator: — Method(“POST”) && Path(“/v1”)
- strategy str
Balancing strategy. Valid values:
ROUNDROBIN,RANDOM,LEASTCONN,IPHASH.-
List[Routing
Rule Tag] A list of key:value paired tags.
- target_
set_ List[str]ids
Supporting Types
RoutingRuleTag
Package Details
- Repository
- https://github.com/pulumi/pulumi-spotinst
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
spotinstTerraform Provider.