Harness v0.5.7 published on Saturday, Mar 8, 2025 by Pulumi
harness.governance.getRuleEnforcement
Explore with Pulumi AI
Datasource for looking up a rule enforcement.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.governance.getRuleEnforcement({
    enforcementId: "enforcement_id",
});
import pulumi
import pulumi_harness as harness
example = harness.governance.get_rule_enforcement(enforcement_id="enforcement_id")
package main
import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/governance"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := governance.LookupRuleEnforcement(ctx, &governance.LookupRuleEnforcementArgs{
			EnforcementId: "enforcement_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(() => 
{
    var example = Harness.Governance.GetRuleEnforcement.Invoke(new()
    {
        EnforcementId = "enforcement_id",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.governance.GovernanceFunctions;
import com.pulumi.harness.governance.inputs.GetRuleEnforcementArgs;
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) {
        final var example = GovernanceFunctions.getRuleEnforcement(GetRuleEnforcementArgs.builder()
            .enforcementId("enforcement_id")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: harness:governance:getRuleEnforcement
      arguments:
        enforcementId: enforcement_id
Using getRuleEnforcement
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 getRuleEnforcement(args: GetRuleEnforcementArgs, opts?: InvokeOptions): Promise<GetRuleEnforcementResult>
function getRuleEnforcementOutput(args: GetRuleEnforcementOutputArgs, opts?: InvokeOptions): Output<GetRuleEnforcementResult>def get_rule_enforcement(enforcement_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRuleEnforcementResult
def get_rule_enforcement_output(enforcement_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRuleEnforcementResult]func LookupRuleEnforcement(ctx *Context, args *LookupRuleEnforcementArgs, opts ...InvokeOption) (*LookupRuleEnforcementResult, error)
func LookupRuleEnforcementOutput(ctx *Context, args *LookupRuleEnforcementOutputArgs, opts ...InvokeOption) LookupRuleEnforcementResultOutput> Note: This function is named LookupRuleEnforcement in the Go SDK.
public static class GetRuleEnforcement 
{
    public static Task<GetRuleEnforcementResult> InvokeAsync(GetRuleEnforcementArgs args, InvokeOptions? opts = null)
    public static Output<GetRuleEnforcementResult> Invoke(GetRuleEnforcementInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRuleEnforcementResult> getRuleEnforcement(GetRuleEnforcementArgs args, InvokeOptions options)
public static Output<GetRuleEnforcementResult> getRuleEnforcement(GetRuleEnforcementArgs args, InvokeOptions options)
fn::invoke:
  function: harness:governance/getRuleEnforcement:getRuleEnforcement
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnforcementId string
- Id of rule enforcement.
- EnforcementId string
- Id of rule enforcement.
- enforcementId String
- Id of rule enforcement.
- enforcementId string
- Id of rule enforcement.
- enforcement_id str
- Id of rule enforcement.
- enforcementId String
- Id of rule enforcement.
getRuleEnforcement Result
The following output properties are available:
- CloudProvider string
- The cloud provider for the rule enforcement.
- Description string
- Description for rule enforcement.
- EnforcementId string
- Id of rule enforcement.
- ExecutionSchedule string
- Execution schedule in cron format.
- ExecutionTimezone string
- Timezone for the execution schedule.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsDry boolRun 
- Indicates if the rule enforcement is a dry run.
- IsEnabled bool
- Indicates if the rule enforcement is enabled.
- Name string
- Name of the rule enforcement.
- RuleIds Dictionary<string, string>
- List of rule IDs.
- RuleSet Dictionary<string, string>Ids 
- List of rule set IDs.
- TargetAccounts List<string>
- List of target accounts.
- TargetRegions List<string>
- List of target regions.
- CloudProvider string
- The cloud provider for the rule enforcement.
- Description string
- Description for rule enforcement.
- EnforcementId string
- Id of rule enforcement.
- ExecutionSchedule string
- Execution schedule in cron format.
- ExecutionTimezone string
- Timezone for the execution schedule.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsDry boolRun 
- Indicates if the rule enforcement is a dry run.
- IsEnabled bool
- Indicates if the rule enforcement is enabled.
- Name string
- Name of the rule enforcement.
- RuleIds map[string]string
- List of rule IDs.
- RuleSet map[string]stringIds 
- List of rule set IDs.
- TargetAccounts []string
- List of target accounts.
- TargetRegions []string
- List of target regions.
- cloudProvider String
- The cloud provider for the rule enforcement.
- description String
- Description for rule enforcement.
- enforcementId String
- Id of rule enforcement.
- executionSchedule String
- Execution schedule in cron format.
- executionTimezone String
- Timezone for the execution schedule.
- id String
- The provider-assigned unique ID for this managed resource.
- isDry BooleanRun 
- Indicates if the rule enforcement is a dry run.
- isEnabled Boolean
- Indicates if the rule enforcement is enabled.
- name String
- Name of the rule enforcement.
- ruleIds Map<String,String>
- List of rule IDs.
- ruleSet Map<String,String>Ids 
- List of rule set IDs.
- targetAccounts List<String>
- List of target accounts.
- targetRegions List<String>
- List of target regions.
- cloudProvider string
- The cloud provider for the rule enforcement.
- description string
- Description for rule enforcement.
- enforcementId string
- Id of rule enforcement.
- executionSchedule string
- Execution schedule in cron format.
- executionTimezone string
- Timezone for the execution schedule.
- id string
- The provider-assigned unique ID for this managed resource.
- isDry booleanRun 
- Indicates if the rule enforcement is a dry run.
- isEnabled boolean
- Indicates if the rule enforcement is enabled.
- name string
- Name of the rule enforcement.
- ruleIds {[key: string]: string}
- List of rule IDs.
- ruleSet {[key: string]: string}Ids 
- List of rule set IDs.
- targetAccounts string[]
- List of target accounts.
- targetRegions string[]
- List of target regions.
- cloud_provider str
- The cloud provider for the rule enforcement.
- description str
- Description for rule enforcement.
- enforcement_id str
- Id of rule enforcement.
- execution_schedule str
- Execution schedule in cron format.
- execution_timezone str
- Timezone for the execution schedule.
- id str
- The provider-assigned unique ID for this managed resource.
- is_dry_ boolrun 
- Indicates if the rule enforcement is a dry run.
- is_enabled bool
- Indicates if the rule enforcement is enabled.
- name str
- Name of the rule enforcement.
- rule_ids Mapping[str, str]
- List of rule IDs.
- rule_set_ Mapping[str, str]ids 
- List of rule set IDs.
- target_accounts Sequence[str]
- List of target accounts.
- target_regions Sequence[str]
- List of target regions.
- cloudProvider String
- The cloud provider for the rule enforcement.
- description String
- Description for rule enforcement.
- enforcementId String
- Id of rule enforcement.
- executionSchedule String
- Execution schedule in cron format.
- executionTimezone String
- Timezone for the execution schedule.
- id String
- The provider-assigned unique ID for this managed resource.
- isDry BooleanRun 
- Indicates if the rule enforcement is a dry run.
- isEnabled Boolean
- Indicates if the rule enforcement is enabled.
- name String
- Name of the rule enforcement.
- ruleIds Map<String>
- List of rule IDs.
- ruleSet Map<String>Ids 
- List of rule set IDs.
- targetAccounts List<String>
- List of target accounts.
- targetRegions List<String>
- List of target regions.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the harnessTerraform Provider.
