1. Packages
  2. Spotinst Provider
  3. API Docs
  4. HealthCheck
Spotinst v3.100.0 published on Wednesday, Nov 20, 2024 by Pulumi

spotinst.HealthCheck

Explore with Pulumi AI

spotinst logo
Spotinst v3.100.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Provides a Spotinst Health Check resource.

    Example Usage

    resource "spotinst_health_check" "http_check" {
      name        = "sample_health_check"
      resource_id = "sig-123"
    
      check {
        protocol = "http"
        endpoint = "http://endpoint.com"
        port     = 1337
        interval = 10
        timeout  = 10
        healthy   = 1
        unhealthy = 1
      }
    
        proxy_address = "http://proxy.com"
        proxy_port = 80
      
    }
    

    Create HealthCheck Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HealthCheck(name: string, args: HealthCheckArgs, opts?: CustomResourceOptions);
    @overload
    def HealthCheck(resource_name: str,
                    args: HealthCheckArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def HealthCheck(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    proxy_address: Optional[str] = None,
                    resource_id: Optional[str] = None,
                    check: Optional[HealthCheckCheckArgs] = None,
                    name: Optional[str] = None,
                    proxy_port: Optional[int] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var healthCheckResource = new SpotInst.HealthCheck("healthCheckResource", new()
    {
        ProxyAddress = "string",
        ResourceId = "string",
        Check = new SpotInst.Inputs.HealthCheckCheckArgs
        {
            Healthy = 0,
            Interval = 0,
            Port = 0,
            Protocol = "string",
            Unhealthy = 0,
            EndPoint = "string",
            Endpoint = "string",
            TimeOut = 0,
            Timeout = 0,
        },
        Name = "string",
        ProxyPort = 0,
    });
    
    example, err := spotinst.NewHealthCheck(ctx, "healthCheckResource", &spotinst.HealthCheckArgs{
    	ProxyAddress: pulumi.String("string"),
    	ResourceId:   pulumi.String("string"),
    	Check: &spotinst.HealthCheckCheckArgs{
    		Healthy:   pulumi.Int(0),
    		Interval:  pulumi.Int(0),
    		Port:      pulumi.Int(0),
    		Protocol:  pulumi.String("string"),
    		Unhealthy: pulumi.Int(0),
    		EndPoint:  pulumi.String("string"),
    		Endpoint:  pulumi.String("string"),
    		TimeOut:   pulumi.Int(0),
    		Timeout:   pulumi.Int(0),
    	},
    	Name:      pulumi.String("string"),
    	ProxyPort: pulumi.Int(0),
    })
    
    var healthCheckResource = new HealthCheck("healthCheckResource", HealthCheckArgs.builder()
        .proxyAddress("string")
        .resourceId("string")
        .check(HealthCheckCheckArgs.builder()
            .healthy(0)
            .interval(0)
            .port(0)
            .protocol("string")
            .unhealthy(0)
            .endPoint("string")
            .endpoint("string")
            .timeOut(0)
            .timeout(0)
            .build())
        .name("string")
        .proxyPort(0)
        .build());
    
    health_check_resource = spotinst.HealthCheck("healthCheckResource",
        proxy_address="string",
        resource_id="string",
        check={
            "healthy": 0,
            "interval": 0,
            "port": 0,
            "protocol": "string",
            "unhealthy": 0,
            "end_point": "string",
            "endpoint": "string",
            "time_out": 0,
            "timeout": 0,
        },
        name="string",
        proxy_port=0)
    
    const healthCheckResource = new spotinst.HealthCheck("healthCheckResource", {
        proxyAddress: "string",
        resourceId: "string",
        check: {
            healthy: 0,
            interval: 0,
            port: 0,
            protocol: "string",
            unhealthy: 0,
            endPoint: "string",
            endpoint: "string",
            timeOut: 0,
            timeout: 0,
        },
        name: "string",
        proxyPort: 0,
    });
    
    type: spotinst:HealthCheck
    properties:
        check:
            endPoint: string
            endpoint: string
            healthy: 0
            interval: 0
            port: 0
            protocol: string
            timeOut: 0
            timeout: 0
            unhealthy: 0
        name: string
        proxyAddress: string
        proxyPort: 0
        resourceId: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The HealthCheck resource accepts the following input properties:

    ProxyAddress string
    ResourceId string
    The ID of the resource to check.
    Check Pulumi.SpotInst.Inputs.HealthCheckCheck
    Describes the check to execute.
    Name string
    The name of the health check.
    ProxyPort int
    ProxyAddress string
    ResourceId string
    The ID of the resource to check.
    Check HealthCheckCheckArgs
    Describes the check to execute.
    Name string
    The name of the health check.
    ProxyPort int
    proxyAddress String
    resourceId String
    The ID of the resource to check.
    check HealthCheckCheck
    Describes the check to execute.
    name String
    The name of the health check.
    proxyPort Integer
    proxyAddress string
    resourceId string
    The ID of the resource to check.
    check HealthCheckCheck
    Describes the check to execute.
    name string
    The name of the health check.
    proxyPort number
    proxy_address str
    resource_id str
    The ID of the resource to check.
    check HealthCheckCheckArgs
    Describes the check to execute.
    name str
    The name of the health check.
    proxy_port int
    proxyAddress String
    resourceId String
    The ID of the resource to check.
    check Property Map
    Describes the check to execute.
    name String
    The name of the health check.
    proxyPort 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.
    The following state arguments are supported:
    Check Pulumi.SpotInst.Inputs.HealthCheckCheck
    Describes the check to execute.
    Name string
    The name of the health check.
    ProxyAddress string
    ProxyPort int
    ResourceId string
    The ID of the resource to check.
    Check HealthCheckCheckArgs
    Describes the check to execute.
    Name string
    The name of the health check.
    ProxyAddress string
    ProxyPort int
    ResourceId string
    The ID of the resource to check.
    check HealthCheckCheck
    Describes the check to execute.
    name String
    The name of the health check.
    proxyAddress String
    proxyPort Integer
    resourceId String
    The ID of the resource to check.
    check HealthCheckCheck
    Describes the check to execute.
    name string
    The name of the health check.
    proxyAddress string
    proxyPort number
    resourceId string
    The ID of the resource to check.
    check HealthCheckCheckArgs
    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.
    proxyAddress String
    proxyPort Number
    resourceId String
    The ID of the resource to check.

    Supporting Types

    HealthCheckCheck, HealthCheckCheckArgs

    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 to use to connect with the instance.
    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.
    EndPoint string
    Endpoint string
    The destination for the request.
    TimeOut 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 to use to connect with the instance.
    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.
    EndPoint string
    Endpoint string
    The destination for the request.
    TimeOut 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 to use to connect with the instance.
    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.
    endPoint String
    endpoint String
    The destination for the request.
    timeOut 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 to use to connect with the instance.
    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.
    endPoint string
    endpoint string
    The destination for the request.
    timeOut 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 to use to connect with the instance.
    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 to use to connect with the instance.
    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.
    endPoint String
    endpoint String
    The destination for the request.
    timeOut 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.
    spotinst logo
    Spotinst v3.100.0 published on Wednesday, Nov 20, 2024 by Pulumi