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

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:

BalancerId string

The ID of the balancer.

ListenerId 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”)

TargetSetIds List<string>
MiddlewareIds List<string>
Priority int
Strategy string

Balancing strategy. Valid values: ROUNDROBIN, RANDOM, LEASTCONN, IPHASH.

Tags List<Pulumi.SpotInst.Multai.Inputs.RoutingRuleTagArgs>

A list of key:value paired tags.

BalancerId string

The ID of the balancer.

ListenerId 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”)

TargetSetIds []string
MiddlewareIds []string
Priority int
Strategy string

Balancing strategy. Valid values: ROUNDROBIN, RANDOM, LEASTCONN, IPHASH.

Tags []RoutingRuleTag

A list of key:value paired tags.

balancerId string

The ID of the balancer.

listenerId 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”)

targetSetIds string[]
middlewareIds string[]
priority number
strategy string

Balancing strategy. Valid values: ROUNDROBIN, RANDOM, LEASTCONN, IPHASH.

tags RoutingRuleTag[]

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_ids List[str]
middleware_ids List[str]
priority float
strategy str

Balancing strategy. Valid values: ROUNDROBIN, RANDOM, LEASTCONN, IPHASH.

tags List[RoutingRuleTag]

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:

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.

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): RoutingRule
static 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:

BalancerId string

The ID of the balancer.

ListenerId string

The ID of the listener.

MiddlewareIds 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.

Tags List<Pulumi.SpotInst.Multai.Inputs.RoutingRuleTagArgs>

A list of key:value paired tags.

TargetSetIds List<string>
BalancerId string

The ID of the balancer.

ListenerId string

The ID of the listener.

MiddlewareIds []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.

Tags []RoutingRuleTag

A list of key:value paired tags.

TargetSetIds []string
balancerId string

The ID of the balancer.

listenerId string

The ID of the listener.

middlewareIds 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.

tags RoutingRuleTag[]

A list of key:value paired tags.

targetSetIds string[]
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.

tags List[RoutingRuleTag]

A list of key:value paired tags.

target_set_ids List[str]

Supporting Types

RoutingRuleTag

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

The tag’s key.

Value string

The tag’s value.

Key string

The tag’s key.

Value string

The tag’s value.

key string

The tag’s key.

value string

The tag’s value.

key str

The tag’s key.

value str

The tag’s value.

Package Details

Repository
https://github.com/pulumi/pulumi-spotinst
License
Apache-2.0
Notes
This Pulumi package is based on the spotinst Terraform Provider.