1. Packages
  2. Harness Provider
  3. API Docs
  4. chaos
  5. getSecurityGovernanceRule
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

harness.chaos.getSecurityGovernanceRule

Explore with Pulumi AI

harness logo
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

    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 dictionary

    The following arguments are supported:

    OrgId string
    The organization identifier.
    ProjectId string
    The project identifier.
    Id string
    The ID of the rule.
    Name string
    The name of the rule.
    OrgId string
    The organization identifier.
    ProjectId string
    The project identifier.
    Id string
    The ID of the rule.
    Name string
    The name of the rule.
    orgId String
    The organization identifier.
    projectId String
    The project identifier.
    id String
    The ID of the rule.
    name String
    The name of the rule.
    orgId string
    The organization identifier.
    projectId string
    The project identifier.
    id string
    The ID of the rule.
    name string
    The name of the rule.
    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.
    orgId String
    The organization identifier.
    projectId String
    The project identifier.
    id String
    The ID of the rule.
    name String
    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.
    Tags List<string>
    Tags associated with the rule.
    TimeWindows List<GetSecurityGovernanceRuleTimeWindow>
    Time windows when the rule is active.
    UserGroupIds List<string>
    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.
    Tags []string
    Tags associated with the rule.
    TimeWindows []GetSecurityGovernanceRuleTimeWindow
    Time windows when the rule is active.
    UserGroupIds []string
    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.
    tags List<String>
    Tags associated with the rule.
    timeWindows List<GetSecurityGovernanceRuleTimeWindow>
    Time windows when the rule is active.
    userGroupIds List<String>
    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.
    tags string[]
    Tags associated with the rule.
    timeWindows GetSecurityGovernanceRuleTimeWindow[]
    Time windows when the rule is active.
    userGroupIds string[]
    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.
    tags Sequence[str]
    Tags associated with the rule.
    time_windows Sequence[GetSecurityGovernanceRuleTimeWindow]
    Time windows when the rule is active.
    user_group_ids Sequence[str]
    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.
    tags List<String>
    Tags associated with the rule.
    timeWindows List<Property Map>
    Time windows when the rule is active.
    userGroupIds List<String>
    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<GetSecurityGovernanceRuleTimeWindowRecurrence>
    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 []GetSecurityGovernanceRuleTimeWindowRecurrence
    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<GetSecurityGovernanceRuleTimeWindowRecurrence>
    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 GetSecurityGovernanceRuleTimeWindowRecurrence[]
    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[GetSecurityGovernanceRuleTimeWindowRecurrence]
    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

    Type string
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    Until int
    Unix timestamp in milliseconds until when the recurrence should continue.
    Value int
    Recurrence value (e.g., interval for daily recurrence).
    Type string
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    Until int
    Unix timestamp in milliseconds until when the recurrence should continue.
    Value int
    Recurrence value (e.g., interval for daily recurrence).
    type String
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    until Integer
    Unix timestamp in milliseconds until when the recurrence should continue.
    value Integer
    Recurrence value (e.g., interval for daily recurrence).
    type string
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    until number
    Unix timestamp in milliseconds until when the recurrence should continue.
    value number
    Recurrence value (e.g., interval for daily recurrence).
    type str
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    until int
    Unix timestamp in milliseconds until when the recurrence should continue.
    value int
    Recurrence value (e.g., interval for daily recurrence).
    type String
    Type of recurrence (e.g., 'Daily', 'Weekly', 'Monthly').
    until Number
    Unix timestamp in milliseconds until when the recurrence should continue.
    value Number
    Recurrence value (e.g., interval for daily recurrence).

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi