1. Registry
  2. Packages
  3. Incident Provider
  4. API Docs
  5. getScheduleSyncTarget
Viewing docs for incident 7.0.0
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

    Manage schedule sync targets (Slack user groups that schedules can sync to).

    Use this data source to look up an existing schedule sync target, either by id or by slack_user_group_id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // Look up a schedule sync target by ID.
    const byId = incident.getScheduleSyncTarget({
        id: "01ABC123DEF456GHI789JKL",
    });
    // ...or by the Slack user group it keeps in sync. The group's Slack-assigned
    // ID starts with 'S'; this is not the @-handle.
    const bySlackGroup = incident.getScheduleSyncTarget({
        slackUserGroupId: "S06MNNU5BMK",
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # Look up a schedule sync target by ID.
    by_id = incident.get_schedule_sync_target(id="01ABC123DEF456GHI789JKL")
    # ...or by the Slack user group it keeps in sync. The group's Slack-assigned
    # ID starts with 'S'; this is not the @-handle.
    by_slack_group = incident.get_schedule_sync_target(slack_user_group_id="S06MNNU5BMK")
    
    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 sync target by ID.
    		_, err := incident.LookupScheduleSyncTarget(ctx, &incident.LookupScheduleSyncTargetArgs{
    			Id: pulumi.StringRef("01ABC123DEF456GHI789JKL"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// ...or by the Slack user group it keeps in sync. The group's Slack-assigned
    		// ID starts with 'S'; this is not the @-handle.
    		_, err = incident.LookupScheduleSyncTarget(ctx, &incident.LookupScheduleSyncTargetArgs{
    			SlackUserGroupId: pulumi.StringRef("S06MNNU5BMK"),
    		}, 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 sync target by ID.
        var byId = Incident.GetScheduleSyncTarget.Invoke(new()
        {
            Id = "01ABC123DEF456GHI789JKL",
        });
    
        // ...or by the Slack user group it keeps in sync. The group's Slack-assigned
        // ID starts with 'S'; this is not the @-handle.
        var bySlackGroup = Incident.GetScheduleSyncTarget.Invoke(new()
        {
            SlackUserGroupId = "S06MNNU5BMK",
        });
    
    });
    
    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.GetScheduleSyncTargetArgs;
    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 sync target by ID.
            final var byId = IncidentFunctions.getScheduleSyncTarget(GetScheduleSyncTargetArgs.builder()
                .id("01ABC123DEF456GHI789JKL")
                .build());
    
            // ...or by the Slack user group it keeps in sync. The group's Slack-assigned
            // ID starts with 'S'; this is not the @-handle.
            final var bySlackGroup = IncidentFunctions.getScheduleSyncTarget(GetScheduleSyncTargetArgs.builder()
                .slackUserGroupId("S06MNNU5BMK")
                .build());
    
        }
    }
    
    variables:
      # Look up a schedule sync target by ID.
      byId:
        fn::invoke:
          function: incident:getScheduleSyncTarget
          arguments:
            id: 01ABC123DEF456GHI789JKL
      # ...or by the Slack user group it keeps in sync. The group's Slack-assigned
      # ID starts with 'S'; this is not the @-handle.
      bySlackGroup:
        fn::invoke:
          function: incident:getScheduleSyncTarget
          arguments:
            slackUserGroupId: S06MNNU5BMK
    
    Example coming soon!
    

    Using getScheduleSyncTarget

    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 getScheduleSyncTarget(args: GetScheduleSyncTargetArgs, opts?: InvokeOptions): Promise<GetScheduleSyncTargetResult>
    function getScheduleSyncTargetOutput(args: GetScheduleSyncTargetOutputArgs, opts?: InvokeOutputOptions): Output<GetScheduleSyncTargetResult>
    def get_schedule_sync_target(id: Optional[str] = None,
                                 slack_user_group_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetScheduleSyncTargetResult
    def get_schedule_sync_target_output(id: pulumi.Input[Optional[str]] = None,
                                 slack_user_group_id: pulumi.Input[Optional[str]] = None,
                                 opts: Optional[InvokeOutputOptions] = None) -> Output[GetScheduleSyncTargetResult]
    func LookupScheduleSyncTarget(ctx *Context, args *LookupScheduleSyncTargetArgs, opts ...InvokeOption) (*LookupScheduleSyncTargetResult, error)
    func LookupScheduleSyncTargetOutput(ctx *Context, args *LookupScheduleSyncTargetOutputArgs, opts ...InvokeOption) LookupScheduleSyncTargetResultOutput

    > Note: This function is named LookupScheduleSyncTarget in the Go SDK.

    public static class GetScheduleSyncTarget 
    {
        public static Task<GetScheduleSyncTargetResult> InvokeAsync(GetScheduleSyncTargetArgs args, InvokeOptions? opts = null)
        public static Output<GetScheduleSyncTargetResult> Invoke(GetScheduleSyncTargetInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetScheduleSyncTargetResult> Invoke(GetScheduleSyncTargetInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetScheduleSyncTargetResult> getScheduleSyncTarget(GetScheduleSyncTargetArgs args, InvokeOptions options)
    public static Output<GetScheduleSyncTargetResult> getScheduleSyncTarget(GetScheduleSyncTargetArgs args, InvokeOptions options)
    public static Output<GetScheduleSyncTargetResult> getScheduleSyncTarget(GetScheduleSyncTargetArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: incident:index/getScheduleSyncTarget:getScheduleSyncTarget
      arguments:
        # arguments dictionary
    data "incident_get_schedule_sync_target" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    Unique identifier of the sync target
    SlackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    Id string
    Unique identifier of the sync target
    SlackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    id string
    Unique identifier of the sync target
    slack_user_group_id string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    id String
    Unique identifier of the sync target
    slackUserGroupId String
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    id string
    Unique identifier of the sync target
    slackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    id str
    Unique identifier of the sync target
    slack_user_group_id str
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    id String
    Unique identifier of the sync target
    slackUserGroupId String
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.

    getScheduleSyncTarget Result

    The following output properties are available:

    AddBotToGroup bool
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    Id string
    Unique identifier of the sync target
    LinkedSchedules List<GetScheduleSyncTargetLinkedSchedule>
    Schedules with an active sync rule pointing at this target
    SlackTeamId string
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    SlackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    AddBotToGroup bool
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    Id string
    Unique identifier of the sync target
    LinkedSchedules []GetScheduleSyncTargetLinkedSchedule
    Schedules with an active sync rule pointing at this target
    SlackTeamId string
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    SlackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    id string
    Unique identifier of the sync target
    linked_schedules list(object)
    Schedules with an active sync rule pointing at this target
    slack_team_id string
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    slack_user_group_id string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    id String
    Unique identifier of the sync target
    linkedSchedules List<GetScheduleSyncTargetLinkedSchedule>
    Schedules with an active sync rule pointing at this target
    slackTeamId String
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    slackUserGroupId String
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    addBotToGroup boolean
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    id string
    Unique identifier of the sync target
    linkedSchedules GetScheduleSyncTargetLinkedSchedule[]
    Schedules with an active sync rule pointing at this target
    slackTeamId string
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    slackUserGroupId string
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    id str
    Unique identifier of the sync target
    linked_schedules Sequence[GetScheduleSyncTargetLinkedSchedule]
    Schedules with an active sync rule pointing at this target
    slack_team_id str
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    slack_user_group_id str
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group as a member. This is needed for some Slack configurations to let us manage the group's membership.
    id String
    Unique identifier of the sync target
    linkedSchedules List<Property Map>
    Schedules with an active sync rule pointing at this target
    slackTeamId String
    Slack team (workspace) ID the user group lives in. On Enterprise Grid this identifies which workspace within the org the group belongs to.
    slackUserGroupId String
    Slack ID of the user group whose membership is kept in sync. This is the Slack-assigned group ID (starting with 'S'), not the @-handle.

    Supporting Types

    GetScheduleSyncTargetLinkedSchedule

    Id string
    Unique internal ID of the schedule
    Name string
    Human readable name of the schedule
    TeamIds List<string>
    IDs of teams that own this schedule
    Id string
    Unique internal ID of the schedule
    Name string
    Human readable name of the schedule
    TeamIds []string
    IDs of teams that own this schedule
    id string
    Unique internal ID of the schedule
    name string
    Human readable name of the schedule
    team_ids list(string)
    IDs of teams that own this schedule
    id String
    Unique internal ID of the schedule
    name String
    Human readable name of the schedule
    teamIds List<String>
    IDs of teams that own this schedule
    id string
    Unique internal ID of the schedule
    name string
    Human readable name of the schedule
    teamIds string[]
    IDs of teams that own this schedule
    id str
    Unique internal ID of the schedule
    name str
    Human readable name of the schedule
    team_ids Sequence[str]
    IDs of teams that own this schedule
    id String
    Unique internal ID of the schedule
    name String
    Human readable name of the schedule
    teamIds List<String>
    IDs of teams that own this schedule

    Package Details

    Repository
    incident incident-io/terraform-provider-incident
    License
    Notes
    This Pulumi package is based on the incident Terraform Provider.
    Viewing docs for incident 7.0.0
    published on Friday, Sep 11, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial