Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.LoadBalancer.getHealth
Explore with Pulumi AI
This data source provides details about a specific Load Balancer Health resource in Oracle Cloud Infrastructure Load Balancer service.
Gets the health status for the specified load balancer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testLoadBalancerHealth = oci.LoadBalancer.getHealth({
    loadBalancerId: testLoadBalancer.id,
});
import pulumi
import pulumi_oci as oci
test_load_balancer_health = oci.LoadBalancer.get_health(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.GetHealth(ctx, &loadbalancer.GetHealthArgs{
			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 testLoadBalancerHealth = Oci.LoadBalancer.GetHealth.Invoke(new()
    {
        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.GetHealthArgs;
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 testLoadBalancerHealth = LoadBalancerFunctions.getHealth(GetHealthArgs.builder()
            .loadBalancerId(testLoadBalancer.id())
            .build());
    }
}
variables:
  testLoadBalancerHealth:
    fn::invoke:
      function: oci:LoadBalancer:getHealth
      arguments:
        loadBalancerId: ${testLoadBalancer.id}
Using getHealth
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 getHealth(args: GetHealthArgs, opts?: InvokeOptions): Promise<GetHealthResult>
function getHealthOutput(args: GetHealthOutputArgs, opts?: InvokeOptions): Output<GetHealthResult>def get_health(load_balancer_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetHealthResult
def get_health_output(load_balancer_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetHealthResult]func GetHealth(ctx *Context, args *GetHealthArgs, opts ...InvokeOption) (*GetHealthResult, error)
func GetHealthOutput(ctx *Context, args *GetHealthOutputArgs, opts ...InvokeOption) GetHealthResultOutput> Note: This function is named GetHealth in the Go SDK.
public static class GetHealth 
{
    public static Task<GetHealthResult> InvokeAsync(GetHealthArgs args, InvokeOptions? opts = null)
    public static Output<GetHealthResult> Invoke(GetHealthInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetHealthResult> getHealth(GetHealthArgs args, InvokeOptions options)
public static Output<GetHealthResult> getHealth(GetHealthArgs args, InvokeOptions options)
fn::invoke:
  function: oci:LoadBalancer/getHealth:getHealth
  arguments:
    # arguments dictionaryThe following arguments are supported:
- LoadBalancer stringId 
- The OCID of the load balancer to return health status for.
- LoadBalancer stringId 
- The OCID of the load balancer to return health status for.
- loadBalancer StringId 
- The OCID of the load balancer to return health status for.
- loadBalancer stringId 
- The OCID of the load balancer to return health status for.
- load_balancer_ strid 
- The OCID of the load balancer to return health status for.
- loadBalancer StringId 
- The OCID of the load balancer to return health status for.
getHealth Result
The following output properties are available:
- CriticalState List<string>Backend Set Names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- Id string
- The provider-assigned unique ID for this managed resource.
- LoadBalancer stringId 
- Status string
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- TotalBackend intSet Count 
- The total number of backend sets associated with this load balancer. Example: 4
- UnknownState List<string>Backend Set Names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- WarningState List<string>Backend Set Names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
- CriticalState []stringBackend Set Names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- Id string
- The provider-assigned unique ID for this managed resource.
- LoadBalancer stringId 
- Status string
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- TotalBackend intSet Count 
- The total number of backend sets associated with this load balancer. Example: 4
- UnknownState []stringBackend Set Names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- WarningState []stringBackend Set Names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
- criticalState List<String>Backend Set Names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- id String
- The provider-assigned unique ID for this managed resource.
- loadBalancer StringId 
- status String
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- totalBackend IntegerSet Count 
- The total number of backend sets associated with this load balancer. Example: 4
- unknownState List<String>Backend Set Names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- warningState List<String>Backend Set Names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
- criticalState string[]Backend Set Names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- id string
- The provider-assigned unique ID for this managed resource.
- loadBalancer stringId 
- status string
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- totalBackend numberSet Count 
- The total number of backend sets associated with this load balancer. Example: 4
- unknownState string[]Backend Set Names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- warningState string[]Backend Set Names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
- critical_state_ Sequence[str]backend_ set_ names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- id str
- The provider-assigned unique ID for this managed resource.
- load_balancer_ strid 
- status str
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- total_backend_ intset_ count 
- The total number of backend sets associated with this load balancer. Example: 4
- unknown_state_ Sequence[str]backend_ set_ names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- warning_state_ Sequence[str]backend_ set_ names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
- criticalState List<String>Backend Set Names 
- A list of backend sets that are currently in the CRITICALhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set
- id String
- The provider-assigned unique ID for this managed resource.
- loadBalancer StringId 
- status String
- The overall health status of the load balancer.- OK: All backend sets associated with the load balancer return a status of OK.
- WARNING: At least one of the backend sets associated with the load balancer returns a status of WARNING, no backend sets return a status ofCRITICAL, and the load balancer life cycle state isACTIVE.
- CRITICAL: One or more of the backend sets associated with the load balancer return a status of CRITICAL.
- UNKNOWN: If any one of the following conditions is true:
- The load balancer life cycle state is not ACTIVE.
- No backend sets are defined for the load balancer.
- More than half of the backend sets associated with the load balancer return a status of UNKNOWN, none of the backend sets return a status ofWARNINGorCRITICAL, and the load balancer life cycle state isACTIVE.
- The system could not retrieve metrics for any reason.
 
- OK: All backend sets associated with the load balancer return a status of 
- totalBackend NumberSet Count 
- The total number of backend sets associated with this load balancer. Example: 4
- unknownState List<String>Backend Set Names 
- A list of backend sets that are currently in the UNKNOWNhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set2
- warningState List<String>Backend Set Names 
- A list of backend sets that are currently in the WARNINGhealth state. The list identifies each backend set by the friendly name you assigned when you created it. Example:example_backend_set3
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.