1. Packages
  2. Grafana Cloud
  3. API Docs
  4. MuteTiming
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.MuteTiming

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

    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.MuteTiming("myMuteTiming", {intervals: [{
        daysOfMonths: [
            "1:7",
            "-1",
        ],
        location: "America/New_York",
        months: [
            "1:3",
            "december",
        ],
        times: [{
            end: "14:17",
            start: "04:56",
        }],
        weekdays: [
            "monday",
            "tuesday:thursday",
        ],
        years: [
            "2030",
            "2025:2026",
        ],
    }]});
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    my_mute_timing = grafana.MuteTiming("myMuteTiming", intervals=[grafana.MuteTimingIntervalArgs(
        days_of_months=[
            "1:7",
            "-1",
        ],
        location="America/New_York",
        months=[
            "1:3",
            "december",
        ],
        times=[grafana.MuteTimingIntervalTimeArgs(
            end="14:17",
            start="04:56",
        )],
        weekdays=[
            "monday",
            "tuesday:thursday",
        ],
        years=[
            "2030",
            "2025:2026",
        ],
    )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana"
    )
    
    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"),
    					},
    					Location: pulumi.String("America/New_York"),
    					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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var myMuteTiming = new Grafana.MuteTiming("myMuteTiming", new()
        {
            Intervals = new[]
            {
                new Grafana.Inputs.MuteTimingIntervalArgs
                {
                    DaysOfMonths = new[]
                    {
                        "1:7",
                        "-1",
                    },
                    Location = "America/New_York",
                    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 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")
                    .location("America/New_York")
                    .months(                
                        "1:3",
                        "december")
                    .times(MuteTimingIntervalTimeArgs.builder()
                        .end("14:17")
                        .start("04:56")
                        .build())
                    .weekdays(                
                        "monday",
                        "tuesday:thursday")
                    .years(                
                        "2030",
                        "2025:2026")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myMuteTiming:
        type: grafana:MuteTiming
        properties:
          intervals:
            - daysOfMonths:
                - 1:7
                - '-1'
              location: America/New_York
              months:
                - 1:3
                - december
              times:
                - end: 14:17
                  start: 04:56
              weekdays:
                - monday
                - tuesday:thursday
              years:
                - '2030'
                - 2025:2026
    

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var muteTimingResource = new Grafana.MuteTiming("muteTimingResource", new()
    {
        DisableProvenance = false,
        Intervals = new[]
        {
            new Grafana.Inputs.MuteTimingIntervalArgs
            {
                DaysOfMonths = new[]
                {
                    "string",
                },
                Location = "string",
                Months = new[]
                {
                    "string",
                },
                Times = new[]
                {
                    new Grafana.Inputs.MuteTimingIntervalTimeArgs
                    {
                        End = "string",
                        Start = "string",
                    },
                },
                Weekdays = new[]
                {
                    "string",
                },
                Years = new[]
                {
                    "string",
                },
            },
        },
        Name = "string",
        OrgId = "string",
    });
    
    example, err := grafana.NewMuteTiming(ctx, "muteTimingResource", &grafana.MuteTimingArgs{
    	DisableProvenance: pulumi.Bool(false),
    	Intervals: grafana.MuteTimingIntervalArray{
    		&grafana.MuteTimingIntervalArgs{
    			DaysOfMonths: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Location: pulumi.String("string"),
    			Months: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Times: grafana.MuteTimingIntervalTimeArray{
    				&grafana.MuteTimingIntervalTimeArgs{
    					End:   pulumi.String("string"),
    					Start: pulumi.String("string"),
    				},
    			},
    			Weekdays: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Years: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Name:  pulumi.String("string"),
    	OrgId: pulumi.String("string"),
    })
    
    var muteTimingResource = new MuteTiming("muteTimingResource", MuteTimingArgs.builder()
        .disableProvenance(false)
        .intervals(MuteTimingIntervalArgs.builder()
            .daysOfMonths("string")
            .location("string")
            .months("string")
            .times(MuteTimingIntervalTimeArgs.builder()
                .end("string")
                .start("string")
                .build())
            .weekdays("string")
            .years("string")
            .build())
        .name("string")
        .orgId("string")
        .build());
    
    mute_timing_resource = grafana.MuteTiming("muteTimingResource",
        disable_provenance=False,
        intervals=[grafana.MuteTimingIntervalArgs(
            days_of_months=["string"],
            location="string",
            months=["string"],
            times=[grafana.MuteTimingIntervalTimeArgs(
                end="string",
                start="string",
            )],
            weekdays=["string"],
            years=["string"],
        )],
        name="string",
        org_id="string")
    
    const muteTimingResource = new grafana.MuteTiming("muteTimingResource", {
        disableProvenance: false,
        intervals: [{
            daysOfMonths: ["string"],
            location: "string",
            months: ["string"],
            times: [{
                end: "string",
                start: "string",
            }],
            weekdays: ["string"],
            years: ["string"],
        }],
        name: "string",
        orgId: "string",
    });
    
    type: grafana:MuteTiming
    properties:
        disableProvenance: false
        intervals:
            - daysOfMonths:
                - string
              location: string
              months:
                - string
              times:
                - end: string
                  start: string
              weekdays:
                - string
              years:
                - string
        name: string
        orgId: string
    

    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:

    DisableProvenance bool
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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
    Allow modifying the mute timing from other sources than Terraform or the Grafana API.
    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.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse