1. Registry
  2. Packages
  3. Harness Provider
  4. API Docs
  5. autostopping
  6. getRuleScaleGroup
Viewing docs for Harness v0.17.3
published on Thursday, Oct 15, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.17.3
published on Thursday, Oct 15, 2026 by Pulumi

    Data source for retrieving a Harness AutoStopping rule for Scaling Groups.

    Example Usage

    Lookup by ID

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const byId = harness.autostopping.getRuleScaleGroup({
        identifier: "12345",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    by_id = harness.autostopping.get_rule_scale_group(identifier="12345")
    
    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.LookupRuleScaleGroup(ctx, &autostopping.LookupRuleScaleGroupArgs{
    			Identifier: pulumi.StringRef("12345"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var byId = Harness.Autostopping.GetRuleScaleGroup.Invoke(new()
        {
            Identifier = "12345",
        });
    
    });
    
    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.GetRuleScaleGroupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 byId = AutostoppingFunctions.getRuleScaleGroup(GetRuleScaleGroupArgs.builder()
                .identifier("12345")
                .build());
    
        }
    }
    
    variables:
      byId:
        fn::invoke:
          function: harness:autostopping:getRuleScaleGroup
          arguments:
            identifier: '12345'
    
    terraform {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_autostopping_rule_scale_group" "byId" {
      identifier = "12345"
    }
    

    Lookup by name (regex)

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const byName = harness.autostopping.getRuleScaleGroup({
        name: "^my-scale-group-rule$",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    by_name = harness.autostopping.get_rule_scale_group(name="^my-scale-group-rule$")
    
    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.LookupRuleScaleGroup(ctx, &autostopping.LookupRuleScaleGroupArgs{
    			Name: pulumi.StringRef("^my-scale-group-rule$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var byName = Harness.Autostopping.GetRuleScaleGroup.Invoke(new()
        {
            Name = "^my-scale-group-rule$",
        });
    
    });
    
    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.GetRuleScaleGroupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 byName = AutostoppingFunctions.getRuleScaleGroup(GetRuleScaleGroupArgs.builder()
                .name("^my-scale-group-rule$")
                .build());
    
        }
    }
    
    variables:
      byName:
        fn::invoke:
          function: harness:autostopping:getRuleScaleGroup
          arguments:
            name: ^my-scale-group-rule$
    
    terraform {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_autostopping_rule_scale_group" "byName" {
      name = "^my-scale-group-rule$"
    }
    

    Lookup by name pattern

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const byPattern = harness.autostopping.getRuleScaleGroup({
        name: "my-asg-.*-prod",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    by_pattern = harness.autostopping.get_rule_scale_group(name="my-asg-.*-prod")
    
    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.LookupRuleScaleGroup(ctx, &autostopping.LookupRuleScaleGroupArgs{
    			Name: pulumi.StringRef("my-asg-.*-prod"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var byPattern = Harness.Autostopping.GetRuleScaleGroup.Invoke(new()
        {
            Name = "my-asg-.*-prod",
        });
    
    });
    
    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.GetRuleScaleGroupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 byPattern = AutostoppingFunctions.getRuleScaleGroup(GetRuleScaleGroupArgs.builder()
                .name("my-asg-.*-prod")
                .build());
    
        }
    }
    
    variables:
      byPattern:
        fn::invoke:
          function: harness:autostopping:getRuleScaleGroup
          arguments:
            name: my-asg-.*-prod
    
    terraform {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_autostopping_rule_scale_group" "byPattern" {
      name = "my-asg-.*-prod"
    }
    

    Using getRuleScaleGroup

    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 getRuleScaleGroup(args: GetRuleScaleGroupArgs, opts?: InvokeOptions): Promise<GetRuleScaleGroupResult>
    function getRuleScaleGroupOutput(args: GetRuleScaleGroupOutputArgs, opts?: InvokeOutputOptions): Output<GetRuleScaleGroupResult>
    def get_rule_scale_group(identifier: Optional[str] = None,
                             name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetRuleScaleGroupResult
    def get_rule_scale_group_output(identifier: pulumi.Input[Optional[str]] = None,
                             name: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOutputOptions] = None) -> Output[GetRuleScaleGroupResult]
    func LookupRuleScaleGroup(ctx *Context, args *LookupRuleScaleGroupArgs, opts ...InvokeOption) (*LookupRuleScaleGroupResult, error)
    func LookupRuleScaleGroupOutput(ctx *Context, args *LookupRuleScaleGroupOutputArgs, opts ...InvokeOption) LookupRuleScaleGroupResultOutput

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

    public static class GetRuleScaleGroup 
    {
        public static Task<GetRuleScaleGroupResult> InvokeAsync(GetRuleScaleGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetRuleScaleGroupResult> Invoke(GetRuleScaleGroupInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetRuleScaleGroupResult> Invoke(GetRuleScaleGroupInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetRuleScaleGroupResult> getRuleScaleGroup(GetRuleScaleGroupArgs args, InvokeOptions options)
    public static Output<GetRuleScaleGroupResult> getRuleScaleGroup(GetRuleScaleGroupArgs args, InvokeOptions options)
    public static Output<GetRuleScaleGroupResult> getRuleScaleGroup(GetRuleScaleGroupArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: harness:autostopping/getRuleScaleGroup:getRuleScaleGroup
      arguments:
        # arguments dictionary
    data "harness_autostopping_get_rule_scale_group" "name" {
        # arguments
    }

    The following arguments are supported:

    Identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    Name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    Identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    Name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    identifier String
    Unique identifier of the resource. Either identifier or name must be specified.
    name String
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    identifier str
    Unique identifier of the resource. Either identifier or name must be specified.
    name str
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    identifier String
    Unique identifier of the resource. Either identifier or name must be specified.
    name String
    Name or regex pattern to match the rule name. Either identifier or name must be specified.

    getRuleScaleGroup Result

    The following output properties are available:

    CloudConnectorId string
    Id of the cloud connector
    Depends List<GetRuleScaleGroupDepend>
    Dependent rules
    DryRun bool
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    CloudConnectorId string
    Id of the cloud connector
    Depends []GetRuleScaleGroupDepend
    Dependent rules
    DryRun bool
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    cloud_connector_id string
    Id of the cloud connector
    depends list(object)
    Dependent rules
    dry_run bool
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    idle_time_mins number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    cloudConnectorId String
    Id of the cloud connector
    depends List<GetRuleScaleGroupDepend>
    Dependent rules
    dryRun Boolean
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource. Either identifier or name must be specified.
    idleTimeMins Integer
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    cloudConnectorId string
    Id of the cloud connector
    depends GetRuleScaleGroupDepend[]
    Dependent rules
    dryRun boolean
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the resource. Either identifier or name must be specified.
    idleTimeMins number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name string
    Name or regex pattern to match the rule name. Either identifier or name must be specified.
    cloud_connector_id str
    Id of the cloud connector
    depends Sequence[GetRuleScaleGroupDepend]
    Dependent rules
    dry_run bool
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the resource. Either identifier or name must be specified.
    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 or regex pattern to match the rule name. Either identifier or name must be specified.
    cloudConnectorId String
    Id of the cloud connector
    depends List<Property Map>
    Dependent rules
    dryRun Boolean
    Boolean that indicates whether the AutoStopping rule is in DryRun mode
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource. Either identifier or name must be specified.
    idleTimeMins Number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name or regex pattern to match the rule name. Either identifier or name must be specified.

    Supporting Types

    GetRuleScaleGroupDepend

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.17.3
    published on Thursday, Oct 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial