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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
policy1:
type: flexibleengine:WafPolicy
rule1:
type: flexibleengine:WafRuleDataMasking
properties:
policyId: ${policy1.wafPolicyId}
path: /login
field: params
subfield: password
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 string
- The unique name of the resource.
- args WafRuleDataMaskingArgs
- 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 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 string
- The unique name of the resource.
- args WafRuleDataMaskingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafRuleDataMaskingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var wafRuleDataMaskingResource = new WafRuleDataMasking("wafRuleDataMaskingResource", WafRuleDataMaskingArgs.builder()
.field("string")
.path("string")
.policyId("string")
.subfield("string")
.wafRuleDataMaskingId("string")
.build());
waf_rule_data_masking_resource = flexibleengine.WafRuleDataMasking("wafRuleDataMaskingResource",
field="string",
path="string",
policy_id="string",
subfield="string",
waf_rule_data_masking_id="string")
const wafRuleDataMaskingResource = new flexibleengine.WafRuleDataMasking("wafRuleDataMaskingResource", {
field: "string",
path: "string",
policyId: "string",
subfield: "string",
wafRuleDataMaskingId: "string",
});
type: flexibleengine:WafRuleDataMasking
properties:
field: string
path: string
policyId: string
subfield: string
wafRuleDataMaskingId: string
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 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).
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Subfield string
- Specifies the masked subfield.
- Waf
Rule stringData Masking Id - 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).
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Subfield string
- Specifies the masked subfield.
- Waf
Rule stringData Masking Id - 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).
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield String
- Specifies the masked subfield.
- waf
Rule StringData Masking Id - 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).
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield string
- Specifies the masked subfield.
- waf
Rule stringData Masking Id - 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_ strdata_ masking_ id - 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).
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield String
- Specifies the masked subfield.
- waf
Rule StringData Masking Id - 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
- 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.
- 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).
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Subfield string
- Specifies the masked subfield.
- Waf
Rule stringData Masking Id - 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).
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Subfield string
- Specifies the masked subfield.
- Waf
Rule stringData Masking Id - 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).
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield String
- Specifies the masked subfield.
- waf
Rule StringData Masking Id - 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).
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield string
- Specifies the masked subfield.
- waf
Rule stringData Masking Id - 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_ strdata_ masking_ id - 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).
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- subfield String
- Specifies the masked subfield.
- waf
Rule StringData Masking Id - 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
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.