1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. chaos
  6. getSecurityGovernanceRuleV3
Viewing docs for Harness v0.14.3
published on Thursday, Jun 18, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.14.3
published on Thursday, Jun 18, 2026 by Pulumi

    Data source for retrieving a Harness Chaos Security Governance Rule (V3 / REST API).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Look up a security governance rule (V3) by identity
    const byIdentity = harness.chaos.getSecurityGovernanceRuleV3({
        orgId: orgId,
        projectId: projectId,
        identity: "<rule_id>",
    });
    // Look up a security governance rule (V3) by name
    const byName = harness.chaos.getSecurityGovernanceRuleV3({
        orgId: orgId,
        projectId: projectId,
        name: "k8s-security-rule",
    });
    export const securityGovernanceRuleV3ByIdentity = byIdentity;
    export const securityGovernanceRuleV3ByName = byName;
    
    import pulumi
    import pulumi_harness as harness
    
    # Look up a security governance rule (V3) by identity
    by_identity = harness.chaos.get_security_governance_rule_v3(org_id=org_id,
        project_id=project_id,
        identity="<rule_id>")
    # Look up a security governance rule (V3) by name
    by_name = harness.chaos.get_security_governance_rule_v3(org_id=org_id,
        project_id=project_id,
        name="k8s-security-rule")
    pulumi.export("securityGovernanceRuleV3ByIdentity", by_identity)
    pulumi.export("securityGovernanceRuleV3ByName", by_name)
    
    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 {
    		// Look up a security governance rule (V3) by identity
    		byIdentity, err := chaos.LookupSecurityGovernanceRuleV3(ctx, &chaos.LookupSecurityGovernanceRuleV3Args{
    			OrgId:     orgId,
    			ProjectId: projectId,
    			Identity:  pulumi.StringRef("<rule_id>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Look up a security governance rule (V3) by name
    		byName, err := chaos.LookupSecurityGovernanceRuleV3(ctx, &chaos.LookupSecurityGovernanceRuleV3Args{
    			OrgId:     orgId,
    			ProjectId: projectId,
    			Name:      pulumi.StringRef("k8s-security-rule"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("securityGovernanceRuleV3ByIdentity", byIdentity)
    		ctx.Export("securityGovernanceRuleV3ByName", byName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up a security governance rule (V3) by identity
        var byIdentity = Harness.Chaos.GetSecurityGovernanceRuleV3.Invoke(new()
        {
            OrgId = orgId,
            ProjectId = projectId,
            Identity = "<rule_id>",
        });
    
        // Look up a security governance rule (V3) by name
        var byName = Harness.Chaos.GetSecurityGovernanceRuleV3.Invoke(new()
        {
            OrgId = orgId,
            ProjectId = projectId,
            Name = "k8s-security-rule",
        });
    
        return new Dictionary<string, object?>
        {
            ["securityGovernanceRuleV3ByIdentity"] = byIdentity,
            ["securityGovernanceRuleV3ByName"] = byName,
        };
    });
    
    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.GetSecurityGovernanceRuleV3Args;
    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) {
            // Look up a security governance rule (V3) by identity
            final var byIdentity = ChaosFunctions.getSecurityGovernanceRuleV3(GetSecurityGovernanceRuleV3Args.builder()
                .orgId(orgId)
                .projectId(projectId)
                .identity("<rule_id>")
                .build());
    
            // Look up a security governance rule (V3) by name
            final var byName = ChaosFunctions.getSecurityGovernanceRuleV3(GetSecurityGovernanceRuleV3Args.builder()
                .orgId(orgId)
                .projectId(projectId)
                .name("k8s-security-rule")
                .build());
    
            ctx.export("securityGovernanceRuleV3ByIdentity", byIdentity);
            ctx.export("securityGovernanceRuleV3ByName", byName);
        }
    }
    
    variables:
      # Look up a security governance rule (V3) by identity
      byIdentity:
        fn::invoke:
          function: harness:chaos:getSecurityGovernanceRuleV3
          arguments:
            orgId: ${orgId}
            projectId: ${projectId}
            identity: <rule_id>
      # Look up a security governance rule (V3) by name
      byName:
        fn::invoke:
          function: harness:chaos:getSecurityGovernanceRuleV3
          arguments:
            orgId: ${orgId}
            projectId: ${projectId}
            name: k8s-security-rule
    outputs:
      securityGovernanceRuleV3ByIdentity: ${byIdentity}
      securityGovernanceRuleV3ByName: ${byName}
    
    pulumi {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_chaos_getsecuritygovernancerulev3" "byIdentity" {
      org_id     = orgId
      project_id = projectId
      identity   = "<rule_id>"
    }
    data "harness_chaos_getsecuritygovernancerulev3" "byName" {
      org_id     = orgId
      project_id = projectId
      name       = "k8s-security-rule"
    }
    
    # Look up a security governance rule (V3) by identity
    # Look up a security governance rule (V3) by name
    output "securityGovernanceRuleV3ByIdentity" {
      value = data.harness_chaos_getsecuritygovernancerulev3.byIdentity
    }
    output "securityGovernanceRuleV3ByName" {
      value = data.harness_chaos_getsecuritygovernancerulev3.byName
    }
    

    Using getSecurityGovernanceRuleV3

    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 getSecurityGovernanceRuleV3(args: GetSecurityGovernanceRuleV3Args, opts?: InvokeOptions): Promise<GetSecurityGovernanceRuleV3Result>
    function getSecurityGovernanceRuleV3Output(args: GetSecurityGovernanceRuleV3OutputArgs, opts?: InvokeOptions): Output<GetSecurityGovernanceRuleV3Result>
    def get_security_governance_rule_v3(identity: Optional[str] = None,
                                        name: Optional[str] = None,
                                        org_id: Optional[str] = None,
                                        project_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetSecurityGovernanceRuleV3Result
    def get_security_governance_rule_v3_output(identity: pulumi.Input[Optional[str]] = None,
                                        name: pulumi.Input[Optional[str]] = None,
                                        org_id: pulumi.Input[Optional[str]] = None,
                                        project_id: pulumi.Input[Optional[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGovernanceRuleV3Result]
    func LookupSecurityGovernanceRuleV3(ctx *Context, args *LookupSecurityGovernanceRuleV3Args, opts ...InvokeOption) (*LookupSecurityGovernanceRuleV3Result, error)
    func LookupSecurityGovernanceRuleV3Output(ctx *Context, args *LookupSecurityGovernanceRuleV3OutputArgs, opts ...InvokeOption) LookupSecurityGovernanceRuleV3ResultOutput

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

    public static class GetSecurityGovernanceRuleV3 
    {
        public static Task<GetSecurityGovernanceRuleV3Result> InvokeAsync(GetSecurityGovernanceRuleV3Args args, InvokeOptions? opts = null)
        public static Output<GetSecurityGovernanceRuleV3Result> Invoke(GetSecurityGovernanceRuleV3InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityGovernanceRuleV3Result> getSecurityGovernanceRuleV3(GetSecurityGovernanceRuleV3Args args, InvokeOptions options)
    public static Output<GetSecurityGovernanceRuleV3Result> getSecurityGovernanceRuleV3(GetSecurityGovernanceRuleV3Args args, InvokeOptions options)
    
    fn::invoke:
      function: harness:chaos/getSecurityGovernanceRuleV3:getSecurityGovernanceRuleV3
      arguments:
        # arguments dictionary
    data "harness_chaos_getsecuritygovernancerulev3" "name" {
        # arguments
    }

    The following arguments are supported:

    OrgId string
    The organization ID of the security governance rule
    ProjectId string
    The project ID of the security governance rule
    Identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    Name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    OrgId string
    The organization ID of the security governance rule
    ProjectId string
    The project ID of the security governance rule
    Identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    Name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    org_id string
    The organization ID of the security governance rule
    project_id string
    The project ID of the security governance rule
    identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId String
    The organization ID of the security governance rule
    projectId String
    The project ID of the security governance rule
    identity String
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    name String
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId string
    The organization ID of the security governance rule
    projectId string
    The project ID of the security governance rule
    identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    org_id str
    The organization ID of the security governance rule
    project_id str
    The project ID of the security governance rule
    identity str
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    name str
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId String
    The organization ID of the security governance rule
    projectId String
    The project ID of the security governance rule
    identity String
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    name String
    The name of the security governance rule. Exactly one of identity or name must be provided.

    getSecurityGovernanceRuleV3 Result

    The following output properties are available:

    ConditionIds List<string>
    List of condition IDs associated with this rule
    Description string
    Description of the security governance rule
    Id string
    The provider-assigned unique ID for this managed resource.
    IsEnabled bool
    Whether the rule is enabled
    Name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    OrgId string
    The organization ID of the security governance rule
    ProjectId string
    The project ID of the security governance rule
    Tags List<string>
    Tags for the security governance rule
    TimeWindows List<GetSecurityGovernanceRuleV3TimeWindow>
    Time windows during which the rule is active
    UserGroupIds List<string>
    List of user group IDs associated with this rule
    Identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    ConditionIds []string
    List of condition IDs associated with this rule
    Description string
    Description of the security governance rule
    Id string
    The provider-assigned unique ID for this managed resource.
    IsEnabled bool
    Whether the rule is enabled
    Name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    OrgId string
    The organization ID of the security governance rule
    ProjectId string
    The project ID of the security governance rule
    Tags []string
    Tags for the security governance rule
    TimeWindows []GetSecurityGovernanceRuleV3TimeWindow
    Time windows during which the rule is active
    UserGroupIds []string
    List of user group IDs associated with this rule
    Identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    condition_ids list(string)
    List of condition IDs associated with this rule
    description string
    Description of the security governance rule
    id string
    The provider-assigned unique ID for this managed resource.
    is_enabled bool
    Whether the rule is enabled
    name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    org_id string
    The organization ID of the security governance rule
    project_id string
    The project ID of the security governance rule
    tags list(string)
    Tags for the security governance rule
    time_windows list(object)
    Time windows during which the rule is active
    user_group_ids list(string)
    List of user group IDs associated with this rule
    identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    conditionIds List<String>
    List of condition IDs associated with this rule
    description String
    Description of the security governance rule
    id String
    The provider-assigned unique ID for this managed resource.
    isEnabled Boolean
    Whether the rule is enabled
    name String
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId String
    The organization ID of the security governance rule
    projectId String
    The project ID of the security governance rule
    tags List<String>
    Tags for the security governance rule
    timeWindows List<GetSecurityGovernanceRuleV3TimeWindow>
    Time windows during which the rule is active
    userGroupIds List<String>
    List of user group IDs associated with this rule
    identity String
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    conditionIds string[]
    List of condition IDs associated with this rule
    description string
    Description of the security governance rule
    id string
    The provider-assigned unique ID for this managed resource.
    isEnabled boolean
    Whether the rule is enabled
    name string
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId string
    The organization ID of the security governance rule
    projectId string
    The project ID of the security governance rule
    tags string[]
    Tags for the security governance rule
    timeWindows GetSecurityGovernanceRuleV3TimeWindow[]
    Time windows during which the rule is active
    userGroupIds string[]
    List of user group IDs associated with this rule
    identity string
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    condition_ids Sequence[str]
    List of condition IDs associated with this rule
    description str
    Description of the security governance rule
    id str
    The provider-assigned unique ID for this managed resource.
    is_enabled bool
    Whether the rule is enabled
    name str
    The name of the security governance rule. Exactly one of identity or name must be provided.
    org_id str
    The organization ID of the security governance rule
    project_id str
    The project ID of the security governance rule
    tags Sequence[str]
    Tags for the security governance rule
    time_windows Sequence[GetSecurityGovernanceRuleV3TimeWindow]
    Time windows during which the rule is active
    user_group_ids Sequence[str]
    List of user group IDs associated with this rule
    identity str
    The identifier of the security governance rule. Exactly one of identity or name must be provided.
    conditionIds List<String>
    List of condition IDs associated with this rule
    description String
    Description of the security governance rule
    id String
    The provider-assigned unique ID for this managed resource.
    isEnabled Boolean
    Whether the rule is enabled
    name String
    The name of the security governance rule. Exactly one of identity or name must be provided.
    orgId String
    The organization ID of the security governance rule
    projectId String
    The project ID of the security governance rule
    tags List<String>
    Tags for the security governance rule
    timeWindows List<Property Map>
    Time windows during which the rule is active
    userGroupIds List<String>
    List of user group IDs associated with this rule
    identity String
    The identifier of the security governance rule. Exactly one of identity or name must be provided.

    Supporting Types

    GetSecurityGovernanceRuleV3TimeWindow

    Duration string
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    EndTime int
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    Recurrences List<GetSecurityGovernanceRuleV3TimeWindowRecurrence>
    Recurrence specification for the time window.
    StartTime int
    Start of the window as a Unix epoch timestamp in milliseconds.
    TimeZone string
    IANA time zone for the window (e.g., UTC, America/New_York).
    Duration string
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    EndTime int
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    Recurrences []GetSecurityGovernanceRuleV3TimeWindowRecurrence
    Recurrence specification for the time window.
    StartTime int
    Start of the window as a Unix epoch timestamp in milliseconds.
    TimeZone string
    IANA time zone for the window (e.g., UTC, America/New_York).
    duration string
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    end_time number
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    recurrences list(object)
    Recurrence specification for the time window.
    start_time number
    Start of the window as a Unix epoch timestamp in milliseconds.
    time_zone string
    IANA time zone for the window (e.g., UTC, America/New_York).
    duration String
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    endTime Integer
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    recurrences List<GetSecurityGovernanceRuleV3TimeWindowRecurrence>
    Recurrence specification for the time window.
    startTime Integer
    Start of the window as a Unix epoch timestamp in milliseconds.
    timeZone String
    IANA time zone for the window (e.g., UTC, America/New_York).
    duration string
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    endTime number
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    recurrences GetSecurityGovernanceRuleV3TimeWindowRecurrence[]
    Recurrence specification for the time window.
    startTime number
    Start of the window as a Unix epoch timestamp in milliseconds.
    timeZone string
    IANA time zone for the window (e.g., UTC, America/New_York).
    duration str
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    end_time int
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    recurrences Sequence[GetSecurityGovernanceRuleV3TimeWindowRecurrence]
    Recurrence specification for the time window.
    start_time int
    Start of the window as a Unix epoch timestamp in milliseconds.
    time_zone str
    IANA time zone for the window (e.g., UTC, America/New_York).
    duration String
    Duration of the window (e.g., 30m, 1h). Computed from endTime when not set.
    endTime Number
    End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
    recurrences List<Property Map>
    Recurrence specification for the time window.
    startTime Number
    Start of the window as a Unix epoch timestamp in milliseconds.
    timeZone String
    IANA time zone for the window (e.g., UTC, America/New_York).

    GetSecurityGovernanceRuleV3TimeWindowRecurrence

    Type string
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    Until int
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    Value int
    Day of month for Monthly recurrence. Only used when type is Monthly.
    Type string
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    Until int
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    Value int
    Day of month for Monthly recurrence. Only used when type is Monthly.
    type string
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    until number
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    value number
    Day of month for Monthly recurrence. Only used when type is Monthly.
    type String
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    until Integer
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    value Integer
    Day of month for Monthly recurrence. Only used when type is Monthly.
    type string
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    until number
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    value number
    Day of month for Monthly recurrence. Only used when type is Monthly.
    type str
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    until int
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    value int
    Day of month for Monthly recurrence. Only used when type is Monthly.
    type String
    Recurrence type (None, Daily, Weekly, Monthly, Yearly).
    until Number
    End of the recurrence as a Unix epoch timestamp in milliseconds. Use -1 for no end.
    value Number
    Day of month for Monthly recurrence. Only used when type is Monthly.

    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.14.3
    published on Thursday, Jun 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial