sysdig.SecureRuleStateful
Explore with Pulumi AI
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<Secure
Rule Stateful Exception> - 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.
- Secure
Rule stringStateful Id - Timeouts
Secure
Rule Stateful Timeouts
- Exceptions
[]Secure
Rule Stateful Exception Args - 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.
- Secure
Rule stringStateful Id - Timeouts
Secure
Rule Stateful Timeouts Args
- exceptions
List<Secure
Rule Stateful Exception> - 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.
- secure
Rule StringStateful Id - timeouts
Secure
Rule Stateful Timeouts
- exceptions
Secure
Rule Stateful Exception[] - 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.
- secure
Rule stringStateful Id - timeouts
Secure
Rule Stateful Timeouts
- exceptions
Sequence[Secure
Rule Stateful Exception Args] - 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_ strstateful_ id - timeouts
Secure
Rule Stateful Timeouts Args
- 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.
- secure
Rule StringStateful Id - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SecureRuleStateful resource produces the following output properties:
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.
- 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<Secure
Rule Stateful Exception> - 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".
- Secure
Rule stringStateful Id - Source string
- The source of the event. We currently support the "awscloudtrail_stateful" source.
- Timeouts
Secure
Rule Stateful Timeouts - 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
[]Secure
Rule Stateful Exception Args - 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".
- Secure
Rule stringStateful Id - Source string
- The source of the event. We currently support the "awscloudtrail_stateful" source.
- Timeouts
Secure
Rule Stateful Timeouts Args - 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<Secure
Rule Stateful Exception> - 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".
- secure
Rule StringStateful Id - source String
- The source of the event. We currently support the "awscloudtrail_stateful" source.
- timeouts
Secure
Rule Stateful Timeouts - 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
Secure
Rule Stateful Exception[] - 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".
- secure
Rule stringStateful Id - source string
- The source of the event. We currently support the "awscloudtrail_stateful" source.
- timeouts
Secure
Rule Stateful Timeouts - 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[Secure
Rule Stateful Exception Args] - 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_ strstateful_ id - source str
- The source of the event. We currently support the "awscloudtrail_stateful" source.
- timeouts
Secure
Rule Stateful Timeouts Args - 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".
- secure
Rule StringStateful Id - 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
Package Details
- Repository
- sysdig sysdiglabs/terraform-provider-sysdig
- License
- Notes
- This Pulumi package is based on the
sysdig
Terraform Provider.