grafana.alerting.MuteTiming
Explore with Pulumi AI
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:alerting: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.Alerting.MuteTiming("muteTimingResource", new()
{
DisableProvenance = false,
Intervals = new[]
{
new Grafana.Alerting.Inputs.MuteTimingIntervalArgs
{
DaysOfMonths = new[]
{
"string",
},
Location = "string",
Months = new[]
{
"string",
},
Times = new[]
{
new Grafana.Alerting.Inputs.MuteTimingIntervalTimeArgs
{
End = "string",
Start = "string",
},
},
Weekdays = new[]
{
"string",
},
Years = new[]
{
"string",
},
},
},
Name = "string",
OrgId = "string",
});
example, err := alerting.NewMuteTiming(ctx, "muteTimingResource", &alerting.MuteTimingArgs{
DisableProvenance: pulumi.Bool(false),
Intervals: alerting.MuteTimingIntervalArray{
&alerting.MuteTimingIntervalArgs{
DaysOfMonths: pulumi.StringArray{
pulumi.String("string"),
},
Location: pulumi.String("string"),
Months: pulumi.StringArray{
pulumi.String("string"),
},
Times: alerting.MuteTimingIntervalTimeArray{
&alerting.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.alerting.MuteTiming("muteTimingResource",
disable_provenance=False,
intervals=[{
"days_of_months": ["string"],
"location": "string",
"months": ["string"],
"times": [{
"end": "string",
"start": "string",
}],
"weekdays": ["string"],
"years": ["string"],
}],
name="string",
org_id="string")
const muteTimingResource = new grafana.alerting.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:alerting: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
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:
- Disable
Provenance bool - Intervals
List<Pulumiverse.
Grafana. Alerting. Inputs. Mute Timing Interval> - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Disable
Provenance bool - Intervals
[]Mute
Timing Interval Args - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable
Provenance Boolean - intervals
List<Mute
Timing Interval> - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable
Provenance boolean - intervals
Mute
Timing Interval[] - 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.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable_
provenance bool - intervals
Sequence[Mute
Timing Interval Args] - 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.
- disable
Provenance 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.
- org
Id 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.
- Disable
Provenance bool - Intervals
List<Pulumiverse.
Grafana. Alerting. Inputs. Mute Timing Interval> - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Disable
Provenance bool - Intervals
[]Mute
Timing Interval Args - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable
Provenance Boolean - intervals
List<Mute
Timing Interval> - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable
Provenance boolean - intervals
Mute
Timing Interval[] - 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.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- disable_
provenance bool - intervals
Sequence[Mute
Timing Interval Args] - 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.
- disable
Provenance 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
Supporting Types
MuteTimingInterval, MuteTimingIntervalArgs
- Days
Of List<string>Months - 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. Alerting. Inputs. Mute Timing Interval Time> - 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".
- Days
Of []stringMonths - 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
[]Mute
Timing Interval Time - 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 List<String>Months - 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<Mute
Timing Interval Time> - 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".
- days
Of string[]Months - 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
Mute
Timing Interval Time[] - 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_ Sequence[str]months - 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[Mute
Timing Interval Time] - 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".
- days
Of List<String>Months - 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
Import
$ pulumi import grafana:alerting/muteTiming:MuteTiming name "{{ name }}"
$ pulumi import grafana:alerting/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.