1. Packages
  2. Castai Provider
  3. API Docs
  4. SecurityRuntimeRule
castai 7.52.0 published on Friday, May 9, 2025 by castai

castai.SecurityRuntimeRule

Explore with Pulumi AI

castai logo
castai 7.52.0 published on Friday, May 9, 2025 by castai

    Manages a CAST AI security runtime rule.

    Create SecurityRuntimeRule Resource

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

    Constructor syntax

    new SecurityRuntimeRule(name: string, args: SecurityRuntimeRuleArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityRuntimeRule(resource_name: str,
                            args: SecurityRuntimeRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityRuntimeRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            rule_text: Optional[str] = None,
                            severity: Optional[str] = None,
                            category: Optional[str] = None,
                            enabled: Optional[bool] = None,
                            labels: Optional[Mapping[str, str]] = None,
                            name: Optional[str] = None,
                            resource_selector: Optional[str] = None,
                            rule_engine_type: Optional[str] = None,
                            security_runtime_rule_id: Optional[str] = None,
                            timeouts: Optional[SecurityRuntimeRuleTimeoutsArgs] = None)
    func NewSecurityRuntimeRule(ctx *Context, name string, args SecurityRuntimeRuleArgs, opts ...ResourceOption) (*SecurityRuntimeRule, error)
    public SecurityRuntimeRule(string name, SecurityRuntimeRuleArgs args, CustomResourceOptions? opts = null)
    public SecurityRuntimeRule(String name, SecurityRuntimeRuleArgs args)
    public SecurityRuntimeRule(String name, SecurityRuntimeRuleArgs args, CustomResourceOptions options)
    
    type: castai:SecurityRuntimeRule
    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 SecurityRuntimeRuleArgs
    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 SecurityRuntimeRuleArgs
    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 SecurityRuntimeRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityRuntimeRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityRuntimeRuleArgs
    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 securityRuntimeRuleResource = new Castai.SecurityRuntimeRule("securityRuntimeRuleResource", new()
    {
        RuleText = "string",
        Severity = "string",
        Category = "string",
        Enabled = false,
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        ResourceSelector = "string",
        RuleEngineType = "string",
        SecurityRuntimeRuleId = "string",
        Timeouts = new Castai.Inputs.SecurityRuntimeRuleTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
        },
    });
    
    example, err := castai.NewSecurityRuntimeRule(ctx, "securityRuntimeRuleResource", &castai.SecurityRuntimeRuleArgs{
    	RuleText: pulumi.String("string"),
    	Severity: pulumi.String("string"),
    	Category: pulumi.String("string"),
    	Enabled:  pulumi.Bool(false),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:                  pulumi.String("string"),
    	ResourceSelector:      pulumi.String("string"),
    	RuleEngineType:        pulumi.String("string"),
    	SecurityRuntimeRuleId: pulumi.String("string"),
    	Timeouts: &castai.SecurityRuntimeRuleTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    	},
    })
    
    var securityRuntimeRuleResource = new SecurityRuntimeRule("securityRuntimeRuleResource", SecurityRuntimeRuleArgs.builder()
        .ruleText("string")
        .severity("string")
        .category("string")
        .enabled(false)
        .labels(Map.of("string", "string"))
        .name("string")
        .resourceSelector("string")
        .ruleEngineType("string")
        .securityRuntimeRuleId("string")
        .timeouts(SecurityRuntimeRuleTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .build())
        .build());
    
    security_runtime_rule_resource = castai.SecurityRuntimeRule("securityRuntimeRuleResource",
        rule_text="string",
        severity="string",
        category="string",
        enabled=False,
        labels={
            "string": "string",
        },
        name="string",
        resource_selector="string",
        rule_engine_type="string",
        security_runtime_rule_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
        })
    
    const securityRuntimeRuleResource = new castai.SecurityRuntimeRule("securityRuntimeRuleResource", {
        ruleText: "string",
        severity: "string",
        category: "string",
        enabled: false,
        labels: {
            string: "string",
        },
        name: "string",
        resourceSelector: "string",
        ruleEngineType: "string",
        securityRuntimeRuleId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
        },
    });
    
    type: castai:SecurityRuntimeRule
    properties:
        category: string
        enabled: false
        labels:
            string: string
        name: string
        resourceSelector: string
        ruleEngineType: string
        ruleText: string
        securityRuntimeRuleId: string
        severity: string
        timeouts:
            create: string
            delete: string
            read: string
    

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

    RuleText string
    CEL rule expression text.
    Severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    Category string
    Category of the rule.
    Enabled bool
    Whether the rule is enabled.
    Labels Dictionary<string, string>
    Key-value labels attached to the rule.
    Name string
    ResourceSelector string
    Optional CEL expression for resource selection.
    RuleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    SecurityRuntimeRuleId string
    The ID of this resource.
    Timeouts SecurityRuntimeRuleTimeouts
    RuleText string
    CEL rule expression text.
    Severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    Category string
    Category of the rule.
    Enabled bool
    Whether the rule is enabled.
    Labels map[string]string
    Key-value labels attached to the rule.
    Name string
    ResourceSelector string
    Optional CEL expression for resource selection.
    RuleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    SecurityRuntimeRuleId string
    The ID of this resource.
    Timeouts SecurityRuntimeRuleTimeoutsArgs
    ruleText String
    CEL rule expression text.
    severity String
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    category String
    Category of the rule.
    enabled Boolean
    Whether the rule is enabled.
    labels Map<String,String>
    Key-value labels attached to the rule.
    name String
    resourceSelector String
    Optional CEL expression for resource selection.
    ruleEngineType String
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    securityRuntimeRuleId String
    The ID of this resource.
    timeouts SecurityRuntimeRuleTimeouts
    ruleText string
    CEL rule expression text.
    severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    category string
    Category of the rule.
    enabled boolean
    Whether the rule is enabled.
    labels {[key: string]: string}
    Key-value labels attached to the rule.
    name string
    resourceSelector string
    Optional CEL expression for resource selection.
    ruleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    securityRuntimeRuleId string
    The ID of this resource.
    timeouts SecurityRuntimeRuleTimeouts
    rule_text str
    CEL rule expression text.
    severity str
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    category str
    Category of the rule.
    enabled bool
    Whether the rule is enabled.
    labels Mapping[str, str]
    Key-value labels attached to the rule.
    name str
    resource_selector str
    Optional CEL expression for resource selection.
    rule_engine_type str
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    security_runtime_rule_id str
    The ID of this resource.
    timeouts SecurityRuntimeRuleTimeoutsArgs
    ruleText String
    CEL rule expression text.
    severity String
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    category String
    Category of the rule.
    enabled Boolean
    Whether the rule is enabled.
    labels Map<String>
    Key-value labels attached to the rule.
    name String
    resourceSelector String
    Optional CEL expression for resource selection.
    ruleEngineType String
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    securityRuntimeRuleId String
    The ID of this resource.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityRuntimeRule resource produces the following output properties:

    AnomaliesCount double
    Number of anomalies detected using this rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsBuiltIn bool
    Indicates whether the rule is a built-in rule.
    Type string
    Type of the rule (internal value).
    UsedCustomLists List<string>
    Custom lists used in this rule, if any.
    AnomaliesCount float64
    Number of anomalies detected using this rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsBuiltIn bool
    Indicates whether the rule is a built-in rule.
    Type string
    Type of the rule (internal value).
    UsedCustomLists []string
    Custom lists used in this rule, if any.
    anomaliesCount Double
    Number of anomalies detected using this rule.
    id String
    The provider-assigned unique ID for this managed resource.
    isBuiltIn Boolean
    Indicates whether the rule is a built-in rule.
    type String
    Type of the rule (internal value).
    usedCustomLists List<String>
    Custom lists used in this rule, if any.
    anomaliesCount number
    Number of anomalies detected using this rule.
    id string
    The provider-assigned unique ID for this managed resource.
    isBuiltIn boolean
    Indicates whether the rule is a built-in rule.
    type string
    Type of the rule (internal value).
    usedCustomLists string[]
    Custom lists used in this rule, if any.
    anomalies_count float
    Number of anomalies detected using this rule.
    id str
    The provider-assigned unique ID for this managed resource.
    is_built_in bool
    Indicates whether the rule is a built-in rule.
    type str
    Type of the rule (internal value).
    used_custom_lists Sequence[str]
    Custom lists used in this rule, if any.
    anomaliesCount Number
    Number of anomalies detected using this rule.
    id String
    The provider-assigned unique ID for this managed resource.
    isBuiltIn Boolean
    Indicates whether the rule is a built-in rule.
    type String
    Type of the rule (internal value).
    usedCustomLists List<String>
    Custom lists used in this rule, if any.

    Look up Existing SecurityRuntimeRule Resource

    Get an existing SecurityRuntimeRule 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?: SecurityRuntimeRuleState, opts?: CustomResourceOptions): SecurityRuntimeRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            anomalies_count: Optional[float] = None,
            category: Optional[str] = None,
            enabled: Optional[bool] = None,
            is_built_in: Optional[bool] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            resource_selector: Optional[str] = None,
            rule_engine_type: Optional[str] = None,
            rule_text: Optional[str] = None,
            security_runtime_rule_id: Optional[str] = None,
            severity: Optional[str] = None,
            timeouts: Optional[SecurityRuntimeRuleTimeoutsArgs] = None,
            type: Optional[str] = None,
            used_custom_lists: Optional[Sequence[str]] = None) -> SecurityRuntimeRule
    func GetSecurityRuntimeRule(ctx *Context, name string, id IDInput, state *SecurityRuntimeRuleState, opts ...ResourceOption) (*SecurityRuntimeRule, error)
    public static SecurityRuntimeRule Get(string name, Input<string> id, SecurityRuntimeRuleState? state, CustomResourceOptions? opts = null)
    public static SecurityRuntimeRule get(String name, Output<String> id, SecurityRuntimeRuleState state, CustomResourceOptions options)
    resources:  _:    type: castai:SecurityRuntimeRule    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:
    AnomaliesCount double
    Number of anomalies detected using this rule.
    Category string
    Category of the rule.
    Enabled bool
    Whether the rule is enabled.
    IsBuiltIn bool
    Indicates whether the rule is a built-in rule.
    Labels Dictionary<string, string>
    Key-value labels attached to the rule.
    Name string
    ResourceSelector string
    Optional CEL expression for resource selection.
    RuleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    RuleText string
    CEL rule expression text.
    SecurityRuntimeRuleId string
    The ID of this resource.
    Severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    Timeouts SecurityRuntimeRuleTimeouts
    Type string
    Type of the rule (internal value).
    UsedCustomLists List<string>
    Custom lists used in this rule, if any.
    AnomaliesCount float64
    Number of anomalies detected using this rule.
    Category string
    Category of the rule.
    Enabled bool
    Whether the rule is enabled.
    IsBuiltIn bool
    Indicates whether the rule is a built-in rule.
    Labels map[string]string
    Key-value labels attached to the rule.
    Name string
    ResourceSelector string
    Optional CEL expression for resource selection.
    RuleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    RuleText string
    CEL rule expression text.
    SecurityRuntimeRuleId string
    The ID of this resource.
    Severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    Timeouts SecurityRuntimeRuleTimeoutsArgs
    Type string
    Type of the rule (internal value).
    UsedCustomLists []string
    Custom lists used in this rule, if any.
    anomaliesCount Double
    Number of anomalies detected using this rule.
    category String
    Category of the rule.
    enabled Boolean
    Whether the rule is enabled.
    isBuiltIn Boolean
    Indicates whether the rule is a built-in rule.
    labels Map<String,String>
    Key-value labels attached to the rule.
    name String
    resourceSelector String
    Optional CEL expression for resource selection.
    ruleEngineType String
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    ruleText String
    CEL rule expression text.
    securityRuntimeRuleId String
    The ID of this resource.
    severity String
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    timeouts SecurityRuntimeRuleTimeouts
    type String
    Type of the rule (internal value).
    usedCustomLists List<String>
    Custom lists used in this rule, if any.
    anomaliesCount number
    Number of anomalies detected using this rule.
    category string
    Category of the rule.
    enabled boolean
    Whether the rule is enabled.
    isBuiltIn boolean
    Indicates whether the rule is a built-in rule.
    labels {[key: string]: string}
    Key-value labels attached to the rule.
    name string
    resourceSelector string
    Optional CEL expression for resource selection.
    ruleEngineType string
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    ruleText string
    CEL rule expression text.
    securityRuntimeRuleId string
    The ID of this resource.
    severity string
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    timeouts SecurityRuntimeRuleTimeouts
    type string
    Type of the rule (internal value).
    usedCustomLists string[]
    Custom lists used in this rule, if any.
    anomalies_count float
    Number of anomalies detected using this rule.
    category str
    Category of the rule.
    enabled bool
    Whether the rule is enabled.
    is_built_in bool
    Indicates whether the rule is a built-in rule.
    labels Mapping[str, str]
    Key-value labels attached to the rule.
    name str
    resource_selector str
    Optional CEL expression for resource selection.
    rule_engine_type str
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    rule_text str
    CEL rule expression text.
    security_runtime_rule_id str
    The ID of this resource.
    severity str
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    timeouts SecurityRuntimeRuleTimeoutsArgs
    type str
    Type of the rule (internal value).
    used_custom_lists Sequence[str]
    Custom lists used in this rule, if any.
    anomaliesCount Number
    Number of anomalies detected using this rule.
    category String
    Category of the rule.
    enabled Boolean
    Whether the rule is enabled.
    isBuiltIn Boolean
    Indicates whether the rule is a built-in rule.
    labels Map<String>
    Key-value labels attached to the rule.
    name String
    resourceSelector String
    Optional CEL expression for resource selection.
    ruleEngineType String
    The engine type used to evaluate the rule. Only RULEENGINETYPE_CEL is currently supported.
    ruleText String
    CEL rule expression text.
    securityRuntimeRuleId String
    The ID of this resource.
    severity String
    Severity of the rule. One of SEVERITYCRITICAL, SEVERITYHIGH, SEVERITYMEDIUM, SEVERITYLOW, SEVERITY_NONE.
    timeouts Property Map
    type String
    Type of the rule (internal value).
    usedCustomLists List<String>
    Custom lists used in this rule, if any.

    Supporting Types

    SecurityRuntimeRuleTimeouts, SecurityRuntimeRuleTimeoutsArgs

    Create string
    Delete string
    Read string
    Create string
    Delete string
    Read string
    create String
    delete String
    read String
    create string
    delete string
    read string
    create str
    delete str
    read str
    create String
    delete String
    read String

    Package Details

    Repository
    castai castai/terraform-provider-castai
    License
    Notes
    This Pulumi package is based on the castai Terraform Provider.
    castai logo
    castai 7.52.0 published on Friday, May 9, 2025 by castai