published on Thursday, Sep 24, 2026 by Pydantic
published on Thursday, Sep 24, 2026 by Pydantic
Manages an organization-level Logfire delivery schedule. A channel assignment with a schedule_id notifies its channel only inside the schedule’s windows. Use it in channel_assignments on logfire.Alert and in alerts.<tier>.channel_assignments on logfire.Slo. Deleting a schedule makes the channel assignments that use it notify at all times. The provider credential needs organization:read_channel and organization:write_channel. The schedules API needs Logfire v2026-09-23.01 or newer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as logfire from "@pydantic/pulumi-logfire";
// Weekday office hours in London. Use the schedule in a channel assignment on
// `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
const officeHours = new logfire.Schedule("officeHours", {
label: "Office hours",
timezone: "Europe/London",
windows: [{
days: [
1,
2,
3,
4,
5,
],
end_time: "18:00",
start_time: "09:00",
}],
});
// Several windows: weekday evenings and all of the weekend.
const outOfHours = new logfire.Schedule("outOfHours", {
label: "Out of hours",
timezone: "America/New_York",
windows: [
{
days: [
1,
2,
3,
4,
5,
],
end_time: "23:59",
start_time: "18:00",
},
{
days: [
6,
7,
],
end_time: "23:59",
start_time: "00:00",
},
],
});
import pulumi
import pulumi_logfire as logfire
# Weekday office hours in London. Use the schedule in a channel assignment on
# `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
office_hours = logfire.Schedule("officeHours",
label="Office hours",
timezone="Europe/London",
windows=[{
"days": [
1,
2,
3,
4,
5,
],
"end_time": "18:00",
"start_time": "09:00",
}])
# Several windows: weekday evenings and all of the weekend.
out_of_hours = logfire.Schedule("outOfHours",
label="Out of hours",
timezone="America/New_York",
windows=[
{
"days": [
1,
2,
3,
4,
5,
],
"end_time": "23:59",
"start_time": "18:00",
},
{
"days": [
6,
7,
],
"end_time": "23:59",
"start_time": "00:00",
},
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Weekday office hours in London. Use the schedule in a channel assignment on
// `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
_, err := logfire.NewSchedule(ctx, "officeHours", &logfire.ScheduleArgs{
Label: pulumi.String("Office hours"),
Timezone: pulumi.String("Europe/London"),
Windows: logfire.ScheduleWindowArray{
&logfire.ScheduleWindowArgs{
Days: pulumi.IntArray{
pulumi.Int(1),
pulumi.Int(2),
pulumi.Int(3),
pulumi.Int(4),
pulumi.Int(5),
},
End_time: "18:00",
Start_time: "09:00",
},
},
})
if err != nil {
return err
}
// Several windows: weekday evenings and all of the weekend.
_, err = logfire.NewSchedule(ctx, "outOfHours", &logfire.ScheduleArgs{
Label: pulumi.String("Out of hours"),
Timezone: pulumi.String("America/New_York"),
Windows: logfire.ScheduleWindowArray{
&logfire.ScheduleWindowArgs{
Days: pulumi.IntArray{
pulumi.Int(1),
pulumi.Int(2),
pulumi.Int(3),
pulumi.Int(4),
pulumi.Int(5),
},
End_time: "23:59",
Start_time: "18:00",
},
&logfire.ScheduleWindowArgs{
Days: pulumi.IntArray{
pulumi.Int(6),
pulumi.Int(7),
},
End_time: "23:59",
Start_time: "00:00",
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logfire = Pulumi.Logfire;
return await Deployment.RunAsync(() =>
{
// Weekday office hours in London. Use the schedule in a channel assignment on
// `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
var officeHours = new Logfire.Schedule("officeHours", new()
{
Label = "Office hours",
Timezone = "Europe/London",
Windows = new[]
{
new Logfire.Inputs.ScheduleWindowArgs
{
Days = new[]
{
1,
2,
3,
4,
5,
},
End_time = "18:00",
Start_time = "09:00",
},
},
});
// Several windows: weekday evenings and all of the weekend.
var outOfHours = new Logfire.Schedule("outOfHours", new()
{
Label = "Out of hours",
Timezone = "America/New_York",
Windows = new[]
{
new Logfire.Inputs.ScheduleWindowArgs
{
Days = new[]
{
1,
2,
3,
4,
5,
},
End_time = "23:59",
Start_time = "18:00",
},
new Logfire.Inputs.ScheduleWindowArgs
{
Days = new[]
{
6,
7,
},
End_time = "23:59",
Start_time = "00:00",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logfire.Schedule;
import com.pulumi.logfire.ScheduleArgs;
import com.pulumi.logfire.inputs.ScheduleWindowArgs;
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) {
// Weekday office hours in London. Use the schedule in a channel assignment on
// `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
var officeHours = new Schedule("officeHours", ScheduleArgs.builder()
.label("Office hours")
.timezone("Europe/London")
.windows(ScheduleWindowArgs.builder()
.days(
1,
2,
3,
4,
5)
.end_time("18:00")
.start_time("09:00")
.build())
.build());
// Several windows: weekday evenings and all of the weekend.
var outOfHours = new Schedule("outOfHours", ScheduleArgs.builder()
.label("Out of hours")
.timezone("America/New_York")
.windows(
ScheduleWindowArgs.builder()
.days(
1,
2,
3,
4,
5)
.end_time("23:59")
.start_time("18:00")
.build(),
ScheduleWindowArgs.builder()
.days(
6,
7)
.end_time("23:59")
.start_time("00:00")
.build())
.build());
}
}
resources:
# Weekday office hours in London. Use the schedule in a channel assignment on
# // `logfire_alert` or `logfire_slo` to notify a channel only inside its windows.
officeHours:
type: logfire:Schedule
properties:
label: Office hours
timezone: Europe/London
windows:
- days:
- 1
- 2
- 3
- 4
- 5
end_time: 18:00
start_time: 09:00
# Several windows: weekday evenings and all of the weekend.
outOfHours:
type: logfire:Schedule
properties:
label: Out of hours
timezone: America/New_York
windows:
- days:
- 1
- 2
- 3
- 4
- 5
end_time: 23:59
start_time: 18:00
- days:
- 6
- 7
end_time: 23:59
start_time: 00:00
Example coming soon!
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,
label: Optional[str] = None,
timezone: Optional[str] = None,
windows: Optional[Sequence[ScheduleWindowArgs]] = 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: logfire:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "logfire_schedule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ScheduleArgs
- 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 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 string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 Logfire.Schedule("scheduleResource", new()
{
Label = "string",
Timezone = "string",
Windows = new[]
{
new Logfire.Inputs.ScheduleWindowArgs
{
Days = new[]
{
0,
},
EndTime = "string",
StartTime = "string",
},
},
});
example, err := logfire.NewSchedule(ctx, "scheduleResource", &logfire.ScheduleArgs{
Label: pulumi.String("string"),
Timezone: pulumi.String("string"),
Windows: logfire.ScheduleWindowArray{
&logfire.ScheduleWindowArgs{
Days: pulumi.IntArray{
pulumi.Int(0),
},
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
},
})
resource "logfire_schedule" "scheduleResource" {
lifecycle {
create_before_destroy = true
}
label = "string"
timezone = "string"
windows {
days = [0]
end_time = "string"
start_time = "string"
}
}
var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
.label("string")
.timezone("string")
.windows(ScheduleWindowArgs.builder()
.days(0)
.endTime("string")
.startTime("string")
.build())
.build());
schedule_resource = logfire.Schedule("scheduleResource",
label="string",
timezone="string",
windows=[{
"days": [0],
"end_time": "string",
"start_time": "string",
}])
const scheduleResource = new logfire.Schedule("scheduleResource", {
label: "string",
timezone: "string",
windows: [{
days: [0],
endTime: "string",
startTime: "string",
}],
});
type: logfire:Schedule
properties:
label: string
timezone: string
windows:
- days:
- 0
endTime: string
startTime: string
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:
- Label string
- Schedule name.
- Timezone string
- IANA time zone of the windows, for example
Europe/London. - Windows
List<Schedule
Window> - Time windows in which the schedule delivers. At least one.
- Label string
- Schedule name.
- Timezone string
- IANA time zone of the windows, for example
Europe/London. - Windows
[]Schedule
Window Args - Time windows in which the schedule delivers. At least one.
- label string
- Schedule name.
- timezone string
- IANA time zone of the windows, for example
Europe/London. - windows list(object)
- Time windows in which the schedule delivers. At least one.
- label String
- Schedule name.
- timezone String
- IANA time zone of the windows, for example
Europe/London. - windows
List<Schedule
Window> - Time windows in which the schedule delivers. At least one.
- label string
- Schedule name.
- timezone string
- IANA time zone of the windows, for example
Europe/London. - windows
Schedule
Window[] - Time windows in which the schedule delivers. At least one.
- label str
- Schedule name.
- timezone str
- IANA time zone of the windows, for example
Europe/London. - windows
Sequence[Schedule
Window Args] - Time windows in which the schedule delivers. At least one.
- label String
- Schedule name.
- timezone String
- IANA time zone of the windows, for example
Europe/London. - windows List<Property Map>
- Time windows in which the schedule delivers. At least one.
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 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,
label: Optional[str] = None,
timezone: Optional[str] = None,
windows: Optional[Sequence[ScheduleWindowArgs]] = None) -> Schedulefunc 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: logfire:Schedule get: id: ${id}import {
to = logfire_schedule.example
id = "${id}"
}
- 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.
- Label string
- Schedule name.
- Timezone string
- IANA time zone of the windows, for example
Europe/London. - Windows
List<Schedule
Window> - Time windows in which the schedule delivers. At least one.
- Label string
- Schedule name.
- Timezone string
- IANA time zone of the windows, for example
Europe/London. - Windows
[]Schedule
Window Args - Time windows in which the schedule delivers. At least one.
- label string
- Schedule name.
- timezone string
- IANA time zone of the windows, for example
Europe/London. - windows list(object)
- Time windows in which the schedule delivers. At least one.
- label String
- Schedule name.
- timezone String
- IANA time zone of the windows, for example
Europe/London. - windows
List<Schedule
Window> - Time windows in which the schedule delivers. At least one.
- label string
- Schedule name.
- timezone string
- IANA time zone of the windows, for example
Europe/London. - windows
Schedule
Window[] - Time windows in which the schedule delivers. At least one.
- label str
- Schedule name.
- timezone str
- IANA time zone of the windows, for example
Europe/London. - windows
Sequence[Schedule
Window Args] - Time windows in which the schedule delivers. At least one.
- label String
- Schedule name.
- timezone String
- IANA time zone of the windows, for example
Europe/London. - windows List<Property Map>
- Time windows in which the schedule delivers. At least one.
Supporting Types
ScheduleWindow, ScheduleWindowArgs
- Days List<int>
- ISO weekday numbers:
1is Monday and7is Sunday. - End
Time string - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - Start
Time string - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- Days []int
- ISO weekday numbers:
1is Monday and7is Sunday. - End
Time string - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - Start
Time string - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- days list(number)
- ISO weekday numbers:
1is Monday and7is Sunday. - end_
time string - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - start_
time string - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- days List<Integer>
- ISO weekday numbers:
1is Monday and7is Sunday. - end
Time String - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - start
Time String - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- days number[]
- ISO weekday numbers:
1is Monday and7is Sunday. - end
Time string - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - start
Time string - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- days Sequence[int]
- ISO weekday numbers:
1is Monday and7is Sunday. - end_
time str - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - start_
time str - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
- days List<Number>
- ISO weekday numbers:
1is Monday and7is Sunday. - end
Time String - End of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero. - start
Time String - Start of the window, as 24-hour
HH:MMorHH:MM:SSintimezone. A read keeps your spelling when it denotes the same time, and shows seconds only when they are not zero.
Import
The pulumi import command can be used, for example:
Import an existing schedule by its UUID. The API has no schedule list and no
lookup by label. The UUID is the schedule_id of any channel assignment that
uses the schedule, for example in logfire_slo.alerts or in the alert
API response.
$ pulumi import logfire:index/schedule:Schedule office_hours' "9f9b2f9e-aaaa-bbbb-cccc-ddddeeeeffff"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- logfire pydantic/pulumi-logfire
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
logfireTerraform Provider.
published on Thursday, Sep 24, 2026 by Pydantic