1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. PathRouteSet
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.LoadBalancer.PathRouteSet

Explore with Pulumi AI

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

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testPathRouteSet = new oci.loadbalancer.PathRouteSet("test_path_route_set", {
    loadBalancerId: testLoadBalancer.id,
    name: pathRouteSetName,
    pathRoutes: [{
        backendSetName: testBackendSet.name,
        path: pathRouteSetPathRoutesPath,
        pathMatchType: {
            matchType: pathRouteSetPathRoutesPathMatchTypeMatchType,
        },
    }],
});
Copy
import pulumi
import pulumi_oci as oci

test_path_route_set = oci.load_balancer.PathRouteSet("test_path_route_set",
    load_balancer_id=test_load_balancer["id"],
    name=path_route_set_name,
    path_routes=[{
        "backend_set_name": test_backend_set["name"],
        "path": path_route_set_path_routes_path,
        "path_match_type": {
            "match_type": path_route_set_path_routes_path_match_type_match_type,
        },
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loadbalancer.NewPathRouteSet(ctx, "test_path_route_set", &loadbalancer.PathRouteSetArgs{
			LoadBalancerId: pulumi.Any(testLoadBalancer.Id),
			Name:           pulumi.Any(pathRouteSetName),
			PathRoutes: loadbalancer.PathRouteSetPathRouteArray{
				&loadbalancer.PathRouteSetPathRouteArgs{
					BackendSetName: pulumi.Any(testBackendSet.Name),
					Path:           pulumi.Any(pathRouteSetPathRoutesPath),
					PathMatchType: &loadbalancer.PathRouteSetPathRoutePathMatchTypeArgs{
						MatchType: pulumi.Any(pathRouteSetPathRoutesPathMatchTypeMatchType),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testPathRouteSet = new Oci.LoadBalancer.PathRouteSet("test_path_route_set", new()
    {
        LoadBalancerId = testLoadBalancer.Id,
        Name = pathRouteSetName,
        PathRoutes = new[]
        {
            new Oci.LoadBalancer.Inputs.PathRouteSetPathRouteArgs
            {
                BackendSetName = testBackendSet.Name,
                Path = pathRouteSetPathRoutesPath,
                PathMatchType = new Oci.LoadBalancer.Inputs.PathRouteSetPathRoutePathMatchTypeArgs
                {
                    MatchType = pathRouteSetPathRoutesPathMatchTypeMatchType,
                },
            },
        },
    });

});
Copy
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(testLoadBalancer.id())
            .name(pathRouteSetName)
            .pathRoutes(PathRouteSetPathRouteArgs.builder()
                .backendSetName(testBackendSet.name())
                .path(pathRouteSetPathRoutesPath)
                .pathMatchType(PathRouteSetPathRoutePathMatchTypeArgs.builder()
                    .matchType(pathRouteSetPathRoutesPathMatchTypeMatchType)
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  testPathRouteSet:
    type: oci:LoadBalancer:PathRouteSet
    name: test_path_route_set
    properties:
      loadBalancerId: ${testLoadBalancer.id}
      name: ${pathRouteSetName}
      pathRoutes:
        - backendSetName: ${testBackendSet.name}
          path: ${pathRouteSetPathRoutesPath}
          pathMatchType:
            matchType: ${pathRouteSetPathRoutesPathMatchTypeMatchType}
Copy

Create PathRouteSet Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PathRouteSet(name: string, args: PathRouteSetArgs, opts?: CustomResourceOptions);
@overload
def PathRouteSet(resource_name: str,
                 args: PathRouteSetArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def PathRouteSet(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 load_balancer_id: Optional[str] = None,
                 path_routes: Optional[Sequence[_loadbalancer.PathRouteSetPathRouteArgs]] = None,
                 name: Optional[str] = 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.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var pathRouteSetResource = new Oci.LoadBalancer.PathRouteSet("pathRouteSetResource", new()
{
    LoadBalancerId = "string",
    PathRoutes = new[]
    {
        new Oci.LoadBalancer.Inputs.PathRouteSetPathRouteArgs
        {
            BackendSetName = "string",
            Path = "string",
            PathMatchType = new Oci.LoadBalancer.Inputs.PathRouteSetPathRoutePathMatchTypeArgs
            {
                MatchType = "string",
            },
        },
    },
    Name = "string",
});
Copy
example, err := LoadBalancer.NewPathRouteSet(ctx, "pathRouteSetResource", &LoadBalancer.PathRouteSetArgs{
	LoadBalancerId: pulumi.String("string"),
	PathRoutes: loadbalancer.PathRouteSetPathRouteArray{
		&loadbalancer.PathRouteSetPathRouteArgs{
			BackendSetName: pulumi.String("string"),
			Path:           pulumi.String("string"),
			PathMatchType: &loadbalancer.PathRouteSetPathRoutePathMatchTypeArgs{
				MatchType: pulumi.String("string"),
			},
		},
	},
	Name: pulumi.String("string"),
})
Copy
var pathRouteSetResource = new PathRouteSet("pathRouteSetResource", PathRouteSetArgs.builder()
    .loadBalancerId("string")
    .pathRoutes(PathRouteSetPathRouteArgs.builder()
        .backendSetName("string")
        .path("string")
        .pathMatchType(PathRouteSetPathRoutePathMatchTypeArgs.builder()
            .matchType("string")
            .build())
        .build())
    .name("string")
    .build());
Copy
path_route_set_resource = oci.load_balancer.PathRouteSet("pathRouteSetResource",
    load_balancer_id="string",
    path_routes=[{
        "backend_set_name": "string",
        "path": "string",
        "path_match_type": {
            "match_type": "string",
        },
    }],
    name="string")
Copy
const pathRouteSetResource = new oci.loadbalancer.PathRouteSet("pathRouteSetResource", {
    loadBalancerId: "string",
    pathRoutes: [{
        backendSetName: "string",
        path: "string",
        pathMatchType: {
            matchType: "string",
        },
    }],
    name: "string",
});
Copy
type: oci:LoadBalancer:PathRouteSet
properties:
    loadBalancerId: string
    name: string
    pathRoutes:
        - backendSetName: string
          path: string
          pathMatchType:
            matchType: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PathRouteSet resource accepts the following input properties:

LoadBalancerId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the load balancer to add the path route set to.
PathRoutes This property is required. List<PathRouteSetPathRoute>
(Updatable) The set of path route rules.
Name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the load balancer to add the path route set to.
PathRoutes This property is required. []PathRouteSetPathRouteArgs
(Updatable) The set of path route rules.
Name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the load balancer to add the path route set to.
pathRoutes This property is required. List<PathRouteSetPathRoute>
(Updatable) The set of path route rules.
name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the load balancer to add the path route set to.
pathRoutes This property is required. PathRouteSetPathRoute[]
(Updatable) The set of path route rules.
name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
str
The OCID of the load balancer to add the path route set to.
path_routes This property is required. Sequence[loadbalancer.PathRouteSetPathRouteArgs]
(Updatable) The set of path route rules.
name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the load balancer to add the path route set to.
pathRoutes This property is required. List<Property Map>
(Updatable) The set of path route rules.
name Changes to this property will trigger replacement. 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)
resources:  _:    type: oci:LoadBalancer:PathRouteSet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The OCID of the load balancer to add the path route set to.
Name Changes to this property will trigger replacement. 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<PathRouteSetPathRoute>
(Updatable) The set of path route rules.
State string
LoadBalancerId Changes to this property will trigger replacement. string
The OCID of the load balancer to add the path route set to.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The OCID of the load balancer to add the path route set to.
name Changes to this property will trigger replacement. 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<PathRouteSetPathRoute>
(Updatable) The set of path route rules.
state String
loadBalancerId Changes to this property will trigger replacement. string
The OCID of the load balancer to add the path route set to.
name Changes to this property will trigger replacement. 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 PathRouteSetPathRoute[]
(Updatable) The set of path route rules.
state string
load_balancer_id Changes to this property will trigger replacement. str
The OCID of the load balancer to add the path route set to.
name Changes to this property will trigger replacement. 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 Sequence[loadbalancer.PathRouteSetPathRouteArgs]
(Updatable) The set of path route rules.
state str
loadBalancerId Changes to this property will trigger replacement. String
The OCID of the load balancer to add the path route set to.
name Changes to this property will trigger replacement. 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
, PathRouteSetPathRouteArgs

BackendSetName This property is required. string
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
Path This property is required. 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.

Example: /example/video/123

PathMatchType This property is required. PathRouteSetPathRoutePathMatchType
(Updatable) The type of matching to apply to incoming URIs.
BackendSetName This property is required. string
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
Path This property is required. 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.

Example: /example/video/123

PathMatchType This property is required. PathRouteSetPathRoutePathMatchType
(Updatable) The type of matching to apply to incoming URIs.
backendSetName This property is required. String
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
path This property is required. 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.

Example: /example/video/123

pathMatchType This property is required. PathRouteSetPathRoutePathMatchType
(Updatable) The type of matching to apply to incoming URIs.
backendSetName This property is required. string
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
path This property is required. 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.

Example: /example/video/123

pathMatchType This property is required. PathRouteSetPathRoutePathMatchType
(Updatable) The type of matching to apply to incoming URIs.
backend_set_name This property is required. str
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
path This property is required. 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.

Example: /example/video/123

path_match_type This property is required. loadbalancer.PathRouteSetPathRoutePathMatchType
(Updatable) The type of matching to apply to incoming URIs.
backendSetName This property is required. String
(Updatable) The name of the target backend set for requests where the incoming URI matches the specified path. Example: example_backend_set
path This property is required. 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.

Example: /example/video/123

pathMatchType This property is required. Property Map
(Updatable) The type of matching to apply to incoming URIs.

PathRouteSetPathRoutePathMatchType
, PathRouteSetPathRoutePathMatchTypeArgs

MatchType This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

MatchType This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

matchType This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

matchType This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

match_type This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

matchType This property is required. 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.

For a full description of how the system handles matchType in a path route set containing multiple rules, see Managing Request Routing.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Import

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

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.