Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.sddp.getRules
Explore with Pulumi AI
This data source provides the Sddp Rules of the current Alibaba Cloud user.
NOTE: Available in v1.132.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultRule = new alicloud.sddp.Rule("default", {
category: 0,
content: "content",
ruleName: "rule_name",
riskLevelId: "4",
productCode: "ODPS",
});
const default = alicloud.sddp.getRulesOutput({
ids: [defaultRule.id],
});
export const sddpRuleId = _default.apply(_default => _default.id);
import pulumi
import pulumi_alicloud as alicloud
default_rule = alicloud.sddp.Rule("default",
category=0,
content="content",
rule_name="rule_name",
risk_level_id="4",
product_code="ODPS")
default = alicloud.sddp.get_rules_output(ids=[default_rule.id])
pulumi.export("sddpRuleId", default.id)
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 {
defaultRule, err := sddp.NewRule(ctx, "default", &sddp.RuleArgs{
Category: pulumi.Int(0),
Content: pulumi.String("content"),
RuleName: pulumi.String("rule_name"),
RiskLevelId: pulumi.String("4"),
ProductCode: pulumi.String("ODPS"),
})
if err != nil {
return err
}
_default := sddp.GetRulesOutput(ctx, sddp.GetRulesOutputArgs{
Ids: pulumi.StringArray{
defaultRule.ID(),
},
}, nil);
ctx.Export("sddpRuleId", _default.ApplyT(func(_default sddp.GetRulesResult) (*string, error) {
return &default.Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultRule = new AliCloud.Sddp.Rule("default", new()
{
Category = 0,
Content = "content",
RuleName = "rule_name",
RiskLevelId = "4",
ProductCode = "ODPS",
});
var @default = AliCloud.Sddp.GetRules.Invoke(new()
{
Ids = new[]
{
defaultRule.Id,
},
});
return new Dictionary<string, object?>
{
["sddpRuleId"] = @default.Apply(@default => @default.Apply(getRulesResult => getRulesResult.Id)),
};
});
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 com.pulumi.alicloud.sddp.SddpFunctions;
import com.pulumi.alicloud.sddp.inputs.GetRulesArgs;
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 defaultRule = new Rule("defaultRule", RuleArgs.builder()
.category("0")
.content("content")
.ruleName("rule_name")
.riskLevelId("4")
.productCode("ODPS")
.build());
final var default = SddpFunctions.getRules(GetRulesArgs.builder()
.ids(defaultRule.id())
.build());
ctx.export("sddpRuleId", default_.applyValue(default_ -> default_.id()));
}
}
resources:
defaultRule:
type: alicloud:sddp:Rule
name: default
properties:
category: '0'
content: content
ruleName: rule_name
riskLevelId: '4'
productCode: ODPS
variables:
default:
fn::invoke:
Function: alicloud:sddp:getRules
Arguments:
ids:
- ${defaultRule.id}
outputs:
sddpRuleId: ${default.id}
Using getRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRules(args: GetRulesArgs, opts?: InvokeOptions): Promise<GetRulesResult>
function getRulesOutput(args: GetRulesOutputArgs, opts?: InvokeOptions): Output<GetRulesResult>
def get_rules(category: Optional[int] = None,
content_category: Optional[str] = None,
custom_type: Optional[int] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
product_id: Optional[str] = None,
risk_level_id: Optional[str] = None,
rule_type: Optional[int] = None,
status: Optional[str] = None,
warn_level: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetRulesResult
def get_rules_output(category: Optional[pulumi.Input[int]] = None,
content_category: Optional[pulumi.Input[str]] = None,
custom_type: Optional[pulumi.Input[int]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
product_id: Optional[pulumi.Input[str]] = None,
risk_level_id: Optional[pulumi.Input[str]] = None,
rule_type: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
warn_level: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRulesResult]
func GetRules(ctx *Context, args *GetRulesArgs, opts ...InvokeOption) (*GetRulesResult, error)
func GetRulesOutput(ctx *Context, args *GetRulesOutputArgs, opts ...InvokeOption) GetRulesResultOutput
> Note: This function is named GetRules
in the Go SDK.
public static class GetRules
{
public static Task<GetRulesResult> InvokeAsync(GetRulesArgs args, InvokeOptions? opts = null)
public static Output<GetRulesResult> Invoke(GetRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRulesResult> getRules(GetRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:sddp/getRules:getRules
arguments:
# arguments dictionary
The following arguments are supported:
- Category int
- Sensitive Data Identification Rules for the Type of. Valid values:
- Content
Category string - The Content Classification.
- Custom
Type int - Sensitive Data Identification Rules of Type. Valid values:
- Enable
Details bool - Ids List<string>
- A list of Rule IDs.
- Name string
- The name of rule.
- Name
Regex string - A regex string to filter results by Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Product
Id string - Product ID. Valid values:
- Risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- Rule
Type int - Rule Type.
- Status string
- Sensitive Data Identification Rules Detection State of.
- Warn
Level int - The Level of Risk. Valid values:
- Category int
- Sensitive Data Identification Rules for the Type of. Valid values:
- Content
Category string - The Content Classification.
- Custom
Type int - Sensitive Data Identification Rules of Type. Valid values:
- Enable
Details bool - Ids []string
- A list of Rule IDs.
- Name string
- The name of rule.
- Name
Regex string - A regex string to filter results by Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Product
Id string - Product ID. Valid values:
- Risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- Rule
Type int - Rule Type.
- Status string
- Sensitive Data Identification Rules Detection State of.
- Warn
Level int - The Level of Risk. Valid values:
- category Integer
- Sensitive Data Identification Rules for the Type of. Valid values:
- content
Category String - The Content Classification.
- custom
Type Integer - Sensitive Data Identification Rules of Type. Valid values:
- enable
Details Boolean - ids List<String>
- A list of Rule IDs.
- name String
- The name of rule.
- name
Regex String - A regex string to filter results by Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - product
Id String - Product ID. Valid values:
- risk
Level StringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- rule
Type Integer - Rule Type.
- status String
- Sensitive Data Identification Rules Detection State of.
- warn
Level Integer - The Level of Risk. Valid values:
- category number
- Sensitive Data Identification Rules for the Type of. Valid values:
- content
Category string - The Content Classification.
- custom
Type number - Sensitive Data Identification Rules of Type. Valid values:
- enable
Details boolean - ids string[]
- A list of Rule IDs.
- name string
- The name of rule.
- name
Regex string - A regex string to filter results by Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - product
Id string - Product ID. Valid values:
- risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- rule
Type number - Rule Type.
- status string
- Sensitive Data Identification Rules Detection State of.
- warn
Level number - The Level of Risk. Valid values:
- category int
- Sensitive Data Identification Rules for the Type of. Valid values:
- content_
category str - The Content Classification.
- custom_
type int - Sensitive Data Identification Rules of Type. Valid values:
- enable_
details bool - ids Sequence[str]
- A list of Rule IDs.
- name str
- The name of rule.
- name_
regex str - A regex string to filter results by Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - product_
id str - Product ID. Valid values:
- risk_
level_ strid - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- rule_
type int - Rule Type.
- status str
- Sensitive Data Identification Rules Detection State of.
- warn_
level int - The Level of Risk. Valid values:
- category Number
- Sensitive Data Identification Rules for the Type of. Valid values:
- content
Category String - The Content Classification.
- custom
Type Number - Sensitive Data Identification Rules of Type. Valid values:
- enable
Details Boolean - ids List<String>
- A list of Rule IDs.
- name String
- The name of rule.
- name
Regex String - A regex string to filter results by Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - product
Id String - Product ID. Valid values:
- risk
Level StringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:
- rule
Type Number - Rule Type.
- status String
- Sensitive Data Identification Rules Detection State of.
- warn
Level Number - The Level of Risk. Valid values:
getRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Rules
List<Pulumi.
Ali Cloud. Sddp. Outputs. Get Rules Rule> - Category int
- Content
Category string - Custom
Type int - Enable
Details bool - Name string
- Name
Regex string - Output
File string - Product
Id string - Risk
Level stringId - Rule
Type int - Status string
- Warn
Level int
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Rules
[]Get
Rules Rule - Category int
- Content
Category string - Custom
Type int - Enable
Details bool - Name string
- Name
Regex string - Output
File string - Product
Id string - Risk
Level stringId - Rule
Type int - Status string
- Warn
Level int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules
List<Get
Rules Rule> - category Integer
- content
Category String - custom
Type Integer - enable
Details Boolean - name String
- name
Regex String - output
File String - product
Id String - risk
Level StringId - rule
Type Integer - status String
- warn
Level Integer
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- rules
Get
Rules Rule[] - category number
- content
Category string - custom
Type number - enable
Details boolean - name string
- name
Regex string - output
File string - product
Id string - risk
Level stringId - rule
Type number - status string
- warn
Level number
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- rules
Sequence[Get
Rules Rule] - category int
- content_
category str - custom_
type int - enable_
details bool - name str
- name_
regex str - output_
file str - product_
id str - risk_
level_ strid - rule_
type int - status str
- warn_
level int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules List<Property Map>
- category Number
- content
Category String - custom
Type Number - enable
Details Boolean - name String
- name
Regex String - output
File String - product
Id String - risk
Level StringId - rule
Type Number - status String
- warn
Level Number
Supporting Types
GetRulesRule
- Category int
- Sensitive Data Identification Rules for the Type of.
- Category
Name string - Sensitive Data Identification Rules Belongs Type Name.
- Content string
- Sensitive Data Identification Rules the Content.
- Content
Category string - The Content Classification.
- Create
Time string - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- Custom
Type int - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- Description string
- Sensitive Data Identification a Description of the Rule Information.
- Display
Name string - Sensitive Data Identification Rules, Founder of Account Display Name.
- Gmt
Modified string - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- Id string
- The ID of the Rule.
- Login
Name string - Sensitive Data Identification Rules, Founder Of Account Login.
- Major
Key string - The Primary Key.
- Name string
- The name of rule.
- Product
Code string - Product Code.
- Product
Id string - Product ID.
- Risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- Risk
Level stringName - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- Rule
Id string - The first ID of the resource.
- Stat
Express string - Triggered the Alarm Conditions.
- Status int
- Sensitive Data Identification Rules Detection State of.
- Target string
- The Target.
- User
Id string - The User ID.
- Warn
Level int - The Level of Risk.
- Category int
- Sensitive Data Identification Rules for the Type of.
- Category
Name string - Sensitive Data Identification Rules Belongs Type Name.
- Content string
- Sensitive Data Identification Rules the Content.
- Content
Category string - The Content Classification.
- Create
Time string - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- Custom
Type int - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- Description string
- Sensitive Data Identification a Description of the Rule Information.
- Display
Name string - Sensitive Data Identification Rules, Founder of Account Display Name.
- Gmt
Modified string - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- Id string
- The ID of the Rule.
- Login
Name string - Sensitive Data Identification Rules, Founder Of Account Login.
- Major
Key string - The Primary Key.
- Name string
- The name of rule.
- Product
Code string - Product Code.
- Product
Id string - Product ID.
- Risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- Risk
Level stringName - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- Rule
Id string - The first ID of the resource.
- Stat
Express string - Triggered the Alarm Conditions.
- Status int
- Sensitive Data Identification Rules Detection State of.
- Target string
- The Target.
- User
Id string - The User ID.
- Warn
Level int - The Level of Risk.
- category Integer
- Sensitive Data Identification Rules for the Type of.
- category
Name String - Sensitive Data Identification Rules Belongs Type Name.
- content String
- Sensitive Data Identification Rules the Content.
- content
Category String - The Content Classification.
- create
Time String - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- custom
Type Integer - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- description String
- Sensitive Data Identification a Description of the Rule Information.
- display
Name String - Sensitive Data Identification Rules, Founder of Account Display Name.
- gmt
Modified String - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- id String
- The ID of the Rule.
- login
Name String - Sensitive Data Identification Rules, Founder Of Account Login.
- major
Key String - The Primary Key.
- name String
- The name of rule.
- product
Code String - Product Code.
- product
Id String - Product ID.
- risk
Level StringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- risk
Level StringName - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- rule
Id String - The first ID of the resource.
- stat
Express String - Triggered the Alarm Conditions.
- status Integer
- Sensitive Data Identification Rules Detection State of.
- target String
- The Target.
- user
Id String - The User ID.
- warn
Level Integer - The Level of Risk.
- category number
- Sensitive Data Identification Rules for the Type of.
- category
Name string - Sensitive Data Identification Rules Belongs Type Name.
- content string
- Sensitive Data Identification Rules the Content.
- content
Category string - The Content Classification.
- create
Time string - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- custom
Type number - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- description string
- Sensitive Data Identification a Description of the Rule Information.
- display
Name string - Sensitive Data Identification Rules, Founder of Account Display Name.
- gmt
Modified string - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- id string
- The ID of the Rule.
- login
Name string - Sensitive Data Identification Rules, Founder Of Account Login.
- major
Key string - The Primary Key.
- name string
- The name of rule.
- product
Code string - Product Code.
- product
Id string - Product ID.
- risk
Level stringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- risk
Level stringName - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- rule
Id string - The first ID of the resource.
- stat
Express string - Triggered the Alarm Conditions.
- status number
- Sensitive Data Identification Rules Detection State of.
- target string
- The Target.
- user
Id string - The User ID.
- warn
Level number - The Level of Risk.
- category int
- Sensitive Data Identification Rules for the Type of.
- category_
name str - Sensitive Data Identification Rules Belongs Type Name.
- content str
- Sensitive Data Identification Rules the Content.
- content_
category str - The Content Classification.
- create_
time str - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- custom_
type int - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- description str
- Sensitive Data Identification a Description of the Rule Information.
- display_
name str - Sensitive Data Identification Rules, Founder of Account Display Name.
- gmt_
modified str - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- id str
- The ID of the Rule.
- login_
name str - Sensitive Data Identification Rules, Founder Of Account Login.
- major_
key str - The Primary Key.
- name str
- The name of rule.
- product_
code str - Product Code.
- product_
id str - Product ID.
- risk_
level_ strid - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- risk_
level_ strname - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- rule_
id str - The first ID of the resource.
- stat_
express str - Triggered the Alarm Conditions.
- status int
- Sensitive Data Identification Rules Detection State of.
- target str
- The Target.
- user_
id str - The User ID.
- warn_
level int - The Level of Risk.
- category Number
- Sensitive Data Identification Rules for the Type of.
- category
Name String - Sensitive Data Identification Rules Belongs Type Name.
- content String
- Sensitive Data Identification Rules the Content.
- content
Category String - The Content Classification.
- create
Time String - Sensitive Data Identification Rules the Creation Time of the Number of Milliseconds.
- custom
Type Number - Sensitive Data Identification Rules of Type. 0: the Built-in 1: The User-Defined.
- description String
- Sensitive Data Identification a Description of the Rule Information.
- display
Name String - Sensitive Data Identification Rules, Founder of Account Display Name.
- gmt
Modified String - Sensitive Data Identification Rules to the Modified Time of the Number of Milliseconds.
- id String
- The ID of the Rule.
- login
Name String - Sensitive Data Identification Rules, Founder Of Account Login.
- major
Key String - The Primary Key.
- name String
- The name of rule.
- product
Code String - Product Code.
- product
Id String - Product ID.
- risk
Level StringId - Sensitive Data Identification Rules of Risk Level ID. Valid values:1:S1, Weak Risk Level. 2:S2, Medium Risk Level. 3:S3 High Risk Level. 4:S4, the Highest Risk Level.
- risk
Level StringName - Sensitive Data Identification Rules the Risk Level of. S1: Weak Risk Level S2: Moderate Risk Level S3: High Risk Level S4: the Highest Risk Level.
- rule
Id String - The first ID of the resource.
- stat
Express String - Triggered the Alarm Conditions.
- status Number
- Sensitive Data Identification Rules Detection State of.
- target String
- The Target.
- user
Id String - The User ID.
- warn
Level Number - The Level of Risk.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.