1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. WafRuleDataMasking
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.WafRuleDataMasking

Explore with Pulumi AI

Manages a WAF Data Masking Rule resource within FlexibleEngine.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const policy1 = new flexibleengine.WafPolicy("policy1", {});
const rule1 = new flexibleengine.WafRuleDataMasking("rule1", {
    policyId: policy1.wafPolicyId,
    path: "/login",
    field: "params",
    subfield: "password",
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

policy1 = flexibleengine.WafPolicy("policy1")
rule1 = flexibleengine.WafRuleDataMasking("rule1",
    policy_id=policy1.waf_policy_id,
    path="/login",
    field="params",
    subfield="password")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		policy1, err := flexibleengine.NewWafPolicy(ctx, "policy1", nil)
		if err != nil {
			return err
		}
		_, err = flexibleengine.NewWafRuleDataMasking(ctx, "rule1", &flexibleengine.WafRuleDataMaskingArgs{
			PolicyId: policy1.WafPolicyId,
			Path:     pulumi.String("/login"),
			Field:    pulumi.String("params"),
			Subfield: pulumi.String("password"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var policy1 = new Flexibleengine.WafPolicy("policy1");

    var rule1 = new Flexibleengine.WafRuleDataMasking("rule1", new()
    {
        PolicyId = policy1.WafPolicyId,
        Path = "/login",
        Field = "params",
        Subfield = "password",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafPolicy;
import com.pulumi.flexibleengine.WafRuleDataMasking;
import com.pulumi.flexibleengine.WafRuleDataMaskingArgs;
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) {
        var policy1 = new WafPolicy("policy1");

        var rule1 = new WafRuleDataMasking("rule1", WafRuleDataMaskingArgs.builder()
            .policyId(policy1.wafPolicyId())
            .path("/login")
            .field("params")
            .subfield("password")
            .build());

    }
}
Copy
resources:
  policy1:
    type: flexibleengine:WafPolicy
  rule1:
    type: flexibleengine:WafRuleDataMasking
    properties:
      policyId: ${policy1.wafPolicyId}
      path: /login
      field: params
      subfield: password
Copy

Create WafRuleDataMasking Resource

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

Constructor syntax

new WafRuleDataMasking(name: string, args: WafRuleDataMaskingArgs, opts?: CustomResourceOptions);
@overload
def WafRuleDataMasking(resource_name: str,
                       args: WafRuleDataMaskingArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def WafRuleDataMasking(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       field: Optional[str] = None,
                       path: Optional[str] = None,
                       policy_id: Optional[str] = None,
                       subfield: Optional[str] = None,
                       waf_rule_data_masking_id: Optional[str] = None)
func NewWafRuleDataMasking(ctx *Context, name string, args WafRuleDataMaskingArgs, opts ...ResourceOption) (*WafRuleDataMasking, error)
public WafRuleDataMasking(string name, WafRuleDataMaskingArgs args, CustomResourceOptions? opts = null)
public WafRuleDataMasking(String name, WafRuleDataMaskingArgs args)
public WafRuleDataMasking(String name, WafRuleDataMaskingArgs args, CustomResourceOptions options)
type: flexibleengine:WafRuleDataMasking
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WafRuleDataMaskingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WafRuleDataMaskingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WafRuleDataMaskingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WafRuleDataMaskingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WafRuleDataMaskingArgs
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 wafRuleDataMaskingResource = new Flexibleengine.WafRuleDataMasking("wafRuleDataMaskingResource", new()
{
    Field = "string",
    Path = "string",
    PolicyId = "string",
    Subfield = "string",
    WafRuleDataMaskingId = "string",
});
Copy
example, err := flexibleengine.NewWafRuleDataMasking(ctx, "wafRuleDataMaskingResource", &flexibleengine.WafRuleDataMaskingArgs{
Field: pulumi.String("string"),
Path: pulumi.String("string"),
PolicyId: pulumi.String("string"),
Subfield: pulumi.String("string"),
WafRuleDataMaskingId: pulumi.String("string"),
})
Copy
var wafRuleDataMaskingResource = new WafRuleDataMasking("wafRuleDataMaskingResource", WafRuleDataMaskingArgs.builder()
    .field("string")
    .path("string")
    .policyId("string")
    .subfield("string")
    .wafRuleDataMaskingId("string")
    .build());
Copy
waf_rule_data_masking_resource = flexibleengine.WafRuleDataMasking("wafRuleDataMaskingResource",
    field="string",
    path="string",
    policy_id="string",
    subfield="string",
    waf_rule_data_masking_id="string")
Copy
const wafRuleDataMaskingResource = new flexibleengine.WafRuleDataMasking("wafRuleDataMaskingResource", {
    field: "string",
    path: "string",
    policyId: "string",
    subfield: "string",
    wafRuleDataMaskingId: "string",
});
Copy
type: flexibleengine:WafRuleDataMasking
properties:
    field: string
    path: string
    policyId: string
    subfield: string
    wafRuleDataMaskingId: string
Copy

WafRuleDataMasking 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 WafRuleDataMasking resource accepts the following input properties:

Field This property is required. string
Specifies the masked field. The options are params and header.
Path This property is required. string
Specifies the URL to which the data masking rule applies (exact match by default).
PolicyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
Subfield This property is required. string
Specifies the masked subfield.
WafRuleDataMaskingId string
The rule ID in UUID format.
Field This property is required. string
Specifies the masked field. The options are params and header.
Path This property is required. string
Specifies the URL to which the data masking rule applies (exact match by default).
PolicyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
Subfield This property is required. string
Specifies the masked subfield.
WafRuleDataMaskingId string
The rule ID in UUID format.
field This property is required. String
Specifies the masked field. The options are params and header.
path This property is required. String
Specifies the URL to which the data masking rule applies (exact match by default).
policyId This property is required. String
Specifies the WAF policy ID. Changing this creates a new rule.
subfield This property is required. String
Specifies the masked subfield.
wafRuleDataMaskingId String
The rule ID in UUID format.
field This property is required. string
Specifies the masked field. The options are params and header.
path This property is required. string
Specifies the URL to which the data masking rule applies (exact match by default).
policyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
subfield This property is required. string
Specifies the masked subfield.
wafRuleDataMaskingId string
The rule ID in UUID format.
field This property is required. str
Specifies the masked field. The options are params and header.
path This property is required. str
Specifies the URL to which the data masking rule applies (exact match by default).
policy_id This property is required. str
Specifies the WAF policy ID. Changing this creates a new rule.
subfield This property is required. str
Specifies the masked subfield.
waf_rule_data_masking_id str
The rule ID in UUID format.
field This property is required. String
Specifies the masked field. The options are params and header.
path This property is required. String
Specifies the URL to which the data masking rule applies (exact match by default).
policyId This property is required. String
Specifies the WAF policy ID. Changing this creates a new rule.
subfield This property is required. String
Specifies the masked subfield.
wafRuleDataMaskingId String
The rule ID in UUID format.

Outputs

All input properties are implicitly available as output properties. Additionally, the WafRuleDataMasking 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 WafRuleDataMasking Resource

Get an existing WafRuleDataMasking 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?: WafRuleDataMaskingState, opts?: CustomResourceOptions): WafRuleDataMasking
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        field: Optional[str] = None,
        path: Optional[str] = None,
        policy_id: Optional[str] = None,
        subfield: Optional[str] = None,
        waf_rule_data_masking_id: Optional[str] = None) -> WafRuleDataMasking
func GetWafRuleDataMasking(ctx *Context, name string, id IDInput, state *WafRuleDataMaskingState, opts ...ResourceOption) (*WafRuleDataMasking, error)
public static WafRuleDataMasking Get(string name, Input<string> id, WafRuleDataMaskingState? state, CustomResourceOptions? opts = null)
public static WafRuleDataMasking get(String name, Output<String> id, WafRuleDataMaskingState state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:WafRuleDataMasking    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Field string
Specifies the masked field. The options are params and header.
Path string
Specifies the URL to which the data masking rule applies (exact match by default).
PolicyId string
Specifies the WAF policy ID. Changing this creates a new rule.
Subfield string
Specifies the masked subfield.
WafRuleDataMaskingId string
The rule ID in UUID format.
Field string
Specifies the masked field. The options are params and header.
Path string
Specifies the URL to which the data masking rule applies (exact match by default).
PolicyId string
Specifies the WAF policy ID. Changing this creates a new rule.
Subfield string
Specifies the masked subfield.
WafRuleDataMaskingId string
The rule ID in UUID format.
field String
Specifies the masked field. The options are params and header.
path String
Specifies the URL to which the data masking rule applies (exact match by default).
policyId String
Specifies the WAF policy ID. Changing this creates a new rule.
subfield String
Specifies the masked subfield.
wafRuleDataMaskingId String
The rule ID in UUID format.
field string
Specifies the masked field. The options are params and header.
path string
Specifies the URL to which the data masking rule applies (exact match by default).
policyId string
Specifies the WAF policy ID. Changing this creates a new rule.
subfield string
Specifies the masked subfield.
wafRuleDataMaskingId string
The rule ID in UUID format.
field str
Specifies the masked field. The options are params and header.
path str
Specifies the URL to which the data masking rule applies (exact match by default).
policy_id str
Specifies the WAF policy ID. Changing this creates a new rule.
subfield str
Specifies the masked subfield.
waf_rule_data_masking_id str
The rule ID in UUID format.
field String
Specifies the masked field. The options are params and header.
path String
Specifies the URL to which the data masking rule applies (exact match by default).
policyId String
Specifies the WAF policy ID. Changing this creates a new rule.
subfield String
Specifies the masked subfield.
wafRuleDataMaskingId String
The rule ID in UUID format.

Import

Data Masking Rules can be imported using the policy ID and rule ID

separated by a slash, e.g.:

$ pulumi import flexibleengine:index/wafRuleDataMasking:WafRuleDataMasking rule_1 523083f4543c497faecd25fcfcc0b2a0/c6482bd0059148559b625f78e8ce92be
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
License
Notes
This Pulumi package is based on the flexibleengine Terraform Provider.