RuleArgs

data class RuleArgs(val category: Output<Int>? = null, val content: Output<String>? = null, val contentCategory: Output<String>? = null, val description: Output<String>? = null, val lang: Output<String>? = null, val productCode: Output<String>? = null, val productId: Output<String>? = null, val riskLevelId: Output<String>? = null, val ruleName: Output<String>? = null, val ruleType: Output<Int>? = null, val statExpress: Output<String>? = null, val status: Output<Int>? = null, val target: Output<String>? = null, val warnLevel: Output<Int>? = null) : ConvertibleToJava<RuleArgs>

Provides a Data Security Center Rule resource. For information about Data Security Center Rule and how to use it, see What is Rule.

NOTE: Available since v1.132.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example-name";
const _default = new alicloud.sddp.Rule("default", {
ruleName: name,
category: 2,
content: ` [
{
"rule": [
{
"operator": "contains",
"target": "content",
"value": "tf-testACCContent"
}
],
"ruleRelation": "AND"
}
]
`,
riskLevelId: "4",
productCode: "OSS",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example-name"
default = alicloud.sddp.Rule("default",
rule_name=name,
category=2,
content=""" [
{
"rule": [
{
"operator": "contains",
"target": "content",
"value": "tf-testACCContent"
}
],
"ruleRelation": "AND"
}
]
""",
risk_level_id="4",
product_code="OSS")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example-name";
var @default = new AliCloud.Sddp.Rule("default", new()
{
RuleName = name,
Category = 2,
Content = @" [
{
""rule"": [
{
""operator"": ""contains"",
""target"": ""content"",
""value"": ""tf-testACCContent""
}
],
""ruleRelation"": ""AND""
}
]
",
RiskLevelId = "4",
ProductCode = "OSS",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sddp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example-name"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := sddp.NewRule(ctx, "default", &sddp.RuleArgs{
RuleName: pulumi.String(name),
Category: pulumi.Int(2),
Content: pulumi.String(` [
{
"rule": [
{
"operator": "contains",
"target": "content",
"value": "tf-testACCContent"
}
],
"ruleRelation": "AND"
}
]
`),
RiskLevelId: pulumi.String("4"),
ProductCode: pulumi.String("OSS"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sddp.Rule;
import com.pulumi.alicloud.sddp.RuleArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example-name");
var default_ = new Rule("default", RuleArgs.builder()
.ruleName(name)
.category(2)
.content("""
[
{
"rule": [
{
"operator": "contains",
"target": "content",
"value": "tf-testACCContent"
}
],
"ruleRelation": "AND"
}
]
""")
.riskLevelId("4")
.productCode("OSS")
.build());
}
}
configuration:
name:
type: string
default: tf-example-name
resources:
default:
type: alicloud:sddp:Rule
properties:
ruleName: ${name}
category: '2'
content: |2
[
{
"rule": [
{
"operator": "contains",
"target": "content",
"value": "tf-testACCContent"
}
],
"ruleRelation": "AND"
}
]
riskLevelId: '4'
productCode: OSS

Import

Data Security Center Rule can be imported using the id, e.g.

$ pulumi import alicloud:sddp/rule:Rule example <id>

Constructors

Link copied to clipboard
constructor(category: Output<Int>? = null, content: Output<String>? = null, contentCategory: Output<String>? = null, description: Output<String>? = null, lang: Output<String>? = null, productCode: Output<String>? = null, productId: Output<String>? = null, riskLevelId: Output<String>? = null, ruleName: Output<String>? = null, ruleType: Output<Int>? = null, statExpress: Output<String>? = null, status: Output<Int>? = null, target: Output<String>? = null, warnLevel: Output<Int>? = null)

Properties

Link copied to clipboard
val category: Output<Int>? = null

The content type of the sensitive data detection rule. Valid values:

Link copied to clipboard
val content: Output<String>? = null

The content of the sensitive data detection rule. NOTE: From version 1.222.0, content can be modified.

Link copied to clipboard
val contentCategory: Output<String>? = null

The type of the content in the sensitive data detection rule. NOTE: From version 1.222.0, content_category cannot be modified.

Link copied to clipboard
val description: Output<String>? = null

The description of the rule. NOTE: From version 1.222.0, description cannot be modified.

Link copied to clipboard
val lang: Output<String>? = null

The language of the content within the request and response. Default value: zh. Valid values:

Link copied to clipboard
val productCode: Output<String>? = null

The name of the service to which data in the column of the table belongs. Valid values: OSS, RDS, ODPS(MaxCompute).

Link copied to clipboard
val productId: Output<String>? = null

The ID of the service to which the data asset belongs. Valid values:

Link copied to clipboard
val riskLevelId: Output<String>? = null

The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:

Link copied to clipboard
val ruleName: Output<String>? = null

The name of the sensitive data detection rule. NOTE: From version 1.222.0, rule_name can be modified.

Link copied to clipboard
val ruleType: Output<Int>? = null

The type of the sensitive data detection rule. Valid values:

Link copied to clipboard
val statExpress: Output<String>? = null

The statistical expression. NOTE: From version 1.222.0, stat_express cannot be modified.

Link copied to clipboard
val status: Output<Int>? = null

Sensitive Specifies whether to enable the sensitive data detection rule. Valid values:

Link copied to clipboard
val target: Output<String>? = null

The code of the service to which the sensitive data detection rule is applied. NOTE: From version 1.222.0, target cannot be modified.

Link copied to clipboard
val warnLevel: Output<Int>? = null

The risk level of the alert that is triggered. Valid values:

Functions

Link copied to clipboard
open override fun toJava(): RuleArgs