Harness v0.4.4 published on Tuesday, Nov 12, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harness:governance/getRuleEnforcement:getRuleEnforcement
arguments:
# arguments dictionary
The following arguments are supported:
- Enforcement
Id string - Id of rule enforcement.
- Enforcement
Id string - Id of rule enforcement.
- enforcement
Id String - Id of rule enforcement.
- enforcement
Id string - Id of rule enforcement.
- enforcement_
id str - Id of rule enforcement.
- enforcement
Id String - Id of rule enforcement.
getRuleEnforcement Result
The following output properties are available:
- Cloud
Provider string - The cloud provider for the rule enforcement.
- Description string
- Description for rule enforcement.
- Enforcement
Id string - Id of rule enforcement.
- Execution
Schedule string - Execution schedule in cron format.
- Execution
Timezone string - Timezone for the execution schedule.
- Id string
- 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 string
- Name of the rule enforcement.
- Rule
Ids Dictionary<string, string> - List of rule IDs.
- Rule
Set Dictionary<string, string>Ids - List of rule set IDs.
- Target
Accounts List<string> - List of target accounts.
- Target
Regions List<string> - List of target regions.
- Cloud
Provider string - The cloud provider for the rule enforcement.
- Description string
- Description for rule enforcement.
- Enforcement
Id string - Id of rule enforcement.
- Execution
Schedule string - Execution schedule in cron format.
- Execution
Timezone string - Timezone for the execution schedule.
- Id string
- 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 string
- Name of the rule enforcement.
- Rule
Ids map[string]string - List of rule IDs.
- Rule
Set map[string]stringIds - List of rule set IDs.
- Target
Accounts []string - List of target accounts.
- Target
Regions []string - List of target regions.
- cloud
Provider String - The cloud provider for the rule enforcement.
- description String
- Description for rule enforcement.
- enforcement
Id String - Id of rule enforcement.
- execution
Schedule String - Execution schedule in cron format.
- execution
Timezone String - Timezone for the execution schedule.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Dry BooleanRun - Indicates if the rule enforcement is a dry run.
- is
Enabled Boolean - Indicates if the rule enforcement is enabled.
- name String
- Name of the rule enforcement.
- rule
Ids Map<String,String> - List of rule IDs.
- rule
Set Map<String,String>Ids - List of rule set IDs.
- target
Accounts List<String> - List of target accounts.
- target
Regions List<String> - List of target regions.
- cloud
Provider string - The cloud provider for the rule enforcement.
- description string
- Description for rule enforcement.
- enforcement
Id string - Id of rule enforcement.
- execution
Schedule string - Execution schedule in cron format.
- execution
Timezone string - Timezone for the execution schedule.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Dry booleanRun - Indicates if the rule enforcement is a dry run.
- is
Enabled boolean - Indicates if the rule enforcement is enabled.
- name string
- Name of the rule enforcement.
- rule
Ids {[key: string]: string} - List of rule IDs.
- rule
Set {[key: string]: string}Ids - List of rule set IDs.
- target
Accounts string[] - List of target accounts.
- target
Regions 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.
- cloud
Provider String - The cloud provider for the rule enforcement.
- description String
- Description for rule enforcement.
- enforcement
Id String - Id of rule enforcement.
- execution
Schedule String - Execution schedule in cron format.
- execution
Timezone String - Timezone for the execution schedule.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Dry BooleanRun - Indicates if the rule enforcement is a dry run.
- is
Enabled Boolean - Indicates if the rule enforcement is enabled.
- name String
- Name of the rule enforcement.
- rule
Ids Map<String> - List of rule IDs.
- rule
Set Map<String>Ids - List of rule set IDs.
- target
Accounts List<String> - List of target accounts.
- target
Regions 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.