1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getHealthCheck
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.compute.getHealthCheck

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    Get information about a HealthCheck.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var healthCheck = Gcp.Compute.GetHealthCheck.Invoke(new()
        {
            Name = "my-hc",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/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 com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetHealthCheckArgs;
    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 healthCheck = 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 = 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
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

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

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi