1. Packages
  2. Harness Provider
  3. API Docs
  4. governance
  5. getRuleEnforcement
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.governance.getRuleEnforcement

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:governance/getRuleEnforcement:getRuleEnforcement
      arguments:
        # arguments dictionary

    The 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.
    IsDryRun bool
    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.
    RuleSetIds Dictionary<string, string>
    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.
    IsDryRun bool
    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.
    RuleSetIds map[string]string
    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.
    isDryRun Boolean
    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.
    ruleSetIds Map<String,String>
    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.
    isDryRun boolean
    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.
    ruleSetIds {[key: string]: string}
    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_run bool
    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_ids Mapping[str, str]
    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.
    isDryRun Boolean
    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.
    ruleSetIds Map<String>
    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 harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi