1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. getPolicies
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.LoadBalancer.getPolicies

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Load Balancer Policies in Oracle Cloud Infrastructure Load Balancer service.

    Lists the available load balancer policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLoadBalancerPolicies = oci.LoadBalancer.getPolicies({
        compartmentId: compartmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_load_balancer_policies = oci.LoadBalancer.get_policies(compartment_id=compartment_id)
    
    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.GetPolicies(ctx, &loadbalancer.GetPoliciesArgs{
    			CompartmentId: compartmentId,
    		}, nil)
    		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 testLoadBalancerPolicies = Oci.LoadBalancer.GetPolicies.Invoke(new()
        {
            CompartmentId = compartmentId,
        });
    
    });
    
    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.GetPoliciesArgs;
    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 testLoadBalancerPolicies = LoadBalancerFunctions.getPolicies(GetPoliciesArgs.builder()
                .compartmentId(compartmentId)
                .build());
    
        }
    }
    
    variables:
      testLoadBalancerPolicies:
        fn::invoke:
          Function: oci:LoadBalancer:getPolicies
          Arguments:
            compartmentId: ${compartmentId}
    

    Using getPolicies

    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 getPolicies(args: GetPoliciesArgs, opts?: InvokeOptions): Promise<GetPoliciesResult>
    function getPoliciesOutput(args: GetPoliciesOutputArgs, opts?: InvokeOptions): Output<GetPoliciesResult>
    def get_policies(compartment_id: Optional[str] = None,
                     filters: Optional[Sequence[_loadbalancer.GetPoliciesFilter]] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
    def get_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loadbalancer.GetPoliciesFilterArgs]]]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]
    func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
    func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment containing the load balancer policies to list.
    Filters List<GetPoliciesFilter>
    CompartmentId string
    The OCID of the compartment containing the load balancer policies to list.
    Filters []GetPoliciesFilter
    compartmentId String
    The OCID of the compartment containing the load balancer policies to list.
    filters List<GetPoliciesFilter>
    compartmentId string
    The OCID of the compartment containing the load balancer policies to list.
    filters GetPoliciesFilter[]
    compartment_id str
    The OCID of the compartment containing the load balancer policies to list.
    filters Sequence[loadbalancer.GetPoliciesFilter]
    compartmentId String
    The OCID of the compartment containing the load balancer policies to list.
    filters List<Property Map>

    getPolicies Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Policies List<GetPoliciesPolicy>
    The list of policies.
    Filters List<GetPoliciesFilter>
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Policies []GetPoliciesPolicy
    The list of policies.
    Filters []GetPoliciesFilter
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<GetPoliciesPolicy>
    The list of policies.
    filters List<GetPoliciesFilter>
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    policies GetPoliciesPolicy[]
    The list of policies.
    filters GetPoliciesFilter[]
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    policies Sequence[loadbalancer.GetPoliciesPolicy]
    The list of policies.
    filters Sequence[loadbalancer.GetPoliciesFilter]
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<Property Map>
    The list of policies.
    filters List<Property Map>

    Supporting Types

    GetPoliciesFilter

    Name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    Values List<string>
    Regex bool
    Name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    Values []string
    Regex bool
    name String
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    values List<String>
    regex Boolean
    name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    values string[]
    regex boolean
    name str
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    values Sequence[str]
    regex bool
    name String
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    values List<String>
    regex Boolean

    GetPoliciesPolicy

    Name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    Name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    name String
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    name string
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    name str
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'
    name String
    The name of a load balancing policy. Example: 'LEAST_CONNECTIONS'

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi