Oracle Cloud Infrastructure
getBackends
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
using Pulumi;
using Oci = Pulumi.Oci;
class MyStack : Stack
{
public MyStack()
{
var testBackends = Output.Create(Oci.LoadBalancer.GetBackends.InvokeAsync(new Oci.LoadBalancer.GetBackendsArgs
{
BackendsetName = oci_load_balancer_backend_set.Test_backend_set.Name,
LoadBalancerId = oci_load_balancer_load_balancer.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: oci_load_balancer_backend_set.Test_backend_set.Name,
LoadBalancerId: oci_load_balancer_load_balancer.Test_load_balancer.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_oci as oci
test_backends = oci.LoadBalancer.get_backends(backendset_name=oci_load_balancer_backend_set["test_backend_set"]["name"],
load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackends = oci.LoadBalancer.getBackends({
backendsetName: oci_load_balancer_backend_set.test_backend_set.name,
loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
});
Coming soon!
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:
- Backendset
Name string The name of the backend set associated with the backend servers. Example:
example_backend_set
- Load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- Filters
List<Get
Backends Filter>
- Backendset
Name string The name of the backend set associated with the backend servers. Example:
example_backend_set
- Load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- Filters
[]Get
Backends Filter
- backendset
Name String The name of the backend set associated with the backend servers. Example:
example_backend_set
- load
Balancer StringId The OCID of the load balancer associated with the backend set and servers.
- filters
List<Get
Backends Filter>
- backendset
Name string The name of the backend set associated with the backend servers. Example:
example_backend_set
- load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- filters
Get
Backends Filter[]
- backendset_
name str The name of the backend set associated with the backend servers. Example:
example_backend_set
- load_
balancer_ strid The OCID of the load balancer associated with the backend set and servers.
- filters
Get
Backends Filter]
- backendset
Name String The name of the backend set associated with the backend servers. Example:
example_backend_set
- load
Balancer StringId 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<Get
Backends Backend> The list of backends.
- Backendset
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId - Filters
List<Get
Backends Filter>
- Backends
[]Get
Backends Backend The list of backends.
- Backendset
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId - Filters
[]Get
Backends Filter
- backends
List<Get
Backends Backend> The list of backends.
- backendset
Name String - id String
The provider-assigned unique ID for this managed resource.
- load
Balancer StringId - filters
List<Get
Backends Filter>
- backends
Get
Backends Backend[] The list of backends.
- backendset
Name string - id string
The provider-assigned unique ID for this managed resource.
- load
Balancer stringId - filters
Get
Backends Filter[]
- backends
Get
Backends Backend] The list of backends.
- backendset_
name str - id str
The provider-assigned unique ID for this managed resource.
- load_
balancer_ strid - filters
Get
Backends Filter]
- backends List<Property Map>
The list of backends.
- backendset
Name String - id String
The provider-assigned unique ID for this managed resource.
- load
Balancer StringId - filters List<Property Map>
Supporting Types
GetBackendsBackend
- Backendset
Name 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
- Ip
Address string The IP address of the backend server. Example:
10.0.0.3
- Load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- 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.
- Backendset
Name 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
- Ip
Address string The IP address of the backend server. Example:
10.0.0.3
- Load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- 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.
- backendset
Name 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
- ip
Address String The IP address of the backend server. Example:
10.0.0.3
- load
Balancer StringId The OCID of the load balancer associated with the backend set and servers.
- 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.
- backendset
Name 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
- ip
Address string The IP address of the backend server. Example:
10.0.0.3
- load
Balancer stringId The OCID of the load balancer associated with the backend set and servers.
- 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_ strid The OCID of the load balancer associated with the backend set and servers.
- 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.
- backendset
Name 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
- ip
Address String The IP address of the backend server. Example:
10.0.0.3
- load
Balancer StringId The OCID of the load balancer associated with the backend set and servers.
- 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.