Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi
harness.chaos.getSecurityGovernanceRule
Explore with Pulumi AI
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:
- 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:
- Condition
Ids List<string> - List of condition IDs associated with the rule.
- Description string
- The description of the rule.
- Is
Enabled bool - Whether the rule is enabled.
- Org
Id string - The organization identifier.
- Project
Id string - The project identifier.
- List<string>
- Tags associated with the rule.
- Time
Windows List<GetSecurity Governance Rule Time Window> - Time windows when the rule is active.
- User
Group 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.
- Condition
Ids []string - List of condition IDs associated with the rule.
- Description string
- The description of the rule.
- Is
Enabled bool - Whether the rule is enabled.
- Org
Id string - The organization identifier.
- Project
Id string - The project identifier.
- []string
- Tags associated with the rule.
- Time
Windows []GetSecurity Governance Rule Time Window - Time windows when the rule is active.
- User
Group []stringIds - 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 List<String> - List of condition IDs associated with the rule.
- description String
- The description of the rule.
- is
Enabled Boolean - Whether the rule is enabled.
- org
Id String - The organization identifier.
- project
Id String - The project identifier.
- List<String>
- Tags associated with the rule.
- time
Windows List<GetSecurity Governance Rule Time Window> - Time windows when the rule is active.
- user
Group 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.
- condition
Ids string[] - List of condition IDs associated with the rule.
- description string
- The description of the rule.
- is
Enabled boolean - Whether the rule is enabled.
- org
Id string - The organization identifier.
- project
Id string - The project identifier.
- string[]
- Tags associated with the rule.
- time
Windows GetSecurity Governance Rule Time Window[] - Time windows when the rule is active.
- user
Group 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.
- condition
Ids List<String> - List of condition IDs associated with the rule.
- description String
- The description of the rule.
- is
Enabled Boolean - Whether the rule is enabled.
- org
Id String - The organization identifier.
- project
Id String - The project identifier.
- List<String>
- Tags associated with the rule.
- time
Windows List<Property Map> - Time windows when the rule is active.
- user
Group 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').
- End
Time int - End time of the time window in milliseconds since epoch.
- Recurrences
List<Get
Security 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 string - Time zone for the time window.
- Duration string
- Duration of the time window (e.g., '30m', '2h').
- End
Time int - End time of the time window in milliseconds since epoch.
- Recurrences
[]Get
Security 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 string - Time zone for the time window.
- duration String
- Duration of the time window (e.g., '30m', '2h').
- end
Time Integer - End time of the time window in milliseconds since epoch.
- recurrences
List<Get
Security Governance Rule Time Window Recurrence> - Recurrence configuration for the time window.
- start
Time Integer - Start time of the time window in milliseconds since epoch.
- time
Zone String - Time zone for the time window.
- duration string
- Duration of the time window (e.g., '30m', '2h').
- end
Time number - End time of the time window in milliseconds since epoch.
- recurrences
Get
Security Governance Rule Time Window Recurrence[] - Recurrence configuration for the time window.
- start
Time number - Start time of the time window in milliseconds since epoch.
- time
Zone 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[Get
Security 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').
- end
Time Number - End time of the time window in milliseconds since epoch.
- recurrences List<Property Map>
- Recurrence configuration for the time window.
- start
Time Number - Start time of the time window in milliseconds since epoch.
- time
Zone 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
harness
Terraform Provider.