oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.LoadBalancer.PathRouteSet

This resource provides the Path Route Set resource in Oracle Cloud Infrastructure Load Balancer service.

Adds a path route set to a load balancer. For more information, see Managing Request Routing.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testPathRouteSet = new Oci.LoadBalancer.PathRouteSet("testPathRouteSet", new()
    {
        LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
        PathRoutes = new[]
        {
            new Oci.LoadBalancer.Inputs.PathRouteSetPathRouteArgs
            {
                BackendSetName = oci_load_balancer_backend_set.Test_backend_set.Name,
                Path = @var.Path_route_set_path_routes_path,
                PathMatchType = new Oci.LoadBalancer.Inputs.PathRouteSetPathRoutePathMatchTypeArgs
                {
                    MatchType = @var.Path_route_set_path_routes_path_match_type_match_type,
                },
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/LoadBalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := LoadBalancer.NewPathRouteSet(ctx, "testPathRouteSet", &LoadBalancer.PathRouteSetArgs{
			LoadBalancerId: pulumi.Any(oci_load_balancer_load_balancer.Test_load_balancer.Id),
			PathRoutes: loadbalancer.PathRouteSetPathRouteArray{
				&loadbalancer.PathRouteSetPathRouteArgs{
					BackendSetName: pulumi.Any(oci_load_balancer_backend_set.Test_backend_set.Name),
					Path:           pulumi.Any(_var.Path_route_set_path_routes_path),
					PathMatchType: &loadbalancer.PathRouteSetPathRoutePathMatchTypeArgs{
						MatchType: pulumi.Any(_var.Path_route_set_path_routes_path_match_type_match_type),
					},
				},
			},
		})
		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.oci.LoadBalancer.PathRouteSet;
import com.pulumi.oci.LoadBalancer.PathRouteSetArgs;
import com.pulumi.oci.LoadBalancer.inputs.PathRouteSetPathRouteArgs;
import com.pulumi.oci.LoadBalancer.inputs.PathRouteSetPathRoutePathMatchTypeArgs;
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 testPathRouteSet = new PathRouteSet("testPathRouteSet", PathRouteSetArgs.builder()        
            .loadBalancerId(oci_load_balancer_load_balancer.test_load_balancer().id())
            .pathRoutes(PathRouteSetPathRouteArgs.builder()
                .backendSetName(oci_load_balancer_backend_set.test_backend_set().name())
                .path(var_.path_route_set_path_routes_path())
                .pathMatchType(PathRouteSetPathRoutePathMatchTypeArgs.builder()
                    .matchType(var_.path_route_set_path_routes_path_match_type_match_type())
                    .build())
                .build())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_path_route_set = oci.load_balancer.PathRouteSet("testPathRouteSet",
    load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"],
    path_routes=[oci.load_balancer.PathRouteSetPathRouteArgs(
        backend_set_name=oci_load_balancer_backend_set["test_backend_set"]["name"],
        path=var["path_route_set_path_routes_path"],
        path_match_type=oci.load_balancer.PathRouteSetPathRoutePathMatchTypeArgs(
            match_type=var["path_route_set_path_routes_path_match_type_match_type"],
        ),
    )])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testPathRouteSet = new oci.loadbalancer.PathRouteSet("testPathRouteSet", {
    loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
    pathRoutes: [{
        backendSetName: oci_load_balancer_backend_set.test_backend_set.name,
        path: _var.path_route_set_path_routes_path,
        pathMatchType: {
            matchType: _var.path_route_set_path_routes_path_match_type_match_type,
        },
    }],
});
resources:
  testPathRouteSet:
    type: oci:LoadBalancer:PathRouteSet
    properties:
      #Required
      loadBalancerId: ${oci_load_balancer_load_balancer.test_load_balancer.id}
      pathRoutes:
        - backendSetName: ${oci_load_balancer_backend_set.test_backend_set.name}
          path: ${var.path_route_set_path_routes_path}
          pathMatchType:
            matchType: ${var.path_route_set_path_routes_path_match_type_match_type}

Create PathRouteSet Resource

new PathRouteSet(name: string, args: PathRouteSetArgs, opts?: CustomResourceOptions);
@overload
def PathRouteSet(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 load_balancer_id: Optional[str] = None,
                 name: Optional[str] = None,
                 path_routes: Optional[Sequence[_loadbalancer.PathRouteSetPathRouteArgs]] = None)
@overload
def PathRouteSet(resource_name: str,
                 args: PathRouteSetArgs,
                 opts: Optional[ResourceOptions] = None)
func NewPathRouteSet(ctx *Context, name string, args PathRouteSetArgs, opts ...ResourceOption) (*PathRouteSet, error)
public PathRouteSet(string name, PathRouteSetArgs args, CustomResourceOptions? opts = null)
public PathRouteSet(String name, PathRouteSetArgs args)
public PathRouteSet(String name, PathRouteSetArgs args, CustomResourceOptions options)
type: oci:LoadBalancer:PathRouteSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PathRouteSetArgs
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 PathRouteSetArgs
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 PathRouteSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PathRouteSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PathRouteSetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

PathRouteSet 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 PathRouteSet resource accepts the following input properties:

LoadBalancerId string

The OCID of the load balancer to add the path route set to.

PathRoutes List<PathRouteSetPathRouteArgs>

(Updatable) The set of path route rules.

Name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

LoadBalancerId string

The OCID of the load balancer to add the path route set to.

PathRoutes []PathRouteSetPathRouteArgs

(Updatable) The set of path route rules.

Name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

loadBalancerId String

The OCID of the load balancer to add the path route set to.

pathRoutes List<PathRouteSetPathRouteArgs>

(Updatable) The set of path route rules.

name String

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

loadBalancerId string

The OCID of the load balancer to add the path route set to.

pathRoutes PathRouteSetPathRouteArgs[]

(Updatable) The set of path route rules.

name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

load_balancer_id str

The OCID of the load balancer to add the path route set to.

path_routes PathRouteSetPathRouteArgs]

(Updatable) The set of path route rules.

name str

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

loadBalancerId String

The OCID of the load balancer to add the path route set to.

pathRoutes List<Property Map>

(Updatable) The set of path route rules.

name String

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

State string
Id string

The provider-assigned unique ID for this managed resource.

State string
id String

The provider-assigned unique ID for this managed resource.

state String
id string

The provider-assigned unique ID for this managed resource.

state string
id str

The provider-assigned unique ID for this managed resource.

state str
id String

The provider-assigned unique ID for this managed resource.

state String

Look up Existing PathRouteSet Resource

Get an existing PathRouteSet 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?: PathRouteSetState, opts?: CustomResourceOptions): PathRouteSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        load_balancer_id: Optional[str] = None,
        name: Optional[str] = None,
        path_routes: Optional[Sequence[_loadbalancer.PathRouteSetPathRouteArgs]] = None,
        state: Optional[str] = None) -> PathRouteSet
func GetPathRouteSet(ctx *Context, name string, id IDInput, state *PathRouteSetState, opts ...ResourceOption) (*PathRouteSet, error)
public static PathRouteSet Get(string name, Input<string> id, PathRouteSetState? state, CustomResourceOptions? opts = null)
public static PathRouteSet get(String name, Output<String> id, PathRouteSetState 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:
LoadBalancerId string

The OCID of the load balancer to add the path route set to.

Name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

PathRoutes List<PathRouteSetPathRouteArgs>

(Updatable) The set of path route rules.

State string
LoadBalancerId string

The OCID of the load balancer to add the path route set to.

Name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

PathRoutes []PathRouteSetPathRouteArgs

(Updatable) The set of path route rules.

State string
loadBalancerId String

The OCID of the load balancer to add the path route set to.

name String

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

pathRoutes List<PathRouteSetPathRouteArgs>

(Updatable) The set of path route rules.

state String
loadBalancerId string

The OCID of the load balancer to add the path route set to.

name string

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

pathRoutes PathRouteSetPathRouteArgs[]

(Updatable) The set of path route rules.

state string
load_balancer_id str

The OCID of the load balancer to add the path route set to.

name str

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

path_routes PathRouteSetPathRouteArgs]

(Updatable) The set of path route rules.

state str
loadBalancerId String

The OCID of the load balancer to add the path route set to.

name String

The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_path_route_set

pathRoutes List<Property Map>

(Updatable) The set of path route rules.

state String

Supporting Types

PathRouteSetPathRoute

BackendSetName string

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

Path string

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
PathMatchType PathRouteSetPathRoutePathMatchType

(Updatable) The type of matching to apply to incoming URIs.

BackendSetName string

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

Path string

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
PathMatchType PathRouteSetPathRoutePathMatchType

(Updatable) The type of matching to apply to incoming URIs.

backendSetName String

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

path String

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
pathMatchType PathRouteSetPathRoutePathMatchType

(Updatable) The type of matching to apply to incoming URIs.

backendSetName string

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

path string

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
pathMatchType PathRouteSetPathRoutePathMatchType

(Updatable) The type of matching to apply to incoming URIs.

backend_set_name str

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

path str

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
path_match_type PathRouteSetPathRoutePathMatchType

(Updatable) The type of matching to apply to incoming URIs.

backendSetName String

(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set

path String

(Updatable) The path string to match against the incoming URI path.

  • Path strings are case-insensitive.
  • Asterisk (*) wildcards are not supported.
  • Regular expressions are not supported.
pathMatchType Property Map

(Updatable) The type of matching to apply to incoming URIs.

PathRouteSetPathRoutePathMatchType

MatchType string

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.
MatchType string

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.
matchType String

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.
matchType string

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.
match_type str

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.
matchType String

(Updatable) Specifies how the load balancing service compares a PathRoute object's path string against the incoming URI.

  • EXACT_MATCH - Looks for a path string that exactly matches the incoming URI path.
  • FORCE_LONGEST_PREFIX_MATCH - Looks for the path string with the best, longest match of the beginning portion of the incoming URI path.
  • PREFIX_MATCH - Looks for a path string that matches the beginning portion of the incoming URI path.
  • SUFFIX_MATCH - Looks for a path string that matches the ending portion of the incoming URI path.

Import

PathRouteSets can be imported using the id, e.g.

 $ pulumi import oci:LoadBalancer/pathRouteSet:PathRouteSet test_path_route_set "loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.