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
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 = oci_network_load_balancer_backend_set.Test_backend_set.Name,
NetworkLoadBalancerId = oci_network_load_balancer_network_load_balancer.Test_network_load_balancer.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/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: oci_network_load_balancer_backend_set.Test_backend_set.Name,
NetworkLoadBalancerId: oci_network_load_balancer_network_load_balancer.Test_network_load_balancer.Id,
}, 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.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(oci_network_load_balancer_backend_set.test_backend_set().name())
.networkLoadBalancerId(oci_network_load_balancer_network_load_balancer.test_network_load_balancer().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_backends = oci.NetworkLoadBalancer.get_backends(backend_set_name=oci_network_load_balancer_backend_set["test_backend_set"]["name"],
network_load_balancer_id=oci_network_load_balancer_network_load_balancer["test_network_load_balancer"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackends = oci.NetworkLoadBalancer.getBackends({
backendSetName: oci_network_load_balancer_backend_set.test_backend_set.name,
networkLoadBalancerId: oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id,
});
variables:
testBackends:
fn::invoke:
Function: oci:NetworkLoadBalancer:getBackends
Arguments:
backendSetName: ${oci_network_load_balancer_backend_set.test_backend_set.name}
networkLoadBalancerId: ${oci_network_load_balancer_network_load_balancer.test_network_load_balancer.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:
- Backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- Network
Load stringBalancer Id The OCID of the network load balancer to update.
- Filters
List<Get
Backends Filter>
- Backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- Network
Load stringBalancer Id The OCID of the network load balancer to update.
- Filters
[]Get
Backends Filter
- backend
Set StringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- network
Load StringBalancer Id The OCID of the network load balancer to update.
- filters
List<Get
Backends Filter>
- backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- network
Load stringBalancer Id The OCID of the network load balancer to update.
- filters
Get
Backends 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
Get
Backends Filter]
- backend
Set StringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- network
Load StringBalancer Id The OCID of the network load balancer to update.
- filters List<Property Map>
getBackends Result
The following output properties are available:
- Backend
Collections List<GetBackends Backend Collection> The list of backend_collection.
- Backend
Set stringName - Id string
The provider-assigned unique ID for this managed resource.
- Network
Load stringBalancer Id - Filters
List<Get
Backends Filter>
- Backend
Collections []GetBackends Backend Collection The list of backend_collection.
- Backend
Set stringName - Id string
The provider-assigned unique ID for this managed resource.
- Network
Load stringBalancer Id - Filters
[]Get
Backends Filter
- backend
Collections List<GetBackends Backend Collection> The list of backend_collection.
- backend
Set StringName - id String
The provider-assigned unique ID for this managed resource.
- network
Load StringBalancer Id - filters
List<Get
Backends Filter>
- backend
Collections GetBackends Backend Collection[] The list of backend_collection.
- backend
Set stringName - id string
The provider-assigned unique ID for this managed resource.
- network
Load stringBalancer Id - filters
Get
Backends Filter[]
- backend_
collections 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
Get
Backends Filter]
- backend
Collections List<Property Map> The list of backend_collection.
- backend
Set StringName - id String
The provider-assigned unique ID for this managed resource.
- network
Load StringBalancer Id - filters List<Property Map>
Supporting Types
GetBackendsBackendCollection
GetBackendsBackendCollectionItem
- Backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- Id string
- Ip
Address string 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 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>:443
or10.0.0.3:0
- Network
Load stringBalancer Id The OCID of the network load balancer to update.
- Port int
The communication port for the backend server. Example:
8080
- Target
Id 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 load balancing policies, see How Network Load Balancing Policies Work. Example:
3
- Backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- Id string
- Ip
Address string 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 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>:443
or10.0.0.3:0
- Network
Load stringBalancer Id The OCID of the network load balancer to update.
- Port int
The communication port for the backend server. Example:
8080
- Target
Id 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 load balancing policies, see How Network Load Balancing Policies Work. Example:
3
- backend
Set StringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- id String
- ip
Address String The IP address of the backend server. Example:
10.0.0.3
- is
Backup 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
- is
Drain Boolean Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example:
false
- is
Offline 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>:443
or10.0.0.3:0
- network
Load StringBalancer Id The OCID of the network load balancer to update.
- port Integer
The communication port for the backend server. Example:
8080
- target
Id 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 load balancing policies, see How Network Load Balancing Policies Work. Example:
3
- backend
Set stringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- id string
- ip
Address string The IP address of the backend server. Example:
10.0.0.3
- is
Backup 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
- is
Drain boolean Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example:
false
- is
Offline 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>:443
or10.0.0.3:0
- network
Load stringBalancer Id The OCID of the network load balancer to update.
- port number
The communication port for the backend server. Example:
8080
- target
Id 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 load balancing policies, see How Network Load Balancing Policies Work. 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>:443
or10.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 load balancing policies, see How Network Load Balancing Policies Work. Example:
3
- backend
Set StringName The name of the backend set associated with the backend servers. Example:
example_backend_set
- id String
- ip
Address String The IP address of the backend server. Example:
10.0.0.3
- is
Backup 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
- is
Drain Boolean Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example:
false
- is
Offline 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>:443
or10.0.0.3:0
- network
Load StringBalancer Id The OCID of the network load balancer to update.
- port Number
The communication port for the backend server. Example:
8080
- target
Id 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 load balancing policies, see How Network Load Balancing Policies Work. Example:
3
GetBackendsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.