alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.sddp.Rule

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 in v1.132.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Sddp.Rule("default", new()
    {
        Category = 0,
        Content = "content",
        ProductCode = "ODPS",
        RiskLevelId = "4",
        RuleName = "rule_name",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sddp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sddp.NewRule(ctx, "default", &sddp.RuleArgs{
			Category:    pulumi.Int(0),
			Content:     pulumi.String("content"),
			ProductCode: pulumi.String("ODPS"),
			RiskLevelId: pulumi.String("4"),
			RuleName:    pulumi.String("rule_name"),
		})
		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) {
        var default_ = new Rule("default", RuleArgs.builder()        
            .category("0")
            .content("content")
            .productCode("ODPS")
            .riskLevelId("4")
            .ruleName("rule_name")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.sddp.Rule("default",
    category=0,
    content="content",
    product_code="ODPS",
    risk_level_id="4",
    rule_name="rule_name")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.sddp.Rule("default", {
    category: 0,
    content: "content",
    productCode: "ODPS",
    riskLevelId: "4",
    ruleName: "rule_name",
});
resources:
  default:
    type: alicloud:sddp:Rule
    properties:
      category: '0'
      content: content
      productCode: ODPS
      riskLevelId: '4'
      ruleName: rule_name

Create Rule Resource

new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
@overload
def Rule(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         category: Optional[int] = None,
         content: Optional[str] = None,
         content_category: Optional[str] = None,
         custom_type: Optional[int] = None,
         description: Optional[str] = None,
         lang: Optional[str] = None,
         product_code: Optional[str] = None,
         product_id: Optional[str] = None,
         risk_level_id: Optional[str] = None,
         rule_name: Optional[str] = None,
         rule_type: Optional[int] = None,
         stat_express: Optional[str] = None,
         status: Optional[int] = None,
         target: Optional[str] = None,
         warn_level: Optional[int] = None)
@overload
def Rule(resource_name: str,
         args: RuleArgs,
         opts: Optional[ResourceOptions] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
public Rule(String name, RuleArgs args)
public Rule(String name, RuleArgs args, CustomResourceOptions options)
type: alicloud:sddp:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args RuleArgs
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 RuleArgs
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 RuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Rule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Rule resource accepts the following input properties:

Category int

Sensitive Data Identification Rules for the Type of. Valid values:

Content string

Sensitive Data Identification Rules the Content.

RuleName string

Sensitive Data Identification Name of the Rule.

ContentCategory string

The Content Classification.

CustomType int

Sensitive Data Identification Rules of Type. Valid values:

Description string

Sensitive Data Identification a Description of the Rule Information.

Lang string

The Request and Receive the Language of the Message Type. Valid values:

ProductCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

ProductId string

Product ID. Valid values:

RiskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

RuleType int

Rule Type.

StatExpress string

Triggered the Alarm Conditions.

Status int

Sensitive Data Identification Rules Detection State of.

Target string

The Target of rule.

WarnLevel int

The Level of Risk. Valid values:

Category int

Sensitive Data Identification Rules for the Type of. Valid values:

Content string

Sensitive Data Identification Rules the Content.

RuleName string

Sensitive Data Identification Name of the Rule.

ContentCategory string

The Content Classification.

CustomType int

Sensitive Data Identification Rules of Type. Valid values:

Description string

Sensitive Data Identification a Description of the Rule Information.

Lang string

The Request and Receive the Language of the Message Type. Valid values:

ProductCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

ProductId string

Product ID. Valid values:

RiskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

RuleType int

Rule Type.

StatExpress string

Triggered the Alarm Conditions.

Status int

Sensitive Data Identification Rules Detection State of.

Target string

The Target of rule.

WarnLevel int

The Level of Risk. Valid values:

category Integer

Sensitive Data Identification Rules for the Type of. Valid values:

content String

Sensitive Data Identification Rules the Content.

ruleName String

Sensitive Data Identification Name of the Rule.

contentCategory String

The Content Classification.

customType Integer

Sensitive Data Identification Rules of Type. Valid values:

description String

Sensitive Data Identification a Description of the Rule Information.

lang String

The Request and Receive the Language of the Message Type. Valid values:

productCode String

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId String

Product ID. Valid values:

riskLevelId String

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleType Integer

Rule Type.

statExpress String

Triggered the Alarm Conditions.

status Integer

Sensitive Data Identification Rules Detection State of.

target String

The Target of rule.

warnLevel Integer

The Level of Risk. Valid values:

category number

Sensitive Data Identification Rules for the Type of. Valid values:

content string

Sensitive Data Identification Rules the Content.

ruleName string

Sensitive Data Identification Name of the Rule.

contentCategory string

The Content Classification.

customType number

Sensitive Data Identification Rules of Type. Valid values:

description string

Sensitive Data Identification a Description of the Rule Information.

lang string

The Request and Receive the Language of the Message Type. Valid values:

productCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId string

Product ID. Valid values:

riskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleType number

Rule Type.

statExpress string

Triggered the Alarm Conditions.

status number

Sensitive Data Identification Rules Detection State of.

target string

The Target of rule.

warnLevel number

The Level of Risk. Valid values:

category int

Sensitive Data Identification Rules for the Type of. Valid values:

content str

Sensitive Data Identification Rules the Content.

rule_name str

Sensitive Data Identification Name of the Rule.

content_category str

The Content Classification.

custom_type int

Sensitive Data Identification Rules of Type. Valid values:

description str

Sensitive Data Identification a Description of the Rule Information.

lang str

The Request and Receive the Language of the Message Type. Valid values:

product_code str

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

product_id str

Product ID. Valid values:

risk_level_id str

Sensitive Data Identification Rules of Risk Level ID. Valid values:

rule_type int

Rule Type.

stat_express str

Triggered the Alarm Conditions.

status int

Sensitive Data Identification Rules Detection State of.

target str

The Target of rule.

warn_level int

The Level of Risk. Valid values:

category Number

Sensitive Data Identification Rules for the Type of. Valid values:

content String

Sensitive Data Identification Rules the Content.

ruleName String

Sensitive Data Identification Name of the Rule.

contentCategory String

The Content Classification.

customType Number

Sensitive Data Identification Rules of Type. Valid values:

description String

Sensitive Data Identification a Description of the Rule Information.

lang String

The Request and Receive the Language of the Message Type. Valid values:

productCode String

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId String

Product ID. Valid values:

riskLevelId String

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleType Number

Rule Type.

statExpress String

Triggered the Alarm Conditions.

status Number

Sensitive Data Identification Rules Detection State of.

target String

The Target of rule.

warnLevel Number

The Level of Risk. Valid values:

Outputs

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

Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        category: Optional[int] = None,
        content: Optional[str] = None,
        content_category: Optional[str] = None,
        custom_type: Optional[int] = None,
        description: Optional[str] = None,
        lang: Optional[str] = None,
        product_code: Optional[str] = None,
        product_id: Optional[str] = None,
        risk_level_id: Optional[str] = None,
        rule_name: Optional[str] = None,
        rule_type: Optional[int] = None,
        stat_express: Optional[str] = None,
        status: Optional[int] = None,
        target: Optional[str] = None,
        warn_level: Optional[int] = None) -> Rule
func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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 int

Sensitive Data Identification Rules for the Type of. Valid values:

Content string

Sensitive Data Identification Rules the Content.

ContentCategory string

The Content Classification.

CustomType int

Sensitive Data Identification Rules of Type. Valid values:

Description string

Sensitive Data Identification a Description of the Rule Information.

Lang string

The Request and Receive the Language of the Message Type. Valid values:

ProductCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

ProductId string

Product ID. Valid values:

RiskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

RuleName string

Sensitive Data Identification Name of the Rule.

RuleType int

Rule Type.

StatExpress string

Triggered the Alarm Conditions.

Status int

Sensitive Data Identification Rules Detection State of.

Target string

The Target of rule.

WarnLevel int

The Level of Risk. Valid values:

Category int

Sensitive Data Identification Rules for the Type of. Valid values:

Content string

Sensitive Data Identification Rules the Content.

ContentCategory string

The Content Classification.

CustomType int

Sensitive Data Identification Rules of Type. Valid values:

Description string

Sensitive Data Identification a Description of the Rule Information.

Lang string

The Request and Receive the Language of the Message Type. Valid values:

ProductCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

ProductId string

Product ID. Valid values:

RiskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

RuleName string

Sensitive Data Identification Name of the Rule.

RuleType int

Rule Type.

StatExpress string

Triggered the Alarm Conditions.

Status int

Sensitive Data Identification Rules Detection State of.

Target string

The Target of rule.

WarnLevel int

The Level of Risk. Valid values:

category Integer

Sensitive Data Identification Rules for the Type of. Valid values:

content String

Sensitive Data Identification Rules the Content.

contentCategory String

The Content Classification.

customType Integer

Sensitive Data Identification Rules of Type. Valid values:

description String

Sensitive Data Identification a Description of the Rule Information.

lang String

The Request and Receive the Language of the Message Type. Valid values:

productCode String

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId String

Product ID. Valid values:

riskLevelId String

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleName String

Sensitive Data Identification Name of the Rule.

ruleType Integer

Rule Type.

statExpress String

Triggered the Alarm Conditions.

status Integer

Sensitive Data Identification Rules Detection State of.

target String

The Target of rule.

warnLevel Integer

The Level of Risk. Valid values:

category number

Sensitive Data Identification Rules for the Type of. Valid values:

content string

Sensitive Data Identification Rules the Content.

contentCategory string

The Content Classification.

customType number

Sensitive Data Identification Rules of Type. Valid values:

description string

Sensitive Data Identification a Description of the Rule Information.

lang string

The Request and Receive the Language of the Message Type. Valid values:

productCode string

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId string

Product ID. Valid values:

riskLevelId string

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleName string

Sensitive Data Identification Name of the Rule.

ruleType number

Rule Type.

statExpress string

Triggered the Alarm Conditions.

status number

Sensitive Data Identification Rules Detection State of.

target string

The Target of rule.

warnLevel number

The Level of Risk. Valid values:

category int

Sensitive Data Identification Rules for the Type of. Valid values:

content str

Sensitive Data Identification Rules the Content.

content_category str

The Content Classification.

custom_type int

Sensitive Data Identification Rules of Type. Valid values:

description str

Sensitive Data Identification a Description of the Rule Information.

lang str

The Request and Receive the Language of the Message Type. Valid values:

product_code str

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

product_id str

Product ID. Valid values:

risk_level_id str

Sensitive Data Identification Rules of Risk Level ID. Valid values:

rule_name str

Sensitive Data Identification Name of the Rule.

rule_type int

Rule Type.

stat_express str

Triggered the Alarm Conditions.

status int

Sensitive Data Identification Rules Detection State of.

target str

The Target of rule.

warn_level int

The Level of Risk. Valid values:

category Number

Sensitive Data Identification Rules for the Type of. Valid values:

content String

Sensitive Data Identification Rules the Content.

contentCategory String

The Content Classification.

customType Number

Sensitive Data Identification Rules of Type. Valid values:

description String

Sensitive Data Identification a Description of the Rule Information.

lang String

The Request and Receive the Language of the Message Type. Valid values:

productCode String

Product Code. Valid values: OSS,RDS,ODPS(MaxCompute).

productId String

Product ID. Valid values:

riskLevelId String

Sensitive Data Identification Rules of Risk Level ID. Valid values:

ruleName String

Sensitive Data Identification Name of the Rule.

ruleType Number

Rule Type.

statExpress String

Triggered the Alarm Conditions.

status Number

Sensitive Data Identification Rules Detection State of.

target String

The Target of rule.

warnLevel Number

The Level of Risk. Valid values:

Import

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

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.