1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. getBackendHealth
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.LoadBalancer.getBackendHealth

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

This data source provides details about a specific Backend Health resource in Oracle Cloud Infrastructure Load Balancer service.

Gets the current health status of the specified backend server.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testBackendHealth = oci.LoadBalancer.getBackendHealth({
    backendName: testBackend.name,
    backendSetName: testBackendSet.name,
    loadBalancerId: testLoadBalancer.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_backend_health = oci.LoadBalancer.get_backend_health(backend_name=test_backend["name"],
    backend_set_name=test_backend_set["name"],
    load_balancer_id=test_load_balancer["id"])
Copy
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.GetBackendHealth(ctx, &loadbalancer.GetBackendHealthArgs{
			BackendName:    testBackend.Name,
			BackendSetName: testBackendSet.Name,
			LoadBalancerId: testLoadBalancer.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testBackendHealth = Oci.LoadBalancer.GetBackendHealth.Invoke(new()
    {
        BackendName = testBackend.Name,
        BackendSetName = testBackendSet.Name,
        LoadBalancerId = testLoadBalancer.Id,
    });

});
Copy
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.GetBackendHealthArgs;
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 testBackendHealth = LoadBalancerFunctions.getBackendHealth(GetBackendHealthArgs.builder()
            .backendName(testBackend.name())
            .backendSetName(testBackendSet.name())
            .loadBalancerId(testLoadBalancer.id())
            .build());

    }
}
Copy
variables:
  testBackendHealth:
    fn::invoke:
      function: oci:LoadBalancer:getBackendHealth
      arguments:
        backendName: ${testBackend.name}
        backendSetName: ${testBackendSet.name}
        loadBalancerId: ${testLoadBalancer.id}
Copy

Using getBackendHealth

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 getBackendHealth(args: GetBackendHealthArgs, opts?: InvokeOptions): Promise<GetBackendHealthResult>
function getBackendHealthOutput(args: GetBackendHealthOutputArgs, opts?: InvokeOptions): Output<GetBackendHealthResult>
Copy
def get_backend_health(backend_name: Optional[str] = None,
                       backend_set_name: Optional[str] = None,
                       load_balancer_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetBackendHealthResult
def get_backend_health_output(backend_name: Optional[pulumi.Input[str]] = None,
                       backend_set_name: Optional[pulumi.Input[str]] = None,
                       load_balancer_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetBackendHealthResult]
Copy
func GetBackendHealth(ctx *Context, args *GetBackendHealthArgs, opts ...InvokeOption) (*GetBackendHealthResult, error)
func GetBackendHealthOutput(ctx *Context, args *GetBackendHealthOutputArgs, opts ...InvokeOption) GetBackendHealthResultOutput
Copy

> Note: This function is named GetBackendHealth in the Go SDK.

public static class GetBackendHealth 
{
    public static Task<GetBackendHealthResult> InvokeAsync(GetBackendHealthArgs args, InvokeOptions? opts = null)
    public static Output<GetBackendHealthResult> Invoke(GetBackendHealthInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBackendHealthResult> getBackendHealth(GetBackendHealthArgs args, InvokeOptions options)
public static Output<GetBackendHealthResult> getBackendHealth(GetBackendHealthArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:LoadBalancer/getBackendHealth:getBackendHealth
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BackendName This property is required. string
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
BackendSetName This property is required. string
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
LoadBalancerId This property is required. string
The OCID of the load balancer associated with the backend server health status to be retrieved.
BackendName This property is required. string
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
BackendSetName This property is required. string
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
LoadBalancerId This property is required. string
The OCID of the load balancer associated with the backend server health status to be retrieved.
backendName This property is required. String
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
backendSetName This property is required. String
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
loadBalancerId This property is required. String
The OCID of the load balancer associated with the backend server health status to be retrieved.
backendName This property is required. string
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
backendSetName This property is required. string
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
loadBalancerId This property is required. string
The OCID of the load balancer associated with the backend server health status to be retrieved.
backend_name This property is required. str
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
backend_set_name This property is required. str
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
load_balancer_id This property is required. str
The OCID of the load balancer associated with the backend server health status to be retrieved.
backendName This property is required. String
The IP address and port of the backend server to retrieve the health status for. Example: 10.0.0.3:8080
backendSetName This property is required. String
The name of the backend set associated with the backend server to retrieve the health status for. Example: example_backend_set
loadBalancerId This property is required. String
The OCID of the load balancer associated with the backend server health status to be retrieved.

getBackendHealth Result

The following output properties are available:

BackendName string
BackendSetName string
HealthCheckResults List<GetBackendHealthHealthCheckResult>
A list of the most recent health check results returned for the specified backend server.
Id string
The provider-assigned unique ID for this managed resource.
LoadBalancerId string
Status string
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.
BackendName string
BackendSetName string
HealthCheckResults []GetBackendHealthHealthCheckResult
A list of the most recent health check results returned for the specified backend server.
Id string
The provider-assigned unique ID for this managed resource.
LoadBalancerId string
Status string
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.
backendName String
backendSetName String
healthCheckResults List<GetBackendHealthHealthCheckResult>
A list of the most recent health check results returned for the specified backend server.
id String
The provider-assigned unique ID for this managed resource.
loadBalancerId String
status String
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.
backendName string
backendSetName string
healthCheckResults GetBackendHealthHealthCheckResult[]
A list of the most recent health check results returned for the specified backend server.
id string
The provider-assigned unique ID for this managed resource.
loadBalancerId string
status string
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.
backend_name str
backend_set_name str
health_check_results Sequence[loadbalancer.GetBackendHealthHealthCheckResult]
A list of the most recent health check results returned for the specified backend server.
id str
The provider-assigned unique ID for this managed resource.
load_balancer_id str
status str
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.
backendName String
backendSetName String
healthCheckResults List<Property Map>
A list of the most recent health check results returned for the specified backend server.
id String
The provider-assigned unique ID for this managed resource.
loadBalancerId String
status String
The general health status of the specified backend server as reported by the primary and standby load balancers.

  • OK: Both health checks returned OK.
  • WARNING: One health check returned OK and one did not.
  • CRITICAL: Neither health check returned OK.
  • UNKNOWN: One or both health checks returned UNKNOWN, or the system was unable to retrieve metrics at this time.

Supporting Types

GetBackendHealthHealthCheckResult

HealthCheckStatus This property is required. string
The result of the most recent health check.
SourceIpAddress This property is required. string
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
SubnetId This property is required. string
The OCID of the subnet hosting the load balancer that reported this health check status.
Timestamp This property is required. string
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00
HealthCheckStatus This property is required. string
The result of the most recent health check.
SourceIpAddress This property is required. string
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
SubnetId This property is required. string
The OCID of the subnet hosting the load balancer that reported this health check status.
Timestamp This property is required. string
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00
healthCheckStatus This property is required. String
The result of the most recent health check.
sourceIpAddress This property is required. String
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
subnetId This property is required. String
The OCID of the subnet hosting the load balancer that reported this health check status.
timestamp This property is required. String
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00
healthCheckStatus This property is required. string
The result of the most recent health check.
sourceIpAddress This property is required. string
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
subnetId This property is required. string
The OCID of the subnet hosting the load balancer that reported this health check status.
timestamp This property is required. string
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00
health_check_status This property is required. str
The result of the most recent health check.
source_ip_address This property is required. str
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
subnet_id This property is required. str
The OCID of the subnet hosting the load balancer that reported this health check status.
timestamp This property is required. str
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00
healthCheckStatus This property is required. String
The result of the most recent health check.
sourceIpAddress This property is required. String
The IP address of the health check status report provider. This identifier helps you differentiate same-subnet load balancers that report health check status. Example: 10.0.0.7
subnetId This property is required. String
The OCID of the subnet hosting the load balancer that reported this health check status.
timestamp This property is required. String
The date and time the data was retrieved, in the format defined by RFC3339. Example: 2017-06-02T18:28:11+00:00

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi