grafana logo
Grafana v0.0.10, May 21 23

grafana.MuteTiming

Explore with Pulumi AI

Manages Grafana Alerting mute timings.

This resource requires Grafana 9.1.0 or later.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;

return await Deployment.RunAsync(() => 
{
    var myMuteTiming = new Grafana.MuteTiming("myMuteTiming", new()
    {
        Intervals = new[]
        {
            new Grafana.Inputs.MuteTimingIntervalArgs
            {
                DaysOfMonths = new[]
                {
                    "1:7",
                    "-1",
                },
                Months = new[]
                {
                    "1:3",
                    "december",
                },
                Times = new[]
                {
                    new Grafana.Inputs.MuteTimingIntervalTimeArgs
                    {
                        End = "14:17",
                        Start = "04:56",
                    },
                },
                Weekdays = new[]
                {
                    "monday",
                    "tuesday:thursday",
                },
                Years = new[]
                {
                    "2030",
                    "2025:2026",
                },
            },
        },
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := grafana.NewMuteTiming(ctx, "myMuteTiming", &grafana.MuteTimingArgs{
			Intervals: grafana.MuteTimingIntervalArray{
				&grafana.MuteTimingIntervalArgs{
					DaysOfMonths: pulumi.StringArray{
						pulumi.String("1:7"),
						pulumi.String("-1"),
					},
					Months: pulumi.StringArray{
						pulumi.String("1:3"),
						pulumi.String("december"),
					},
					Times: grafana.MuteTimingIntervalTimeArray{
						&grafana.MuteTimingIntervalTimeArgs{
							End:   pulumi.String("14:17"),
							Start: pulumi.String("04:56"),
						},
					},
					Weekdays: pulumi.StringArray{
						pulumi.String("monday"),
						pulumi.String("tuesday:thursday"),
					},
					Years: pulumi.StringArray{
						pulumi.String("2030"),
						pulumi.String("2025:2026"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.MuteTiming;
import com.pulumi.grafana.MuteTimingArgs;
import com.pulumi.grafana.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()        
            .intervals(MuteTimingIntervalArgs.builder()
                .daysOfMonths(                
                    "1:7",
                    "-1")
                .months(                
                    "1:3",
                    "december")
                .times(MuteTimingIntervalTimeArgs.builder()
                    .end("14:17")
                    .start("04:56")
                    .build())
                .weekdays(                
                    "monday",
                    "tuesday:thursday")
                .years(                
                    "2030",
                    "2025:2026")
                .build())
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_grafana as grafana

my_mute_timing = grafana.MuteTiming("myMuteTiming", intervals=[grafana.MuteTimingIntervalArgs(
    days_of_months=[
        "1:7",
        "-1",
    ],
    months=[
        "1:3",
        "december",
    ],
    times=[grafana.MuteTimingIntervalTimeArgs(
        end="14:17",
        start="04:56",
    )],
    weekdays=[
        "monday",
        "tuesday:thursday",
    ],
    years=[
        "2030",
        "2025:2026",
    ],
)])
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@lbrlabs/pulumi-grafana";

const myMuteTiming = new grafana.MuteTiming("myMuteTiming", {intervals: [{
    daysOfMonths: [
        "1:7",
        "-1",
    ],
    months: [
        "1:3",
        "december",
    ],
    times: [{
        end: "14:17",
        start: "04:56",
    }],
    weekdays: [
        "monday",
        "tuesday:thursday",
    ],
    years: [
        "2030",
        "2025:2026",
    ],
}]});
resources:
  myMuteTiming:
    type: grafana:MuteTiming
    properties:
      intervals:
        - daysOfMonths:
            - 1:7
            - '-1'
          months:
            - 1:3
            - december
          times:
            - end: 14:17
              start: 04:56
          weekdays:
            - monday
            - tuesday:thursday
          years:
            - '2030'
            - 2025:2026

Create MuteTiming Resource

new MuteTiming(name: string, args?: MuteTimingArgs, opts?: CustomResourceOptions);
@overload
def MuteTiming(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               intervals: Optional[Sequence[MuteTimingIntervalArgs]] = None,
               name: Optional[str] = None)
@overload
def MuteTiming(resource_name: str,
               args: Optional[MuteTimingArgs] = None,
               opts: Optional[ResourceOptions] = 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.

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

The MuteTiming resource accepts the following input properties:

Intervals List<Lbrlabs.PulumiPackage.Grafana.Inputs.MuteTimingIntervalArgs>

The time intervals at which to mute notifications.

Name string

The name of the mute timing.

Intervals []MuteTimingIntervalArgs

The time intervals at which to mute notifications.

Name string

The name of the mute timing.

intervals List<MuteTimingIntervalArgs>

The time intervals at which to mute notifications.

name String

The name of the mute timing.

intervals MuteTimingIntervalArgs[]

The time intervals at which to mute notifications.

name string

The name of the mute timing.

intervals Sequence[MuteTimingIntervalArgs]

The time intervals at which to mute notifications.

name str

The name of the mute timing.

intervals List<Property Map>

The time intervals at which to mute notifications.

name String

The name of the mute timing.

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,
        intervals: Optional[Sequence[MuteTimingIntervalArgs]] = None,
        name: 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:
Intervals List<Lbrlabs.PulumiPackage.Grafana.Inputs.MuteTimingIntervalArgs>

The time intervals at which to mute notifications.

Name string

The name of the mute timing.

Intervals []MuteTimingIntervalArgs

The time intervals at which to mute notifications.

Name string

The name of the mute timing.

intervals List<MuteTimingIntervalArgs>

The time intervals at which to mute notifications.

name String

The name of the mute timing.

intervals MuteTimingIntervalArgs[]

The time intervals at which to mute notifications.

name string

The name of the mute timing.

intervals Sequence[MuteTimingIntervalArgs]

The time intervals at which to mute notifications.

name str

The name of the mute timing.

intervals List<Property Map>

The time intervals at which to mute notifications.

name String

The name of the mute timing.

Supporting Types

MuteTimingInterval

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".

Months List<string>

An inclusive range of months, either numerical or full calendar month, e.g. "1:3", "december", or "may:august".

Times List<Lbrlabs.PulumiPackage.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".

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".

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".

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".

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".

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

End string
Start string
End string
Start string
end String
start String
end string
start string
end str
start str
end String
start String

Import

 $ pulumi import grafana:index/muteTiming:MuteTiming mute_timing_name {{mute_timing_name}}

Package Details

Repository
grafana lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.