published on Friday, Mar 27, 2026 by Pulumi
published on Friday, Mar 27, 2026 by Pulumi
Data source for retrieving a Harness AutoStopping rule for K8s services.
Create RuleK8s Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RuleK8s(name: string, args: RuleK8sArgs, opts?: CustomResourceOptions);@overload
def RuleK8s(resource_name: str,
args: RuleK8sArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RuleK8s(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloud_connector_id: Optional[str] = None,
k8s_connector_id: Optional[str] = None,
k8s_namespace: Optional[str] = None,
rule_yaml: Optional[str] = None,
depends: Optional[Sequence[RuleK8sDependArgs]] = None,
dry_run: Optional[bool] = None,
idle_time_mins: Optional[int] = None,
name: Optional[str] = None)func NewRuleK8s(ctx *Context, name string, args RuleK8sArgs, opts ...ResourceOption) (*RuleK8s, error)public RuleK8s(string name, RuleK8sArgs args, CustomResourceOptions? opts = null)
public RuleK8s(String name, RuleK8sArgs args)
public RuleK8s(String name, RuleK8sArgs args, CustomResourceOptions options)
type: harness:autostopping:RuleK8s
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 RuleK8sArgs
- 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 RuleK8sArgs
- 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 RuleK8sArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleK8sArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleK8sArgs
- 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 ruleK8sResource = new Harness.Autostopping.RuleK8s("ruleK8sResource", new()
{
CloudConnectorId = "string",
K8sConnectorId = "string",
K8sNamespace = "string",
RuleYaml = "string",
Depends = new[]
{
new Harness.Autostopping.Inputs.RuleK8sDependArgs
{
RuleId = 0,
DelayInSec = 0,
},
},
DryRun = false,
IdleTimeMins = 0,
Name = "string",
});
example, err := autostopping.NewRuleK8s(ctx, "ruleK8sResource", &autostopping.RuleK8sArgs{
CloudConnectorId: pulumi.String("string"),
K8sConnectorId: pulumi.String("string"),
K8sNamespace: pulumi.String("string"),
RuleYaml: pulumi.String("string"),
Depends: autostopping.RuleK8sDependArray{
&autostopping.RuleK8sDependArgs{
RuleId: pulumi.Int(0),
DelayInSec: pulumi.Int(0),
},
},
DryRun: pulumi.Bool(false),
IdleTimeMins: pulumi.Int(0),
Name: pulumi.String("string"),
})
var ruleK8sResource = new RuleK8s("ruleK8sResource", RuleK8sArgs.builder()
.cloudConnectorId("string")
.k8sConnectorId("string")
.k8sNamespace("string")
.ruleYaml("string")
.depends(RuleK8sDependArgs.builder()
.ruleId(0)
.delayInSec(0)
.build())
.dryRun(false)
.idleTimeMins(0)
.name("string")
.build());
rule_k8s_resource = harness.autostopping.RuleK8s("ruleK8sResource",
cloud_connector_id="string",
k8s_connector_id="string",
k8s_namespace="string",
rule_yaml="string",
depends=[{
"rule_id": 0,
"delay_in_sec": 0,
}],
dry_run=False,
idle_time_mins=0,
name="string")
const ruleK8sResource = new harness.autostopping.RuleK8s("ruleK8sResource", {
cloudConnectorId: "string",
k8sConnectorId: "string",
k8sNamespace: "string",
ruleYaml: "string",
depends: [{
ruleId: 0,
delayInSec: 0,
}],
dryRun: false,
idleTimeMins: 0,
name: "string",
});
type: harness:autostopping:RuleK8s
properties:
cloudConnectorId: string
depends:
- delayInSec: 0
ruleId: 0
dryRun: false
idleTimeMins: 0
k8sConnectorId: string
k8sNamespace: string
name: string
ruleYaml: string
RuleK8s 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 RuleK8s resource accepts the following input properties:
- Cloud
Connector stringId - Id of the cloud connector
- K8s
Connector stringId - Id of the K8s connector
- K8s
Namespace string - Namespace of the cluster
- Rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- Depends
List<Rule
K8s Depend> - Dependent rules
- Dry
Run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- Idle
Time intMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- Name string
- Name of the rule
- Cloud
Connector stringId - Id of the cloud connector
- K8s
Connector stringId - Id of the K8s connector
- K8s
Namespace string - Namespace of the cluster
- Rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- Depends
[]Rule
K8s Depend Args - Dependent rules
- Dry
Run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- Idle
Time intMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- Name string
- Name of the rule
- cloud
Connector StringId - Id of the cloud connector
- k8s
Connector StringId - Id of the K8s connector
- k8s
Namespace String - Namespace of the cluster
- rule
Yaml String - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- depends
List<Rule
K8s Depend> - Dependent rules
- dry
Run Boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- idle
Time IntegerMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- name String
- Name of the rule
- cloud
Connector stringId - Id of the cloud connector
- k8s
Connector stringId - Id of the K8s connector
- k8s
Namespace string - Namespace of the cluster
- rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- depends
Rule
K8s Depend[] - Dependent rules
- dry
Run boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- idle
Time numberMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- name string
- Name of the rule
- cloud_
connector_ strid - Id of the cloud connector
- k8s_
connector_ strid - Id of the K8s connector
- k8s_
namespace str - Namespace of the cluster
- rule_
yaml str - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- depends
Sequence[Rule
K8s Depend Args] - Dependent rules
- dry_
run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- idle_
time_ intmins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- name str
- Name of the rule
- cloud
Connector StringId - Id of the cloud connector
- k8s
Connector StringId - Id of the K8s connector
- k8s
Namespace String - Namespace of the cluster
- rule
Yaml String - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- depends List<Property Map>
- Dependent rules
- dry
Run Boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- idle
Time NumberMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- name String
- Name of the rule
Outputs
All input properties are implicitly available as output properties. Additionally, the RuleK8s resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- identifier string
- Unique identifier of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- identifier str
- Unique identifier of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource
Look up Existing RuleK8s Resource
Get an existing RuleK8s 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?: RuleK8sState, opts?: CustomResourceOptions): RuleK8s@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cloud_connector_id: Optional[str] = None,
depends: Optional[Sequence[RuleK8sDependArgs]] = None,
dry_run: Optional[bool] = None,
identifier: Optional[str] = None,
idle_time_mins: Optional[int] = None,
k8s_connector_id: Optional[str] = None,
k8s_namespace: Optional[str] = None,
name: Optional[str] = None,
rule_yaml: Optional[str] = None) -> RuleK8sfunc GetRuleK8s(ctx *Context, name string, id IDInput, state *RuleK8sState, opts ...ResourceOption) (*RuleK8s, error)public static RuleK8s Get(string name, Input<string> id, RuleK8sState? state, CustomResourceOptions? opts = null)public static RuleK8s get(String name, Output<String> id, RuleK8sState state, CustomResourceOptions options)resources: _: type: harness:autostopping:RuleK8s get: id: ${id}- 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.
- Cloud
Connector stringId - Id of the cloud connector
- Depends
List<Rule
K8s Depend> - Dependent rules
- Dry
Run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- Identifier string
- Unique identifier of the resource
- Idle
Time intMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- K8s
Connector stringId - Id of the K8s connector
- K8s
Namespace string - Namespace of the cluster
- Name string
- Name of the rule
- Rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- Cloud
Connector stringId - Id of the cloud connector
- Depends
[]Rule
K8s Depend Args - Dependent rules
- Dry
Run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- Identifier string
- Unique identifier of the resource
- Idle
Time intMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- K8s
Connector stringId - Id of the K8s connector
- K8s
Namespace string - Namespace of the cluster
- Name string
- Name of the rule
- Rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- cloud
Connector StringId - Id of the cloud connector
- depends
List<Rule
K8s Depend> - Dependent rules
- dry
Run Boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- identifier String
- Unique identifier of the resource
- idle
Time IntegerMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- k8s
Connector StringId - Id of the K8s connector
- k8s
Namespace String - Namespace of the cluster
- name String
- Name of the rule
- rule
Yaml String - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- cloud
Connector stringId - Id of the cloud connector
- depends
Rule
K8s Depend[] - Dependent rules
- dry
Run boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- identifier string
- Unique identifier of the resource
- idle
Time numberMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- k8s
Connector stringId - Id of the K8s connector
- k8s
Namespace string - Namespace of the cluster
- name string
- Name of the rule
- rule
Yaml string - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- cloud_
connector_ strid - Id of the cloud connector
- depends
Sequence[Rule
K8s Depend Args] - Dependent rules
- dry_
run bool - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- identifier str
- Unique identifier of the resource
- idle_
time_ intmins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- k8s_
connector_ strid - Id of the K8s connector
- k8s_
namespace str - Namespace of the cluster
- name str
- Name of the rule
- rule_
yaml str - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
- cloud
Connector StringId - Id of the cloud connector
- depends List<Property Map>
- Dependent rules
- dry
Run Boolean - Boolean that indicates whether the AutoStopping rule should be created in DryRun mode
- identifier String
- Unique identifier of the resource
- idle
Time NumberMins - Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
- k8s
Connector StringId - Id of the K8s connector
- k8s
Namespace String - Namespace of the cluster
- name String
- Name of the rule
- rule
Yaml String - YAML definition of the K8s AutoStopping rule (workload selector, ingress, etc.).
Supporting Types
RuleK8sDepend, RuleK8sDependArgs
- Rule
Id int - Rule id of the dependent rule
- Delay
In intSec - Number of seconds the rule should wait after warming up the dependent rule
- Rule
Id int - Rule id of the dependent rule
- Delay
In intSec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id Integer - Rule id of the dependent rule
- delay
In IntegerSec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id number - Rule id of the dependent rule
- delay
In numberSec - Number of seconds the rule should wait after warming up the dependent rule
- rule_
id int - Rule id of the dependent rule
- delay_
in_ intsec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id Number - Rule id of the dependent rule
- delay
In NumberSec - Number of seconds the rule should wait after warming up the dependent rule
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
published on Friday, Mar 27, 2026 by Pulumi
