1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. PathRouteSet
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.LoadBalancer.PathRouteSet

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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,
            },
        }],
    });
    
    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,
            },
        }])
    
    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
    	})
    }
    
    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,
                    },
                },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

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

    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",
    });
    
    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"),
    })
    
    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());
    
    path_route_set_resource = oci.load_balancer.PathRouteSet("pathRouteSetResource",
        load_balancer_id="string",
        path_routes=[oci.load_balancer.PathRouteSetPathRouteArgs(
            backend_set_name="string",
            path="string",
            path_match_type=oci.load_balancer.PathRouteSetPathRoutePathMatchTypeArgs(
                match_type="string",
            ),
        )],
        name="string")
    
    const pathRouteSetResource = new oci.loadbalancer.PathRouteSet("pathRouteSetResource", {
        loadBalancerId: "string",
        pathRoutes: [{
            backendSetName: "string",
            path: "string",
            pathMatchType: {
                matchType: "string",
            },
        }],
        name: "string",
    });
    
    type: oci:LoadBalancer:PathRouteSet
    properties:
        loadBalancerId: string
        name: string
        pathRoutes:
            - backendSetName: string
              path: string
              pathMatchType:
                matchType: string
    

    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<PathRouteSetPathRoute>
    (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<PathRouteSetPathRoute>
    (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 PathRouteSetPathRoute[]
    (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 Sequence[loadbalancer.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<PathRouteSetPathRoute>
    (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<PathRouteSetPathRoute>
    (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 PathRouteSetPathRoute[]
    (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 Sequence[loadbalancer.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, PathRouteSetPathRouteArgs

    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.

    Example: /example/video/123

    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.

    Example: /example/video/123

    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.

    Example: /example/video/123

    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.

    Example: /example/video/123

    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.

    Example: /example/video/123

    path_match_type loadbalancer.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.

    Example: /example/video/123

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

    PathRouteSetPathRoutePathMatchType, PathRouteSetPathRoutePathMatchTypeArgs

    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.

    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 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 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 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 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 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}"
    

    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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi