UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

202 lines (201 loc) 7.65 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a WAF Data Masking Rule resource within HuaweiCloud. * * > **NOTE:** All WAF resources depend on WAF instances, and the WAF instances need to be purchased before they can be * used. The data masking rule resource can be used in Cloud Mode and Dedicated Mode. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const enterpriseProjectId = config.requireObject("enterpriseProjectId"); * const policyId = config.requireObject("policyId"); * const test = new huaweicloud.waf.RuleDataMasking("test", { * policyId: policyId, * enterpriseProjectId: enterpriseProjectId, * path: "/login", * field: "params", * subfield: "password", * description: "test description", * }); * ``` * * ## Import * * There are two ways to import WAF rule data masking state. * Using `policy_id` and `rule_id`, separated by a slash, e.g. bash * * ```sh * $ pulumi import huaweicloud:Waf/ruleDataMasking:RuleDataMasking test <policy_id>/<rule_id> * ``` * * * Using `policy_id`, `rule_id` and `enterprise_project_id`, separated by slashes, e.g. bash * * ```sh * $ pulumi import huaweicloud:Waf/ruleDataMasking:RuleDataMasking test <policy_id>/<rule_id>/<enterprise_project_id> * ``` */ export declare class RuleDataMasking extends pulumi.CustomResource { /** * Get an existing RuleDataMasking resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RuleDataMaskingState, opts?: pulumi.CustomResourceOptions): RuleDataMasking; /** * Returns true if the given object is an instance of RuleDataMasking. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RuleDataMasking; /** * Specifies the description of WAF data masking rule. */ readonly description: pulumi.Output<string>; /** * Specifies the enterprise project ID of WAF data masking rule. * For enterprise users, if omitted, default enterprise project will be used. * Changing this parameter will create a new resource. */ readonly enterpriseProjectId: pulumi.Output<string | undefined>; /** * Specifies the position where the masked field stored. Valid values are: * + **params**: The field in the parameter. * + **header**: The field in the header. * + **form**: The field in the form. * + **cookie**: The field in the cookie. */ readonly field: pulumi.Output<string>; /** * Specifies the URL to which the data masking rule applies (exact match by default). */ readonly path: pulumi.Output<string>; /** * Specifies the WAF policy ID. Changing this creates a new rule. */ readonly policyId: pulumi.Output<string>; /** * Specifies the region in which to create the WAF Data Masking rule resource. * If omitted, the provider-level region will be used. Changing this setting will create a new rule. */ readonly region: pulumi.Output<string>; /** * Specifies the status of WAF web tamper protection rule. * Valid values are as follows: * + `0`: Disabled. * + `1`: Enabled. */ readonly status: pulumi.Output<number | undefined>; /** * Specifies the name of the masked field, e.g.: **password**. */ readonly subfield: pulumi.Output<string>; /** * Create a RuleDataMasking resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RuleDataMaskingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RuleDataMasking resources. */ export interface RuleDataMaskingState { /** * Specifies the description of WAF data masking rule. */ description?: pulumi.Input<string>; /** * Specifies the enterprise project ID of WAF data masking rule. * For enterprise users, if omitted, default enterprise project will be used. * Changing this parameter will create a new resource. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the position where the masked field stored. Valid values are: * + **params**: The field in the parameter. * + **header**: The field in the header. * + **form**: The field in the form. * + **cookie**: The field in the cookie. */ field?: pulumi.Input<string>; /** * Specifies the URL to which the data masking rule applies (exact match by default). */ path?: pulumi.Input<string>; /** * Specifies the WAF policy ID. Changing this creates a new rule. */ policyId?: pulumi.Input<string>; /** * Specifies the region in which to create the WAF Data Masking rule resource. * If omitted, the provider-level region will be used. Changing this setting will create a new rule. */ region?: pulumi.Input<string>; /** * Specifies the status of WAF web tamper protection rule. * Valid values are as follows: * + `0`: Disabled. * + `1`: Enabled. */ status?: pulumi.Input<number>; /** * Specifies the name of the masked field, e.g.: **password**. */ subfield?: pulumi.Input<string>; } /** * The set of arguments for constructing a RuleDataMasking resource. */ export interface RuleDataMaskingArgs { /** * Specifies the description of WAF data masking rule. */ description?: pulumi.Input<string>; /** * Specifies the enterprise project ID of WAF data masking rule. * For enterprise users, if omitted, default enterprise project will be used. * Changing this parameter will create a new resource. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the position where the masked field stored. Valid values are: * + **params**: The field in the parameter. * + **header**: The field in the header. * + **form**: The field in the form. * + **cookie**: The field in the cookie. */ field: pulumi.Input<string>; /** * Specifies the URL to which the data masking rule applies (exact match by default). */ path: pulumi.Input<string>; /** * Specifies the WAF policy ID. Changing this creates a new rule. */ policyId: pulumi.Input<string>; /** * Specifies the region in which to create the WAF Data Masking rule resource. * If omitted, the provider-level region will be used. Changing this setting will create a new rule. */ region?: pulumi.Input<string>; /** * Specifies the status of WAF web tamper protection rule. * Valid values are as follows: * + `0`: Disabled. * + `1`: Enabled. */ status?: pulumi.Input<number>; /** * Specifies the name of the masked field, e.g.: **password**. */ subfield: pulumi.Input<string>; }