Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io
Look up a schedule by id or name. Exactly one lookup field should be set.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incident from "@pulumi/incident";
// Look up a schedule by name...
const platform = incident.getSchedule({
name: "Platform on-call",
});
// ...or by ID, which is what you want if several schedules share a name.
const platformById = incident.getSchedule({
id: "01ABC123DEF456GHI789JKL",
});
import pulumi
import pulumi_incident as incident
# Look up a schedule by name...
platform = incident.get_schedule(name="Platform on-call")
# ...or by ID, which is what you want if several schedules share a name.
platform_by_id = incident.get_schedule(id="01ABC123DEF456GHI789JKL")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v7/incident"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Look up a schedule by name...
_, err := incident.LookupSchedule(ctx, &incident.LookupScheduleArgs{
Name: pulumi.StringRef("Platform on-call"),
}, nil)
if err != nil {
return err
}
// ...or by ID, which is what you want if several schedules share a name.
_, err = incident.LookupSchedule(ctx, &incident.LookupScheduleArgs{
Id: pulumi.StringRef("01ABC123DEF456GHI789JKL"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incident = Pulumi.Incident;
return await Deployment.RunAsync(() =>
{
// Look up a schedule by name...
var platform = Incident.GetSchedule.Invoke(new()
{
Name = "Platform on-call",
});
// ...or by ID, which is what you want if several schedules share a name.
var platformById = Incident.GetSchedule.Invoke(new()
{
Id = "01ABC123DEF456GHI789JKL",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incident.IncidentFunctions;
import com.pulumi.incident.inputs.GetScheduleArgs;
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) {
// Look up a schedule by name...
final var platform = IncidentFunctions.getSchedule(GetScheduleArgs.builder()
.name("Platform on-call")
.build());
// ...or by ID, which is what you want if several schedules share a name.
final var platformById = IncidentFunctions.getSchedule(GetScheduleArgs.builder()
.id("01ABC123DEF456GHI789JKL")
.build());
}
}
variables:
# Look up a schedule by name...
platform:
fn::invoke:
function: incident:getSchedule
arguments:
name: Platform on-call
# ...or by ID, which is what you want if several schedules share a name.
platformById:
fn::invoke:
function: incident:getSchedule
arguments:
id: 01ABC123DEF456GHI789JKL
Example coming soon!
Using getSchedule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSchedule(args: GetScheduleArgs, opts?: InvokeOptions): Promise<GetScheduleResult>
function getScheduleOutput(args: GetScheduleOutputArgs, opts?: InvokeOutputOptions): Output<GetScheduleResult>def get_schedule(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetScheduleResult
def get_schedule_output(id: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetScheduleResult]func LookupSchedule(ctx *Context, args *LookupScheduleArgs, opts ...InvokeOption) (*LookupScheduleResult, error)
func LookupScheduleOutput(ctx *Context, args *LookupScheduleOutputArgs, opts ...InvokeOption) LookupScheduleResultOutput> Note: This function is named LookupSchedule in the Go SDK.
public static class GetSchedule
{
public static Task<GetScheduleResult> InvokeAsync(GetScheduleArgs args, InvokeOptions? opts = null)
public static Output<GetScheduleResult> Invoke(GetScheduleInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetScheduleResult> Invoke(GetScheduleInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetScheduleResult> getSchedule(GetScheduleArgs args, InvokeOptions options)
public static Output<GetScheduleResult> getSchedule(GetScheduleArgs args, InvokeOptions options)
public static Output<GetScheduleResult> getSchedule(GetScheduleArgs args, InvokeOutputOptions options)
fn::invoke:
function: incident:index/getSchedule:getSchedule
arguments:
# arguments dictionarydata "incident_get_schedule" "name" {
# arguments
}The following arguments are supported:
getSchedule Result
The following output properties are available:
Package Details
- Repository
- incident incident-io/terraform-provider-incident
- License
- Notes
- This Pulumi package is based on the
incidentTerraform Provider.
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io