1. Packages
  2. Sysdig Provider
  3. API Docs
  4. SecureRuleStateful
sysdig 1.56.0 published on Wednesday, Apr 30, 2025 by sysdiglabs

sysdig.SecureRuleStateful

Explore with Pulumi AI

sysdig logo
sysdig 1.56.0 published on Wednesday, Apr 30, 2025 by sysdiglabs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sysdig from "@pulumi/sysdig";
    
    const statefulRule = new sysdig.SecureRuleStateful("statefulRule", {
        source: "awscloudtrail_stateful",
        ruletype: "STATEFUL_SEQUENCE",
        exceptions: [{
            values: JSON.stringify([[
                "user_abc",
                ["12345"],
            ]]),
            name: "user_accountid",
        }],
    });
    
    import pulumi
    import json
    import pulumi_sysdig as sysdig
    
    stateful_rule = sysdig.SecureRuleStateful("statefulRule",
        source="awscloudtrail_stateful",
        ruletype="STATEFUL_SEQUENCE",
        exceptions=[{
            "values": json.dumps([[
                "user_abc",
                ["12345"],
            ]]),
            "name": "user_accountid",
        }])
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal([][]interface{}{
    			[]interface{}{
    				"user_abc",
    				[]string{
    					"12345",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = sysdig.NewSecureRuleStateful(ctx, "statefulRule", &sysdig.SecureRuleStatefulArgs{
    			Source:   pulumi.String("awscloudtrail_stateful"),
    			Ruletype: pulumi.String("STATEFUL_SEQUENCE"),
    			Exceptions: sysdig.SecureRuleStatefulExceptionArray{
    				&sysdig.SecureRuleStatefulExceptionArgs{
    					Values: pulumi.String(json0),
    					Name:   pulumi.String("user_accountid"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Sysdig = Pulumi.Sysdig;
    
    return await Deployment.RunAsync(() => 
    {
        var statefulRule = new Sysdig.SecureRuleStateful("statefulRule", new()
        {
            Source = "awscloudtrail_stateful",
            Ruletype = "STATEFUL_SEQUENCE",
            Exceptions = new[]
            {
                new Sysdig.Inputs.SecureRuleStatefulExceptionArgs
                {
                    Values = JsonSerializer.Serialize(new[]
                    {
                        new object?[]
                        {
                            "user_abc",
                            new[]
                            {
                                "12345",
                            },
                        },
                    }),
                    Name = "user_accountid",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sysdig.SecureRuleStateful;
    import com.pulumi.sysdig.SecureRuleStatefulArgs;
    import com.pulumi.sysdig.inputs.SecureRuleStatefulExceptionArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 statefulRule = new SecureRuleStateful("statefulRule", SecureRuleStatefulArgs.builder()
                .source("awscloudtrail_stateful")
                .ruletype("STATEFUL_SEQUENCE")
                .exceptions(SecureRuleStatefulExceptionArgs.builder()
                    .values(serializeJson(
                        jsonArray(jsonArray(
                            "user_abc", 
                            jsonArray("12345")
                        ))))
                    .name("user_accountid")
                    .build())
                .build());
    
        }
    }
    
    resources:
      statefulRule:
        type: sysdig:SecureRuleStateful
        properties:
          source: awscloudtrail_stateful
          ruletype: STATEFUL_SEQUENCE
          exceptions:
            - values:
                fn::toJSON:
                  - - user_abc
                    - - '12345'
              name: user_accountid
    

    Create SecureRuleStateful Resource

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

    Constructor syntax

    new SecureRuleStateful(name: string, args: SecureRuleStatefulArgs, opts?: CustomResourceOptions);
    @overload
    def SecureRuleStateful(resource_name: str,
                           args: SecureRuleStatefulArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecureRuleStateful(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           exceptions: Optional[Sequence[SecureRuleStatefulExceptionArgs]] = None,
                           ruletype: Optional[str] = None,
                           source: Optional[str] = None,
                           append: Optional[bool] = None,
                           name: Optional[str] = None,
                           secure_rule_stateful_id: Optional[str] = None,
                           timeouts: Optional[SecureRuleStatefulTimeoutsArgs] = None)
    func NewSecureRuleStateful(ctx *Context, name string, args SecureRuleStatefulArgs, opts ...ResourceOption) (*SecureRuleStateful, error)
    public SecureRuleStateful(string name, SecureRuleStatefulArgs args, CustomResourceOptions? opts = null)
    public SecureRuleStateful(String name, SecureRuleStatefulArgs args)
    public SecureRuleStateful(String name, SecureRuleStatefulArgs args, CustomResourceOptions options)
    
    type: sysdig:SecureRuleStateful
    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 SecureRuleStatefulArgs
    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 SecureRuleStatefulArgs
    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 SecureRuleStatefulArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecureRuleStatefulArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecureRuleStatefulArgs
    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 secureRuleStatefulResource = new Sysdig.SecureRuleStateful("secureRuleStatefulResource", new()
    {
        Exceptions = new[]
        {
            new Sysdig.Inputs.SecureRuleStatefulExceptionArgs
            {
                Name = "string",
                Values = "string",
            },
        },
        Ruletype = "string",
        Source = "string",
        Append = false,
        Name = "string",
        SecureRuleStatefulId = "string",
        Timeouts = new Sysdig.Inputs.SecureRuleStatefulTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := sysdig.NewSecureRuleStateful(ctx, "secureRuleStatefulResource", &sysdig.SecureRuleStatefulArgs{
    	Exceptions: sysdig.SecureRuleStatefulExceptionArray{
    		&sysdig.SecureRuleStatefulExceptionArgs{
    			Name:   pulumi.String("string"),
    			Values: pulumi.String("string"),
    		},
    	},
    	Ruletype:             pulumi.String("string"),
    	Source:               pulumi.String("string"),
    	Append:               pulumi.Bool(false),
    	Name:                 pulumi.String("string"),
    	SecureRuleStatefulId: pulumi.String("string"),
    	Timeouts: &sysdig.SecureRuleStatefulTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var secureRuleStatefulResource = new SecureRuleStateful("secureRuleStatefulResource", SecureRuleStatefulArgs.builder()
        .exceptions(SecureRuleStatefulExceptionArgs.builder()
            .name("string")
            .values("string")
            .build())
        .ruletype("string")
        .source("string")
        .append(false)
        .name("string")
        .secureRuleStatefulId("string")
        .timeouts(SecureRuleStatefulTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    secure_rule_stateful_resource = sysdig.SecureRuleStateful("secureRuleStatefulResource",
        exceptions=[{
            "name": "string",
            "values": "string",
        }],
        ruletype="string",
        source="string",
        append=False,
        name="string",
        secure_rule_stateful_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        })
    
    const secureRuleStatefulResource = new sysdig.SecureRuleStateful("secureRuleStatefulResource", {
        exceptions: [{
            name: "string",
            values: "string",
        }],
        ruletype: "string",
        source: "string",
        append: false,
        name: "string",
        secureRuleStatefulId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: sysdig:SecureRuleStateful
    properties:
        append: false
        exceptions:
            - name: string
              values: string
        name: string
        ruletype: string
        secureRuleStatefulId: string
        source: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
    

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

    Exceptions List<SecureRuleStatefulException>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    Ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    Source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    Append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    Name string
    The name of the Stateful rule that the exception is being appended to.
    SecureRuleStatefulId string
    Timeouts SecureRuleStatefulTimeouts
    Exceptions []SecureRuleStatefulExceptionArgs
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    Ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    Source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    Append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    Name string
    The name of the Stateful rule that the exception is being appended to.
    SecureRuleStatefulId string
    Timeouts SecureRuleStatefulTimeoutsArgs
    exceptions List<SecureRuleStatefulException>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    ruletype String
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    source String
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    append Boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    name String
    The name of the Stateful rule that the exception is being appended to.
    secureRuleStatefulId String
    timeouts SecureRuleStatefulTimeouts
    exceptions SecureRuleStatefulException[]
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    append boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    name string
    The name of the Stateful rule that the exception is being appended to.
    secureRuleStatefulId string
    timeouts SecureRuleStatefulTimeouts
    exceptions Sequence[SecureRuleStatefulExceptionArgs]
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    ruletype str
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    source str
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    name str
    The name of the Stateful rule that the exception is being appended to.
    secure_rule_stateful_id str
    timeouts SecureRuleStatefulTimeoutsArgs
    exceptions List<Property Map>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    ruletype String
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    source String
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    append Boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    name String
    The name of the Stateful rule that the exception is being appended to.
    secureRuleStatefulId String
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Version double
    Current version of the resource in Sysdig Secure.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version float64
    Current version of the resource in Sysdig Secure.
    id String
    The provider-assigned unique ID for this managed resource.
    version Double
    Current version of the resource in Sysdig Secure.
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    Current version of the resource in Sysdig Secure.
    id str
    The provider-assigned unique ID for this managed resource.
    version float
    Current version of the resource in Sysdig Secure.
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    Current version of the resource in Sysdig Secure.

    Look up Existing SecureRuleStateful Resource

    Get an existing SecureRuleStateful 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?: SecureRuleStatefulState, opts?: CustomResourceOptions): SecureRuleStateful
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            append: Optional[bool] = None,
            exceptions: Optional[Sequence[SecureRuleStatefulExceptionArgs]] = None,
            name: Optional[str] = None,
            ruletype: Optional[str] = None,
            secure_rule_stateful_id: Optional[str] = None,
            source: Optional[str] = None,
            timeouts: Optional[SecureRuleStatefulTimeoutsArgs] = None,
            version: Optional[float] = None) -> SecureRuleStateful
    func GetSecureRuleStateful(ctx *Context, name string, id IDInput, state *SecureRuleStatefulState, opts ...ResourceOption) (*SecureRuleStateful, error)
    public static SecureRuleStateful Get(string name, Input<string> id, SecureRuleStatefulState? state, CustomResourceOptions? opts = null)
    public static SecureRuleStateful get(String name, Output<String> id, SecureRuleStatefulState state, CustomResourceOptions options)
    resources:  _:    type: sysdig:SecureRuleStateful    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:
    Append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    Exceptions List<SecureRuleStatefulException>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    Name string
    The name of the Stateful rule that the exception is being appended to.
    Ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    SecureRuleStatefulId string
    Source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    Timeouts SecureRuleStatefulTimeouts
    Version double
    Current version of the resource in Sysdig Secure.
    Append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    Exceptions []SecureRuleStatefulExceptionArgs
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    Name string
    The name of the Stateful rule that the exception is being appended to.
    Ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    SecureRuleStatefulId string
    Source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    Timeouts SecureRuleStatefulTimeoutsArgs
    Version float64
    Current version of the resource in Sysdig Secure.
    append Boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    exceptions List<SecureRuleStatefulException>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    name String
    The name of the Stateful rule that the exception is being appended to.
    ruletype String
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    secureRuleStatefulId String
    source String
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    timeouts SecureRuleStatefulTimeouts
    version Double
    Current version of the resource in Sysdig Secure.
    append boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    exceptions SecureRuleStatefulException[]
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    name string
    The name of the Stateful rule that the exception is being appended to.
    ruletype string
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    secureRuleStatefulId string
    source string
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    timeouts SecureRuleStatefulTimeouts
    version number
    Current version of the resource in Sysdig Secure.
    append bool
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    exceptions Sequence[SecureRuleStatefulExceptionArgs]
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    name str
    The name of the Stateful rule that the exception is being appended to.
    ruletype str
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    secure_rule_stateful_id str
    source str
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    timeouts SecureRuleStatefulTimeoutsArgs
    version float
    Current version of the resource in Sysdig Secure.
    append Boolean
    This indicates that the rule being created appends the condition to an existing Sysdig-provided. For stateful rules, the default value is true.
    exceptions List<Property Map>
    The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
    name String
    The name of the Stateful rule that the exception is being appended to.
    ruletype String
    The type of Stateful rule being appended to. We currently support "STATEFUL_SEQUENCE", "STATEFUL_COUNT", and "STATEFUL_UNIQ_PERCENT".
    secureRuleStatefulId String
    source String
    The source of the event. We currently support the "awscloudtrail_stateful" source.
    timeouts Property Map
    version Number
    Current version of the resource in Sysdig Secure.

    Supporting Types

    SecureRuleStatefulException, SecureRuleStatefulExceptionArgs

    Name string
    The name of the exception.
    Values string
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.
    Name string
    The name of the exception.
    Values string
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.
    name String
    The name of the exception.
    values String
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.
    name string
    The name of the exception.
    values string
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.
    name str
    The name of the exception.
    values str
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.
    name String
    The name of the exception.
    values String
    Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field and comparison operator. Since the value can be a string, a list of strings or a list of a list of strings, the value of this field must be supplied in JSON format. You can use the default jsonencode function to provide this value. See the usage example on the top.

    SecureRuleStatefulTimeouts, SecureRuleStatefulTimeoutsArgs

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

    Package Details

    Repository
    sysdig sysdiglabs/terraform-provider-sysdig
    License
    Notes
    This Pulumi package is based on the sysdig Terraform Provider.
    sysdig logo
    sysdig 1.56.0 published on Wednesday, Apr 30, 2025 by sysdiglabs