ovh.IpLoadBalancing.HttpRoute
Manage HTTP route for a loadbalancer service
Example Usage
Route which redirect all url to https.
using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;
return await Deployment.RunAsync(() =>
{
var httpsredirect = new Ovh.IpLoadBalancing.HttpRoute("httpsredirect", new()
{
Action = new Ovh.IpLoadBalancing.Inputs.HttpRouteActionArgs
{
Status = 302,
Target = "https://${host}${path}${arguments}",
Type = "redirect",
},
DisplayName = "Redirect to HTTPS",
ServiceName = "loadbalancer-xxxxxxxxxxxxxxxxxx",
Weight = 1,
});
});
package main
import (
"fmt"
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/IpLoadBalancing"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := IpLoadBalancing.NewHttpRoute(ctx, "httpsredirect", &IpLoadBalancing.HttpRouteArgs{
Action: &iploadbalancing.HttpRouteActionArgs{
Status: pulumi.Int(302),
Target: pulumi.String(fmt.Sprintf("https://${host}${path}${arguments}")),
Type: pulumi.String("redirect"),
},
DisplayName: pulumi.String("Redirect to HTTPS"),
ServiceName: pulumi.String("loadbalancer-xxxxxxxxxxxxxxxxxx"),
Weight: pulumi.Int(1),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.IpLoadBalancing.HttpRoute;
import com.pulumi.ovh.IpLoadBalancing.HttpRouteArgs;
import com.pulumi.ovh.IpLoadBalancing.inputs.HttpRouteActionArgs;
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 httpsredirect = new HttpRoute("httpsredirect", HttpRouteArgs.builder()
.action(HttpRouteActionArgs.builder()
.status(302)
.target("https://${host}${path}${arguments}")
.type("redirect")
.build())
.displayName("Redirect to HTTPS")
.serviceName("loadbalancer-xxxxxxxxxxxxxxxxxx")
.weight(1)
.build());
}
}
import pulumi
import lbrlabs_pulumi_ovh as ovh
httpsredirect = ovh.ip_load_balancing.HttpRoute("httpsredirect",
action=ovh.ip_load_balancing.HttpRouteActionArgs(
status=302,
target="https://${host}${path}${arguments}",
type="redirect",
),
display_name="Redirect to HTTPS",
service_name="loadbalancer-xxxxxxxxxxxxxxxxxx",
weight=1)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@lbrlabs/pulumi-ovh";
const httpsredirect = new ovh.iploadbalancing.HttpRoute("httpsredirect", {
action: {
status: 302,
target: `https://${host}${path}${arguments}`,
type: "redirect",
},
displayName: "Redirect to HTTPS",
serviceName: "loadbalancer-xxxxxxxxxxxxxxxxxx",
weight: 1,
});
resources:
httpsredirect:
type: ovh:IpLoadBalancing:HttpRoute
properties:
action:
status: 302
target: https://${host}${path}${arguments}
type: redirect
displayName: Redirect to HTTPS
serviceName: loadbalancer-xxxxxxxxxxxxxxxxxx
weight: 1
Create HttpRoute Resource
new HttpRoute(name: string, args: HttpRouteArgs, opts?: CustomResourceOptions);
@overload
def HttpRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[_iploadbalancing.HttpRouteActionArgs] = None,
display_name: Optional[str] = None,
frontend_id: Optional[int] = None,
service_name: Optional[str] = None,
weight: Optional[int] = None)
@overload
def HttpRoute(resource_name: str,
args: HttpRouteArgs,
opts: Optional[ResourceOptions] = None)
func NewHttpRoute(ctx *Context, name string, args HttpRouteArgs, opts ...ResourceOption) (*HttpRoute, error)
public HttpRoute(string name, HttpRouteArgs args, CustomResourceOptions? opts = null)
public HttpRoute(String name, HttpRouteArgs args)
public HttpRoute(String name, HttpRouteArgs args, CustomResourceOptions options)
type: ovh:IpLoadBalancing:HttpRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpRouteArgs
- 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 HttpRouteArgs
- 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 HttpRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
HttpRoute 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 HttpRoute resource accepts the following input properties:
- Action
Lbrlabs.
Pulumi Package. Ovh. Ip Load Balancing. Inputs. Http Route Action Args Action triggered when all rules match
- Service
Name string The internal name of your IP load balancing
- Display
Name string Human readable name for your route, this field is for you
- Frontend
Id int Route traffic for this frontend
- Weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- Action
Http
Route Action Args Action triggered when all rules match
- Service
Name string The internal name of your IP load balancing
- Display
Name string Human readable name for your route, this field is for you
- Frontend
Id int Route traffic for this frontend
- Weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- service
Name String The internal name of your IP load balancing
- display
Name String Human readable name for your route, this field is for you
- frontend
Id Integer Route traffic for this frontend
- weight Integer
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- service
Name string The internal name of your IP load balancing
- display
Name string Human readable name for your route, this field is for you
- frontend
Id number Route traffic for this frontend
- weight number
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- service_
name str The internal name of your IP load balancing
- display_
name str Human readable name for your route, this field is for you
- frontend_
id int Route traffic for this frontend
- weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action Property Map
Action triggered when all rules match
- service
Name String The internal name of your IP load balancing
- display
Name String Human readable name for your route, this field is for you
- frontend
Id Number Route traffic for this frontend
- weight Number
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
Outputs
All input properties are implicitly available as output properties. Additionally, the HttpRoute resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Rules
List<Lbrlabs.
Pulumi Package. Ovh. Ip Load Balancing. Outputs. Http Route Rule> List of rules to match to trigger action
- Status string
HTTP status code for "redirect" and "reject" actions
- Id string
The provider-assigned unique ID for this managed resource.
- Rules
[]Http
Route Rule Type List of rules to match to trigger action
- Status string
HTTP status code for "redirect" and "reject" actions
- id String
The provider-assigned unique ID for this managed resource.
- rules
List<Http
Route Rule> List of rules to match to trigger action
- status String
HTTP status code for "redirect" and "reject" actions
- id string
The provider-assigned unique ID for this managed resource.
- rules
Http
Route Rule[] List of rules to match to trigger action
- status string
HTTP status code for "redirect" and "reject" actions
- id str
The provider-assigned unique ID for this managed resource.
- rules
Http
Route Rule] List of rules to match to trigger action
- status str
HTTP status code for "redirect" and "reject" actions
- id String
The provider-assigned unique ID for this managed resource.
- rules List<Property Map>
List of rules to match to trigger action
- status String
HTTP status code for "redirect" and "reject" actions
Look up Existing HttpRoute Resource
Get an existing HttpRoute 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?: HttpRouteState, opts?: CustomResourceOptions): HttpRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[_iploadbalancing.HttpRouteActionArgs] = None,
display_name: Optional[str] = None,
frontend_id: Optional[int] = None,
rules: Optional[Sequence[_iploadbalancing.HttpRouteRuleArgs]] = None,
service_name: Optional[str] = None,
status: Optional[str] = None,
weight: Optional[int] = None) -> HttpRoute
func GetHttpRoute(ctx *Context, name string, id IDInput, state *HttpRouteState, opts ...ResourceOption) (*HttpRoute, error)
public static HttpRoute Get(string name, Input<string> id, HttpRouteState? state, CustomResourceOptions? opts = null)
public static HttpRoute get(String name, Output<String> id, HttpRouteState 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.
- Action
Lbrlabs.
Pulumi Package. Ovh. Ip Load Balancing. Inputs. Http Route Action Args Action triggered when all rules match
- Display
Name string Human readable name for your route, this field is for you
- Frontend
Id int Route traffic for this frontend
- Rules
List<Lbrlabs.
Pulumi Package. Ovh. Ip Load Balancing. Inputs. Http Route Rule Args> List of rules to match to trigger action
- Service
Name string The internal name of your IP load balancing
- Status string
HTTP status code for "redirect" and "reject" actions
- Weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- Action
Http
Route Action Args Action triggered when all rules match
- Display
Name string Human readable name for your route, this field is for you
- Frontend
Id int Route traffic for this frontend
- Rules
[]Http
Route Rule Type Args List of rules to match to trigger action
- Service
Name string The internal name of your IP load balancing
- Status string
HTTP status code for "redirect" and "reject" actions
- Weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- display
Name String Human readable name for your route, this field is for you
- frontend
Id Integer Route traffic for this frontend
- rules
List<Http
Route Rule Args> List of rules to match to trigger action
- service
Name String The internal name of your IP load balancing
- status String
HTTP status code for "redirect" and "reject" actions
- weight Integer
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- display
Name string Human readable name for your route, this field is for you
- frontend
Id number Route traffic for this frontend
- rules
Http
Route Rule Args[] List of rules to match to trigger action
- service
Name string The internal name of your IP load balancing
- status string
HTTP status code for "redirect" and "reject" actions
- weight number
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action
Http
Route Action Args Action triggered when all rules match
- display_
name str Human readable name for your route, this field is for you
- frontend_
id int Route traffic for this frontend
- rules
Http
Route Rule Args] List of rules to match to trigger action
- service_
name str The internal name of your IP load balancing
- status str
HTTP status code for "redirect" and "reject" actions
- weight int
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
- action Property Map
Action triggered when all rules match
- display
Name String Human readable name for your route, this field is for you
- frontend
Id Number Route traffic for this frontend
- rules List<Property Map>
List of rules to match to trigger action
- service
Name String The internal name of your IP load balancing
- status String
HTTP status code for "redirect" and "reject" actions
- weight Number
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
Supporting Types
HttpRouteAction
- Type string
Action to trigger if all the rules of this route matches
- Status int
HTTP status code for "redirect" and "reject" actions
- Target string
Farm ID for "farm" action type or URL template for "redirect" action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
- Type string
Action to trigger if all the rules of this route matches
- Status int
HTTP status code for "redirect" and "reject" actions
- Target string
Farm ID for "farm" action type or URL template for "redirect" action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
- type String
Action to trigger if all the rules of this route matches
- status Integer
HTTP status code for "redirect" and "reject" actions
- target String
Farm ID for "farm" action type or URL template for "redirect" action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
- type string
Action to trigger if all the rules of this route matches
- status number
HTTP status code for "redirect" and "reject" actions
- target string
Farm ID for "farm" action type or URL template for "redirect" action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
- type String
Action to trigger if all the rules of this route matches
- status Number
HTTP status code for "redirect" and "reject" actions
- target String
Farm ID for "farm" action type or URL template for "redirect" action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
HttpRouteRule
- Field string
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- Match string
Matching operator. Not all operators are available for all fields. See "availableRules"
- Negate bool
Invert the matching operator effect
- Pattern string
Value to match against this match. Interpretation if this field depends on the match and field
- Rule
Id int Id of your rule
- Sub
Field string Name of sub-field, if applicable. This may be a Cookie or Header name for instance
- Field string
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- Match string
Matching operator. Not all operators are available for all fields. See "availableRules"
- Negate bool
Invert the matching operator effect
- Pattern string
Value to match against this match. Interpretation if this field depends on the match and field
- Rule
Id int Id of your rule
- Sub
Field string Name of sub-field, if applicable. This may be a Cookie or Header name for instance
- field String
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- match String
Matching operator. Not all operators are available for all fields. See "availableRules"
- negate Boolean
Invert the matching operator effect
- pattern String
Value to match against this match. Interpretation if this field depends on the match and field
- rule
Id Integer Id of your rule
- sub
Field String Name of sub-field, if applicable. This may be a Cookie or Header name for instance
- field string
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- match string
Matching operator. Not all operators are available for all fields. See "availableRules"
- negate boolean
Invert the matching operator effect
- pattern string
Value to match against this match. Interpretation if this field depends on the match and field
- rule
Id number Id of your rule
- sub
Field string Name of sub-field, if applicable. This may be a Cookie or Header name for instance
- field str
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- match str
Matching operator. Not all operators are available for all fields. See "availableRules"
- negate bool
Invert the matching operator effect
- pattern str
Value to match against this match. Interpretation if this field depends on the match and field
- rule_
id int Id of your rule
- sub_
field str Name of sub-field, if applicable. This may be a Cookie or Header name for instance
- field String
Name of the field to match like "protocol" or "host" "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules
- match String
Matching operator. Not all operators are available for all fields. See "availableRules"
- negate Boolean
Invert the matching operator effect
- pattern String
Value to match against this match. Interpretation if this field depends on the match and field
- rule
Id Number Id of your rule
- sub
Field String Name of sub-field, if applicable. This may be a Cookie or Header name for instance
Package Details
- Repository
- ovh lbrlabs/pulumi-ovh
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
ovh
Terraform Provider.