spotinst.HealthCheck
Explore with Pulumi AI
Provides a Spotinst Health Check resource.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SpotInst = Pulumi.SpotInst;
return await Deployment.RunAsync(() =>
{
var httpCheck = new SpotInst.HealthCheck("httpCheck", new()
{
Check = new SpotInst.Inputs.HealthCheckCheckArgs
{
Endpoint = "http://endpoint.com",
Healthy = 1,
Interval = 10,
Port = 1337,
Protocol = "http",
Timeout = 10,
Unhealthy = 1,
},
ProxyAddress = "http://proxy.com",
ProxyPort = 80,
ResourceId = "sig-123",
});
});
package main
import (
"github.com/pulumi/pulumi-spotinst/sdk/v3/go/spotinst"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := spotinst.NewHealthCheck(ctx, "httpCheck", &spotinst.HealthCheckArgs{
Check: &spotinst.HealthCheckCheckArgs{
Endpoint: pulumi.String("http://endpoint.com"),
Healthy: pulumi.Int(1),
Interval: pulumi.Int(10),
Port: pulumi.Int(1337),
Protocol: pulumi.String("http"),
Timeout: pulumi.Int(10),
Unhealthy: pulumi.Int(1),
},
ProxyAddress: pulumi.String("http://proxy.com"),
ProxyPort: pulumi.Int(80),
ResourceId: pulumi.String("sig-123"),
})
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.spotinst.HealthCheck;
import com.pulumi.spotinst.HealthCheckArgs;
import com.pulumi.spotinst.inputs.HealthCheckCheckArgs;
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) {
var httpCheck = new HealthCheck("httpCheck", HealthCheckArgs.builder()
.check(HealthCheckCheckArgs.builder()
.endpoint("http://endpoint.com")
.healthy(1)
.interval(10)
.port(1337)
.protocol("http")
.timeout(10)
.unhealthy(1)
.build())
.proxyAddress("http://proxy.com")
.proxyPort(80)
.resourceId("sig-123")
.build());
}
}
import pulumi
import pulumi_spotinst as spotinst
http_check = spotinst.HealthCheck("httpCheck",
check=spotinst.HealthCheckCheckArgs(
endpoint="http://endpoint.com",
healthy=1,
interval=10,
port=1337,
protocol="http",
timeout=10,
unhealthy=1,
),
proxy_address="http://proxy.com",
proxy_port=80,
resource_id="sig-123")
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";
const httpCheck = new spotinst.HealthCheck("httpCheck", {
check: {
endpoint: "http://endpoint.com",
healthy: 1,
interval: 10,
port: 1337,
protocol: "http",
timeout: 10,
unhealthy: 1,
},
proxyAddress: "http://proxy.com",
proxyPort: 80,
resourceId: "sig-123",
});
resources:
httpCheck:
type: spotinst:HealthCheck
properties:
check:
endpoint: http://endpoint.com
healthy: 1
interval: 10
port: 1337
protocol: http
timeout: 10
unhealthy: 1
proxyAddress: http://proxy.com
proxyPort: 80
resourceId: sig-123
Create HealthCheck Resource
new HealthCheck(name: string, args: HealthCheckArgs, opts?: CustomResourceOptions);
@overload
def HealthCheck(resource_name: str,
opts: Optional[ResourceOptions] = None,
check: Optional[HealthCheckCheckArgs] = None,
name: Optional[str] = None,
proxy_address: Optional[str] = None,
proxy_port: Optional[int] = None,
resource_id: Optional[str] = None)
@overload
def HealthCheck(resource_name: str,
args: HealthCheckArgs,
opts: Optional[ResourceOptions] = None)
func NewHealthCheck(ctx *Context, name string, args HealthCheckArgs, opts ...ResourceOption) (*HealthCheck, error)
public HealthCheck(string name, HealthCheckArgs args, CustomResourceOptions? opts = null)
public HealthCheck(String name, HealthCheckArgs args)
public HealthCheck(String name, HealthCheckArgs args, CustomResourceOptions options)
type: spotinst:HealthCheck
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HealthCheckArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HealthCheckArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HealthCheckArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HealthCheckArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HealthCheckArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
HealthCheck Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The HealthCheck resource accepts the following input properties:
- Proxy
Address string - Resource
Id string The ID of the resource to check.
- Check
Pulumi.
Spot Inst. Inputs. Health Check Check Args Describes the check to execute.
- Name string
The name of the health check.
- Proxy
Port int
- Proxy
Address string - Resource
Id string The ID of the resource to check.
- Check
Health
Check Check Args Describes the check to execute.
- Name string
The name of the health check.
- Proxy
Port int
- proxy
Address String - resource
Id String The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name String
The name of the health check.
- proxy
Port Integer
- proxy
Address string - resource
Id string The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name string
The name of the health check.
- proxy
Port number
- proxy_
address str - resource_
id str The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name str
The name of the health check.
- proxy_
port int
- proxy
Address String - resource
Id String The ID of the resource to check.
- check Property Map
Describes the check to execute.
- name String
The name of the health check.
- proxy
Port Number
Outputs
All input properties are implicitly available as output properties. Additionally, the HealthCheck resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing HealthCheck Resource
Get an existing HealthCheck resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HealthCheckState, opts?: CustomResourceOptions): HealthCheck
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
check: Optional[HealthCheckCheckArgs] = None,
name: Optional[str] = None,
proxy_address: Optional[str] = None,
proxy_port: Optional[int] = None,
resource_id: Optional[str] = None) -> HealthCheck
func GetHealthCheck(ctx *Context, name string, id IDInput, state *HealthCheckState, opts ...ResourceOption) (*HealthCheck, error)
public static HealthCheck Get(string name, Input<string> id, HealthCheckState? state, CustomResourceOptions? opts = null)
public static HealthCheck get(String name, Output<String> id, HealthCheckState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Check
Pulumi.
Spot Inst. Inputs. Health Check Check Args Describes the check to execute.
- Name string
The name of the health check.
- Proxy
Address string - Proxy
Port int - Resource
Id string The ID of the resource to check.
- Check
Health
Check Check Args Describes the check to execute.
- Name string
The name of the health check.
- Proxy
Address string - Proxy
Port int - Resource
Id string The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name String
The name of the health check.
- proxy
Address String - proxy
Port Integer - resource
Id String The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name string
The name of the health check.
- proxy
Address string - proxy
Port number - resource
Id string The ID of the resource to check.
- check
Health
Check Check Args Describes the check to execute.
- name str
The name of the health check.
- proxy_
address str - proxy_
port int - resource_
id str The ID of the resource to check.
- check Property Map
Describes the check to execute.
- name String
The name of the health check.
- proxy
Address String - proxy
Port Number - resource
Id String The ID of the resource to check.
Supporting Types
HealthCheckCheck
- Healthy int
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- Interval int
The amount of time (in seconds) between each health check (minimum: 10).
- Port int
The port of the Spotinst HCS (default: 80).
- Protocol string
The protocol to use to connect with the instance. Valid values: http, https.
- Unhealthy int
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- End
Point string - Endpoint string
The destination for the request.
- Time
Out int - Timeout int
the amount of time (in seconds) to wait when receiving a response from the health check.
- Healthy int
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- Interval int
The amount of time (in seconds) between each health check (minimum: 10).
- Port int
The port of the Spotinst HCS (default: 80).
- Protocol string
The protocol to use to connect with the instance. Valid values: http, https.
- Unhealthy int
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- End
Point string - Endpoint string
The destination for the request.
- Time
Out int - Timeout int
the amount of time (in seconds) to wait when receiving a response from the health check.
- healthy Integer
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- interval Integer
The amount of time (in seconds) between each health check (minimum: 10).
- port Integer
The port of the Spotinst HCS (default: 80).
- protocol String
The protocol to use to connect with the instance. Valid values: http, https.
- unhealthy Integer
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- end
Point String - endpoint String
The destination for the request.
- time
Out Integer - timeout Integer
the amount of time (in seconds) to wait when receiving a response from the health check.
- healthy number
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- interval number
The amount of time (in seconds) between each health check (minimum: 10).
- port number
The port of the Spotinst HCS (default: 80).
- protocol string
The protocol to use to connect with the instance. Valid values: http, https.
- unhealthy number
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- end
Point string - endpoint string
The destination for the request.
- time
Out number - timeout number
the amount of time (in seconds) to wait when receiving a response from the health check.
- healthy int
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- interval int
The amount of time (in seconds) between each health check (minimum: 10).
- port int
The port of the Spotinst HCS (default: 80).
- protocol str
The protocol to use to connect with the instance. Valid values: http, https.
- unhealthy int
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- end_
point str - endpoint str
The destination for the request.
- time_
out int - timeout int
the amount of time (in seconds) to wait when receiving a response from the health check.
- healthy Number
The number of consecutive successful health checks that must occur before declaring an instance healthy.
- interval Number
The amount of time (in seconds) between each health check (minimum: 10).
- port Number
The port of the Spotinst HCS (default: 80).
- protocol String
The protocol to use to connect with the instance. Valid values: http, https.
- unhealthy Number
The number of consecutive failed health checks that must occur before declaring an instance unhealthy.
- end
Point String - endpoint String
The destination for the request.
- time
Out Number - timeout Number
the amount of time (in seconds) to wait when receiving a response from the health check.
Package Details
- Repository
- Spotinst pulumi/pulumi-spotinst
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
spotinst
Terraform Provider.