1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. WafDatamaskingRuleV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.WafDatamaskingRuleV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for WAF datamasking rule you can get at documentation portal

    Manages a WAF Data Masking Rule resource within OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const policy1 = new opentelekomcloud.WafPolicyV1("policy1", {});
    const rule1 = new opentelekomcloud.WafDatamaskingRuleV1("rule1", {
        policyId: policy1.wafPolicyV1Id,
        url: "/login",
        category: "params",
        index: "password",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    policy1 = opentelekomcloud.WafPolicyV1("policy1")
    rule1 = opentelekomcloud.WafDatamaskingRuleV1("rule1",
        policy_id=policy1.waf_policy_v1_id,
        url="/login",
        category="params",
        index="password")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		policy1, err := opentelekomcloud.NewWafPolicyV1(ctx, "policy1", nil)
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewWafDatamaskingRuleV1(ctx, "rule1", &opentelekomcloud.WafDatamaskingRuleV1Args{
    			PolicyId: policy1.WafPolicyV1Id,
    			Url:      pulumi.String("/login"),
    			Category: pulumi.String("params"),
    			Index:    pulumi.String("password"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var policy1 = new Opentelekomcloud.WafPolicyV1("policy1");
    
        var rule1 = new Opentelekomcloud.WafDatamaskingRuleV1("rule1", new()
        {
            PolicyId = policy1.WafPolicyV1Id,
            Url = "/login",
            Category = "params",
            Index = "password",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.WafPolicyV1;
    import com.pulumi.opentelekomcloud.WafDatamaskingRuleV1;
    import com.pulumi.opentelekomcloud.WafDatamaskingRuleV1Args;
    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 WafPolicyV1("policy1");
    
            var rule1 = new WafDatamaskingRuleV1("rule1", WafDatamaskingRuleV1Args.builder()
                .policyId(policy1.wafPolicyV1Id())
                .url("/login")
                .category("params")
                .index("password")
                .build());
    
        }
    }
    
    resources:
      policy1:
        type: opentelekomcloud:WafPolicyV1
      rule1:
        type: opentelekomcloud:WafDatamaskingRuleV1
        properties:
          policyId: ${policy1.wafPolicyV1Id}
          url: /login
          category: params
          index: password
    

    Create WafDatamaskingRuleV1 Resource

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

    Constructor syntax

    new WafDatamaskingRuleV1(name: string, args: WafDatamaskingRuleV1Args, opts?: CustomResourceOptions);
    @overload
    def WafDatamaskingRuleV1(resource_name: str,
                             args: WafDatamaskingRuleV1Args,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafDatamaskingRuleV1(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             category: Optional[str] = None,
                             index: Optional[str] = None,
                             policy_id: Optional[str] = None,
                             url: Optional[str] = None,
                             timeouts: Optional[WafDatamaskingRuleV1TimeoutsArgs] = None,
                             waf_datamasking_rule_v1_id: Optional[str] = None)
    func NewWafDatamaskingRuleV1(ctx *Context, name string, args WafDatamaskingRuleV1Args, opts ...ResourceOption) (*WafDatamaskingRuleV1, error)
    public WafDatamaskingRuleV1(string name, WafDatamaskingRuleV1Args args, CustomResourceOptions? opts = null)
    public WafDatamaskingRuleV1(String name, WafDatamaskingRuleV1Args args)
    public WafDatamaskingRuleV1(String name, WafDatamaskingRuleV1Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:WafDatamaskingRuleV1
    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 WafDatamaskingRuleV1Args
    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 WafDatamaskingRuleV1Args
    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 WafDatamaskingRuleV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafDatamaskingRuleV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafDatamaskingRuleV1Args
    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 wafDatamaskingRuleV1Resource = new Opentelekomcloud.WafDatamaskingRuleV1("wafDatamaskingRuleV1Resource", new()
    {
        Category = "string",
        Index = "string",
        PolicyId = "string",
        Url = "string",
        Timeouts = new Opentelekomcloud.Inputs.WafDatamaskingRuleV1TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        WafDatamaskingRuleV1Id = "string",
    });
    
    example, err := opentelekomcloud.NewWafDatamaskingRuleV1(ctx, "wafDatamaskingRuleV1Resource", &opentelekomcloud.WafDatamaskingRuleV1Args{
    	Category: pulumi.String("string"),
    	Index:    pulumi.String("string"),
    	PolicyId: pulumi.String("string"),
    	Url:      pulumi.String("string"),
    	Timeouts: &opentelekomcloud.WafDatamaskingRuleV1TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	WafDatamaskingRuleV1Id: pulumi.String("string"),
    })
    
    var wafDatamaskingRuleV1Resource = new WafDatamaskingRuleV1("wafDatamaskingRuleV1Resource", WafDatamaskingRuleV1Args.builder()
        .category("string")
        .index("string")
        .policyId("string")
        .url("string")
        .timeouts(WafDatamaskingRuleV1TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .wafDatamaskingRuleV1Id("string")
        .build());
    
    waf_datamasking_rule_v1_resource = opentelekomcloud.WafDatamaskingRuleV1("wafDatamaskingRuleV1Resource",
        category="string",
        index="string",
        policy_id="string",
        url="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        waf_datamasking_rule_v1_id="string")
    
    const wafDatamaskingRuleV1Resource = new opentelekomcloud.WafDatamaskingRuleV1("wafDatamaskingRuleV1Resource", {
        category: "string",
        index: "string",
        policyId: "string",
        url: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        wafDatamaskingRuleV1Id: "string",
    });
    
    type: opentelekomcloud:WafDatamaskingRuleV1
    properties:
        category: string
        index: string
        policyId: string
        timeouts:
            create: string
            delete: string
        url: string
        wafDatamaskingRuleV1Id: string
    

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

    Category string
    Specifies the masked field. The options are params and header.
    Index string
    Specifies the masked subfield.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Url string
    Specifies the URL to which the data masking rule applies.
    Timeouts WafDatamaskingRuleV1Timeouts
    WafDatamaskingRuleV1Id string
    ID of the rule.
    Category string
    Specifies the masked field. The options are params and header.
    Index string
    Specifies the masked subfield.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Url string
    Specifies the URL to which the data masking rule applies.
    Timeouts WafDatamaskingRuleV1TimeoutsArgs
    WafDatamaskingRuleV1Id string
    ID of the rule.
    category String
    Specifies the masked field. The options are params and header.
    index String
    Specifies the masked subfield.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    url String
    Specifies the URL to which the data masking rule applies.
    timeouts WafDatamaskingRuleV1Timeouts
    wafDatamaskingRuleV1Id String
    ID of the rule.
    category string
    Specifies the masked field. The options are params and header.
    index string
    Specifies the masked subfield.
    policyId string
    The WAF policy ID. Changing this creates a new rule.
    url string
    Specifies the URL to which the data masking rule applies.
    timeouts WafDatamaskingRuleV1Timeouts
    wafDatamaskingRuleV1Id string
    ID of the rule.
    category str
    Specifies the masked field. The options are params and header.
    index str
    Specifies the masked subfield.
    policy_id str
    The WAF policy ID. Changing this creates a new rule.
    url str
    Specifies the URL to which the data masking rule applies.
    timeouts WafDatamaskingRuleV1TimeoutsArgs
    waf_datamasking_rule_v1_id str
    ID of the rule.
    category String
    Specifies the masked field. The options are params and header.
    index String
    Specifies the masked subfield.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    url String
    Specifies the URL to which the data masking rule applies.
    timeouts Property Map
    wafDatamaskingRuleV1Id String
    ID of the rule.

    Outputs

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

    Get an existing WafDatamaskingRuleV1 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?: WafDatamaskingRuleV1State, opts?: CustomResourceOptions): WafDatamaskingRuleV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            index: Optional[str] = None,
            policy_id: Optional[str] = None,
            timeouts: Optional[WafDatamaskingRuleV1TimeoutsArgs] = None,
            url: Optional[str] = None,
            waf_datamasking_rule_v1_id: Optional[str] = None) -> WafDatamaskingRuleV1
    func GetWafDatamaskingRuleV1(ctx *Context, name string, id IDInput, state *WafDatamaskingRuleV1State, opts ...ResourceOption) (*WafDatamaskingRuleV1, error)
    public static WafDatamaskingRuleV1 Get(string name, Input<string> id, WafDatamaskingRuleV1State? state, CustomResourceOptions? opts = null)
    public static WafDatamaskingRuleV1 get(String name, Output<String> id, WafDatamaskingRuleV1State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:WafDatamaskingRuleV1    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:
    Category string
    Specifies the masked field. The options are params and header.
    Index string
    Specifies the masked subfield.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Timeouts WafDatamaskingRuleV1Timeouts
    Url string
    Specifies the URL to which the data masking rule applies.
    WafDatamaskingRuleV1Id string
    ID of the rule.
    Category string
    Specifies the masked field. The options are params and header.
    Index string
    Specifies the masked subfield.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Timeouts WafDatamaskingRuleV1TimeoutsArgs
    Url string
    Specifies the URL to which the data masking rule applies.
    WafDatamaskingRuleV1Id string
    ID of the rule.
    category String
    Specifies the masked field. The options are params and header.
    index String
    Specifies the masked subfield.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    timeouts WafDatamaskingRuleV1Timeouts
    url String
    Specifies the URL to which the data masking rule applies.
    wafDatamaskingRuleV1Id String
    ID of the rule.
    category string
    Specifies the masked field. The options are params and header.
    index string
    Specifies the masked subfield.
    policyId string
    The WAF policy ID. Changing this creates a new rule.
    timeouts WafDatamaskingRuleV1Timeouts
    url string
    Specifies the URL to which the data masking rule applies.
    wafDatamaskingRuleV1Id string
    ID of the rule.
    category str
    Specifies the masked field. The options are params and header.
    index str
    Specifies the masked subfield.
    policy_id str
    The WAF policy ID. Changing this creates a new rule.
    timeouts WafDatamaskingRuleV1TimeoutsArgs
    url str
    Specifies the URL to which the data masking rule applies.
    waf_datamasking_rule_v1_id str
    ID of the rule.
    category String
    Specifies the masked field. The options are params and header.
    index String
    Specifies the masked subfield.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    timeouts Property Map
    url String
    Specifies the URL to which the data masking rule applies.
    wafDatamaskingRuleV1Id String
    ID of the rule.

    Supporting Types

    WafDatamaskingRuleV1Timeouts, WafDatamaskingRuleV1TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Data Masking Rules can be imported using the policy_id/id, e.g.

    $ pulumi import opentelekomcloud:index/wafDatamaskingRuleV1:WafDatamaskingRuleV1 rule_1 b39f3a5a1b4f447a8030f0b0703f47f5/7117d38e4c8f4624a505bd96b97d024c
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud