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

harness.autostopping.getRuleVm

Explore with Pulumi AI

Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

Data source for retrieving a Harness Variable.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.autostopping.AutostoppingFunctions;
import com.pulumi.harness.autostopping.inputs.GetRuleVmArgs;
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 example = AutostoppingFunctions.getRuleVm(GetRuleVmArgs.builder()
            .identifier("identifier")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: harness:autostopping:getRuleVm
      arguments:
        identifier: identifier
Copy

Using getRuleVm

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 getRuleVm(args: GetRuleVmArgs, opts?: InvokeOptions): Promise<GetRuleVmResult>
function getRuleVmOutput(args: GetRuleVmOutputArgs, opts?: InvokeOptions): Output<GetRuleVmResult>
Copy
def get_rule_vm(cloud_connector_id: Optional[str] = None,
                custom_domains: Optional[Sequence[str]] = None,
                depends: Optional[Sequence[GetRuleVmDepend]] = None,
                filter: Optional[GetRuleVmFilter] = None,
                https: Optional[Sequence[GetRuleVmHttp]] = None,
                idle_time_mins: Optional[int] = None,
                name: Optional[str] = None,
                tcps: Optional[Sequence[GetRuleVmTcp]] = None,
                use_spot: Optional[bool] = None,
                opts: Optional[InvokeOptions] = None) -> GetRuleVmResult
def get_rule_vm_output(cloud_connector_id: Optional[pulumi.Input[str]] = None,
                custom_domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                depends: Optional[pulumi.Input[Sequence[pulumi.Input[GetRuleVmDependArgs]]]] = None,
                filter: Optional[pulumi.Input[GetRuleVmFilterArgs]] = None,
                https: Optional[pulumi.Input[Sequence[pulumi.Input[GetRuleVmHttpArgs]]]] = None,
                idle_time_mins: Optional[pulumi.Input[int]] = None,
                name: Optional[pulumi.Input[str]] = None,
                tcps: Optional[pulumi.Input[Sequence[pulumi.Input[GetRuleVmTcpArgs]]]] = None,
                use_spot: Optional[pulumi.Input[bool]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetRuleVmResult]
Copy
func LookupRuleVm(ctx *Context, args *LookupRuleVmArgs, opts ...InvokeOption) (*LookupRuleVmResult, error)
func LookupRuleVmOutput(ctx *Context, args *LookupRuleVmOutputArgs, opts ...InvokeOption) LookupRuleVmResultOutput
Copy

> Note: This function is named LookupRuleVm in the Go SDK.

public static class GetRuleVm 
{
    public static Task<GetRuleVmResult> InvokeAsync(GetRuleVmArgs args, InvokeOptions? opts = null)
    public static Output<GetRuleVmResult> Invoke(GetRuleVmInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRuleVmResult> getRuleVm(GetRuleVmArgs args, InvokeOptions options)
public static Output<GetRuleVmResult> getRuleVm(GetRuleVmArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:autostopping/getRuleVm:getRuleVm
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CloudConnectorId This property is required. string
Id of the cloud connector
Filter This property is required. GetRuleVmFilter
Name This property is required. string
Name of the rule
CustomDomains List<string>
Custom URLs used to access the instances
Depends List<GetRuleVmDepend>
Dependent rules
Https List<GetRuleVmHttp>
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Tcps List<GetRuleVmTcp>
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. GetRuleVmFilter
Name This property is required. string
Name of the rule
CustomDomains []string
Custom URLs used to access the instances
Depends []GetRuleVmDepend
Dependent rules
Https []GetRuleVmHttp
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Tcps []GetRuleVmTcp
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. GetRuleVmFilter
name This property is required. String
Name of the rule
customDomains List<String>
Custom URLs used to access the instances
depends List<GetRuleVmDepend>
Dependent rules
https List<GetRuleVmHttp>
Http routing configuration
idleTimeMins Integer
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
tcps List<GetRuleVmTcp>
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. GetRuleVmFilter
name This property is required. string
Name of the rule
customDomains string[]
Custom URLs used to access the instances
depends GetRuleVmDepend[]
Dependent rules
https GetRuleVmHttp[]
Http routing configuration
idleTimeMins number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
tcps GetRuleVmTcp[]
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. GetRuleVmFilter
name This property is required. str
Name of the rule
custom_domains Sequence[str]
Custom URLs used to access the instances
depends Sequence[GetRuleVmDepend]
Dependent rules
https Sequence[GetRuleVmHttp]
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.
tcps Sequence[GetRuleVmTcp]
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
name This property is required. String
Name of the rule
customDomains List<String>
Custom URLs used to access the instances
depends List<Property Map>
Dependent rules
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.
tcps List<Property Map>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm

getRuleVm Result

The following output properties are available:

CloudConnectorId string
Id of the cloud connector
Filter GetRuleVmFilter
Id string
The provider-assigned unique ID for this managed resource.
Identifier double
Unique identifier of the resource
Name string
Name of the rule
CustomDomains List<string>
Custom URLs used to access the instances
Depends List<GetRuleVmDepend>
Dependent rules
Https List<GetRuleVmHttp>
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Tcps List<GetRuleVmTcp>
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
Filter GetRuleVmFilter
Id string
The provider-assigned unique ID for this managed resource.
Identifier float64
Unique identifier of the resource
Name string
Name of the rule
CustomDomains []string
Custom URLs used to access the instances
Depends []GetRuleVmDepend
Dependent rules
Https []GetRuleVmHttp
Http routing configuration
IdleTimeMins int
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
Tcps []GetRuleVmTcp
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
filter GetRuleVmFilter
id String
The provider-assigned unique ID for this managed resource.
identifier Double
Unique identifier of the resource
name String
Name of the rule
customDomains List<String>
Custom URLs used to access the instances
depends List<GetRuleVmDepend>
Dependent rules
https List<GetRuleVmHttp>
Http routing configuration
idleTimeMins Integer
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
tcps List<GetRuleVmTcp>
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
filter GetRuleVmFilter
id string
The provider-assigned unique ID for this managed resource.
identifier number
Unique identifier of the resource
name string
Name of the rule
customDomains string[]
Custom URLs used to access the instances
depends GetRuleVmDepend[]
Dependent rules
https GetRuleVmHttp[]
Http routing configuration
idleTimeMins number
Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
tcps GetRuleVmTcp[]
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
filter GetRuleVmFilter
id str
The provider-assigned unique ID for this managed resource.
identifier float
Unique identifier of the resource
name str
Name of the rule
custom_domains Sequence[str]
Custom URLs used to access the instances
depends Sequence[GetRuleVmDepend]
Dependent rules
https Sequence[GetRuleVmHttp]
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.
tcps Sequence[GetRuleVmTcp]
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
filter Property Map
id String
The provider-assigned unique ID for this managed resource.
identifier Number
Unique identifier of the resource
name String
Name of the rule
customDomains List<String>
Custom URLs used to access the instances
depends List<Property Map>
Dependent rules
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.
tcps List<Property Map>
TCP routing configuration
useSpot Boolean
Boolean that indicates whether the selected instances should be converted to spot vm

Supporting Types

GetRuleVmDepend

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

GetRuleVmFilter

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<GetRuleVmFilterTag>
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 []GetRuleVmFilterTag
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<GetRuleVmFilterTag>
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 GetRuleVmFilterTag[]
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[GetRuleVmFilterTag]
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

GetRuleVmFilterTag

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

GetRuleVmHttp

ProxyId This property is required. string
Id of the proxy
Healths List<GetRuleVmHttpHealth>
Health Check Details
Routings List<GetRuleVmHttpRouting>
Routing configuration used to access the instances
ProxyId This property is required. string
Id of the proxy
Healths []GetRuleVmHttpHealth
Health Check Details
Routings []GetRuleVmHttpRouting
Routing configuration used to access the instances
proxyId This property is required. String
Id of the proxy
healths List<GetRuleVmHttpHealth>
Health Check Details
routings List<GetRuleVmHttpRouting>
Routing configuration used to access the instances
proxyId This property is required. string
Id of the proxy
healths GetRuleVmHttpHealth[]
Health Check Details
routings GetRuleVmHttpRouting[]
Routing configuration used to access the instances
proxy_id This property is required. str
Id of the proxy
healths Sequence[GetRuleVmHttpHealth]
Health Check Details
routings Sequence[GetRuleVmHttpRouting]
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

GetRuleVmHttpHealth

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

GetRuleVmHttpRouting

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

GetRuleVmTcp

ProxyId This property is required. string
Id of the Proxy
ForwardRules List<GetRuleVmTcpForwardRule>
Additional tcp forwarding rules
Rdps List<GetRuleVmTcpRdp>
RDP configuration
Sshes List<GetRuleVmTcpSsh>
SSH configuration
ProxyId This property is required. string
Id of the Proxy
ForwardRules []GetRuleVmTcpForwardRule
Additional tcp forwarding rules
Rdps []GetRuleVmTcpRdp
RDP configuration
Sshes []GetRuleVmTcpSsh
SSH configuration
proxyId This property is required. String
Id of the Proxy
forwardRules List<GetRuleVmTcpForwardRule>
Additional tcp forwarding rules
rdps List<GetRuleVmTcpRdp>
RDP configuration
sshes List<GetRuleVmTcpSsh>
SSH configuration
proxyId This property is required. string
Id of the Proxy
forwardRules GetRuleVmTcpForwardRule[]
Additional tcp forwarding rules
rdps GetRuleVmTcpRdp[]
RDP configuration
sshes GetRuleVmTcpSsh[]
SSH configuration
proxy_id This property is required. str
Id of the Proxy
forward_rules Sequence[GetRuleVmTcpForwardRule]
Additional tcp forwarding rules
rdps Sequence[GetRuleVmTcpRdp]
RDP configuration
sshes Sequence[GetRuleVmTcpSsh]
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

GetRuleVmTcpForwardRule

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

GetRuleVmTcpRdp

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

GetRuleVmTcpSsh

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.
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi