1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. getBackends
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

oci.LoadBalancer.getBackends

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

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

    Lists the backend servers for a given load balancer and backend set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testBackends = oci.LoadBalancer.getBackends({
        backendsetName: testBackendSet.name,
        loadBalancerId: testLoadBalancer.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_backends = oci.LoadBalancer.get_backends(backendset_name=test_backend_set["name"],
        load_balancer_id=test_load_balancer["id"])
    
    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.GetBackends(ctx, &loadbalancer.GetBackendsArgs{
    			BackendsetName: testBackendSet.Name,
    			LoadBalancerId: testLoadBalancer.Id,
    		}, 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 testBackends = Oci.LoadBalancer.GetBackends.Invoke(new()
        {
            BackendsetName = testBackendSet.Name,
            LoadBalancerId = testLoadBalancer.Id,
        });
    
    });
    
    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.GetBackendsArgs;
    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 testBackends = LoadBalancerFunctions.getBackends(GetBackendsArgs.builder()
                .backendsetName(testBackendSet.name())
                .loadBalancerId(testLoadBalancer.id())
                .build());
    
        }
    }
    
    variables:
      testBackends:
        fn::invoke:
          Function: oci:LoadBalancer:getBackends
          Arguments:
            backendsetName: ${testBackendSet.name}
            loadBalancerId: ${testLoadBalancer.id}
    

    Using getBackends

    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 getBackends(args: GetBackendsArgs, opts?: InvokeOptions): Promise<GetBackendsResult>
    function getBackendsOutput(args: GetBackendsOutputArgs, opts?: InvokeOptions): Output<GetBackendsResult>
    def get_backends(backendset_name: Optional[str] = None,
                     filters: Optional[Sequence[_loadbalancer.GetBackendsFilter]] = None,
                     load_balancer_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetBackendsResult
    def get_backends_output(backendset_name: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loadbalancer.GetBackendsFilterArgs]]]] = None,
                     load_balancer_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetBackendsResult]
    func GetBackends(ctx *Context, args *GetBackendsArgs, opts ...InvokeOption) (*GetBackendsResult, error)
    func GetBackendsOutput(ctx *Context, args *GetBackendsOutputArgs, opts ...InvokeOption) GetBackendsResultOutput

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

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

    The following arguments are supported:

    BackendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    LoadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    Filters List<GetBackendsFilter>
    BackendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    LoadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    Filters []GetBackendsFilter
    backendsetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    loadBalancerId String
    The OCID of the load balancer associated with the backend set and servers.
    filters List<GetBackendsFilter>
    backendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    loadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    filters GetBackendsFilter[]
    backendset_name str
    The name of the backend set associated with the backend servers. Example: example_backend_set
    load_balancer_id str
    The OCID of the load balancer associated with the backend set and servers.
    filters Sequence[loadbalancer.GetBackendsFilter]
    backendsetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    loadBalancerId String
    The OCID of the load balancer associated with the backend set and servers.
    filters List<Property Map>

    getBackends Result

    The following output properties are available:

    Backends List<GetBackendsBackend>
    The list of backends.
    BackendsetName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId string
    Filters List<GetBackendsFilter>
    Backends []GetBackendsBackend
    The list of backends.
    BackendsetName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId string
    Filters []GetBackendsFilter
    backends List<GetBackendsBackend>
    The list of backends.
    backendsetName String
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId String
    filters List<GetBackendsFilter>
    backends GetBackendsBackend[]
    The list of backends.
    backendsetName string
    id string
    The provider-assigned unique ID for this managed resource.
    loadBalancerId string
    filters GetBackendsFilter[]
    backends Sequence[loadbalancer.GetBackendsBackend]
    The list of backends.
    backendset_name str
    id str
    The provider-assigned unique ID for this managed resource.
    load_balancer_id str
    filters Sequence[loadbalancer.GetBackendsFilter]
    backends List<Property Map>
    The list of backends.
    backendsetName String
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId String
    filters List<Property Map>

    Supporting Types

    GetBackendsBackend

    BackendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    Drain bool
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    IpAddress string
    The IP address of the backend server. Example: 10.0.0.3
    LoadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    MaxConnections int
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    Name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    Offline bool
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    Port int
    The communication port for the backend server. Example: 8080
    State string
    Weight int
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    Backup bool
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.
    BackendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    Drain bool
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    IpAddress string
    The IP address of the backend server. Example: 10.0.0.3
    LoadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    MaxConnections int
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    Name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    Offline bool
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    Port int
    The communication port for the backend server. Example: 8080
    State string
    Weight int
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    Backup bool
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.
    backendsetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    drain Boolean
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    ipAddress String
    The IP address of the backend server. Example: 10.0.0.3
    loadBalancerId String
    The OCID of the load balancer associated with the backend set and servers.
    maxConnections Integer
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    name String
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    offline Boolean
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    port Integer
    The communication port for the backend server. Example: 8080
    state String
    weight Integer
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    backup Boolean
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.
    backendsetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    drain boolean
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    ipAddress string
    The IP address of the backend server. Example: 10.0.0.3
    loadBalancerId string
    The OCID of the load balancer associated with the backend set and servers.
    maxConnections number
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    offline boolean
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    port number
    The communication port for the backend server. Example: 8080
    state string
    weight number
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    backup boolean
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.
    backendset_name str
    The name of the backend set associated with the backend servers. Example: example_backend_set
    drain bool
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    ip_address str
    The IP address of the backend server. Example: 10.0.0.3
    load_balancer_id str
    The OCID of the load balancer associated with the backend set and servers.
    max_connections int
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    name str
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    offline bool
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    port int
    The communication port for the backend server. Example: 8080
    state str
    weight int
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    backup bool
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.
    backendsetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    drain Boolean
    Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
    ipAddress String
    The IP address of the backend server. Example: 10.0.0.3
    loadBalancerId String
    The OCID of the load balancer associated with the backend set and servers.
    maxConnections Number
    The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
    name String
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    offline Boolean
    Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    port Number
    The communication port for the backend server. Example: 8080
    state String
    weight Number
    The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3
    backup Boolean
    Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

    GetBackendsFilter

    Name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    Values List<string>
    Regex bool
    Name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    Values []string
    Regex bool
    name String
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    values List<String>
    regex Boolean
    name string
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    values string[]
    regex boolean
    name str
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    values Sequence[str]
    regex bool
    name String
    A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
    values List<String>
    regex Boolean

    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.40.0 published on Wednesday, Jun 12, 2024 by Pulumi