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

oci.NetworkLoadBalancer.getBackends

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 Backends in Oracle Cloud Infrastructure Network Load Balancer service.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testBackends = oci.NetworkLoadBalancer.getBackends({
        backendSetName: testBackendSet.name,
        networkLoadBalancerId: testNetworkLoadBalancer.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_backends = oci.NetworkLoadBalancer.get_backends(backend_set_name=test_backend_set["name"],
        network_load_balancer_id=test_network_load_balancer["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/NetworkLoadBalancer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := NetworkLoadBalancer.GetBackends(ctx, &networkloadbalancer.GetBackendsArgs{
    			BackendSetName:        testBackendSet.Name,
    			NetworkLoadBalancerId: testNetworkLoadBalancer.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.NetworkLoadBalancer.GetBackends.Invoke(new()
        {
            BackendSetName = testBackendSet.Name,
            NetworkLoadBalancerId = testNetworkLoadBalancer.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.NetworkLoadBalancer.NetworkLoadBalancerFunctions;
    import com.pulumi.oci.NetworkLoadBalancer.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 = NetworkLoadBalancerFunctions.getBackends(GetBackendsArgs.builder()
                .backendSetName(testBackendSet.name())
                .networkLoadBalancerId(testNetworkLoadBalancer.id())
                .build());
    
        }
    }
    
    variables:
      testBackends:
        fn::invoke:
          Function: oci:NetworkLoadBalancer:getBackends
          Arguments:
            backendSetName: ${testBackendSet.name}
            networkLoadBalancerId: ${testNetworkLoadBalancer.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(backend_set_name: Optional[str] = None,
                     filters: Optional[Sequence[_networkloadbalancer.GetBackendsFilter]] = None,
                     network_load_balancer_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetBackendsResult
    def get_backends_output(backend_set_name: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_networkloadbalancer.GetBackendsFilterArgs]]]] = None,
                     network_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:NetworkLoadBalancer/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
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    Filters List<GetBackendsFilter>
    BackendSetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    Filters []GetBackendsFilter
    backendSetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    networkLoadBalancerId String
    The OCID of the network load balancer to update.
    filters List<GetBackendsFilter>
    backendSetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    networkLoadBalancerId string
    The OCID of the network load balancer to update.
    filters GetBackendsFilter[]
    backend_set_name str
    The name of the backend set associated with the backend servers. Example: example_backend_set
    network_load_balancer_id str
    The OCID of the network load balancer to update.
    filters Sequence[networkloadbalancer.GetBackendsFilter]
    backendSetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    networkLoadBalancerId String
    The OCID of the network load balancer to update.
    filters List<Property Map>

    getBackends Result

    The following output properties are available:

    BackendCollections List<GetBackendsBackendCollection>
    The list of backend_collection.
    BackendSetName string
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkLoadBalancerId string
    Filters List<GetBackendsFilter>
    BackendCollections []GetBackendsBackendCollection
    The list of backend_collection.
    BackendSetName string
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkLoadBalancerId string
    Filters []GetBackendsFilter
    backendCollections List<GetBackendsBackendCollection>
    The list of backend_collection.
    backendSetName String
    id String
    The provider-assigned unique ID for this managed resource.
    networkLoadBalancerId String
    filters List<GetBackendsFilter>
    backendCollections GetBackendsBackendCollection[]
    The list of backend_collection.
    backendSetName string
    id string
    The provider-assigned unique ID for this managed resource.
    networkLoadBalancerId string
    filters GetBackendsFilter[]
    backendCollections List<Property Map>
    The list of backend_collection.
    backendSetName String
    id String
    The provider-assigned unique ID for this managed resource.
    networkLoadBalancerId String
    filters List<Property Map>

    Supporting Types

    GetBackendsBackendCollection

    GetBackendsBackendCollectionItem

    BackendSetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    Id string
    IpAddress string
    The IP address of the backend server. Example: 10.0.0.3
    IsBackup bool
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    IsDrain bool
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    IsOffline bool
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    Name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    Port int
    The communication port for the backend server. Example: 8080
    TargetId string
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    Weight int
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3
    BackendSetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    Id string
    IpAddress string
    The IP address of the backend server. Example: 10.0.0.3
    IsBackup bool
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    IsDrain bool
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    IsOffline bool
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    Name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    Port int
    The communication port for the backend server. Example: 8080
    TargetId string
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    Weight int
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3
    backendSetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    id String
    ipAddress String
    The IP address of the backend server. Example: 10.0.0.3
    isBackup Boolean
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    isDrain Boolean
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    isOffline Boolean
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    name String
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    networkLoadBalancerId String
    The OCID of the network load balancer to update.
    port Integer
    The communication port for the backend server. Example: 8080
    targetId String
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    weight Integer
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3
    backendSetName string
    The name of the backend set associated with the backend servers. Example: example_backend_set
    id string
    ipAddress string
    The IP address of the backend server. Example: 10.0.0.3
    isBackup boolean
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    isDrain boolean
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    isOffline boolean
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    networkLoadBalancerId string
    The OCID of the network load balancer to update.
    port number
    The communication port for the backend server. Example: 8080
    targetId string
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    weight number
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3
    backend_set_name str
    The name of the backend set associated with the backend servers. Example: example_backend_set
    id str
    ip_address str
    The IP address of the backend server. Example: 10.0.0.3
    is_backup bool
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    is_drain bool
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    is_offline bool
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    name str
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    network_load_balancer_id str
    The OCID of the network load balancer to update.
    port int
    The communication port for the backend server. Example: 8080
    target_id str
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    weight int
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3
    backendSetName String
    The name of the backend set associated with the backend servers. Example: example_backend_set
    id String
    ipAddress String
    The IP address of the backend server. Example: 10.0.0.3
    isBackup Boolean
    Whether the network load balancer should treat this server as a backup unit. If true, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: false
    isDrain Boolean
    Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: false
    isOffline Boolean
    Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
    name String
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    networkLoadBalancerId String
    The OCID of the network load balancer to update.
    port Number
    The communication port for the backend server. Example: 8080
    targetId String
    The IP OCID/Instance OCID associated with the backend server. Example: ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>
    weight Number
    The network 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 three times the number of new connections as a server weighted '1'. For more information about load balancing policies, see How Network Load Balancing Policies Work. Example: 3

    GetBackendsFilter

    Name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    Values List<string>
    Regex bool
    Name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    Values []string
    Regex bool
    name String
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    values List<String>
    regex Boolean
    name string
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    values string[]
    regex boolean
    name str
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    values Sequence[str]
    regex bool
    name String
    A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080, or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443 or 10.0.0.3:0
    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 v2.17.0 published on Friday, Nov 15, 2024 by Pulumi