Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.NetworkLoadBalancer.getBackends
Explore with Pulumi AI
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[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[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)
public static Output<GetBackendsResult> getBackends(GetBackendsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:NetworkLoadBalancer/getBackends:getBackends
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BackendSet stringName 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- NetworkLoad stringBalancer Id 
- The OCID of the network load balancer to update.
- Filters
List<GetBackends Filter> 
- BackendSet stringName 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- NetworkLoad stringBalancer Id 
- The OCID of the network load balancer to update.
- Filters
[]GetBackends Filter 
- backendSet StringName 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- networkLoad StringBalancer Id 
- The OCID of the network load balancer to update.
- filters
List<GetBackends Filter> 
- backendSet stringName 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- networkLoad stringBalancer Id 
- The OCID of the network load balancer to update.
- filters
GetBackends Filter[] 
- backend_set_ strname 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- network_load_ strbalancer_ id 
- The OCID of the network load balancer to update.
- filters
Sequence[GetBackends Filter] 
- backendSet StringName 
- The name of the backend set associated with the backend servers. Example: example_backend_set
- networkLoad StringBalancer Id 
- The OCID of the network load balancer to update.
- filters List<Property Map>
getBackends Result
The following output properties are available:
- BackendCollections List<GetBackends Backend Collection> 
- The list of backend_collection.
- BackendSet stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkLoad stringBalancer Id 
- Filters
List<GetBackends Filter> 
- BackendCollections []GetBackends Backend Collection 
- The list of backend_collection.
- BackendSet stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkLoad stringBalancer Id 
- Filters
[]GetBackends Filter 
- backendCollections List<GetBackends Backend Collection> 
- The list of backend_collection.
- backendSet StringName 
- id String
- The provider-assigned unique ID for this managed resource.
- networkLoad StringBalancer Id 
- filters
List<GetBackends Filter> 
- backendCollections GetBackends Backend Collection[] 
- The list of backend_collection.
- backendSet stringName 
- id string
- The provider-assigned unique ID for this managed resource.
- networkLoad stringBalancer Id 
- filters
GetBackends Filter[] 
- backend_collections Sequence[GetBackends Backend Collection] 
- The list of backend_collection.
- backend_set_ strname 
- id str
- The provider-assigned unique ID for this managed resource.
- network_load_ strbalancer_ id 
- filters
Sequence[GetBackends Filter] 
- backendCollections List<Property Map>
- The list of backend_collection.
- backendSet StringName 
- id String
- The provider-assigned unique ID for this managed resource.
- networkLoad StringBalancer Id 
- filters List<Property Map>
Supporting Types
GetBackendsBackendCollection   
GetBackendsBackendCollectionItem    
- BackendSet stringName 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- NetworkLoad stringBalancer Id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
- BackendSet stringName 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- NetworkLoad stringBalancer Id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
- backendSet StringName 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- networkLoad StringBalancer Id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
- backendSet stringName 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- networkLoad stringBalancer Id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
- backend_set_ strname 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- network_load_ strbalancer_ id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
- backendSet StringName 
- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0
- networkLoad StringBalancer Id 
- 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><unique_ID></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 network load balancing policies, see Network Load Balancer Policies. Example: 3
GetBackendsFilter  
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.