1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkLoadBalancer
  5. getBackendHealth
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.NetworkLoadBalancer.getBackendHealth

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

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

    Retrieves 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.NetworkLoadBalancer.getBackendHealth({
        backendName: testBackend.name,
        backendSetName: testBackendSet.name,
        networkLoadBalancerId: testNetworkLoadBalancer.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_backend_health = oci.NetworkLoadBalancer.get_backend_health(backend_name=test_backend["name"],
        backend_set_name=test_backend_set["name"],
        network_load_balancer_id=test_network_load_balancer["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/NetworkLoadBalancer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := NetworkLoadBalancer.GetBackendHealth(ctx, &networkloadbalancer.GetBackendHealthArgs{
    			BackendName:           testBackend.Name,
    			BackendSetName:        testBackendSet.Name,
    			NetworkLoadBalancerId: testNetworkLoadBalancer.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 testBackendHealth = Oci.NetworkLoadBalancer.GetBackendHealth.Invoke(new()
        {
            BackendName = testBackend.Name,
            BackendSetName = testBackendSet.Name,
            NetworkLoadBalancerId = testNetworkLoadBalancer.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.NetworkLoadBalancer.NetworkLoadBalancerFunctions;
    import com.pulumi.oci.NetworkLoadBalancer.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 = NetworkLoadBalancerFunctions.getBackendHealth(GetBackendHealthArgs.builder()
                .backendName(testBackend.name())
                .backendSetName(testBackendSet.name())
                .networkLoadBalancerId(testNetworkLoadBalancer.id())
                .build());
    
        }
    }
    
    variables:
      testBackendHealth:
        fn::invoke:
          Function: oci:NetworkLoadBalancer:getBackendHealth
          Arguments:
            backendName: ${testBackend.name}
            backendSetName: ${testBackendSet.name}
            networkLoadBalancerId: ${testNetworkLoadBalancer.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,
                           network_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,
                           network_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:NetworkLoadBalancer/getBackendHealth:getBackendHealth
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackendName string
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    BackendSetName string
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    BackendName string
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    BackendSetName string
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    NetworkLoadBalancerId string
    The OCID of the network load balancer to update.
    backendName String
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    backendSetName String
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    networkLoadBalancerId String
    The OCID of the network load balancer to update.
    backendName string
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    backendSetName string
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    networkLoadBalancerId string
    The OCID of the network load balancer to update.
    backend_name str
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    backend_set_name str
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    network_load_balancer_id str
    The OCID of the network load balancer to update.
    backendName String
    The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as :. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as :. Example: 10.0.0.3:8080 or ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080
    backendSetName String
    The name of the backend set associated with the backend server for which to retrieve the health status. Example: example_backend_set
    networkLoadBalancerId String
    The OCID of the network load balancer to update.

    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.
    NetworkLoadBalancerId string
    Status string
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is 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.
    NetworkLoadBalancerId string
    Status string
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is 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.
    networkLoadBalancerId String
    status String
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is 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.
    networkLoadBalancerId string
    status string
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is unable to retrieve metrics at this time.
    backend_name str
    backend_set_name str
    health_check_results Sequence[networkloadbalancer.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.
    network_load_balancer_id str
    status str
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is 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.
    networkLoadBalancerId String
    status String
    The general health status of the specified backend server.

    • OK: All health check probes return OK
    • WARNING: At least one of the health check probes does not return OK
    • CRITICAL: None of the health check probes return OK. *
    • UNKNOWN: One of the health checks probes return UNKNOWN,
    • or the system is unable to retrieve metrics at this time.

    Supporting Types

    GetBackendHealthHealthCheckResult

    HealthCheckStatus string
    The result of the most recent health check.
    Timestamp string
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18:28:11+00:00
    HealthCheckStatus string
    The result of the most recent health check.
    Timestamp string
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18:28:11+00:00
    healthCheckStatus String
    The result of the most recent health check.
    timestamp String
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18:28:11+00:00
    healthCheckStatus string
    The result of the most recent health check.
    timestamp string
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18:28:11+00:00
    health_check_status str
    The result of the most recent health check.
    timestamp str
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18:28:11+00:00
    healthCheckStatus String
    The result of the most recent health check.
    timestamp String
    The date and time the data was retrieved, in the format defined by RFC3339. Example: 2020-05-01T18: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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi