1. Packages
  2. Impart Security
  3. API Docs
  4. Rule
Viewing docs for Impart Security v0.11.2
published on Monday, Mar 2, 2026 by Impart Security
impart logo
Viewing docs for Impart Security v0.11.2
published on Monday, Mar 2, 2026 by Impart Security

    Manage a rule.

    Create Rule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             disabled: Optional[bool] = None,
             name: Optional[str] = None,
             type: Optional[str] = None,
             blocking_effect: Optional[str] = None,
             content: Optional[str] = None,
             description: Optional[str] = None,
             labels: Optional[Sequence[str]] = None,
             source_file: Optional[str] = None,
             source_hash: Optional[str] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: impart:Rule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var ruleResource = new Impart.Rule("ruleResource", new()
    {
        Disabled = false,
        Name = "string",
        Type = "string",
        BlockingEffect = "string",
        Content = "string",
        Description = "string",
        Labels = new[]
        {
            "string",
        },
        SourceFile = "string",
        SourceHash = "string",
    });
    
    example, err := impart.NewRule(ctx, "ruleResource", &impart.RuleArgs{
    	Disabled:       pulumi.Bool(false),
    	Name:           pulumi.String("string"),
    	Type:           pulumi.String("string"),
    	BlockingEffect: pulumi.String("string"),
    	Content:        pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Labels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SourceFile: pulumi.String("string"),
    	SourceHash: pulumi.String("string"),
    })
    
    var ruleResource = new Rule("ruleResource", RuleArgs.builder()
        .disabled(false)
        .name("string")
        .type("string")
        .blockingEffect("string")
        .content("string")
        .description("string")
        .labels("string")
        .sourceFile("string")
        .sourceHash("string")
        .build());
    
    rule_resource = impart.Rule("ruleResource",
        disabled=False,
        name="string",
        type="string",
        blocking_effect="string",
        content="string",
        description="string",
        labels=["string"],
        source_file="string",
        source_hash="string")
    
    const ruleResource = new impart.Rule("ruleResource", {
        disabled: false,
        name: "string",
        type: "string",
        blockingEffect: "string",
        content: "string",
        description: "string",
        labels: ["string"],
        sourceFile: "string",
        sourceHash: "string",
    });
    
    type: impart:Rule
    properties:
        blockingEffect: string
        content: string
        description: string
        disabled: false
        labels:
            - string
        name: string
        sourceFile: string
        sourceHash: string
        type: string
    

    Rule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Rule resource accepts the following input properties:

    Disabled bool
    Set true to disable the rule.
    Name string
    The name for this rule.
    Type string
    The type of the rule. Allowed values: script, recipe.
    BlockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    Content string
    The rule body content.
    Description string
    The description for this rule.
    Labels List<string>
    The applied labels.
    SourceFile string
    The rule source file.
    SourceHash string
    The rule source hash.
    Disabled bool
    Set true to disable the rule.
    Name string
    The name for this rule.
    Type string
    The type of the rule. Allowed values: script, recipe.
    BlockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    Content string
    The rule body content.
    Description string
    The description for this rule.
    Labels []string
    The applied labels.
    SourceFile string
    The rule source file.
    SourceHash string
    The rule source hash.
    disabled Boolean
    Set true to disable the rule.
    name String
    The name for this rule.
    type String
    The type of the rule. Allowed values: script, recipe.
    blockingEffect String
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content String
    The rule body content.
    description String
    The description for this rule.
    labels List<String>
    The applied labels.
    sourceFile String
    The rule source file.
    sourceHash String
    The rule source hash.
    disabled boolean
    Set true to disable the rule.
    name string
    The name for this rule.
    type string
    The type of the rule. Allowed values: script, recipe.
    blockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content string
    The rule body content.
    description string
    The description for this rule.
    labels string[]
    The applied labels.
    sourceFile string
    The rule source file.
    sourceHash string
    The rule source hash.
    disabled bool
    Set true to disable the rule.
    name str
    The name for this rule.
    type str
    The type of the rule. Allowed values: script, recipe.
    blocking_effect str
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content str
    The rule body content.
    description str
    The description for this rule.
    labels Sequence[str]
    The applied labels.
    source_file str
    The rule source file.
    source_hash str
    The rule source hash.
    disabled Boolean
    Set true to disable the rule.
    name String
    The name for this rule.
    type String
    The type of the rule. Allowed values: script, recipe.
    blockingEffect String
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content String
    The rule body content.
    description String
    The description for this rule.
    labels List<String>
    The applied labels.
    sourceFile String
    The rule source file.
    sourceHash String
    The rule source hash.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Rule Resource

    Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blocking_effect: Optional[str] = None,
            content: Optional[str] = None,
            description: Optional[str] = None,
            disabled: Optional[bool] = None,
            labels: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            source_file: Optional[str] = None,
            source_hash: Optional[str] = None,
            type: Optional[str] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
    resources:  _:    type: impart:Rule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BlockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    Content string
    The rule body content.
    Description string
    The description for this rule.
    Disabled bool
    Set true to disable the rule.
    Labels List<string>
    The applied labels.
    Name string
    The name for this rule.
    SourceFile string
    The rule source file.
    SourceHash string
    The rule source hash.
    Type string
    The type of the rule. Allowed values: script, recipe.
    BlockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    Content string
    The rule body content.
    Description string
    The description for this rule.
    Disabled bool
    Set true to disable the rule.
    Labels []string
    The applied labels.
    Name string
    The name for this rule.
    SourceFile string
    The rule source file.
    SourceHash string
    The rule source hash.
    Type string
    The type of the rule. Allowed values: script, recipe.
    blockingEffect String
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content String
    The rule body content.
    description String
    The description for this rule.
    disabled Boolean
    Set true to disable the rule.
    labels List<String>
    The applied labels.
    name String
    The name for this rule.
    sourceFile String
    The rule source file.
    sourceHash String
    The rule source hash.
    type String
    The type of the rule. Allowed values: script, recipe.
    blockingEffect string
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content string
    The rule body content.
    description string
    The description for this rule.
    disabled boolean
    Set true to disable the rule.
    labels string[]
    The applied labels.
    name string
    The name for this rule.
    sourceFile string
    The rule source file.
    sourceHash string
    The rule source hash.
    type string
    The type of the rule. Allowed values: script, recipe.
    blocking_effect str
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content str
    The rule body content.
    description str
    The description for this rule.
    disabled bool
    Set true to disable the rule.
    labels Sequence[str]
    The applied labels.
    name str
    The name for this rule.
    source_file str
    The rule source file.
    source_hash str
    The rule source hash.
    type str
    The type of the rule. Allowed values: script, recipe.
    blockingEffect String
    The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
    content String
    The rule body content.
    description String
    The description for this rule.
    disabled Boolean
    Set true to disable the rule.
    labels List<String>
    The applied labels.
    name String
    The name for this rule.
    sourceFile String
    The rule source file.
    sourceHash String
    The rule source hash.
    type String
    The type of the rule. Allowed values: script, recipe.

    Package Details

    Repository
    impart impart-security/pulumi-impart
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the impart Terraform Provider.
    impart logo
    Viewing docs for Impart Security v0.11.2
    published on Monday, Mar 2, 2026 by Impart Security
      Try Pulumi Cloud free. Your team will thank you.