1. Packages
  2. Grafana Cloud
  3. API Docs
  4. onCall
  5. Schedule
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse

grafana.onCall.Schedule

Explore with Pulumi AI

Create Schedule Resource

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

Constructor syntax

new Schedule(name: string, args: ScheduleArgs, opts?: CustomResourceOptions);
@overload
def Schedule(resource_name: str,
             args: ScheduleArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Schedule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             type: Optional[str] = None,
             enable_web_overrides: Optional[bool] = None,
             ical_url_overrides: Optional[str] = None,
             ical_url_primary: Optional[str] = None,
             name: Optional[str] = None,
             shifts: Optional[Sequence[str]] = None,
             slack: Optional[_oncall.ScheduleSlackArgs] = None,
             team_id: Optional[str] = None,
             time_zone: Optional[str] = None)
func NewSchedule(ctx *Context, name string, args ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
public Schedule(string name, ScheduleArgs args, CustomResourceOptions? opts = null)
public Schedule(String name, ScheduleArgs args)
public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
type: grafana:onCall:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScheduleArgs
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 scheduleResource = new Grafana.OnCall.Schedule("scheduleResource", new()
{
    Type = "string",
    EnableWebOverrides = false,
    IcalUrlOverrides = "string",
    IcalUrlPrimary = "string",
    Name = "string",
    Shifts = new[]
    {
        "string",
    },
    Slack = new Grafana.OnCall.Inputs.ScheduleSlackArgs
    {
        ChannelId = "string",
        UserGroupId = "string",
    },
    TeamId = "string",
    TimeZone = "string",
});
Copy
example, err := onCall.NewSchedule(ctx, "scheduleResource", &onCall.ScheduleArgs{
	Type:               pulumi.String("string"),
	EnableWebOverrides: pulumi.Bool(false),
	IcalUrlOverrides:   pulumi.String("string"),
	IcalUrlPrimary:     pulumi.String("string"),
	Name:               pulumi.String("string"),
	Shifts: pulumi.StringArray{
		pulumi.String("string"),
	},
	Slack: &oncall.ScheduleSlackArgs{
		ChannelId:   pulumi.String("string"),
		UserGroupId: pulumi.String("string"),
	},
	TeamId:   pulumi.String("string"),
	TimeZone: pulumi.String("string"),
})
Copy
var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
    .type("string")
    .enableWebOverrides(false)
    .icalUrlOverrides("string")
    .icalUrlPrimary("string")
    .name("string")
    .shifts("string")
    .slack(ScheduleSlackArgs.builder()
        .channelId("string")
        .userGroupId("string")
        .build())
    .teamId("string")
    .timeZone("string")
    .build());
Copy
schedule_resource = grafana.on_call.Schedule("scheduleResource",
    type="string",
    enable_web_overrides=False,
    ical_url_overrides="string",
    ical_url_primary="string",
    name="string",
    shifts=["string"],
    slack={
        "channel_id": "string",
        "user_group_id": "string",
    },
    team_id="string",
    time_zone="string")
Copy
const scheduleResource = new grafana.oncall.Schedule("scheduleResource", {
    type: "string",
    enableWebOverrides: false,
    icalUrlOverrides: "string",
    icalUrlPrimary: "string",
    name: "string",
    shifts: ["string"],
    slack: {
        channelId: "string",
        userGroupId: "string",
    },
    teamId: "string",
    timeZone: "string",
});
Copy
type: grafana:onCall:Schedule
properties:
    enableWebOverrides: false
    icalUrlOverrides: string
    icalUrlPrimary: string
    name: string
    shifts:
        - string
    slack:
        channelId: string
        userGroupId: string
    teamId: string
    timeZone: string
    type: string
Copy

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

Type
This property is required.
Changes to this property will trigger replacement.
string
The schedule's type. Valid values are ical, calendar.
EnableWebOverrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
IcalUrlOverrides string
The URL of external iCal calendar which override primary events.
IcalUrlPrimary string
The URL of the external calendar iCal file.
Name string
The schedule's name.
Shifts List<string>
The list of ID's of on-call shifts.
Slack Pulumiverse.Grafana.OnCall.Inputs.ScheduleSlack
The Slack-specific settings for a schedule.
TeamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
TimeZone string
The schedule's time zone.
Type
This property is required.
Changes to this property will trigger replacement.
string
The schedule's type. Valid values are ical, calendar.
EnableWebOverrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
IcalUrlOverrides string
The URL of external iCal calendar which override primary events.
IcalUrlPrimary string
The URL of the external calendar iCal file.
Name string
The schedule's name.
Shifts []string
The list of ID's of on-call shifts.
Slack ScheduleSlackArgs
The Slack-specific settings for a schedule.
TeamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
TimeZone string
The schedule's time zone.
type
This property is required.
Changes to this property will trigger replacement.
String
The schedule's type. Valid values are ical, calendar.
enableWebOverrides Boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides String
The URL of external iCal calendar which override primary events.
icalUrlPrimary String
The URL of the external calendar iCal file.
name String
The schedule's name.
shifts List<String>
The list of ID's of on-call shifts.
slack ScheduleSlack
The Slack-specific settings for a schedule.
teamId String
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone String
The schedule's time zone.
type
This property is required.
Changes to this property will trigger replacement.
string
The schedule's type. Valid values are ical, calendar.
enableWebOverrides boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides string
The URL of external iCal calendar which override primary events.
icalUrlPrimary string
The URL of the external calendar iCal file.
name string
The schedule's name.
shifts string[]
The list of ID's of on-call shifts.
slack ScheduleSlack
The Slack-specific settings for a schedule.
teamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone string
The schedule's time zone.
type
This property is required.
Changes to this property will trigger replacement.
str
The schedule's type. Valid values are ical, calendar.
enable_web_overrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
ical_url_overrides str
The URL of external iCal calendar which override primary events.
ical_url_primary str
The URL of the external calendar iCal file.
name str
The schedule's name.
shifts Sequence[str]
The list of ID's of on-call shifts.
slack oncall.ScheduleSlackArgs
The Slack-specific settings for a schedule.
team_id str
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
time_zone str
The schedule's time zone.
type
This property is required.
Changes to this property will trigger replacement.
String
The schedule's type. Valid values are ical, calendar.
enableWebOverrides Boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides String
The URL of external iCal calendar which override primary events.
icalUrlPrimary String
The URL of the external calendar iCal file.
name String
The schedule's name.
shifts List<String>
The list of ID's of on-call shifts.
slack Property Map
The Slack-specific settings for a schedule.
teamId String
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone String
The schedule's time zone.

Outputs

All input properties are implicitly available as output properties. Additionally, the Schedule 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 Schedule Resource

Get an existing Schedule 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?: ScheduleState, opts?: CustomResourceOptions): Schedule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enable_web_overrides: Optional[bool] = None,
        ical_url_overrides: Optional[str] = None,
        ical_url_primary: Optional[str] = None,
        name: Optional[str] = None,
        shifts: Optional[Sequence[str]] = None,
        slack: Optional[_oncall.ScheduleSlackArgs] = None,
        team_id: Optional[str] = None,
        time_zone: Optional[str] = None,
        type: Optional[str] = None) -> Schedule
func GetSchedule(ctx *Context, name string, id IDInput, state *ScheduleState, opts ...ResourceOption) (*Schedule, error)
public static Schedule Get(string name, Input<string> id, ScheduleState? state, CustomResourceOptions? opts = null)
public static Schedule get(String name, Output<String> id, ScheduleState state, CustomResourceOptions options)
resources:  _:    type: grafana:onCall:Schedule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
EnableWebOverrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
IcalUrlOverrides string
The URL of external iCal calendar which override primary events.
IcalUrlPrimary string
The URL of the external calendar iCal file.
Name string
The schedule's name.
Shifts List<string>
The list of ID's of on-call shifts.
Slack Pulumiverse.Grafana.OnCall.Inputs.ScheduleSlack
The Slack-specific settings for a schedule.
TeamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
TimeZone string
The schedule's time zone.
Type Changes to this property will trigger replacement. string
The schedule's type. Valid values are ical, calendar.
EnableWebOverrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
IcalUrlOverrides string
The URL of external iCal calendar which override primary events.
IcalUrlPrimary string
The URL of the external calendar iCal file.
Name string
The schedule's name.
Shifts []string
The list of ID's of on-call shifts.
Slack ScheduleSlackArgs
The Slack-specific settings for a schedule.
TeamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
TimeZone string
The schedule's time zone.
Type Changes to this property will trigger replacement. string
The schedule's type. Valid values are ical, calendar.
enableWebOverrides Boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides String
The URL of external iCal calendar which override primary events.
icalUrlPrimary String
The URL of the external calendar iCal file.
name String
The schedule's name.
shifts List<String>
The list of ID's of on-call shifts.
slack ScheduleSlack
The Slack-specific settings for a schedule.
teamId String
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone String
The schedule's time zone.
type Changes to this property will trigger replacement. String
The schedule's type. Valid values are ical, calendar.
enableWebOverrides boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides string
The URL of external iCal calendar which override primary events.
icalUrlPrimary string
The URL of the external calendar iCal file.
name string
The schedule's name.
shifts string[]
The list of ID's of on-call shifts.
slack ScheduleSlack
The Slack-specific settings for a schedule.
teamId string
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone string
The schedule's time zone.
type Changes to this property will trigger replacement. string
The schedule's type. Valid values are ical, calendar.
enable_web_overrides bool
Enable overrides via web UI (it will ignore icalurloverrides).
ical_url_overrides str
The URL of external iCal calendar which override primary events.
ical_url_primary str
The URL of the external calendar iCal file.
name str
The schedule's name.
shifts Sequence[str]
The list of ID's of on-call shifts.
slack oncall.ScheduleSlackArgs
The Slack-specific settings for a schedule.
team_id str
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
time_zone str
The schedule's time zone.
type Changes to this property will trigger replacement. str
The schedule's type. Valid values are ical, calendar.
enableWebOverrides Boolean
Enable overrides via web UI (it will ignore icalurloverrides).
icalUrlOverrides String
The URL of external iCal calendar which override primary events.
icalUrlPrimary String
The URL of the external calendar iCal file.
name String
The schedule's name.
shifts List<String>
The list of ID's of on-call shifts.
slack Property Map
The Slack-specific settings for a schedule.
teamId String
The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana.onCall.getTeam datasource.
timeZone String
The schedule's time zone.
type Changes to this property will trigger replacement. String
The schedule's type. Valid values are ical, calendar.

Supporting Types

ScheduleSlack
, ScheduleSlackArgs

ChannelId string
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
UserGroupId string
Slack user group id. Members of user group will be updated when on-call users change.
ChannelId string
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
UserGroupId string
Slack user group id. Members of user group will be updated when on-call users change.
channelId String
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
userGroupId String
Slack user group id. Members of user group will be updated when on-call users change.
channelId string
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
userGroupId string
Slack user group id. Members of user group will be updated when on-call users change.
channel_id str
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
user_group_id str
Slack user group id. Members of user group will be updated when on-call users change.
channelId String
Slack channel id. Reminder about schedule shifts will be directed to this channel in Slack.
userGroupId String
Slack user group id. Members of user group will be updated when on-call users change.

Import

$ pulumi import grafana:onCall/schedule:Schedule name "{{ id }}"
Copy

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.