sysdig.MonitorSilenceRule
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";
import * as time from "@pulumi/time";
const startTs = new time.index.Time_static("startTs", {rfc3339: "2023-07-08T07:00:00Z"});
const sample = new sysdig.MonitorSilenceRule("sample", {
    enabled: true,
    startTs: startTs.unix * 1000,
    durationSeconds: 60 * 60 * 24,
    scope: "cloudProvider.region != \"us-east-1\" and not host.hostName contains \"testhost\" and kubernetes.job.name starts with \"prod\" and kubernetes.daemonSet.name in (\"ds1\", \"ds2\")",
    alertIds: [
        1234,
        1235,
    ],
    notificationChannelIds: [
        111,
        222,
    ],
});
import pulumi
import pulumi_sysdig as sysdig
import pulumi_time as time
start_ts = time.index.Time_static("startTs", rfc3339=2023-07-08T07:00:00Z)
sample = sysdig.MonitorSilenceRule("sample",
    enabled=True,
    start_ts=start_ts["unix"] * 1000,
    duration_seconds=60 * 60 * 24,
    scope="cloudProvider.region != \"us-east-1\" and not host.hostName contains \"testhost\" and kubernetes.job.name starts with \"prod\" and kubernetes.daemonSet.name in (\"ds1\", \"ds2\")",
    alert_ids=[
        1234,
        1235,
    ],
    notification_channel_ids=[
        111,
        222,
    ])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
	"github.com/pulumi/pulumi-time/sdk/go/time"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		startTs, err := time.NewTime_static(ctx, "startTs", &time.Time_staticArgs{
			Rfc3339: "2023-07-08T07:00:00Z",
		})
		if err != nil {
			return err
		}
		_, err = sysdig.NewMonitorSilenceRule(ctx, "sample", &sysdig.MonitorSilenceRuleArgs{
			Enabled:         pulumi.Bool(true),
			StartTs:         pulumi.String(startTs.Unix * 1000),
			DurationSeconds: 60 * 60 * 24,
			Scope:           pulumi.String("cloudProvider.region != \"us-east-1\" and not host.hostName contains \"testhost\" and kubernetes.job.name starts with \"prod\" and kubernetes.daemonSet.name in (\"ds1\", \"ds2\")"),
			AlertIds: pulumi.Float64Array{
				pulumi.Float64(1234),
				pulumi.Float64(1235),
			},
			NotificationChannelIds: pulumi.Float64Array{
				pulumi.Float64(111),
				pulumi.Float64(222),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;
using Time = Pulumi.Time;
return await Deployment.RunAsync(() => 
{
    var startTs = new Time.Index.Time_static("startTs", new()
    {
        Rfc3339 = "2023-07-08T07:00:00Z",
    });
    var sample = new Sysdig.MonitorSilenceRule("sample", new()
    {
        Enabled = true,
        StartTs = startTs.Unix * 1000,
        DurationSeconds = 60 * 60 * 24,
        Scope = "cloudProvider.region != \"us-east-1\" and not host.hostName contains \"testhost\" and kubernetes.job.name starts with \"prod\" and kubernetes.daemonSet.name in (\"ds1\", \"ds2\")",
        AlertIds = new[]
        {
            1234,
            1235,
        },
        NotificationChannelIds = new[]
        {
            111,
            222,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.time.time_static;
import com.pulumi.time.Time_staticArgs;
import com.pulumi.sysdig.MonitorSilenceRule;
import com.pulumi.sysdig.MonitorSilenceRuleArgs;
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 startTs = new Time_static("startTs", Time_staticArgs.builder()
            .rfc3339("2023-07-08T07:00:00Z")
            .build());
        var sample = new MonitorSilenceRule("sample", MonitorSilenceRuleArgs.builder()
            .enabled(true)
            .startTs(startTs.unix() * 1000)
            .durationSeconds(60 * 60 * 24)
            .scope("cloudProvider.region != \"us-east-1\" and not host.hostName contains \"testhost\" and kubernetes.job.name starts with \"prod\" and kubernetes.daemonSet.name in (\"ds1\", \"ds2\")")
            .alertIds(            
                1234,
                1235)
            .notificationChannelIds(            
                111,
                222)
            .build());
    }
}
Coming soon!
Create MonitorSilenceRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MonitorSilenceRule(name: string, args: MonitorSilenceRuleArgs, opts?: CustomResourceOptions);@overload
def MonitorSilenceRule(resource_name: str,
                       args: MonitorSilenceRuleArgs,
                       opts: Optional[ResourceOptions] = None)
@overload
def MonitorSilenceRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       duration_seconds: Optional[float] = None,
                       start_ts: Optional[str] = None,
                       alert_ids: Optional[Sequence[float]] = None,
                       enabled: Optional[bool] = None,
                       monitor_silence_rule_id: Optional[str] = None,
                       name: Optional[str] = None,
                       notification_channel_ids: Optional[Sequence[float]] = None,
                       scope: Optional[str] = None,
                       timeouts: Optional[MonitorSilenceRuleTimeoutsArgs] = None)func NewMonitorSilenceRule(ctx *Context, name string, args MonitorSilenceRuleArgs, opts ...ResourceOption) (*MonitorSilenceRule, error)public MonitorSilenceRule(string name, MonitorSilenceRuleArgs args, CustomResourceOptions? opts = null)
public MonitorSilenceRule(String name, MonitorSilenceRuleArgs args)
public MonitorSilenceRule(String name, MonitorSilenceRuleArgs args, CustomResourceOptions options)
type: sysdig:MonitorSilenceRule
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 MonitorSilenceRuleArgs
- 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 MonitorSilenceRuleArgs
- 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 MonitorSilenceRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorSilenceRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorSilenceRuleArgs
- 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 monitorSilenceRuleResource = new Sysdig.MonitorSilenceRule("monitorSilenceRuleResource", new()
{
    DurationSeconds = 0,
    StartTs = "string",
    AlertIds = new[]
    {
        0,
    },
    Enabled = false,
    MonitorSilenceRuleId = "string",
    Name = "string",
    NotificationChannelIds = new[]
    {
        0,
    },
    Scope = "string",
    Timeouts = new Sysdig.Inputs.MonitorSilenceRuleTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
example, err := sysdig.NewMonitorSilenceRule(ctx, "monitorSilenceRuleResource", &sysdig.MonitorSilenceRuleArgs{
DurationSeconds: pulumi.Float64(0),
StartTs: pulumi.String("string"),
AlertIds: pulumi.Float64Array{
pulumi.Float64(0),
},
Enabled: pulumi.Bool(false),
MonitorSilenceRuleId: pulumi.String("string"),
Name: pulumi.String("string"),
NotificationChannelIds: pulumi.Float64Array{
pulumi.Float64(0),
},
Scope: pulumi.String("string"),
Timeouts: &.MonitorSilenceRuleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var monitorSilenceRuleResource = new MonitorSilenceRule("monitorSilenceRuleResource", MonitorSilenceRuleArgs.builder()
    .durationSeconds(0)
    .startTs("string")
    .alertIds(0)
    .enabled(false)
    .monitorSilenceRuleId("string")
    .name("string")
    .notificationChannelIds(0)
    .scope("string")
    .timeouts(MonitorSilenceRuleTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
monitor_silence_rule_resource = sysdig.MonitorSilenceRule("monitorSilenceRuleResource",
    duration_seconds=0,
    start_ts="string",
    alert_ids=[0],
    enabled=False,
    monitor_silence_rule_id="string",
    name="string",
    notification_channel_ids=[0],
    scope="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
const monitorSilenceRuleResource = new sysdig.MonitorSilenceRule("monitorSilenceRuleResource", {
    durationSeconds: 0,
    startTs: "string",
    alertIds: [0],
    enabled: false,
    monitorSilenceRuleId: "string",
    name: "string",
    notificationChannelIds: [0],
    scope: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
type: sysdig:MonitorSilenceRule
properties:
    alertIds:
        - 0
    durationSeconds: 0
    enabled: false
    monitorSilenceRuleId: string
    name: string
    notificationChannelIds:
        - 0
    scope: string
    startTs: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
MonitorSilenceRule 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 MonitorSilenceRule resource accepts the following input properties:
- DurationSeconds double
- Duration of the Silence Rule, in seconds.
- StartTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- AlertIds List<double>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- Enabled bool
- Whether to enable the Silence Rule. Default: true.
- MonitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- Name string
- The name of the Silence Rule.
- NotificationChannel List<double>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- Scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- Timeouts
MonitorSilence Rule Timeouts 
- DurationSeconds float64
- Duration of the Silence Rule, in seconds.
- StartTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- AlertIds []float64
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- Enabled bool
- Whether to enable the Silence Rule. Default: true.
- MonitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- Name string
- The name of the Silence Rule.
- NotificationChannel []float64Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- Scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- Timeouts
MonitorSilence Rule Timeouts Args 
- durationSeconds Double
- Duration of the Silence Rule, in seconds.
- startTs String
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- alertIds List<Double>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- enabled Boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence StringRule Id 
- (Computed) The ID of the Silence Rule.
- name String
- The name of the Silence Rule.
- notificationChannel List<Double>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope String
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- timeouts
MonitorSilence Rule Timeouts 
- durationSeconds number
- Duration of the Silence Rule, in seconds.
- startTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- alertIds number[]
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- enabled boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- name string
- The name of the Silence Rule.
- notificationChannel number[]Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- timeouts
MonitorSilence Rule Timeouts 
- duration_seconds float
- Duration of the Silence Rule, in seconds.
- start_ts str
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- alert_ids Sequence[float]
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- enabled bool
- Whether to enable the Silence Rule. Default: true.
- monitor_silence_ strrule_ id 
- (Computed) The ID of the Silence Rule.
- name str
- The name of the Silence Rule.
- notification_channel_ Sequence[float]ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope str
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- timeouts
MonitorSilence Rule Timeouts Args 
- durationSeconds Number
- Duration of the Silence Rule, in seconds.
- startTs String
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- alertIds List<Number>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- enabled Boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence StringRule Id 
- (Computed) The ID of the Silence Rule.
- name String
- The name of the Silence Rule.
- notificationChannel List<Number>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope String
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the MonitorSilenceRule resource produces the following output properties:
Look up Existing MonitorSilenceRule Resource
Get an existing MonitorSilenceRule 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?: MonitorSilenceRuleState, opts?: CustomResourceOptions): MonitorSilenceRule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alert_ids: Optional[Sequence[float]] = None,
        duration_seconds: Optional[float] = None,
        enabled: Optional[bool] = None,
        monitor_silence_rule_id: Optional[str] = None,
        name: Optional[str] = None,
        notification_channel_ids: Optional[Sequence[float]] = None,
        scope: Optional[str] = None,
        start_ts: Optional[str] = None,
        timeouts: Optional[MonitorSilenceRuleTimeoutsArgs] = None,
        version: Optional[float] = None) -> MonitorSilenceRulefunc GetMonitorSilenceRule(ctx *Context, name string, id IDInput, state *MonitorSilenceRuleState, opts ...ResourceOption) (*MonitorSilenceRule, error)public static MonitorSilenceRule Get(string name, Input<string> id, MonitorSilenceRuleState? state, CustomResourceOptions? opts = null)public static MonitorSilenceRule get(String name, Output<String> id, MonitorSilenceRuleState state, CustomResourceOptions options)resources:  _:    type: sysdig:MonitorSilenceRule    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.
- AlertIds List<double>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- DurationSeconds double
- Duration of the Silence Rule, in seconds.
- Enabled bool
- Whether to enable the Silence Rule. Default: true.
- MonitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- Name string
- The name of the Silence Rule.
- NotificationChannel List<double>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- Scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- StartTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- Timeouts
MonitorSilence Rule Timeouts 
- Version double
- (Computed) The current version of the Silence Rule.
- AlertIds []float64
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- DurationSeconds float64
- Duration of the Silence Rule, in seconds.
- Enabled bool
- Whether to enable the Silence Rule. Default: true.
- MonitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- Name string
- The name of the Silence Rule.
- NotificationChannel []float64Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- Scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- StartTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- Timeouts
MonitorSilence Rule Timeouts Args 
- Version float64
- (Computed) The current version of the Silence Rule.
- alertIds List<Double>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- durationSeconds Double
- Duration of the Silence Rule, in seconds.
- enabled Boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence StringRule Id 
- (Computed) The ID of the Silence Rule.
- name String
- The name of the Silence Rule.
- notificationChannel List<Double>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope String
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- startTs String
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- timeouts
MonitorSilence Rule Timeouts 
- version Double
- (Computed) The current version of the Silence Rule.
- alertIds number[]
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- durationSeconds number
- Duration of the Silence Rule, in seconds.
- enabled boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence stringRule Id 
- (Computed) The ID of the Silence Rule.
- name string
- The name of the Silence Rule.
- notificationChannel number[]Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope string
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- startTs string
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- timeouts
MonitorSilence Rule Timeouts 
- version number
- (Computed) The current version of the Silence Rule.
- alert_ids Sequence[float]
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- duration_seconds float
- Duration of the Silence Rule, in seconds.
- enabled bool
- Whether to enable the Silence Rule. Default: true.
- monitor_silence_ strrule_ id 
- (Computed) The ID of the Silence Rule.
- name str
- The name of the Silence Rule.
- notification_channel_ Sequence[float]ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope str
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- start_ts str
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- timeouts
MonitorSilence Rule Timeouts Args 
- version float
- (Computed) The current version of the Silence Rule.
- alertIds List<Number>
- List of alerts the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- durationSeconds Number
- Duration of the Silence Rule, in seconds.
- enabled Boolean
- Whether to enable the Silence Rule. Default: true.
- monitorSilence StringRule Id 
- (Computed) The ID of the Silence Rule.
- name String
- The name of the Silence Rule.
- notificationChannel List<Number>Ids 
- List of notification channels that will be used to notify when the Silence Rule starts and end.
- scope String
- Part of the infrastructure the Silence Rule will be applied to. At least one of scopeoralert_idsmust be defined.
- startTs String
- Unix timestamp, in milliseconds, when the Silence Rule starts.
- timeouts Property Map
- version Number
- (Computed) The current version of the Silence Rule.
Supporting Types
MonitorSilenceRuleTimeouts, MonitorSilenceRuleTimeoutsArgs        
Import
Silence Rules for Monitor can be imported using the ID, e.g.
$ pulumi import sysdig:index/monitorSilenceRule:MonitorSilenceRule example 12345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sysdig sysdiglabs/terraform-provider-sysdig
- License
- Notes
- This Pulumi package is based on the sysdigTerraform Provider.