Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.LoadBalancer.getBackendSetHealth
Explore with Pulumi AI
This data source provides details about a specific Backend Set Health resource in Oracle Cloud Infrastructure Load Balancer service.
Gets the health status for the specified backend set.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackendSetHealth = oci.LoadBalancer.getBackendSetHealth({
    backendSetName: testBackendSet.name,
    loadBalancerId: testLoadBalancer.id,
});
import pulumi
import pulumi_oci as oci
test_backend_set_health = oci.LoadBalancer.get_backend_set_health(backend_set_name=test_backend_set["name"],
    load_balancer_id=test_load_balancer["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/loadbalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loadbalancer.GetBackendSetHealth(ctx, &loadbalancer.GetBackendSetHealthArgs{
			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 testBackendSetHealth = Oci.LoadBalancer.GetBackendSetHealth.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.GetBackendSetHealthArgs;
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 testBackendSetHealth = LoadBalancerFunctions.getBackendSetHealth(GetBackendSetHealthArgs.builder()
            .backendSetName(testBackendSet.name())
            .loadBalancerId(testLoadBalancer.id())
            .build());
    }
}
variables:
  testBackendSetHealth:
    fn::invoke:
      function: oci:LoadBalancer:getBackendSetHealth
      arguments:
        backendSetName: ${testBackendSet.name}
        loadBalancerId: ${testLoadBalancer.id}
Using getBackendSetHealth
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 getBackendSetHealth(args: GetBackendSetHealthArgs, opts?: InvokeOptions): Promise<GetBackendSetHealthResult>
function getBackendSetHealthOutput(args: GetBackendSetHealthOutputArgs, opts?: InvokeOptions): Output<GetBackendSetHealthResult>def get_backend_set_health(backend_set_name: Optional[str] = None,
                           load_balancer_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetBackendSetHealthResult
def get_backend_set_health_output(backend_set_name: Optional[pulumi.Input[str]] = None,
                           load_balancer_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetBackendSetHealthResult]func GetBackendSetHealth(ctx *Context, args *GetBackendSetHealthArgs, opts ...InvokeOption) (*GetBackendSetHealthResult, error)
func GetBackendSetHealthOutput(ctx *Context, args *GetBackendSetHealthOutputArgs, opts ...InvokeOption) GetBackendSetHealthResultOutput> Note: This function is named GetBackendSetHealth in the Go SDK.
public static class GetBackendSetHealth 
{
    public static Task<GetBackendSetHealthResult> InvokeAsync(GetBackendSetHealthArgs args, InvokeOptions? opts = null)
    public static Output<GetBackendSetHealthResult> Invoke(GetBackendSetHealthInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackendSetHealthResult> getBackendSetHealth(GetBackendSetHealthArgs args, InvokeOptions options)
public static Output<GetBackendSetHealthResult> getBackendSetHealth(GetBackendSetHealthArgs args, InvokeOptions options)
fn::invoke:
  function: oci:LoadBalancer/getBackendSetHealth:getBackendSetHealth
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Backend
Set stringName  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - Load
Balancer stringId  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
- Backend
Set stringName  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - Load
Balancer stringId  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
- backend
Set StringName  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - load
Balancer StringId  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
- backend
Set stringName  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - load
Balancer stringId  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
- backend_
set_ strname  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - load_
balancer_ strid  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
- backend
Set StringName  - The name of the backend set to retrieve the health status for. Example: 
example_backend_set - load
Balancer StringId  - The OCID of the load balancer associated with the backend set health status to be retrieved.
 
getBackendSetHealth Result
The following output properties are available:
- Backend
Set stringName  - Critical
State List<string>Backend Names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Load
Balancer stringId  - Status string
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - Total
Backend intCount  - The total number of backend servers in this backend set. Example: 
7 - Unknown
State List<string>Backend Names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - Warning
State List<string>Backend Names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
- Backend
Set stringName  - Critical
State []stringBackend Names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Load
Balancer stringId  - Status string
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - Total
Backend intCount  - The total number of backend servers in this backend set. Example: 
7 - Unknown
State []stringBackend Names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - Warning
State []stringBackend Names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
- backend
Set StringName  - critical
State List<String>Backend Names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - id String
 - The provider-assigned unique ID for this managed resource.
 - load
Balancer StringId  - status String
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - total
Backend IntegerCount  - The total number of backend servers in this backend set. Example: 
7 - unknown
State List<String>Backend Names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - warning
State List<String>Backend Names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
- backend
Set stringName  - critical
State string[]Backend Names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - id string
 - The provider-assigned unique ID for this managed resource.
 - load
Balancer stringId  - status string
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - total
Backend numberCount  - The total number of backend servers in this backend set. Example: 
7 - unknown
State string[]Backend Names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - warning
State string[]Backend Names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
- backend_
set_ strname  - critical_
state_ Sequence[str]backend_ names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - id str
 - The provider-assigned unique ID for this managed resource.
 - load_
balancer_ strid  - status str
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - total_
backend_ intcount  - The total number of backend servers in this backend set. Example: 
7 - unknown_
state_ Sequence[str]backend_ names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - warning_
state_ Sequence[str]backend_ names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
- backend
Set StringName  - critical
State List<String>Backend Names  - A list of backend servers that are currently in the 
CRITICALhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.4:8080 - id String
 - The provider-assigned unique ID for this managed resource.
 - load
Balancer StringId  - status String
 - Overall health status of the backend set.
- OK: All backend servers in the backend set return a status of 
OK. - WARNING: Half or more of the backend set's backend servers return a status of 
OKand at least one backend server returns a status ofWARNING,CRITICAL, orUNKNOWN. - CRITICAL: Fewer than half of the backend set's backend servers return a status of 
OK. - UNKNOWN: More than half of the backend set's backend servers return a status of 
UNKNOWN, the system was unable to retrieve metrics, or the backend set does not have a listener attached. 
 - OK: All backend servers in the backend set return a status of 
 - total
Backend NumberCount  - The total number of backend servers in this backend set. Example: 
7 - unknown
State List<String>Backend Names  - A list of backend servers that are currently in the 
UNKNOWNhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.5:8080 - warning
State List<String>Backend Names  - A list of backend servers that are currently in the 
WARNINGhealth state. The list identifies each backend server by IP address and port. Example:10.0.0.3:8080 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider.