1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. getLoadBalancerRoutingPolicy
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

oci.LoadBalancer.getLoadBalancerRoutingPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

    This data source provides details about a specific Load Balancer Routing Policy resource in Oracle Cloud Infrastructure Load Balancer service.

    Gets the specified routing policy.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testLoadBalancerRoutingPolicy = Oci.LoadBalancer.GetLoadBalancerRoutingPolicy.Invoke(new()
        {
            LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
            RoutingPolicyName = oci_load_balancer_routing_policy.Test_routing_policy.Name,
        });
    
    });
    
    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.GetLoadBalancerRoutingPolicy(ctx, &loadbalancer.GetLoadBalancerRoutingPolicyArgs{
    			LoadBalancerId:    oci_load_balancer_load_balancer.Test_load_balancer.Id,
    			RoutingPolicyName: oci_load_balancer_routing_policy.Test_routing_policy.Name,
    		}, nil)
    		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.LoadBalancerFunctions;
    import com.pulumi.oci.LoadBalancer.inputs.GetLoadBalancerRoutingPolicyArgs;
    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) {
            final var testLoadBalancerRoutingPolicy = LoadBalancerFunctions.getLoadBalancerRoutingPolicy(GetLoadBalancerRoutingPolicyArgs.builder()
                .loadBalancerId(oci_load_balancer_load_balancer.test_load_balancer().id())
                .routingPolicyName(oci_load_balancer_routing_policy.test_routing_policy().name())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_load_balancer_routing_policy = oci.LoadBalancer.get_load_balancer_routing_policy(load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"],
        routing_policy_name=oci_load_balancer_routing_policy["test_routing_policy"]["name"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLoadBalancerRoutingPolicy = oci.LoadBalancer.getLoadBalancerRoutingPolicy({
        loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
        routingPolicyName: oci_load_balancer_routing_policy.test_routing_policy.name,
    });
    
    variables:
      testLoadBalancerRoutingPolicy:
        fn::invoke:
          Function: oci:LoadBalancer:getLoadBalancerRoutingPolicy
          Arguments:
            loadBalancerId: ${oci_load_balancer_load_balancer.test_load_balancer.id}
            routingPolicyName: ${oci_load_balancer_routing_policy.test_routing_policy.name}
    

    Using getLoadBalancerRoutingPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLoadBalancerRoutingPolicy(args: GetLoadBalancerRoutingPolicyArgs, opts?: InvokeOptions): Promise<GetLoadBalancerRoutingPolicyResult>
    function getLoadBalancerRoutingPolicyOutput(args: GetLoadBalancerRoutingPolicyOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancerRoutingPolicyResult>
    def get_load_balancer_routing_policy(load_balancer_id: Optional[str] = None,
                                         routing_policy_name: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetLoadBalancerRoutingPolicyResult
    def get_load_balancer_routing_policy_output(load_balancer_id: Optional[pulumi.Input[str]] = None,
                                         routing_policy_name: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancerRoutingPolicyResult]
    func GetLoadBalancerRoutingPolicy(ctx *Context, args *GetLoadBalancerRoutingPolicyArgs, opts ...InvokeOption) (*GetLoadBalancerRoutingPolicyResult, error)
    func GetLoadBalancerRoutingPolicyOutput(ctx *Context, args *GetLoadBalancerRoutingPolicyOutputArgs, opts ...InvokeOption) GetLoadBalancerRoutingPolicyResultOutput

    > Note: This function is named GetLoadBalancerRoutingPolicy in the Go SDK.

    public static class GetLoadBalancerRoutingPolicy 
    {
        public static Task<GetLoadBalancerRoutingPolicyResult> InvokeAsync(GetLoadBalancerRoutingPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetLoadBalancerRoutingPolicyResult> Invoke(GetLoadBalancerRoutingPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLoadBalancerRoutingPolicyResult> getLoadBalancerRoutingPolicy(GetLoadBalancerRoutingPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LoadBalancer/getLoadBalancerRoutingPolicy:getLoadBalancerRoutingPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LoadBalancerId string

    The OCID of the specified load balancer.

    RoutingPolicyName string

    The name of the routing policy to retrieve. Example: example_routing_policy

    LoadBalancerId string

    The OCID of the specified load balancer.

    RoutingPolicyName string

    The name of the routing policy to retrieve. Example: example_routing_policy

    loadBalancerId String

    The OCID of the specified load balancer.

    routingPolicyName String

    The name of the routing policy to retrieve. Example: example_routing_policy

    loadBalancerId string

    The OCID of the specified load balancer.

    routingPolicyName string

    The name of the routing policy to retrieve. Example: example_routing_policy

    load_balancer_id str

    The OCID of the specified load balancer.

    routing_policy_name str

    The name of the routing policy to retrieve. Example: example_routing_policy

    loadBalancerId String

    The OCID of the specified load balancer.

    routingPolicyName String

    The name of the routing policy to retrieve. Example: example_routing_policy

    getLoadBalancerRoutingPolicy Result

    The following output properties are available:

    ConditionLanguageVersion string

    The version of the language in which condition of rules are composed.

    Id string
    LoadBalancerId string
    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    RoutingPolicyName string
    Rules List<GetLoadBalancerRoutingPolicyRule>

    The ordered list of routing rules.

    State string
    ConditionLanguageVersion string

    The version of the language in which condition of rules are composed.

    Id string
    LoadBalancerId string
    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    RoutingPolicyName string
    Rules []GetLoadBalancerRoutingPolicyRule

    The ordered list of routing rules.

    State string
    conditionLanguageVersion String

    The version of the language in which condition of rules are composed.

    id String
    loadBalancerId String
    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    routingPolicyName String
    rules List<GetRoutingPolicyRule>

    The ordered list of routing rules.

    state String
    conditionLanguageVersion string

    The version of the language in which condition of rules are composed.

    id string
    loadBalancerId string
    name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    routingPolicyName string
    rules GetLoadBalancerRoutingPolicyRule[]

    The ordered list of routing rules.

    state string
    condition_language_version str

    The version of the language in which condition of rules are composed.

    id str
    load_balancer_id str
    name str

    A unique name for the routing policy rule. Avoid entering confidential information.

    routing_policy_name str
    rules GetLoadBalancerRoutingPolicyRule]

    The ordered list of routing rules.

    state str
    conditionLanguageVersion String

    The version of the language in which condition of rules are composed.

    id String
    loadBalancerId String
    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    routingPolicyName String
    rules List<Property Map>

    The ordered list of routing rules.

    state String

    Supporting Types

    GetLoadBalancerRoutingPolicyRule

    Actions List<GetLoadBalancerRoutingPolicyRuleAction>

    A list of actions to be applied when conditions of the routing rule are met.

    Condition string

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    Actions []GetLoadBalancerRoutingPolicyRuleAction

    A list of actions to be applied when conditions of the routing rule are met.

    Condition string

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    actions List<GetRoutingPolicyRuleAction>

    A list of actions to be applied when conditions of the routing rule are met.

    condition String

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    actions GetLoadBalancerRoutingPolicyRuleAction[]

    A list of actions to be applied when conditions of the routing rule are met.

    condition string

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    actions GetLoadBalancerRoutingPolicyRuleAction]

    A list of actions to be applied when conditions of the routing rule are met.

    condition str

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    name str

    A unique name for the routing policy rule. Avoid entering confidential information.

    actions List<Property Map>

    A list of actions to be applied when conditions of the routing rule are met.

    condition String

    A routing rule to evaluate defined conditions against the incoming HTTP request and perform an action.

    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    GetLoadBalancerRoutingPolicyRuleAction

    BackendSetName string

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    BackendSetName string

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    Name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    backendSetName String

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    backendSetName string

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    name string

    A unique name for the routing policy rule. Avoid entering confidential information.

    backend_set_name str

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    name str

    A unique name for the routing policy rule. Avoid entering confidential information.

    backendSetName String

    Name of the backend set the listener will forward the traffic to. Example: backendSetForImages

    name String

    A unique name for the routing policy rule. Avoid entering confidential information.

    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 v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi