oci.LoadBalancer.getBackendHealth
Explore with Pulumi AI
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
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 = oci_load_balancer_backend.Test_backend.Name,
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.GetBackendHealth(ctx, &loadbalancer.GetBackendHealthArgs{
BackendName: oci_load_balancer_backend.Test_backend.Name,
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
})
}
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(oci_load_balancer_backend.test_backend().name())
.backendSetName(oci_load_balancer_backend_set.test_backend_set().name())
.loadBalancerId(oci_load_balancer_load_balancer.test_load_balancer().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_backend_health = oci.LoadBalancer.get_backend_health(backend_name=oci_load_balancer_backend["test_backend"]["name"],
backend_set_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 testBackendHealth = oci.LoadBalancer.getBackendHealth({
backendName: oci_load_balancer_backend.test_backend.name,
backendSetName: oci_load_balancer_backend_set.test_backend_set.name,
loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
});
variables:
testBackendHealth:
fn::invoke:
Function: oci:LoadBalancer:getBackendHealth
Arguments:
backendName: ${oci_load_balancer_backend.test_backend.name}
backendSetName: ${oci_load_balancer_backend_set.test_backend_set.name}
loadBalancerId: ${oci_load_balancer_load_balancer.test_load_balancer.id}
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>
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]
func GetBackendHealth(ctx *Context, args *GetBackendHealthArgs, opts ...InvokeOption) (*GetBackendHealthResult, error)
func GetBackendHealthOutput(ctx *Context, args *GetBackendHealthOutputArgs, opts ...InvokeOption) GetBackendHealthResultOutput
> 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)
}
public static CompletableFuture<GetBackendHealthResult> getBackendHealth(GetBackendHealthArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:LoadBalancer/getBackendHealth:getBackendHealth
arguments:
# arguments dictionary
The following arguments are supported:
- Backend
Name string The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- Backend
Set stringName The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- Load
Balancer stringId The OCID of the load balancer associated with the backend server health status to be retrieved.
- Backend
Name string The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- Backend
Set stringName The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- Load
Balancer stringId The OCID of the load balancer associated with the backend server health status to be retrieved.
- backend
Name String The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- backend
Set StringName The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- load
Balancer StringId The OCID of the load balancer associated with the backend server health status to be retrieved.
- backend
Name string The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- backend
Set stringName The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- load
Balancer stringId The OCID of the load balancer associated with the backend server health status to be retrieved.
- backend_
name str The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- backend_
set_ strname The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- load_
balancer_ strid The OCID of the load balancer associated with the backend server health status to be retrieved.
- backend
Name String The IP address and port of the backend server to retrieve the health status for. Example:
10.0.0.3:8080
- backend
Set StringName The name of the backend set associated with the backend server to retrieve the health status for. Example:
example_backend_set
- load
Balancer StringId The OCID of the load balancer associated with the backend server health status to be retrieved.
getBackendHealth Result
The following output properties are available:
- Backend
Name string - Backend
Set stringName - Health
Check List<GetResults Backend Health Health Check Result> 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.
- Load
Balancer stringId - 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.
- OK: Both health checks returned
- Backend
Name string - Backend
Set stringName - Health
Check []GetResults Backend Health Health Check Result 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.
- Load
Balancer stringId - 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.
- OK: Both health checks returned
- backend
Name String - backend
Set StringName - health
Check List<GetResults Backend Health Health Check Result> 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.
- load
Balancer StringId - 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.
- OK: Both health checks returned
- backend
Name string - backend
Set stringName - health
Check GetResults Backend Health Health Check Result[] 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.
- load
Balancer stringId - 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.
- OK: Both health checks returned
- backend_
name str - backend_
set_ strname - health_
check_ Getresults Backend Health Health Check Result] 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_ strid - 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.
- OK: Both health checks returned
- backend
Name String - backend
Set StringName - health
Check List<Property Map>Results 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.
- load
Balancer StringId - 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.
- OK: Both health checks returned
Supporting Types
GetBackendHealthHealthCheckResult
- Health
Check stringStatus The result of the most recent health check.
- Source
Ip stringAddress 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 string The OCID of the subnet hosting the load balancer that reported this health check status.
- Timestamp 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 stringStatus The result of the most recent health check.
- Source
Ip stringAddress 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 string The OCID of the subnet hosting the load balancer that reported this health check status.
- Timestamp 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 StringStatus The result of the most recent health check.
- source
Ip StringAddress 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 String The OCID of the subnet hosting the load balancer that reported this health check status.
- timestamp 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 stringStatus The result of the most recent health check.
- source
Ip stringAddress 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 string The OCID of the subnet hosting the load balancer that reported this health check status.
- timestamp 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_ strstatus The result of the most recent health check.
- source_
ip_ straddress 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 str The OCID of the subnet hosting the load balancer that reported this health check status.
- timestamp str
The date and time the data was retrieved, in the format defined by RFC3339. Example:
2017-06-02T18:28:11+00:00
- health
Check StringStatus The result of the most recent health check.
- source
Ip StringAddress 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 String The OCID of the subnet hosting the load balancer that reported this health check status.
- timestamp 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.