Harness v0.9.0 published on Wednesday, Oct 22, 2025 by Pulumi
harness.chaos.getSecurityGovernanceRule
Data source for retrieving a Harness Chaos Security Governance Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// Data sources to verify the rules
const example = harness.chaos.getSecurityGovernanceRule({
    id: "<rule_id>",
    orgId: "<org_id>",
    projectId: "<project_id>",
});
const exampleLinux = harness.chaos.getSecurityGovernanceRule({
    id: "<rule_id>",
    orgId: "<org_id>",
    projectId: "<project_id>",
});
const exampleWindows = harness.chaos.getSecurityGovernanceRule({
    id: "<rule_id>",
    orgId: "<org_id>",
    projectId: "<project_id>",
});
import pulumi
import pulumi_harness as harness
# Data sources to verify the rules
example = harness.chaos.get_security_governance_rule(id="<rule_id>",
    org_id="<org_id>",
    project_id="<project_id>")
example_linux = harness.chaos.get_security_governance_rule(id="<rule_id>",
    org_id="<org_id>",
    project_id="<project_id>")
example_windows = harness.chaos.get_security_governance_rule(id="<rule_id>",
    org_id="<org_id>",
    project_id="<project_id>")
package main
import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/chaos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Data sources to verify the rules
		_, err := chaos.LookupSecurityGovernanceRule(ctx, &chaos.LookupSecurityGovernanceRuleArgs{
			Id:        pulumi.StringRef("<rule_id>"),
			OrgId:     "<org_id>",
			ProjectId: "<project_id>",
		}, nil)
		if err != nil {
			return err
		}
		_, err = chaos.LookupSecurityGovernanceRule(ctx, &chaos.LookupSecurityGovernanceRuleArgs{
			Id:        pulumi.StringRef("<rule_id>"),
			OrgId:     "<org_id>",
			ProjectId: "<project_id>",
		}, nil)
		if err != nil {
			return err
		}
		_, err = chaos.LookupSecurityGovernanceRule(ctx, &chaos.LookupSecurityGovernanceRuleArgs{
			Id:        pulumi.StringRef("<rule_id>"),
			OrgId:     "<org_id>",
			ProjectId: "<project_id>",
		}, 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(() => 
{
    // Data sources to verify the rules
    var example = Harness.Chaos.GetSecurityGovernanceRule.Invoke(new()
    {
        Id = "<rule_id>",
        OrgId = "<org_id>",
        ProjectId = "<project_id>",
    });
    var exampleLinux = Harness.Chaos.GetSecurityGovernanceRule.Invoke(new()
    {
        Id = "<rule_id>",
        OrgId = "<org_id>",
        ProjectId = "<project_id>",
    });
    var exampleWindows = Harness.Chaos.GetSecurityGovernanceRule.Invoke(new()
    {
        Id = "<rule_id>",
        OrgId = "<org_id>",
        ProjectId = "<project_id>",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.chaos.ChaosFunctions;
import com.pulumi.harness.chaos.inputs.GetSecurityGovernanceRuleArgs;
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) {
        // Data sources to verify the rules
        final var example = ChaosFunctions.getSecurityGovernanceRule(GetSecurityGovernanceRuleArgs.builder()
            .id("<rule_id>")
            .orgId("<org_id>")
            .projectId("<project_id>")
            .build());
        final var exampleLinux = ChaosFunctions.getSecurityGovernanceRule(GetSecurityGovernanceRuleArgs.builder()
            .id("<rule_id>")
            .orgId("<org_id>")
            .projectId("<project_id>")
            .build());
        final var exampleWindows = ChaosFunctions.getSecurityGovernanceRule(GetSecurityGovernanceRuleArgs.builder()
            .id("<rule_id>")
            .orgId("<org_id>")
            .projectId("<project_id>")
            .build());
    }
}
variables:
  # Data sources to verify the rules
  example:
    fn::invoke:
      function: harness:chaos:getSecurityGovernanceRule
      arguments:
        id: <rule_id>
        orgId: <org_id>
        projectId: <project_id>
  exampleLinux:
    fn::invoke:
      function: harness:chaos:getSecurityGovernanceRule
      arguments:
        id: <rule_id>
        orgId: <org_id>
        projectId: <project_id>
  exampleWindows:
    fn::invoke:
      function: harness:chaos:getSecurityGovernanceRule
      arguments:
        id: <rule_id>
        orgId: <org_id>
        projectId: <project_id>
Using getSecurityGovernanceRule
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 getSecurityGovernanceRule(args: GetSecurityGovernanceRuleArgs, opts?: InvokeOptions): Promise<GetSecurityGovernanceRuleResult>
function getSecurityGovernanceRuleOutput(args: GetSecurityGovernanceRuleOutputArgs, opts?: InvokeOptions): Output<GetSecurityGovernanceRuleResult>def get_security_governance_rule(id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 org_id: Optional[str] = None,
                                 project_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetSecurityGovernanceRuleResult
def get_security_governance_rule_output(id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 org_id: Optional[pulumi.Input[str]] = None,
                                 project_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGovernanceRuleResult]func LookupSecurityGovernanceRule(ctx *Context, args *LookupSecurityGovernanceRuleArgs, opts ...InvokeOption) (*LookupSecurityGovernanceRuleResult, error)
func LookupSecurityGovernanceRuleOutput(ctx *Context, args *LookupSecurityGovernanceRuleOutputArgs, opts ...InvokeOption) LookupSecurityGovernanceRuleResultOutput> Note: This function is named LookupSecurityGovernanceRule in the Go SDK.
public static class GetSecurityGovernanceRule 
{
    public static Task<GetSecurityGovernanceRuleResult> InvokeAsync(GetSecurityGovernanceRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityGovernanceRuleResult> Invoke(GetSecurityGovernanceRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecurityGovernanceRuleResult> getSecurityGovernanceRule(GetSecurityGovernanceRuleArgs args, InvokeOptions options)
public static Output<GetSecurityGovernanceRuleResult> getSecurityGovernanceRule(GetSecurityGovernanceRuleArgs args, InvokeOptions options)
fn::invoke:
  function: harness:chaos/getSecurityGovernanceRule:getSecurityGovernanceRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- org_id str
- The organization identifier.
- project_id str
- The project identifier.
- id str
- The ID of the rule.
- name str
- The name of the rule.
getSecurityGovernanceRule Result
The following output properties are available:
- ConditionIds List<string>
- List of condition IDs associated with the rule.
- Description string
- The description of the rule.
- IsEnabled bool
- Whether the rule is enabled.
- OrgId string
- The organization identifier.
- ProjectId string
- The project identifier.
- List<string>
- Tags associated with the rule.
- TimeWindows List<GetSecurity Governance Rule Time Window> 
- Time windows when the rule is active.
- UserGroup List<string>Ids 
- List of user group IDs associated with the rule.
- Id string
- The ID of the rule.
- Name string
- The name of the rule.
- ConditionIds []string
- List of condition IDs associated with the rule.
- Description string
- The description of the rule.
- IsEnabled bool
- Whether the rule is enabled.
- OrgId string
- The organization identifier.
- ProjectId string
- The project identifier.
- []string
- Tags associated with the rule.
- TimeWindows []GetSecurity Governance Rule Time Window 
- Time windows when the rule is active.
- UserGroup []stringIds 
- List of user group IDs associated with the rule.
- Id string
- The ID of the rule.
- Name string
- The name of the rule.
- conditionIds List<String>
- List of condition IDs associated with the rule.
- description String
- The description of the rule.
- isEnabled Boolean
- Whether the rule is enabled.
- orgId String
- The organization identifier.
- projectId String
- The project identifier.
- List<String>
- Tags associated with the rule.
- timeWindows List<GetSecurity Governance Rule Time Window> 
- Time windows when the rule is active.
- userGroup List<String>Ids 
- List of user group IDs associated with the rule.
- id String
- The ID of the rule.
- name String
- The name of the rule.
- conditionIds string[]
- List of condition IDs associated with the rule.
- description string
- The description of the rule.
- isEnabled boolean
- Whether the rule is enabled.
- orgId string
- The organization identifier.
- projectId string
- The project identifier.
- string[]
- Tags associated with the rule.
- timeWindows GetSecurity Governance Rule Time Window[] 
- Time windows when the rule is active.
- userGroup string[]Ids 
- List of user group IDs associated with the rule.
- id string
- The ID of the rule.
- name string
- The name of the rule.
- condition_ids Sequence[str]
- List of condition IDs associated with the rule.
- description str
- The description of the rule.
- is_enabled bool
- Whether the rule is enabled.
- org_id str
- The organization identifier.
- project_id str
- The project identifier.
- Sequence[str]
- Tags associated with the rule.
- time_windows Sequence[GetSecurity Governance Rule Time Window] 
- Time windows when the rule is active.
- user_group_ Sequence[str]ids 
- List of user group IDs associated with the rule.
- id str
- The ID of the rule.
- name str
- The name of the rule.
- conditionIds List<String>
- List of condition IDs associated with the rule.
- description String
- The description of the rule.
- isEnabled Boolean
- Whether the rule is enabled.
- orgId String
- The organization identifier.
- projectId String
- The project identifier.
- List<String>
- Tags associated with the rule.
- timeWindows List<Property Map>
- Time windows when the rule is active.
- userGroup List<String>Ids 
- List of user group IDs associated with the rule.
- id String
- The ID of the rule.
- name String
- The name of the rule.
Supporting Types
GetSecurityGovernanceRuleTimeWindow     
- Duration string
- Duration of the time window (e.g., '30m', '2h').
- EndTime int
- End time of the time window in milliseconds since epoch.
- Recurrences
List<GetSecurity Governance Rule Time Window Recurrence> 
- Recurrence configuration for the time window.
- StartTime int
- Start time of the time window in milliseconds since epoch.
- TimeZone string
- Time zone for the time window.
- Duration string
- Duration of the time window (e.g., '30m', '2h').
- EndTime int
- End time of the time window in milliseconds since epoch.
- Recurrences
[]GetSecurity Governance Rule Time Window Recurrence 
- Recurrence configuration for the time window.
- StartTime int
- Start time of the time window in milliseconds since epoch.
- TimeZone string
- Time zone for the time window.
- duration String
- Duration of the time window (e.g., '30m', '2h').
- endTime Integer
- End time of the time window in milliseconds since epoch.
- recurrences
List<GetSecurity Governance Rule Time Window Recurrence> 
- Recurrence configuration for the time window.
- startTime Integer
- Start time of the time window in milliseconds since epoch.
- timeZone String
- Time zone for the time window.
- duration string
- Duration of the time window (e.g., '30m', '2h').
- endTime number
- End time of the time window in milliseconds since epoch.
- recurrences
GetSecurity Governance Rule Time Window Recurrence[] 
- Recurrence configuration for the time window.
- startTime number
- Start time of the time window in milliseconds since epoch.
- timeZone string
- Time zone for the time window.
- duration str
- Duration of the time window (e.g., '30m', '2h').
- end_time int
- End time of the time window in milliseconds since epoch.
- recurrences
Sequence[GetSecurity Governance Rule Time Window Recurrence] 
- Recurrence configuration for the time window.
- start_time int
- Start time of the time window in milliseconds since epoch.
- time_zone str
- Time zone for the time window.
- duration String
- Duration of the time window (e.g., '30m', '2h').
- endTime Number
- End time of the time window in milliseconds since epoch.
- recurrences List<Property Map>
- Recurrence configuration for the time window.
- startTime Number
- Start time of the time window in milliseconds since epoch.
- timeZone String
- Time zone for the time window.
GetSecurityGovernanceRuleTimeWindowRecurrence      
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the harnessTerraform Provider.
 
