1. Packages
  2. Harness Provider
  3. API Docs
  4. autostopping
  5. RuleVm
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

harness.autostopping.RuleVm

Explore with Pulumi AI

Resource for creating a Harness Variables.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const test = new harness.autostopping.RuleVm("test", {
    name: "name",
    cloudConnectorId: "cloud_connector_id",
    idleTimeMins: 10,
    dryRun: true,
    filter: {
        vmIds: ["/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine"],
        regions: ["useast2"],
    },
    https: [{
        proxyId: "proxy_id",
        routings: [
            {
                sourceProtocol: "https",
                targetProtocol: "https",
                sourcePort: 443,
                targetPort: 443,
                action: "forward",
            },
            {
                sourceProtocol: "http",
                targetProtocol: "http",
                sourcePort: 80,
                targetPort: 80,
                action: "forward",
            },
        ],
        healths: [{
            protocol: "http",
            port: 80,
            path: "/",
            timeout: 30,
            statusCodeFrom: 200,
            statusCodeTo: 299,
        }],
    }],
    tcps: [{
        proxyId: "proxy_id",
        sshes: [{
            port: 22,
        }],
        rdps: [{
            port: 3389,
        }],
        forwardRules: [{
            port: 2233,
        }],
    }],
    depends: [{
        ruleId: 24576,
        delayInSec: 5,
    }],
});
Copy
import pulumi
import pulumi_harness as harness

test = harness.autostopping.RuleVm("test",
    name="name",
    cloud_connector_id="cloud_connector_id",
    idle_time_mins=10,
    dry_run=True,
    filter={
        "vm_ids": ["/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine"],
        "regions": ["useast2"],
    },
    https=[{
        "proxy_id": "proxy_id",
        "routings": [
            {
                "source_protocol": "https",
                "target_protocol": "https",
                "source_port": 443,
                "target_port": 443,
                "action": "forward",
            },
            {
                "source_protocol": "http",
                "target_protocol": "http",
                "source_port": 80,
                "target_port": 80,
                "action": "forward",
            },
        ],
        "healths": [{
            "protocol": "http",
            "port": 80,
            "path": "/",
            "timeout": 30,
            "status_code_from": 200,
            "status_code_to": 299,
        }],
    }],
    tcps=[{
        "proxy_id": "proxy_id",
        "sshes": [{
            "port": 22,
        }],
        "rdps": [{
            "port": 3389,
        }],
        "forward_rules": [{
            "port": 2233,
        }],
    }],
    depends=[{
        "rule_id": 24576,
        "delay_in_sec": 5,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/autostopping"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := autostopping.NewRuleVm(ctx, "test", &autostopping.RuleVmArgs{
			Name:             pulumi.String("name"),
			CloudConnectorId: pulumi.String("cloud_connector_id"),
			IdleTimeMins:     pulumi.Int(10),
			DryRun:           pulumi.Bool(true),
			Filter: &autostopping.RuleVmFilterArgs{
				VmIds: pulumi.StringArray{
					pulumi.String("/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine"),
				},
				Regions: pulumi.StringArray{
					pulumi.String("useast2"),
				},
			},
			Https: autostopping.RuleVmHttpArray{
				&autostopping.RuleVmHttpArgs{
					ProxyId: pulumi.String("proxy_id"),
					Routings: autostopping.RuleVmHttpRoutingArray{
						&autostopping.RuleVmHttpRoutingArgs{
							SourceProtocol: pulumi.String("https"),
							TargetProtocol: pulumi.String("https"),
							SourcePort:     pulumi.Int(443),
							TargetPort:     pulumi.Int(443),
							Action:         pulumi.String("forward"),
						},
						&autostopping.RuleVmHttpRoutingArgs{
							SourceProtocol: pulumi.String("http"),
							TargetProtocol: pulumi.String("http"),
							SourcePort:     pulumi.Int(80),
							TargetPort:     pulumi.Int(80),
							Action:         pulumi.String("forward"),
						},
					},
					Healths: autostopping.RuleVmHttpHealthArray{
						&autostopping.RuleVmHttpHealthArgs{
							Protocol:       pulumi.String("http"),
							Port:           pulumi.Int(80),
							Path:           pulumi.String("/"),
							Timeout:        pulumi.Int(30),
							StatusCodeFrom: pulumi.Int(200),
							StatusCodeTo:   pulumi.Int(299),
						},
					},
				},
			},
			Tcps: autostopping.RuleVmTcpArray{
				&autostopping.RuleVmTcpArgs{
					ProxyId: pulumi.String("proxy_id"),
					Sshes: autostopping.RuleVmTcpSshArray{
						&autostopping.RuleVmTcpSshArgs{
							Port: pulumi.Int(22),
						},
					},
					Rdps: autostopping.RuleVmTcpRdpArray{
						&autostopping.RuleVmTcpRdpArgs{
							Port: pulumi.Int(3389),
						},
					},
					ForwardRules: autostopping.RuleVmTcpForwardRuleArray{
						&autostopping.RuleVmTcpForwardRuleArgs{
							Port: pulumi.Int(2233),
						},
					},
				},
			},
			Depends: autostopping.RuleVmDependArray{
				&autostopping.RuleVmDependArgs{
					RuleId:     pulumi.Int(24576),
					DelayInSec: pulumi.Int(5),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var test = new Harness.Autostopping.RuleVm("test", new()
    {
        Name = "name",
        CloudConnectorId = "cloud_connector_id",
        IdleTimeMins = 10,
        DryRun = true,
        Filter = new Harness.Autostopping.Inputs.RuleVmFilterArgs
        {
            VmIds = new[]
            {
                "/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine",
            },
            Regions = new[]
            {
                "useast2",
            },
        },
        Https = new[]
        {
            new Harness.Autostopping.Inputs.RuleVmHttpArgs
            {
                ProxyId = "proxy_id",
                Routings = new[]
                {
                    new Harness.Autostopping.Inputs.RuleVmHttpRoutingArgs
                    {
                        SourceProtocol = "https",
                        TargetProtocol = "https",
                        SourcePort = 443,
                        TargetPort = 443,
                        Action = "forward",
                    },
                    new Harness.Autostopping.Inputs.RuleVmHttpRoutingArgs
                    {
                        SourceProtocol = "http",
                        TargetProtocol = "http",
                        SourcePort = 80,
                        TargetPort = 80,
                        Action = "forward",
                    },
                },
                Healths = new[]
                {
                    new Harness.Autostopping.Inputs.RuleVmHttpHealthArgs
                    {
                        Protocol = "http",
                        Port = 80,
                        Path = "/",
                        Timeout = 30,
                        StatusCodeFrom = 200,
                        StatusCodeTo = 299,
                    },
                },
            },
        },
        Tcps = new[]
        {
            new Harness.Autostopping.Inputs.RuleVmTcpArgs
            {
                ProxyId = "proxy_id",
                Sshes = new[]
                {
                    new Harness.Autostopping.Inputs.RuleVmTcpSshArgs
                    {
                        Port = 22,
                    },
                },
                Rdps = new[]
                {
                    new Harness.Autostopping.Inputs.RuleVmTcpRdpArgs
                    {
                        Port = 3389,
                    },
                },
                ForwardRules = new[]
                {
                    new Harness.Autostopping.Inputs.RuleVmTcpForwardRuleArgs
                    {
                        Port = 2233,
                    },
                },
            },
        },
        Depends = new[]
        {
            new Harness.Autostopping.Inputs.RuleVmDependArgs
            {
                RuleId = 24576,
                DelayInSec = 5,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.autostopping.RuleVm;
import com.pulumi.harness.autostopping.RuleVmArgs;
import com.pulumi.harness.autostopping.inputs.RuleVmFilterArgs;
import com.pulumi.harness.autostopping.inputs.RuleVmHttpArgs;
import com.pulumi.harness.autostopping.inputs.RuleVmTcpArgs;
import com.pulumi.harness.autostopping.inputs.RuleVmDependArgs;
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 test = new RuleVm("test", RuleVmArgs.builder()
            .name("name")
            .cloudConnectorId("cloud_connector_id")
            .idleTimeMins(10)
            .dryRun(true)
            .filter(RuleVmFilterArgs.builder()
                .vmIds("/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine")
                .regions("useast2")
                .build())
            .https(RuleVmHttpArgs.builder()
                .proxyId("proxy_id")
                .routings(                
                    RuleVmHttpRoutingArgs.builder()
                        .sourceProtocol("https")
                        .targetProtocol("https")
                        .sourcePort(443)
                        .targetPort(443)
                        .action("forward")
                        .build(),
                    RuleVmHttpRoutingArgs.builder()
                        .sourceProtocol("http")
                        .targetProtocol("http")
                        .sourcePort(80)
                        .targetPort(80)
                        .action("forward")
                        .build())
                .healths(RuleVmHttpHealthArgs.builder()
                    .protocol("http")
                    .port(80)
                    .path("/")
                    .timeout(30)
                    .statusCodeFrom(200)
                    .statusCodeTo(299)
                    .build())
                .build())
            .tcps(RuleVmTcpArgs.builder()
                .proxyId("proxy_id")
                .sshes(RuleVmTcpSshArgs.builder()
                    .port(22)
                    .build())
                .rdps(RuleVmTcpRdpArgs.builder()
                    .port(3389)
                    .build())
                .forwardRules(RuleVmTcpForwardRuleArgs.builder()
                    .port(2233)
                    .build())
                .build())
            .depends(RuleVmDependArgs.builder()
                .ruleId(24576)
                .delayInSec(5)
                .build())
            .build());

    }
}
Copy
resources:
  test:
    type: harness:autostopping:RuleVm
    properties:
      name: name
      cloudConnectorId: cloud_connector_id
      idleTimeMins: 10
      dryRun: true
      filter:
        vmIds:
          - /subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Compute/virtualMachines/virtual_machine
        regions:
          - useast2
      https:
        - proxyId: proxy_id
          routings:
            - sourceProtocol: https
              targetProtocol: https
              sourcePort: 443
              targetPort: 443
              action: forward
            - sourceProtocol: http
              targetProtocol: http
              sourcePort: 80
              targetPort: 80
              action: forward
          healths:
            - protocol: http
              port: 80
              path: /
              timeout: 30
              statusCodeFrom: 200
              statusCodeTo: 299
      tcps:
        - proxyId: proxy_id
          sshes:
            - port: 22
          rdps:
            - port: 3389
          forwardRules:
            - port: 2233
      depends:
        - ruleId: 24576
          delayInSec: 5
Copy

Create RuleVm Resource

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

Constructor syntax

new RuleVm(name: string, args: RuleVmArgs, opts?: CustomResourceOptions);
@overload
def RuleVm(resource_name: str,
           args: RuleVmArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def RuleVm(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           cloud_connector_id: Optional[str] = None,
           filter: Optional[RuleVmFilterArgs] = None,
           custom_domains: Optional[Sequence[str]] = None,
           depends: Optional[Sequence[RuleVmDependArgs]] = None,
           dry_run: Optional[bool] = None,
           https: Optional[Sequence[RuleVmHttpArgs]] = None,
           idle_time_mins: Optional[int] = None,
           name: Optional[str] = None,
           tcps: Optional[Sequence[RuleVmTcpArgs]] = None,
           use_spot: Optional[bool] = None)
func NewRuleVm(ctx *Context, name string, args RuleVmArgs, opts ...ResourceOption) (*RuleVm, error)
public RuleVm(string name, RuleVmArgs args, CustomResourceOptions? opts = null)
public RuleVm(String name, RuleVmArgs args)
public RuleVm(String name, RuleVmArgs args, CustomResourceOptions options)
type: harness:autostopping:RuleVm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RuleVmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RuleVmArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RuleVmArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RuleVmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RuleVmArgs
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 ruleVmResource = new Harness.Autostopping.RuleVm("ruleVmResource", new()
{
    CloudConnectorId = "string",
    Filter = new Harness.Autostopping.Inputs.RuleVmFilterArgs
    {
        VmIds = new[]
        {
            "string",
        },
        Regions = new[]
        {
            "string",
        },
        Tags = new[]
        {
            new Harness.Autostopping.Inputs.RuleVmFilterTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Zones = new[]
        {
            "string",
        },
    },
    CustomDomains = new[]
    {
        "string",
    },
    Depends = new[]
    {
        new Harness.Autostopping.Inputs.RuleVmDependArgs
        {
            RuleId = 0,
            DelayInSec = 0,
        },
    },
    DryRun = false,
    Https = new[]
    {
        new Harness.Autostopping.Inputs.RuleVmHttpArgs
        {
            ProxyId = "string",
            Healths = new[]
            {
                new Harness.Autostopping.Inputs.RuleVmHttpHealthArgs
                {
                    Port = 0,
                    Protocol = "string",
                    Path = "string",
                    StatusCodeFrom = 0,
                    StatusCodeTo = 0,
                    Timeout = 0,
                },
            },
            Routings = new[]
            {
                new Harness.Autostopping.Inputs.RuleVmHttpRoutingArgs
                {
                    SourceProtocol = "string",
                    TargetProtocol = "string",
                    Action = "string",
                    SourcePort = 0,
                    TargetPort = 0,
                },
            },
        },
    },
    IdleTimeMins = 0,
    Name = "string",
    Tcps = new[]
    {
        new Harness.Autostopping.Inputs.RuleVmTcpArgs
        {
            ProxyId = "string",
            ForwardRules = new[]
            {
                new Harness.Autostopping.Inputs.RuleVmTcpForwardRuleArgs
                {
                    Port = 0,
                    ConnectOn = 0,
                },
            },
            Rdps = new[]
            {
                new Harness.Autostopping.Inputs.RuleVmTcpRdpArgs
                {
                    ConnectOn = 0,
                    Port = 0,
                },
            },
            Sshes = new[]
            {
                new Harness.Autostopping.Inputs.RuleVmTcpSshArgs
                {
                    ConnectOn = 0,
                    Port = 0,
                },
            },
        },
    },
    UseSpot = false,
});
Copy
example, err := autostopping.NewRuleVm(ctx, "ruleVmResource", &autostopping.RuleVmArgs{
	CloudConnectorId: pulumi.String("string"),
	Filter: &autostopping.RuleVmFilterArgs{
		VmIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		Regions: pulumi.StringArray{
			pulumi.String("string"),
		},
		Tags: autostopping.RuleVmFilterTagArray{
			&autostopping.RuleVmFilterTagArgs{
				Key:   pulumi.String("string"),
				Value: pulumi.String("string"),
			},
		},
		Zones: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	CustomDomains: pulumi.StringArray{
		pulumi.String("string"),
	},
	Depends: autostopping.RuleVmDependArray{
		&autostopping.RuleVmDependArgs{
			RuleId:     pulumi.Int(0),
			DelayInSec: pulumi.Int(0),
		},
	},
	DryRun: pulumi.Bool(false),
	Https: autostopping.RuleVmHttpArray{
		&autostopping.RuleVmHttpArgs{
			ProxyId: pulumi.String("string"),
			Healths: autostopping.RuleVmHttpHealthArray{
				&autostopping.RuleVmHttpHealthArgs{
					Port:           pulumi.Int(0),
					Protocol:       pulumi.String("string"),
					Path:           pulumi.String("string"),
					StatusCodeFrom: pulumi.Int(0),
					StatusCodeTo:   pulumi.Int(0),
					Timeout:        pulumi.Int(0),
				},
			},
			Routings: autostopping.RuleVmHttpRoutingArray{
				&autostopping.RuleVmHttpRoutingArgs{
					SourceProtocol: pulumi.String("string"),
					TargetProtocol: pulumi.String("string"),
					Action:         pulumi.String("string"),
					SourcePort:     pulumi.Int(0),
					TargetPort:     pulumi.Int(0),
				},
			},
		},
	},
	IdleTimeMins: pulumi.Int(0),
	Name:         pulumi.String("string"),
	Tcps: autostopping.RuleVmTcpArray{
		&autostopping.RuleVmTcpArgs{
			ProxyId: pulumi.String("string"),
			ForwardRules: autostopping.RuleVmTcpForwardRuleArray{
				&autostopping.RuleVmTcpForwardRuleArgs{
					Port:      pulumi.Int(0),
					ConnectOn: pulumi.Int(0),
				},
			},
			Rdps: autostopping.RuleVmTcpRdpArray{
				&autostopping.RuleVmTcpRdpArgs{
					ConnectOn: pulumi.Int(0),
					Port:      pulumi.Int(0),
				},
			},
			Sshes: autostopping.RuleVmTcpSshArray{
				&autostopping.RuleVmTcpSshArgs{
					ConnectOn: pulumi.Int(0),
					Port:      pulumi.Int(0),
				},
			},
		},
	},
	UseSpot: pulumi.Bool(false),
})
Copy
var ruleVmResource = new RuleVm("ruleVmResource", RuleVmArgs.builder()
    .cloudConnectorId("string")
    .filter(RuleVmFilterArgs.builder()
        .vmIds("string")
        .regions("string")
        .tags(RuleVmFilterTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .zones("string")
        .build())
    .customDomains("string")
    .depends(RuleVmDependArgs.builder()
        .ruleId(0)
        .delayInSec(0)
        .build())
    .dryRun(false)
    .https(RuleVmHttpArgs.builder()
        .proxyId("string")
        .healths(RuleVmHttpHealthArgs.builder()
            .port(0)
            .protocol("string")
            .path("string")
            .statusCodeFrom(0)
            .statusCodeTo(0)
            .timeout(0)
            .build())
        .routings(RuleVmHttpRoutingArgs.builder()
            .sourceProtocol("string")
            .targetProtocol("string")
            .action("string")
            .sourcePort(0)
            .targetPort(0)
            .build())
        .build())
    .idleTimeMins(0)
    .name("string")
    .tcps(RuleVmTcpArgs.builder()
        .proxyId("string")
        .forwardRules(RuleVmTcpForwardRuleArgs.builder()
            .port(0)
            .connectOn(0)
            .build())
        .rdps(RuleVmTcpRdpArgs.builder()
            .connectOn(0)
            .port(0)
            .build())
        .sshes(RuleVmTcpSshArgs.builder()
            .connectOn(0)
            .port(0)
            .build())
        .build())
    .useSpot(false)
    .build());
Copy
rule_vm_resource = harness.autostopping.RuleVm("ruleVmResource",
    cloud_connector_id="string",
    filter={
        "vm_ids": ["string"],
        "regions": ["string"],
        "tags": [{
            "key": "string",
            "value": "string",
        }],
        "zones": ["string"],
    },
    custom_domains=["string"],
    depends=[{
        "rule_id": 0,
        "delay_in_sec": 0,
    }],
    dry_run=False,
    https=[{
        "proxy_id": "string",
        "healths": [{
            "port": 0,
            "protocol": "string",
            "path": "string",
            "status_code_from": 0,
            "status_code_to": 0,
            "timeout": 0,
        }],
        "routings": [{
            "source_protocol": "string",
            "target_protocol": "string",
            "action": "string",
            "source_port": 0,
            "target_port": 0,
        }],
    }],
    idle_time_mins=0,
    name="string",
    tcps=[{
        "proxy_id": "string",
        "forward_rules": [{
            "port": 0,
            "connect_on": 0,
        }],
        "rdps": [{
            "connect_on": 0,
            "port": 0,
        }],
        "sshes": [{
            "connect_on": 0,
            "port": 0,
        }],
    }],
    use_spot=False)
Copy
const ruleVmResource = new harness.autostopping.RuleVm("ruleVmResource", {
    cloudConnectorId: "string",
    filter: {
        vmIds: ["string"],
        regions: ["string"],
        tags: [{
            key: "string",
            value: "string",
        }],
        zones: ["string"],
    },
    customDomains: ["string"],
    depends: [{
        ruleId: 0,
        delayInSec: 0,
    }],
    dryRun: false,
    https: [{
        proxyId: "string",
        healths: [{
            port: 0,
            protocol: "string",
            path: "string",
            statusCodeFrom: 0,
            statusCodeTo: 0,
            timeout: 0,
        }],
        routings: [{
            sourceProtocol: "string",
            targetProtocol: "string",
            action: "string",
            sourcePort: 0,
            targetPort: 0,
        }],
    }],
    idleTimeMins: 0,
    name: "string",
    tcps: [{
        proxyId: "string",
        forwardRules: [{
            port: 0,
            connectOn: 0,
        }],
        rdps: [{
            connectOn: 0,
            port: 0,
        }],
        sshes: [{
            connectOn: 0,
            port: 0,
        }],
    }],
    useSpot: false,
});
Copy
type: harness:autostopping:RuleVm
properties:
    cloudConnectorId: string
    customDomains:
        - string
    depends:
        - delayInSec: 0
          ruleId: 0
    dryRun: false
    filter:
        regions:
            - string
        tags:
            - key: string
              value: string
        vmIds:
            - string
        zones:
            - string
    https:
        - healths:
            - path: string
              port: 0
              protocol: string
              statusCodeFrom: 0
              statusCodeTo: 0
              timeout: 0
          proxyId: string
          routings:
            - action: string
              sourcePort: 0
              sourceProtocol: string
              targetPort: 0
              targetProtocol: string
    idleTimeMins: 0
    name: string
    tcps:
        - forwardRules:
            - connectOn: 0
              port: 0
          proxyId: string
          rdps:
            - connectOn: 0
              port: 0
          sshes:
            - connectOn: 0
              port: 0
    useSpot: false
Copy

RuleVm 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 RuleVm resource accepts the following input properties:

CloudConnectorId This property is required. string
Id of the cloud connector
Filter This property is required. RuleVmFilter
CustomDomains List<string>
Custom URLs used to access the instances
Depends List<RuleVmDepend>
Dependent rules
DryRun bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
Https List<RuleVmHttp>
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Name string
Name of the rule
Tcps List<RuleVmTcp>
TCP routing configuration
UseSpot bool
Boolean that indicates whether the selected instances should be converted to spot vm
CloudConnectorId This property is required. string
Id of the cloud connector
Filter This property is required. RuleVmFilterArgs
CustomDomains []string
Custom URLs used to access the instances
Depends []RuleVmDependArgs
Dependent rules
DryRun bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
Https []RuleVmHttpArgs
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Name string
Name of the rule
Tcps []RuleVmTcpArgs
TCP routing configuration
UseSpot bool
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId This property is required. String
Id of the cloud connector
filter This property is required. RuleVmFilter
customDomains List<String>
Custom URLs used to access the instances
depends List<RuleVmDepend>
Dependent rules
dryRun Boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
https List<RuleVmHttp>
Http routing configuration
idleTimeMins Integer
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name String
Name of the rule
tcps List<RuleVmTcp>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId This property is required. string
Id of the cloud connector
filter This property is required. RuleVmFilter
customDomains string[]
Custom URLs used to access the instances
depends RuleVmDepend[]
Dependent rules
dryRun boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
https RuleVmHttp[]
Http routing configuration
idleTimeMins number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name string
Name of the rule
tcps RuleVmTcp[]
TCP routing configuration
useSpot boolean
Boolean that indicates whether the selected instances should be converted to spot vm
cloud_connector_id This property is required. str
Id of the cloud connector
filter This property is required. RuleVmFilterArgs
custom_domains Sequence[str]
Custom URLs used to access the instances
depends Sequence[RuleVmDependArgs]
Dependent rules
dry_run bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
https Sequence[RuleVmHttpArgs]
Http routing configuration
idle_time_mins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name str
Name of the rule
tcps Sequence[RuleVmTcpArgs]
TCP routing configuration
use_spot bool
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId This property is required. String
Id of the cloud connector
filter This property is required. Property Map
customDomains List<String>
Custom URLs used to access the instances
depends List<Property Map>
Dependent rules
dryRun Boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
https List<Property Map>
Http routing configuration
idleTimeMins Number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name String
Name of the rule
tcps List<Property Map>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm

Outputs

All input properties are implicitly available as output properties. Additionally, the RuleVm resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Identifier double
Unique identifier of the resource
Id string
The provider-assigned unique ID for this managed resource.
Identifier float64
Unique identifier of the resource
id String
The provider-assigned unique ID for this managed resource.
identifier Double
Unique identifier of the resource
id string
The provider-assigned unique ID for this managed resource.
identifier number
Unique identifier of the resource
id str
The provider-assigned unique ID for this managed resource.
identifier float
Unique identifier of the resource
id String
The provider-assigned unique ID for this managed resource.
identifier Number
Unique identifier of the resource

Look up Existing RuleVm Resource

Get an existing RuleVm 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?: RuleVmState, opts?: CustomResourceOptions): RuleVm
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cloud_connector_id: Optional[str] = None,
        custom_domains: Optional[Sequence[str]] = None,
        depends: Optional[Sequence[RuleVmDependArgs]] = None,
        dry_run: Optional[bool] = None,
        filter: Optional[RuleVmFilterArgs] = None,
        https: Optional[Sequence[RuleVmHttpArgs]] = None,
        identifier: Optional[float] = None,
        idle_time_mins: Optional[int] = None,
        name: Optional[str] = None,
        tcps: Optional[Sequence[RuleVmTcpArgs]] = None,
        use_spot: Optional[bool] = None) -> RuleVm
func GetRuleVm(ctx *Context, name string, id IDInput, state *RuleVmState, opts ...ResourceOption) (*RuleVm, error)
public static RuleVm Get(string name, Input<string> id, RuleVmState? state, CustomResourceOptions? opts = null)
public static RuleVm get(String name, Output<String> id, RuleVmState state, CustomResourceOptions options)
resources:  _:    type: harness:autostopping:RuleVm    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CloudConnectorId string
Id of the cloud connector
CustomDomains List<string>
Custom URLs used to access the instances
Depends List<RuleVmDepend>
Dependent rules
DryRun bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
Filter RuleVmFilter
Https List<RuleVmHttp>
Http routing configuration
Identifier double
Unique identifier of the resource
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Name string
Name of the rule
Tcps List<RuleVmTcp>
TCP routing configuration
UseSpot bool
Boolean that indicates whether the selected instances should be converted to spot vm
CloudConnectorId string
Id of the cloud connector
CustomDomains []string
Custom URLs used to access the instances
Depends []RuleVmDependArgs
Dependent rules
DryRun bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
Filter RuleVmFilterArgs
Https []RuleVmHttpArgs
Http routing configuration
Identifier float64
Unique identifier of the resource
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Name string
Name of the rule
Tcps []RuleVmTcpArgs
TCP routing configuration
UseSpot bool
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId String
Id of the cloud connector
customDomains List<String>
Custom URLs used to access the instances
depends List<RuleVmDepend>
Dependent rules
dryRun Boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
filter RuleVmFilter
https List<RuleVmHttp>
Http routing configuration
identifier Double
Unique identifier of the resource
idleTimeMins Integer
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name String
Name of the rule
tcps List<RuleVmTcp>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId string
Id of the cloud connector
customDomains string[]
Custom URLs used to access the instances
depends RuleVmDepend[]
Dependent rules
dryRun boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
filter RuleVmFilter
https RuleVmHttp[]
Http routing configuration
identifier number
Unique identifier of the resource
idleTimeMins number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name string
Name of the rule
tcps RuleVmTcp[]
TCP routing configuration
useSpot boolean
Boolean that indicates whether the selected instances should be converted to spot vm
cloud_connector_id str
Id of the cloud connector
custom_domains Sequence[str]
Custom URLs used to access the instances
depends Sequence[RuleVmDependArgs]
Dependent rules
dry_run bool
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
filter RuleVmFilterArgs
https Sequence[RuleVmHttpArgs]
Http routing configuration
identifier float
Unique identifier of the resource
idle_time_mins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name str
Name of the rule
tcps Sequence[RuleVmTcpArgs]
TCP routing configuration
use_spot bool
Boolean that indicates whether the selected instances should be converted to spot vm
cloudConnectorId String
Id of the cloud connector
customDomains List<String>
Custom URLs used to access the instances
depends List<Property Map>
Dependent rules
dryRun Boolean
Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
filter Property Map
https List<Property Map>
Http routing configuration
identifier Number
Unique identifier of the resource
idleTimeMins Number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
name String
Name of the rule
tcps List<Property Map>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm

Supporting Types

RuleVmDepend
, RuleVmDependArgs

RuleId This property is required. int
Rule id of the dependent rule
DelayInSec int
Number of seconds the rule should wait after warming up the dependent rule
RuleId This property is required. int
Rule id of the dependent rule
DelayInSec int
Number of seconds the rule should wait after warming up the dependent rule
ruleId This property is required. Integer
Rule id of the dependent rule
delayInSec Integer
Number of seconds the rule should wait after warming up the dependent rule
ruleId This property is required. number
Rule id of the dependent rule
delayInSec number
Number of seconds the rule should wait after warming up the dependent rule
rule_id This property is required. int
Rule id of the dependent rule
delay_in_sec int
Number of seconds the rule should wait after warming up the dependent rule
ruleId This property is required. Number
Rule id of the dependent rule
delayInSec Number
Number of seconds the rule should wait after warming up the dependent rule

RuleVmFilter
, RuleVmFilterArgs

VmIds This property is required. List<string>
Ids of instances that needs to be managed using the AutoStopping rules
Regions List<string>
Regions of instances that needs to be managed using the AutoStopping rules
Tags List<RuleVmFilterTag>
Tags of instances that needs to be managed using the AutoStopping rules
Zones List<string>
Zones of instances that needs to be managed using the AutoStopping rules
VmIds This property is required. []string
Ids of instances that needs to be managed using the AutoStopping rules
Regions []string
Regions of instances that needs to be managed using the AutoStopping rules
Tags []RuleVmFilterTag
Tags of instances that needs to be managed using the AutoStopping rules
Zones []string
Zones of instances that needs to be managed using the AutoStopping rules
vmIds This property is required. List<String>
Ids of instances that needs to be managed using the AutoStopping rules
regions List<String>
Regions of instances that needs to be managed using the AutoStopping rules
tags List<RuleVmFilterTag>
Tags of instances that needs to be managed using the AutoStopping rules
zones List<String>
Zones of instances that needs to be managed using the AutoStopping rules
vmIds This property is required. string[]
Ids of instances that needs to be managed using the AutoStopping rules
regions string[]
Regions of instances that needs to be managed using the AutoStopping rules
tags RuleVmFilterTag[]
Tags of instances that needs to be managed using the AutoStopping rules
zones string[]
Zones of instances that needs to be managed using the AutoStopping rules
vm_ids This property is required. Sequence[str]
Ids of instances that needs to be managed using the AutoStopping rules
regions Sequence[str]
Regions of instances that needs to be managed using the AutoStopping rules
tags Sequence[RuleVmFilterTag]
Tags of instances that needs to be managed using the AutoStopping rules
zones Sequence[str]
Zones of instances that needs to be managed using the AutoStopping rules
vmIds This property is required. List<String>
Ids of instances that needs to be managed using the AutoStopping rules
regions List<String>
Regions of instances that needs to be managed using the AutoStopping rules
tags List<Property Map>
Tags of instances that needs to be managed using the AutoStopping rules
zones List<String>
Zones of instances that needs to be managed using the AutoStopping rules

RuleVmFilterTag
, RuleVmFilterTagArgs

Key This property is required. string
Value This property is required. string
Key This property is required. string
Value This property is required. string
key This property is required. String
value This property is required. String
key This property is required. string
value This property is required. string
key This property is required. str
value This property is required. str
key This property is required. String
value This property is required. String

RuleVmHttp
, RuleVmHttpArgs

ProxyId This property is required. string
Id of the proxy
Healths List<RuleVmHttpHealth>
Health Check Details
Routings List<RuleVmHttpRouting>
Routing configuration used to access the instances
ProxyId This property is required. string
Id of the proxy
Healths []RuleVmHttpHealth
Health Check Details
Routings []RuleVmHttpRouting
Routing configuration used to access the instances
proxyId This property is required. String
Id of the proxy
healths List<RuleVmHttpHealth>
Health Check Details
routings List<RuleVmHttpRouting>
Routing configuration used to access the instances
proxyId This property is required. string
Id of the proxy
healths RuleVmHttpHealth[]
Health Check Details
routings RuleVmHttpRouting[]
Routing configuration used to access the instances
proxy_id This property is required. str
Id of the proxy
healths Sequence[RuleVmHttpHealth]
Health Check Details
routings Sequence[RuleVmHttpRouting]
Routing configuration used to access the instances
proxyId This property is required. String
Id of the proxy
healths List<Property Map>
Health Check Details
routings List<Property Map>
Routing configuration used to access the instances

RuleVmHttpHealth
, RuleVmHttpHealthArgs

Port This property is required. int
Health check port on the VM
Protocol This property is required. string
Protocol can be http or https
Path string
API path to use for health check
StatusCodeFrom int
Lower limit for acceptable status code
StatusCodeTo int
Upper limit for acceptable status code
Timeout int
Health check timeout
Port This property is required. int
Health check port on the VM
Protocol This property is required. string
Protocol can be http or https
Path string
API path to use for health check
StatusCodeFrom int
Lower limit for acceptable status code
StatusCodeTo int
Upper limit for acceptable status code
Timeout int
Health check timeout
port This property is required. Integer
Health check port on the VM
protocol This property is required. String
Protocol can be http or https
path String
API path to use for health check
statusCodeFrom Integer
Lower limit for acceptable status code
statusCodeTo Integer
Upper limit for acceptable status code
timeout Integer
Health check timeout
port This property is required. number
Health check port on the VM
protocol This property is required. string
Protocol can be http or https
path string
API path to use for health check
statusCodeFrom number
Lower limit for acceptable status code
statusCodeTo number
Upper limit for acceptable status code
timeout number
Health check timeout
port This property is required. int
Health check port on the VM
protocol This property is required. str
Protocol can be http or https
path str
API path to use for health check
status_code_from int
Lower limit for acceptable status code
status_code_to int
Upper limit for acceptable status code
timeout int
Health check timeout
port This property is required. Number
Health check port on the VM
protocol This property is required. String
Protocol can be http or https
path String
API path to use for health check
statusCodeFrom Number
Lower limit for acceptable status code
statusCodeTo Number
Upper limit for acceptable status code
timeout Number
Health check timeout

RuleVmHttpRouting
, RuleVmHttpRoutingArgs

SourceProtocol This property is required. string
Source protocol of the proxy can be http or https
TargetProtocol This property is required. string
Target protocol of the instance can be http or https
Action string
Organization Identifier for the Entity
SourcePort int
Port on the proxy
TargetPort int
Port on the VM
SourceProtocol This property is required. string
Source protocol of the proxy can be http or https
TargetProtocol This property is required. string
Target protocol of the instance can be http or https
Action string
Organization Identifier for the Entity
SourcePort int
Port on the proxy
TargetPort int
Port on the VM
sourceProtocol This property is required. String
Source protocol of the proxy can be http or https
targetProtocol This property is required. String
Target protocol of the instance can be http or https
action String
Organization Identifier for the Entity
sourcePort Integer
Port on the proxy
targetPort Integer
Port on the VM
sourceProtocol This property is required. string
Source protocol of the proxy can be http or https
targetProtocol This property is required. string
Target protocol of the instance can be http or https
action string
Organization Identifier for the Entity
sourcePort number
Port on the proxy
targetPort number
Port on the VM
source_protocol This property is required. str
Source protocol of the proxy can be http or https
target_protocol This property is required. str
Target protocol of the instance can be http or https
action str
Organization Identifier for the Entity
source_port int
Port on the proxy
target_port int
Port on the VM
sourceProtocol This property is required. String
Source protocol of the proxy can be http or https
targetProtocol This property is required. String
Target protocol of the instance can be http or https
action String
Organization Identifier for the Entity
sourcePort Number
Port on the proxy
targetPort Number
Port on the VM

RuleVmTcp
, RuleVmTcpArgs

ProxyId This property is required. string
Id of the Proxy
ForwardRules List<RuleVmTcpForwardRule>
Additional tcp forwarding rules
Rdps List<RuleVmTcpRdp>
RDP configuration
Sshes List<RuleVmTcpSsh>
SSH configuration
ProxyId This property is required. string
Id of the Proxy
ForwardRules []RuleVmTcpForwardRule
Additional tcp forwarding rules
Rdps []RuleVmTcpRdp
RDP configuration
Sshes []RuleVmTcpSsh
SSH configuration
proxyId This property is required. String
Id of the Proxy
forwardRules List<RuleVmTcpForwardRule>
Additional tcp forwarding rules
rdps List<RuleVmTcpRdp>
RDP configuration
sshes List<RuleVmTcpSsh>
SSH configuration
proxyId This property is required. string
Id of the Proxy
forwardRules RuleVmTcpForwardRule[]
Additional tcp forwarding rules
rdps RuleVmTcpRdp[]
RDP configuration
sshes RuleVmTcpSsh[]
SSH configuration
proxy_id This property is required. str
Id of the Proxy
forward_rules Sequence[RuleVmTcpForwardRule]
Additional tcp forwarding rules
rdps Sequence[RuleVmTcpRdp]
RDP configuration
sshes Sequence[RuleVmTcpSsh]
SSH configuration
proxyId This property is required. String
Id of the Proxy
forwardRules List<Property Map>
Additional tcp forwarding rules
rdps List<Property Map>
RDP configuration
sshes List<Property Map>
SSH configuration

RuleVmTcpForwardRule
, RuleVmTcpForwardRuleArgs

Port This property is required. int
Port to listen on the vm
ConnectOn int
Port to listen on the proxy
Port This property is required. int
Port to listen on the vm
ConnectOn int
Port to listen on the proxy
port This property is required. Integer
Port to listen on the vm
connectOn Integer
Port to listen on the proxy
port This property is required. number
Port to listen on the vm
connectOn number
Port to listen on the proxy
port This property is required. int
Port to listen on the vm
connect_on int
Port to listen on the proxy
port This property is required. Number
Port to listen on the vm
connectOn Number
Port to listen on the proxy

RuleVmTcpRdp
, RuleVmTcpRdpArgs

ConnectOn int
Port to listen on the proxy
Port int
Port to listen on the vm
ConnectOn int
Port to listen on the proxy
Port int
Port to listen on the vm
connectOn Integer
Port to listen on the proxy
port Integer
Port to listen on the vm
connectOn number
Port to listen on the proxy
port number
Port to listen on the vm
connect_on int
Port to listen on the proxy
port int
Port to listen on the vm
connectOn Number
Port to listen on the proxy
port Number
Port to listen on the vm

RuleVmTcpSsh
, RuleVmTcpSshArgs

ConnectOn int
Port to listen on the proxy
Port int
Port to listen on the vm
ConnectOn int
Port to listen on the proxy
Port int
Port to listen on the vm
connectOn Integer
Port to listen on the proxy
port Integer
Port to listen on the vm
connectOn number
Port to listen on the proxy
port number
Port to listen on the vm
connect_on int
Port to listen on the proxy
port int
Port to listen on the vm
connectOn Number
Port to listen on the proxy
port Number
Port to listen on the vm

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.