Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

getHealthCheck

Get information about a HealthCheck.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var healthCheck = Output.Create(Gcp.Compute.GetHealthCheck.InvokeAsync(new Gcp.Compute.GetHealthCheckArgs
        {
            Name = "my-hc",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.LookupHealthCheck(ctx, &compute.LookupHealthCheckArgs{
			Name: "my-hc",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var healthCheck = Output.of(ComputeFunctions.getHealthCheck(GetHealthCheckArgs.builder()
            .name("my-hc")
            .build()));

        }
}
import pulumi
import pulumi_gcp as gcp

health_check = gcp.compute.get_health_check(name="my-hc")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const healthCheck = pulumi.output(gcp.compute.getHealthCheck({
    name: "my-hc",
}));
variables:
  healthCheck:
    Fn::Invoke:
      Function: gcp:compute:getHealthCheck
      Arguments:
        name: my-hc

Using getHealthCheck

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 getHealthCheck(args: GetHealthCheckArgs, opts?: InvokeOptions): Promise<GetHealthCheckResult>
function getHealthCheckOutput(args: GetHealthCheckOutputArgs, opts?: InvokeOptions): Output<GetHealthCheckResult>
def get_health_check(name: Optional[str] = None,
                     project: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetHealthCheckResult
def get_health_check_output(name: Optional[pulumi.Input[str]] = None,
                     project: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetHealthCheckResult]
func LookupHealthCheck(ctx *Context, args *LookupHealthCheckArgs, opts ...InvokeOption) (*LookupHealthCheckResult, error)
func LookupHealthCheckOutput(ctx *Context, args *LookupHealthCheckOutputArgs, opts ...InvokeOption) LookupHealthCheckResultOutput

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

public static class GetHealthCheck 
{
    public static Task<GetHealthCheckResult> InvokeAsync(GetHealthCheckArgs args, InvokeOptions? opts = null)
    public static Output<GetHealthCheckResult> Invoke(GetHealthCheckInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHealthCheckResult> getHealthCheck(GetHealthCheckArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gcp:compute/getHealthCheck:getHealthCheck
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

Name of the resource.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Name string

Name of the resource.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

name String

Name of the resource.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

name string

Name of the resource.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

name str

Name of the resource.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

name String

Name of the resource.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

getHealthCheck Result

The following output properties are available:

Supporting Types

GetHealthCheckGrpcHealthCheck

GetHealthCheckHttp2HealthCheck

Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
host String
port Integer
portName String
portSpecification String
proxyHeader String
requestPath String
response String
host string
port number
portName string
portSpecification string
proxyHeader string
requestPath string
response string
host String
port Number
portName String
portSpecification String
proxyHeader String
requestPath String
response String

GetHealthCheckHttpHealthCheck

Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
host String
port Integer
portName String
portSpecification String
proxyHeader String
requestPath String
response String
host string
port number
portName string
portSpecification string
proxyHeader string
requestPath string
response string
host String
port Number
portName String
portSpecification String
proxyHeader String
requestPath String
response String

GetHealthCheckHttpsHealthCheck

Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
Host string
Port int
PortName string
PortSpecification string
ProxyHeader string
RequestPath string
Response string
host String
port Integer
portName String
portSpecification String
proxyHeader String
requestPath String
response String
host string
port number
portName string
portSpecification string
proxyHeader string
requestPath string
response string
host String
port Number
portName String
portSpecification String
proxyHeader String
requestPath String
response String

GetHealthCheckLogConfig

Enable bool
Enable bool
enable Boolean
enable boolean
enable bool
enable Boolean

GetHealthCheckSslHealthCheck

Port int
PortName string
PortSpecification string
ProxyHeader string
Request string
Response string
Port int
PortName string
PortSpecification string
ProxyHeader string
Request string
Response string
port Integer
portName String
portSpecification String
proxyHeader String
request String
response String
port number
portName string
portSpecification string
proxyHeader string
request string
response string
port Number
portName String
portSpecification String
proxyHeader String
request String
response String

GetHealthCheckTcpHealthCheck

Port int
PortName string
PortSpecification string
ProxyHeader string
Request string
Response string
Port int
PortName string
PortSpecification string
ProxyHeader string
Request string
Response string
port Integer
portName String
portSpecification String
proxyHeader String
request String
response String
port number
portName string
portSpecification string
proxyHeader string
request string
response string
port Number
portName String
portSpecification String
proxyHeader String
request String
response String

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.