gcp.compute.getHealthCheck
Explore with Pulumi AI
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:
getHealthCheck Result
The following output properties are available:
- Check
Interval intSec - Creation
Timestamp string - Description string
- Grpc
Health List<GetChecks Health Check Grpc Health Check> - Healthy
Threshold int - Http2Health
Checks List<GetHealth Check Http2Health Check> - Http
Health List<GetChecks Health Check Http Health Check> - Https
Health List<GetChecks Health Check Https Health Check> - Id string
The provider-assigned unique ID for this managed resource.
- Log
Configs List<GetHealth Check Log Config> - Name string
- Self
Link string - Ssl
Health List<GetChecks Health Check Ssl Health Check> - Tcp
Health List<GetChecks Health Check Tcp Health Check> - Timeout
Sec int - Type string
- Unhealthy
Threshold int - Project string
- Check
Interval intSec - Creation
Timestamp string - Description string
- Grpc
Health []GetChecks Health Check Grpc Health Check - Healthy
Threshold int - Http2Health
Checks []GetHealth Check Http2Health Check - Http
Health []GetChecks Health Check Http Health Check - Https
Health []GetChecks Health Check Https Health Check - Id string
The provider-assigned unique ID for this managed resource.
- Log
Configs []GetHealth Check Log Config - Name string
- Self
Link string - Ssl
Health []GetChecks Health Check Ssl Health Check - Tcp
Health []GetChecks Health Check Tcp Health Check - Timeout
Sec int - Type string
- Unhealthy
Threshold int - Project string
- check
Interval IntegerSec - creation
Timestamp String - description String
- grpc
Health List<GetChecks Health Check Grpc Health Check> - healthy
Threshold Integer - http2Health
Checks List<GetHealth Check Http2Health Check> - http
Health List<GetChecks Health Check Http Health Check> - https
Health List<GetChecks Health Check Https Health Check> - id String
The provider-assigned unique ID for this managed resource.
- log
Configs List<GetHealth Check Log Config> - name String
- self
Link String - ssl
Health List<GetChecks Health Check Ssl Health Check> - tcp
Health List<GetChecks Health Check Tcp Health Check> - timeout
Sec Integer - type String
- unhealthy
Threshold Integer - project String
- check
Interval numberSec - creation
Timestamp string - description string
- grpc
Health GetChecks Health Check Grpc Health Check[] - healthy
Threshold number - http2Health
Checks GetHealth Check Http2Health Check[] - http
Health GetChecks Health Check Http Health Check[] - https
Health GetChecks Health Check Https Health Check[] - id string
The provider-assigned unique ID for this managed resource.
- log
Configs GetHealth Check Log Config[] - name string
- self
Link string - ssl
Health GetChecks Health Check Ssl Health Check[] - tcp
Health GetChecks Health Check Tcp Health Check[] - timeout
Sec number - type string
- unhealthy
Threshold number - project string
- check_
interval_ intsec - creation_
timestamp str - description str
- grpc_
health_ Sequence[Getchecks Health Check Grpc Health Check] - healthy_
threshold int - http2_
health_ Sequence[Getchecks Health Check Http2Health Check] - http_
health_ Sequence[Getchecks Health Check Http Health Check] - https_
health_ Sequence[Getchecks Health Check Https Health Check] - id str
The provider-assigned unique ID for this managed resource.
- log_
configs Sequence[GetHealth Check Log Config] - name str
- self_
link str - ssl_
health_ Sequence[Getchecks Health Check Ssl Health Check] - tcp_
health_ Sequence[Getchecks Health Check Tcp Health Check] - timeout_
sec int - type str
- unhealthy_
threshold int - project str
- check
Interval NumberSec - creation
Timestamp String - description String
- grpc
Health List<Property Map>Checks - healthy
Threshold Number - http2Health
Checks List<Property Map> - http
Health List<Property Map>Checks - https
Health List<Property Map>Checks - id String
The provider-assigned unique ID for this managed resource.
- log
Configs List<Property Map> - name String
- self
Link String - ssl
Health List<Property Map>Checks - tcp
Health List<Property Map>Checks - timeout
Sec Number - type String
- unhealthy
Threshold Number - project String
Supporting Types
GetHealthCheckGrpcHealthCheck
- Grpc
Service stringName - Port int
- Port
Name string - Port
Specification string
- Grpc
Service stringName - Port int
- Port
Name string - Port
Specification string
- grpc
Service StringName - port Integer
- port
Name String - port
Specification String
- grpc
Service stringName - port number
- port
Name string - port
Specification string
- grpc_
service_ strname - port int
- port_
name str - port_
specification str
- grpc
Service StringName - port Number
- port
Name String - port
Specification String
GetHealthCheckHttp2HealthCheck
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- host String
- port Integer
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
- host string
- port number
- port
Name string - port
Specification string - proxy
Header string - request
Path string - response string
- host str
- port int
- port_
name str - port_
specification str - proxy_
header str - request_
path str - response str
- host String
- port Number
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
GetHealthCheckHttpHealthCheck
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- host String
- port Integer
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
- host string
- port number
- port
Name string - port
Specification string - proxy
Header string - request
Path string - response string
- host str
- port int
- port_
name str - port_
specification str - proxy_
header str - request_
path str - response str
- host String
- port Number
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
GetHealthCheckHttpsHealthCheck
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- Host string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request
Path string - Response string
- host String
- port Integer
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
- host string
- port number
- port
Name string - port
Specification string - proxy
Header string - request
Path string - response string
- host str
- port int
- port_
name str - port_
specification str - proxy_
header str - request_
path str - response str
- host String
- port Number
- port
Name String - port
Specification String - proxy
Header String - request
Path String - response String
GetHealthCheckLogConfig
- Enable bool
- Enable bool
- enable Boolean
- enable boolean
- enable bool
- enable Boolean
GetHealthCheckSslHealthCheck
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request string
- Response string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request string
- Response string
- port Integer
- port
Name String - port
Specification String - proxy
Header String - request String
- response String
- port number
- port
Name string - port
Specification string - proxy
Header string - request string
- response string
- port int
- port_
name str - port_
specification str - proxy_
header str - request str
- response str
- port Number
- port
Name String - port
Specification String - proxy
Header String - request String
- response String
GetHealthCheckTcpHealthCheck
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request string
- Response string
- Port int
- Port
Name string - Port
Specification string - Proxy
Header string - Request string
- Response string
- port Integer
- port
Name String - port
Specification String - proxy
Header String - request String
- response String
- port number
- port
Name string - port
Specification string - proxy
Header string - request string
- response string
- port int
- port_
name str - port_
specification str - proxy_
header str - request str
- response str
- port Number
- port
Name String - port
Specification String - proxy
Header 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.