Viewing docs for Harness v0.14.3
published on Thursday, Jun 18, 2026 by Pulumi
published on Thursday, Jun 18, 2026 by Pulumi
Viewing docs for Harness v0.14.3
published on Thursday, Jun 18, 2026 by Pulumi
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 dictionarydata "harness_chaos_getsecuritygovernancerulev3" "name" {
# arguments
}The following arguments are supported:
- 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
identityornamemust be provided. - Name string
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - Name string
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - name string
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - name String
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - name string
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - name str
- The name of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - name String
- The name of the security governance rule. Exactly one of
identityornamemust be provided.
getSecurityGovernanceRuleV3 Result
The following output properties are available:
- 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
identityornamemust be provided. - Org
Id string - The organization ID of the security governance rule
- Project
Id string - The project ID of the security governance rule
- List<string>
- Tags for the security governance rule
- Time
Windows List<GetSecurity Governance Rule V3Time Window> - Time windows during which the rule is active
- User
Group List<string>Ids - List of user group IDs associated with this rule
- Identity string
- The identifier of the security governance rule. Exactly one of
identityornamemust be provided.
- Condition
Ids []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
identityornamemust be provided. - Org
Id string - The organization ID of the security governance rule
- Project
Id string - The project ID of the security governance rule
- []string
- Tags for the security governance rule
- Time
Windows []GetSecurity Governance Rule V3Time Window - Time windows during which the rule is active
- User
Group []stringIds - List of user group IDs associated with this rule
- Identity string
- The identifier of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - org_
id string - The organization ID of the security governance rule
- project_
id string - The project ID of the security governance rule
- list(string)
- Tags for the security governance rule
- time_
windows list(object) - Time windows during which the rule is active
- user_
group_ list(string)ids - List of user group IDs associated with this rule
- identity string
- The identifier of the security governance rule. Exactly one of
identityornamemust 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 Boolean - Whether the rule is enabled
- name String
- The name of the security governance rule. Exactly one of
identityornamemust be provided. - org
Id String - The organization ID of the security governance rule
- project
Id String - The project ID of the security governance rule
- List<String>
- Tags for the security governance rule
- time
Windows List<GetSecurity Governance Rule V3Time Window> - Time windows during which the rule is active
- user
Group List<String>Ids - List of user group IDs associated with this rule
- identity String
- The identifier of the security governance rule. Exactly one of
identityornamemust be provided.
- condition
Ids 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 boolean - Whether the rule is enabled
- name string
- The name of the security governance rule. Exactly one of
identityornamemust be provided. - org
Id string - The organization ID of the security governance rule
- project
Id string - The project ID of the security governance rule
- string[]
- Tags for the security governance rule
- time
Windows GetSecurity Governance Rule V3Time Window[] - Time windows during which the rule is active
- user
Group string[]Ids - List of user group IDs associated with this rule
- identity string
- The identifier of the security governance rule. Exactly one of
identityornamemust 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
identityornamemust be provided. - org_
id str - The organization ID of the security governance rule
- project_
id str - The project ID of the security governance rule
- Sequence[str]
- Tags for the security governance rule
- time_
windows Sequence[GetSecurity Governance Rule V3Time Window] - Time windows during which the rule is active
- user_
group_ Sequence[str]ids - List of user group IDs associated with this rule
- identity str
- The identifier of the security governance rule. Exactly one of
identityornamemust 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 Boolean - Whether the rule is enabled
- name String
- The name of the security governance rule. Exactly one of
identityornamemust be provided. - org
Id String - The organization ID of the security governance rule
- project
Id String - The project ID of the security governance rule
- List<String>
- Tags for the security governance rule
- time
Windows List<Property Map> - Time windows during which the rule is active
- user
Group List<String>Ids - List of user group IDs associated with this rule
- identity String
- The identifier of the security governance rule. Exactly one of
identityornamemust be provided.
Supporting Types
GetSecurityGovernanceRuleV3TimeWindow
- Duration string
- 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
List<Get
Security Governance Rule V3Time Window Recurrence> - Recurrence specification for the time window.
- Start
Time int - 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.
- End
Time int - End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
- Recurrences
[]Get
Security Governance Rule V3Time Window Recurrence - Recurrence specification for the time window.
- Start
Time int - 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.
- 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.
- end
Time Integer - End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
- recurrences
List<Get
Security Governance Rule V3Time Window Recurrence> - Recurrence specification for the time window.
- start
Time Integer - 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.
- end
Time number - End of the window as a Unix epoch timestamp in milliseconds. Computed from duration when not set.
- recurrences
Get
Security Governance Rule V3Time Window Recurrence[] - 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 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[Get
Security Governance Rule V3Time Window Recurrence] - 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.
- end
Time 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.
- 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).
GetSecurityGovernanceRuleV3TimeWindowRecurrence
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.14.3
published on Thursday, Jun 18, 2026 by Pulumi
published on Thursday, Jun 18, 2026 by Pulumi