1. Packages
  2. Grafana Cloud
  3. API Docs
  4. MuteTiming
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

grafana.MuteTiming

Explore with Pulumi AI

grafana logo
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse
    Deprecated: grafana.index/mutetiming.MuteTiming has been deprecated in favor of grafana.alerting/mutetiming.MuteTiming

    Manages Grafana Alerting mute timings.

    This resource requires Grafana 9.1.0 or later.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const myMuteTiming = new grafana.alerting.MuteTiming("my_mute_timing", {
        name: "My Mute Timing",
        intervals: [{
            times: [{
                start: "04:56",
                end: "14:17",
            }],
            weekdays: [
                "monday",
                "tuesday:thursday",
            ],
            daysOfMonths: [
                "1:7",
                "-1",
            ],
            months: [
                "1:3",
                "december",
            ],
            years: [
                "2030",
                "2025:2026",
            ],
            location: "America/New_York",
        }],
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    my_mute_timing = grafana.alerting.MuteTiming("my_mute_timing",
        name="My Mute Timing",
        intervals=[{
            "times": [{
                "start": "04:56",
                "end": "14:17",
            }],
            "weekdays": [
                "monday",
                "tuesday:thursday",
            ],
            "days_of_months": [
                "1:7",
                "-1",
            ],
            "months": [
                "1:3",
                "december",
            ],
            "years": [
                "2030",
                "2025:2026",
            ],
            "location": "America/New_York",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/alerting"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alerting.NewMuteTiming(ctx, "my_mute_timing", &alerting.MuteTimingArgs{
    			Name: pulumi.String("My Mute Timing"),
    			Intervals: alerting.MuteTimingIntervalArray{
    				&alerting.MuteTimingIntervalArgs{
    					Times: alerting.MuteTimingIntervalTimeArray{
    						&alerting.MuteTimingIntervalTimeArgs{
    							Start: pulumi.String("04:56"),
    							End:   pulumi.String("14:17"),
    						},
    					},
    					Weekdays: pulumi.StringArray{
    						pulumi.String("monday"),
    						pulumi.String("tuesday:thursday"),
    					},
    					DaysOfMonths: pulumi.StringArray{
    						pulumi.String("1:7"),
    						pulumi.String("-1"),
    					},
    					Months: pulumi.StringArray{
    						pulumi.String("1:3"),
    						pulumi.String("december"),
    					},
    					Years: pulumi.StringArray{
    						pulumi.String("2030"),
    						pulumi.String("2025:2026"),
    					},
    					Location: pulumi.String("America/New_York"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var myMuteTiming = new Grafana.Alerting.MuteTiming("my_mute_timing", new()
        {
            Name = "My Mute Timing",
            Intervals = new[]
            {
                new Grafana.Alerting.Inputs.MuteTimingIntervalArgs
                {
                    Times = new[]
                    {
                        new Grafana.Alerting.Inputs.MuteTimingIntervalTimeArgs
                        {
                            Start = "04:56",
                            End = "14:17",
                        },
                    },
                    Weekdays = new[]
                    {
                        "monday",
                        "tuesday:thursday",
                    },
                    DaysOfMonths = new[]
                    {
                        "1:7",
                        "-1",
                    },
                    Months = new[]
                    {
                        "1:3",
                        "december",
                    },
                    Years = new[]
                    {
                        "2030",
                        "2025:2026",
                    },
                    Location = "America/New_York",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.alerting.MuteTiming;
    import com.pulumi.grafana.alerting.MuteTimingArgs;
    import com.pulumi.grafana.alerting.inputs.MuteTimingIntervalArgs;
    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 myMuteTiming = new MuteTiming("myMuteTiming", MuteTimingArgs.builder()
                .name("My Mute Timing")
                .intervals(MuteTimingIntervalArgs.builder()
                    .times(MuteTimingIntervalTimeArgs.builder()
                        .start("04:56")
                        .end("14:17")
                        .build())
                    .weekdays(                
                        "monday",
                        "tuesday:thursday")
                    .daysOfMonths(                
                        "1:7",
                        "-1")
                    .months(                
                        "1:3",
                        "december")
                    .years(                
                        "2030",
                        "2025:2026")
                    .location("America/New_York")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myMuteTiming:
        type: grafana:alerting:MuteTiming
        name: my_mute_timing
        properties:
          name: My Mute Timing
          intervals:
            - times:
                - start: 04:56
                  end: 14:17
              weekdays:
                - monday
                - tuesday:thursday
              daysOfMonths:
                - 1:7
                - '-1'
              months:
                - 1:3
                - december
              years:
                - '2030'
                - 2025:2026
              location: America/New_York
    

    Create MuteTiming Resource

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

    Constructor syntax

    new MuteTiming(name: string, args?: MuteTimingArgs, opts?: CustomResourceOptions);
    @overload
    def MuteTiming(resource_name: str,
                   args: Optional[MuteTimingArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def MuteTiming(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   disable_provenance: Optional[bool] = None,
                   intervals: Optional[Sequence[MuteTimingIntervalArgs]] = None,
                   name: Optional[str] = None,
                   org_id: Optional[str] = None)
    func NewMuteTiming(ctx *Context, name string, args *MuteTimingArgs, opts ...ResourceOption) (*MuteTiming, error)
    public MuteTiming(string name, MuteTimingArgs? args = null, CustomResourceOptions? opts = null)
    public MuteTiming(String name, MuteTimingArgs args)
    public MuteTiming(String name, MuteTimingArgs args, CustomResourceOptions options)
    
    type: grafana:MuteTiming
    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 MuteTimingArgs
    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 MuteTimingArgs
    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 MuteTimingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MuteTimingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MuteTimingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DisableProvenance bool
    Intervals List<Pulumiverse.Grafana.Inputs.MuteTimingInterval>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    Name string
    The name of the mute timing.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    DisableProvenance bool
    Intervals []MuteTimingIntervalArgs
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    Name string
    The name of the mute timing.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance Boolean
    intervals List<MuteTimingInterval>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name String
    The name of the mute timing.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance boolean
    intervals MuteTimingInterval[]
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name string
    The name of the mute timing.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disable_provenance bool
    intervals Sequence[MuteTimingIntervalArgs]
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name str
    The name of the mute timing.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance Boolean
    intervals List<Property Map>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name String
    The name of the mute timing.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MuteTiming Resource

    Get an existing MuteTiming 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?: MuteTimingState, opts?: CustomResourceOptions): MuteTiming
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disable_provenance: Optional[bool] = None,
            intervals: Optional[Sequence[MuteTimingIntervalArgs]] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None) -> MuteTiming
    func GetMuteTiming(ctx *Context, name string, id IDInput, state *MuteTimingState, opts ...ResourceOption) (*MuteTiming, error)
    public static MuteTiming Get(string name, Input<string> id, MuteTimingState? state, CustomResourceOptions? opts = null)
    public static MuteTiming get(String name, Output<String> id, MuteTimingState 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:
    DisableProvenance bool
    Intervals List<Pulumiverse.Grafana.Inputs.MuteTimingInterval>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    Name string
    The name of the mute timing.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    DisableProvenance bool
    Intervals []MuteTimingIntervalArgs
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    Name string
    The name of the mute timing.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance Boolean
    intervals List<MuteTimingInterval>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name String
    The name of the mute timing.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance boolean
    intervals MuteTimingInterval[]
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name string
    The name of the mute timing.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disable_provenance bool
    intervals Sequence[MuteTimingIntervalArgs]
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name str
    The name of the mute timing.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    disableProvenance Boolean
    intervals List<Property Map>
    The time intervals at which to mute notifications. Use an empty block to mute all the time.
    name String
    The name of the mute timing.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    Supporting Types

    MuteTimingInterval, MuteTimingIntervalArgs

    DaysOfMonths List<string>
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    Location string
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    Months List<string>
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    Times List<Pulumiverse.Grafana.Inputs.MuteTimingIntervalTime>
    The time ranges, represented in minutes, during which to mute in a given day.
    Weekdays List<string>
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    Years List<string>
    A positive inclusive range of years, e.g. "2030" or "2025:2026".
    DaysOfMonths []string
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    Location string
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    Months []string
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    Times []MuteTimingIntervalTime
    The time ranges, represented in minutes, during which to mute in a given day.
    Weekdays []string
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    Years []string
    A positive inclusive range of years, e.g. "2030" or "2025:2026".
    daysOfMonths List<String>
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    location String
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    months List<String>
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    times List<MuteTimingIntervalTime>
    The time ranges, represented in minutes, during which to mute in a given day.
    weekdays List<String>
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    years List<String>
    A positive inclusive range of years, e.g. "2030" or "2025:2026".
    daysOfMonths string[]
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    location string
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    months string[]
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    times MuteTimingIntervalTime[]
    The time ranges, represented in minutes, during which to mute in a given day.
    weekdays string[]
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    years string[]
    A positive inclusive range of years, e.g. "2030" or "2025:2026".
    days_of_months Sequence[str]
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    location str
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    months Sequence[str]
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    times Sequence[MuteTimingIntervalTime]
    The time ranges, represented in minutes, during which to mute in a given day.
    weekdays Sequence[str]
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    years Sequence[str]
    A positive inclusive range of years, e.g. "2030" or "2025:2026".
    daysOfMonths List<String>
    An inclusive range of days, 1-31, within a month, e.g. "1" or "14:16". Negative values can be used to represent days counting from the end of a month, e.g. "-1".
    location String
    Provides the time zone for the time interval. Must be a location in the IANA time zone database, e.g "America/New_York"
    months List<String>
    An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".
    times List<Property Map>
    The time ranges, represented in minutes, during which to mute in a given day.
    weekdays List<String>
    An inclusive range of weekdays, e.g. "monday" or "tuesday:thursday".
    years List<String>
    A positive inclusive range of years, e.g. "2030" or "2025:2026".

    MuteTimingIntervalTime, MuteTimingIntervalTimeArgs

    End string
    The time, in hh:mm format, of when the interval should end exclusively.
    Start string
    The time, in hh:mm format, of when the interval should begin inclusively.
    End string
    The time, in hh:mm format, of when the interval should end exclusively.
    Start string
    The time, in hh:mm format, of when the interval should begin inclusively.
    end String
    The time, in hh:mm format, of when the interval should end exclusively.
    start String
    The time, in hh:mm format, of when the interval should begin inclusively.
    end string
    The time, in hh:mm format, of when the interval should end exclusively.
    start string
    The time, in hh:mm format, of when the interval should begin inclusively.
    end str
    The time, in hh:mm format, of when the interval should end exclusively.
    start str
    The time, in hh:mm format, of when the interval should begin inclusively.
    end String
    The time, in hh:mm format, of when the interval should end exclusively.
    start String
    The time, in hh:mm format, of when the interval should begin inclusively.

    Import

    $ pulumi import grafana:index/muteTiming:MuteTiming name "{{ name }}"
    
    $ pulumi import grafana:index/muteTiming:MuteTiming name "{{ orgID }}:{{ name }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse