1. Packages
  2. SignalFx
  3. API Docs
  4. AlertMutingRule
SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi

signalfx.AlertMutingRule

Explore with Pulumi AI

signalfx logo
SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi

    Provides a Splunk Observability Cloud resource for managing alert muting rules. See Mute Notifications for more information.

    Splunk Observability Cloud currently allows linking an alert muting rule with only one detector ID. Specifying multiple detector IDs makes the muting rule obsolete.

    WARNING Splunk Observability Cloud does not allow the start time of a currently active muting rule to be modified. Attempting to modify a currently active rule destroys the existing rule and creates a new rule. This might result in the emission of notifications.

    Example

    import * as pulumi from "@pulumi/pulumi";
    import * as signalfx from "@pulumi/signalfx";
    
    const roolMooterOne = new signalfx.AlertMutingRule("rool_mooter_one", {
        description: "mooted it NEW",
        startTime: 1573063243,
        stopTime: 0,
        detectors: [someDetectorId],
        filters: [{
            property: "foo",
            propertyValue: "bar",
        }],
        recurrence: {
            unit: "d",
            value: 2,
        },
    });
    
    import pulumi
    import pulumi_signalfx as signalfx
    
    rool_mooter_one = signalfx.AlertMutingRule("rool_mooter_one",
        description="mooted it NEW",
        start_time=1573063243,
        stop_time=0,
        detectors=[some_detector_id],
        filters=[{
            "property": "foo",
            "property_value": "bar",
        }],
        recurrence={
            "unit": "d",
            "value": 2,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := signalfx.NewAlertMutingRule(ctx, "rool_mooter_one", &signalfx.AlertMutingRuleArgs{
    			Description: pulumi.String("mooted it NEW"),
    			StartTime:   pulumi.Int(1573063243),
    			StopTime:    pulumi.Int(0),
    			Detectors: pulumi.StringArray{
    				someDetectorId,
    			},
    			Filters: signalfx.AlertMutingRuleFilterArray{
    				&signalfx.AlertMutingRuleFilterArgs{
    					Property:      pulumi.String("foo"),
    					PropertyValue: pulumi.String("bar"),
    				},
    			},
    			Recurrence: &signalfx.AlertMutingRuleRecurrenceArgs{
    				Unit:  pulumi.String("d"),
    				Value: pulumi.Int(2),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SignalFx = Pulumi.SignalFx;
    
    return await Deployment.RunAsync(() => 
    {
        var roolMooterOne = new SignalFx.AlertMutingRule("rool_mooter_one", new()
        {
            Description = "mooted it NEW",
            StartTime = 1573063243,
            StopTime = 0,
            Detectors = new[]
            {
                someDetectorId,
            },
            Filters = new[]
            {
                new SignalFx.Inputs.AlertMutingRuleFilterArgs
                {
                    Property = "foo",
                    PropertyValue = "bar",
                },
            },
            Recurrence = new SignalFx.Inputs.AlertMutingRuleRecurrenceArgs
            {
                Unit = "d",
                Value = 2,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.signalfx.AlertMutingRule;
    import com.pulumi.signalfx.AlertMutingRuleArgs;
    import com.pulumi.signalfx.inputs.AlertMutingRuleFilterArgs;
    import com.pulumi.signalfx.inputs.AlertMutingRuleRecurrenceArgs;
    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 roolMooterOne = new AlertMutingRule("roolMooterOne", AlertMutingRuleArgs.builder()
                .description("mooted it NEW")
                .startTime(1573063243)
                .stopTime(0)
                .detectors(someDetectorId)
                .filters(AlertMutingRuleFilterArgs.builder()
                    .property("foo")
                    .propertyValue("bar")
                    .build())
                .recurrence(AlertMutingRuleRecurrenceArgs.builder()
                    .unit("d")
                    .value(2)
                    .build())
                .build());
    
        }
    }
    
    resources:
      roolMooterOne:
        type: signalfx:AlertMutingRule
        name: rool_mooter_one
        properties:
          description: mooted it NEW
          startTime: 1.573063243e+09
          stopTime: 0 # Defaults to 0
          detectors:
            - ${someDetectorId}
          filters:
            - property: foo
              propertyValue: bar
          recurrence:
            unit: d
            value: 2
    

    Create AlertMutingRule Resource

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

    Constructor syntax

    new AlertMutingRule(name: string, args: AlertMutingRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AlertMutingRule(resource_name: str,
                        args: AlertMutingRuleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertMutingRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        description: Optional[str] = None,
                        start_time: Optional[int] = None,
                        detectors: Optional[Sequence[str]] = None,
                        filters: Optional[Sequence[AlertMutingRuleFilterArgs]] = None,
                        recurrence: Optional[AlertMutingRuleRecurrenceArgs] = None,
                        stop_time: Optional[int] = None)
    func NewAlertMutingRule(ctx *Context, name string, args AlertMutingRuleArgs, opts ...ResourceOption) (*AlertMutingRule, error)
    public AlertMutingRule(string name, AlertMutingRuleArgs args, CustomResourceOptions? opts = null)
    public AlertMutingRule(String name, AlertMutingRuleArgs args)
    public AlertMutingRule(String name, AlertMutingRuleArgs args, CustomResourceOptions options)
    
    type: signalfx:AlertMutingRule
    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 AlertMutingRuleArgs
    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 AlertMutingRuleArgs
    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 AlertMutingRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertMutingRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertMutingRuleArgs
    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 alertMutingRuleResource = new SignalFx.AlertMutingRule("alertMutingRuleResource", new()
    {
        Description = "string",
        StartTime = 0,
        Detectors = new[]
        {
            "string",
        },
        Filters = new[]
        {
            new SignalFx.Inputs.AlertMutingRuleFilterArgs
            {
                Property = "string",
                PropertyValue = "string",
                Negated = false,
            },
        },
        Recurrence = new SignalFx.Inputs.AlertMutingRuleRecurrenceArgs
        {
            Unit = "string",
            Value = 0,
        },
        StopTime = 0,
    });
    
    example, err := signalfx.NewAlertMutingRule(ctx, "alertMutingRuleResource", &signalfx.AlertMutingRuleArgs{
    	Description: pulumi.String("string"),
    	StartTime:   pulumi.Int(0),
    	Detectors: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Filters: signalfx.AlertMutingRuleFilterArray{
    		&signalfx.AlertMutingRuleFilterArgs{
    			Property:      pulumi.String("string"),
    			PropertyValue: pulumi.String("string"),
    			Negated:       pulumi.Bool(false),
    		},
    	},
    	Recurrence: &signalfx.AlertMutingRuleRecurrenceArgs{
    		Unit:  pulumi.String("string"),
    		Value: pulumi.Int(0),
    	},
    	StopTime: pulumi.Int(0),
    })
    
    var alertMutingRuleResource = new AlertMutingRule("alertMutingRuleResource", AlertMutingRuleArgs.builder()
        .description("string")
        .startTime(0)
        .detectors("string")
        .filters(AlertMutingRuleFilterArgs.builder()
            .property("string")
            .propertyValue("string")
            .negated(false)
            .build())
        .recurrence(AlertMutingRuleRecurrenceArgs.builder()
            .unit("string")
            .value(0)
            .build())
        .stopTime(0)
        .build());
    
    alert_muting_rule_resource = signalfx.AlertMutingRule("alertMutingRuleResource",
        description="string",
        start_time=0,
        detectors=["string"],
        filters=[signalfx.AlertMutingRuleFilterArgs(
            property="string",
            property_value="string",
            negated=False,
        )],
        recurrence=signalfx.AlertMutingRuleRecurrenceArgs(
            unit="string",
            value=0,
        ),
        stop_time=0)
    
    const alertMutingRuleResource = new signalfx.AlertMutingRule("alertMutingRuleResource", {
        description: "string",
        startTime: 0,
        detectors: ["string"],
        filters: [{
            property: "string",
            propertyValue: "string",
            negated: false,
        }],
        recurrence: {
            unit: "string",
            value: 0,
        },
        stopTime: 0,
    });
    
    type: signalfx:AlertMutingRule
    properties:
        description: string
        detectors:
            - string
        filters:
            - negated: false
              property: string
              propertyValue: string
        recurrence:
            unit: string
            value: 0
        startTime: 0
        stopTime: 0
    

    AlertMutingRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AlertMutingRule resource accepts the following input properties:

    Description string
    The description for this muting rule
    StartTime int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    Detectors List<string>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    Filters List<Pulumi.SignalFx.Inputs.AlertMutingRuleFilter>
    Filters for this rule. See Creating muting rules from scratch for more information.
    Recurrence Pulumi.SignalFx.Inputs.AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    StopTime int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    Description string
    The description for this muting rule
    StartTime int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    Detectors []string
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    Filters []AlertMutingRuleFilterArgs
    Filters for this rule. See Creating muting rules from scratch for more information.
    Recurrence AlertMutingRuleRecurrenceArgs
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    StopTime int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description String
    The description for this muting rule
    startTime Integer
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    detectors List<String>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    filters List<AlertMutingRuleFilter>
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    stopTime Integer
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description string
    The description for this muting rule
    startTime number
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    detectors string[]
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    filters AlertMutingRuleFilter[]
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    stopTime number
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description str
    The description for this muting rule
    start_time int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    detectors Sequence[str]
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    filters Sequence[AlertMutingRuleFilterArgs]
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrenceArgs
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    stop_time int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description String
    The description for this muting rule
    startTime Number
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    detectors List<String>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    filters List<Property Map>
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence Property Map
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    stopTime Number
    Stop time of an alert muting rule as a Unix time stamp in seconds.

    Outputs

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

    EffectiveStartTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    EffectiveStartTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    effectiveStartTime Integer
    id String
    The provider-assigned unique ID for this managed resource.
    effectiveStartTime number
    id string
    The provider-assigned unique ID for this managed resource.
    effective_start_time int
    id str
    The provider-assigned unique ID for this managed resource.
    effectiveStartTime Number
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AlertMutingRule Resource

    Get an existing AlertMutingRule 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?: AlertMutingRuleState, opts?: CustomResourceOptions): AlertMutingRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            detectors: Optional[Sequence[str]] = None,
            effective_start_time: Optional[int] = None,
            filters: Optional[Sequence[AlertMutingRuleFilterArgs]] = None,
            recurrence: Optional[AlertMutingRuleRecurrenceArgs] = None,
            start_time: Optional[int] = None,
            stop_time: Optional[int] = None) -> AlertMutingRule
    func GetAlertMutingRule(ctx *Context, name string, id IDInput, state *AlertMutingRuleState, opts ...ResourceOption) (*AlertMutingRule, error)
    public static AlertMutingRule Get(string name, Input<string> id, AlertMutingRuleState? state, CustomResourceOptions? opts = null)
    public static AlertMutingRule get(String name, Output<String> id, AlertMutingRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Description string
    The description for this muting rule
    Detectors List<string>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    EffectiveStartTime int
    Filters List<Pulumi.SignalFx.Inputs.AlertMutingRuleFilter>
    Filters for this rule. See Creating muting rules from scratch for more information.
    Recurrence Pulumi.SignalFx.Inputs.AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    StartTime int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    StopTime int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    Description string
    The description for this muting rule
    Detectors []string
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    EffectiveStartTime int
    Filters []AlertMutingRuleFilterArgs
    Filters for this rule. See Creating muting rules from scratch for more information.
    Recurrence AlertMutingRuleRecurrenceArgs
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    StartTime int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    StopTime int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description String
    The description for this muting rule
    detectors List<String>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    effectiveStartTime Integer
    filters List<AlertMutingRuleFilter>
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    startTime Integer
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    stopTime Integer
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description string
    The description for this muting rule
    detectors string[]
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    effectiveStartTime number
    filters AlertMutingRuleFilter[]
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrence
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    startTime number
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    stopTime number
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description str
    The description for this muting rule
    detectors Sequence[str]
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    effective_start_time int
    filters Sequence[AlertMutingRuleFilterArgs]
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence AlertMutingRuleRecurrenceArgs
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    start_time int
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    stop_time int
    Stop time of an alert muting rule as a Unix time stamp in seconds.
    description String
    The description for this muting rule
    detectors List<String>
    A convenience attribute that associated this muting rule with specific detector IDs. Currently, only one ID is supported.
    effectiveStartTime Number
    filters List<Property Map>
    Filters for this rule. See Creating muting rules from scratch for more information.
    recurrence Property Map
    Defines the recurrence of the muting rule. Allows setting a recurring muting rule based on specified days or weeks.
    startTime Number
    Starting time of an alert muting rule as a Unit time stamp in seconds.
    stopTime Number
    Stop time of an alert muting rule as a Unix time stamp in seconds.

    Supporting Types

    AlertMutingRuleFilter, AlertMutingRuleFilterArgs

    Property string
    The property to filter.
    PropertyValue string
    The property value to filter.
    Negated bool
    Determines if this is a "not" filter. Defaults to false.
    Property string
    The property to filter.
    PropertyValue string
    The property value to filter.
    Negated bool
    Determines if this is a "not" filter. Defaults to false.
    property String
    The property to filter.
    propertyValue String
    The property value to filter.
    negated Boolean
    Determines if this is a "not" filter. Defaults to false.
    property string
    The property to filter.
    propertyValue string
    The property value to filter.
    negated boolean
    Determines if this is a "not" filter. Defaults to false.
    property str
    The property to filter.
    property_value str
    The property value to filter.
    negated bool
    Determines if this is a "not" filter. Defaults to false.
    property String
    The property to filter.
    propertyValue String
    The property value to filter.
    negated Boolean
    Determines if this is a "not" filter. Defaults to false.

    AlertMutingRuleRecurrence, AlertMutingRuleRecurrenceArgs

    Unit string
    The unit of the period. Can be days (d) or weeks (w).
    Value int
    The amount of time, expressed as an integer, applicable to the unit specified.
    Unit string
    The unit of the period. Can be days (d) or weeks (w).
    Value int
    The amount of time, expressed as an integer, applicable to the unit specified.
    unit String
    The unit of the period. Can be days (d) or weeks (w).
    value Integer
    The amount of time, expressed as an integer, applicable to the unit specified.
    unit string
    The unit of the period. Can be days (d) or weeks (w).
    value number
    The amount of time, expressed as an integer, applicable to the unit specified.
    unit str
    The unit of the period. Can be days (d) or weeks (w).
    value int
    The amount of time, expressed as an integer, applicable to the unit specified.
    unit String
    The unit of the period. Can be days (d) or weeks (w).
    value Number
    The amount of time, expressed as an integer, applicable to the unit specified.

    Package Details

    Repository
    SignalFx pulumi/pulumi-signalfx
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the signalfx Terraform Provider.
    signalfx logo
    SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi