1. Packages
  2. Packages
  3. Incident Provider
  4. API Docs
  5. ScheduleSyncTarget
Viewing docs for incident 5.38.0
published on Wednesday, May 20, 2026 by incident-io
Viewing docs for incident 5.38.0
published on Wednesday, May 20, 2026 by incident-io

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // Create a new Slack user group as a sync target
    const platformOncall = new incident.ScheduleSyncTarget("platform_oncall", {
        addBotToGroup: true,
        newSlackUserGroup: {
            name: "Platform On-Call",
            handle: "platform-oncall",
            description: "Current on-call engineers for the Platform team",
        },
    });
    // Or use an existing Slack user group
    const existingGroup = new incident.ScheduleSyncTarget("existing_group", {
        addBotToGroup: true,
        slackUserGroupId: "S0123456789",
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # Create a new Slack user group as a sync target
    platform_oncall = incident.ScheduleSyncTarget("platform_oncall",
        add_bot_to_group=True,
        new_slack_user_group={
            "name": "Platform On-Call",
            "handle": "platform-oncall",
            "description": "Current on-call engineers for the Platform team",
        })
    # Or use an existing Slack user group
    existing_group = incident.ScheduleSyncTarget("existing_group",
        add_bot_to_group=True,
        slack_user_group_id="S0123456789")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v5/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new Slack user group as a sync target
    		_, err := incident.NewScheduleSyncTarget(ctx, "platform_oncall", &incident.ScheduleSyncTargetArgs{
    			AddBotToGroup: pulumi.Bool(true),
    			NewSlackUserGroup: &incident.ScheduleSyncTargetNewSlackUserGroupArgs{
    				Name:        pulumi.String("Platform On-Call"),
    				Handle:      pulumi.String("platform-oncall"),
    				Description: pulumi.String("Current on-call engineers for the Platform team"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Or use an existing Slack user group
    		_, err = incident.NewScheduleSyncTarget(ctx, "existing_group", &incident.ScheduleSyncTargetArgs{
    			AddBotToGroup:    pulumi.Bool(true),
    			SlackUserGroupId: pulumi.String("S0123456789"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Slack user group as a sync target
        var platformOncall = new Incident.ScheduleSyncTarget("platform_oncall", new()
        {
            AddBotToGroup = true,
            NewSlackUserGroup = new Incident.Inputs.ScheduleSyncTargetNewSlackUserGroupArgs
            {
                Name = "Platform On-Call",
                Handle = "platform-oncall",
                Description = "Current on-call engineers for the Platform team",
            },
        });
    
        // Or use an existing Slack user group
        var existingGroup = new Incident.ScheduleSyncTarget("existing_group", new()
        {
            AddBotToGroup = true,
            SlackUserGroupId = "S0123456789",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.ScheduleSyncTarget;
    import com.pulumi.incident.ScheduleSyncTargetArgs;
    import com.pulumi.incident.inputs.ScheduleSyncTargetNewSlackUserGroupArgs;
    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) {
            // Create a new Slack user group as a sync target
            var platformOncall = new ScheduleSyncTarget("platformOncall", ScheduleSyncTargetArgs.builder()
                .addBotToGroup(true)
                .newSlackUserGroup(ScheduleSyncTargetNewSlackUserGroupArgs.builder()
                    .name("Platform On-Call")
                    .handle("platform-oncall")
                    .description("Current on-call engineers for the Platform team")
                    .build())
                .build());
    
            // Or use an existing Slack user group
            var existingGroup = new ScheduleSyncTarget("existingGroup", ScheduleSyncTargetArgs.builder()
                .addBotToGroup(true)
                .slackUserGroupId("S0123456789")
                .build());
    
        }
    }
    
    resources:
      # Create a new Slack user group as a sync target
      platformOncall:
        type: incident:ScheduleSyncTarget
        name: platform_oncall
        properties:
          addBotToGroup: true
          newSlackUserGroup:
            name: Platform On-Call
            handle: platform-oncall
            description: Current on-call engineers for the Platform team
      # Or use an existing Slack user group
      existingGroup:
        type: incident:ScheduleSyncTarget
        name: existing_group
        properties:
          addBotToGroup: true
          slackUserGroupId: S0123456789
    
    Example coming soon!
    

    Create ScheduleSyncTarget Resource

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

    Constructor syntax

    new ScheduleSyncTarget(name: string, args: ScheduleSyncTargetArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduleSyncTarget(resource_name: str,
                           args: ScheduleSyncTargetArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScheduleSyncTarget(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           add_bot_to_group: Optional[bool] = None,
                           new_slack_user_group: Optional[ScheduleSyncTargetNewSlackUserGroupArgs] = None,
                           slack_user_group_id: Optional[str] = None)
    func NewScheduleSyncTarget(ctx *Context, name string, args ScheduleSyncTargetArgs, opts ...ResourceOption) (*ScheduleSyncTarget, error)
    public ScheduleSyncTarget(string name, ScheduleSyncTargetArgs args, CustomResourceOptions? opts = null)
    public ScheduleSyncTarget(String name, ScheduleSyncTargetArgs args)
    public ScheduleSyncTarget(String name, ScheduleSyncTargetArgs args, CustomResourceOptions options)
    
    type: incident:ScheduleSyncTarget
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "incident_schedulesynctarget" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ScheduleSyncTargetArgs
    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 ScheduleSyncTargetArgs
    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 ScheduleSyncTargetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduleSyncTargetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduleSyncTargetArgs
    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 scheduleSyncTargetResource = new Incident.ScheduleSyncTarget("scheduleSyncTargetResource", new()
    {
        AddBotToGroup = false,
        NewSlackUserGroup = new Incident.Inputs.ScheduleSyncTargetNewSlackUserGroupArgs
        {
            Description = "string",
            Handle = "string",
            Name = "string",
            SlackTeamId = "string",
        },
        SlackUserGroupId = "string",
    });
    
    example, err := incident.NewScheduleSyncTarget(ctx, "scheduleSyncTargetResource", &incident.ScheduleSyncTargetArgs{
    	AddBotToGroup: pulumi.Bool(false),
    	NewSlackUserGroup: &incident.ScheduleSyncTargetNewSlackUserGroupArgs{
    		Description: pulumi.String("string"),
    		Handle:      pulumi.String("string"),
    		Name:        pulumi.String("string"),
    		SlackTeamId: pulumi.String("string"),
    	},
    	SlackUserGroupId: pulumi.String("string"),
    })
    
    resource "incident_schedulesynctarget" "scheduleSyncTargetResource" {
      add_bot_to_group = false
      new_slack_user_group = {
        description   = "string"
        handle        = "string"
        name          = "string"
        slack_team_id = "string"
      }
      slack_user_group_id = "string"
    }
    
    var scheduleSyncTargetResource = new ScheduleSyncTarget("scheduleSyncTargetResource", ScheduleSyncTargetArgs.builder()
        .addBotToGroup(false)
        .newSlackUserGroup(ScheduleSyncTargetNewSlackUserGroupArgs.builder()
            .description("string")
            .handle("string")
            .name("string")
            .slackTeamId("string")
            .build())
        .slackUserGroupId("string")
        .build());
    
    schedule_sync_target_resource = incident.ScheduleSyncTarget("scheduleSyncTargetResource",
        add_bot_to_group=False,
        new_slack_user_group={
            "description": "string",
            "handle": "string",
            "name": "string",
            "slack_team_id": "string",
        },
        slack_user_group_id="string")
    
    const scheduleSyncTargetResource = new incident.ScheduleSyncTarget("scheduleSyncTargetResource", {
        addBotToGroup: false,
        newSlackUserGroup: {
            description: "string",
            handle: "string",
            name: "string",
            slackTeamId: "string",
        },
        slackUserGroupId: "string",
    });
    
    type: incident:ScheduleSyncTarget
    properties:
        addBotToGroup: false
        newSlackUserGroup:
            description: string
            handle: string
            name: string
            slackTeamId: string
        slackUserGroupId: string
    

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

    AddBotToGroup bool
    Whether the incident.io bot should be added to the group
    NewSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    SlackUserGroupId string
    Slack ID for the user group synced to
    AddBotToGroup bool
    Whether the incident.io bot should be added to the group
    NewSlackUserGroup ScheduleSyncTargetNewSlackUserGroupArgs
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    SlackUserGroupId string
    Slack ID for the user group synced to
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group
    new_slack_user_group object
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slack_user_group_id string
    Slack ID for the user group synced to
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackUserGroupId String
    Slack ID for the user group synced to
    addBotToGroup boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackUserGroupId string
    Slack ID for the user group synced to
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group
    new_slack_user_group ScheduleSyncTargetNewSlackUserGroupArgs
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slack_user_group_id str
    Slack ID for the user group synced to
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup Property Map
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackUserGroupId String
    Slack ID for the user group synced to

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScheduleSyncTarget resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SlackTeamId string
    Slack team ID for the user group
    Id string
    The provider-assigned unique ID for this managed resource.
    SlackTeamId string
    Slack team ID for the user group
    id string
    The provider-assigned unique ID for this managed resource.
    slack_team_id string
    Slack team ID for the user group
    id String
    The provider-assigned unique ID for this managed resource.
    slackTeamId String
    Slack team ID for the user group
    id string
    The provider-assigned unique ID for this managed resource.
    slackTeamId string
    Slack team ID for the user group
    id str
    The provider-assigned unique ID for this managed resource.
    slack_team_id str
    Slack team ID for the user group
    id String
    The provider-assigned unique ID for this managed resource.
    slackTeamId String
    Slack team ID for the user group

    Look up Existing ScheduleSyncTarget Resource

    Get an existing ScheduleSyncTarget 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?: ScheduleSyncTargetState, opts?: CustomResourceOptions): ScheduleSyncTarget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            add_bot_to_group: Optional[bool] = None,
            new_slack_user_group: Optional[ScheduleSyncTargetNewSlackUserGroupArgs] = None,
            slack_team_id: Optional[str] = None,
            slack_user_group_id: Optional[str] = None) -> ScheduleSyncTarget
    func GetScheduleSyncTarget(ctx *Context, name string, id IDInput, state *ScheduleSyncTargetState, opts ...ResourceOption) (*ScheduleSyncTarget, error)
    public static ScheduleSyncTarget Get(string name, Input<string> id, ScheduleSyncTargetState? state, CustomResourceOptions? opts = null)
    public static ScheduleSyncTarget get(String name, Output<String> id, ScheduleSyncTargetState state, CustomResourceOptions options)
    resources:  _:    type: incident:ScheduleSyncTarget    get:      id: ${id}
    import {
      to = incident_schedulesynctarget.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.
    The following state arguments are supported:
    AddBotToGroup bool
    Whether the incident.io bot should be added to the group
    NewSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    SlackTeamId string
    Slack team ID for the user group
    SlackUserGroupId string
    Slack ID for the user group synced to
    AddBotToGroup bool
    Whether the incident.io bot should be added to the group
    NewSlackUserGroup ScheduleSyncTargetNewSlackUserGroupArgs
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    SlackTeamId string
    Slack team ID for the user group
    SlackUserGroupId string
    Slack ID for the user group synced to
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group
    new_slack_user_group object
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slack_team_id string
    Slack team ID for the user group
    slack_user_group_id string
    Slack ID for the user group synced to
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackTeamId String
    Slack team ID for the user group
    slackUserGroupId String
    Slack ID for the user group synced to
    addBotToGroup boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup ScheduleSyncTargetNewSlackUserGroup
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackTeamId string
    Slack team ID for the user group
    slackUserGroupId string
    Slack ID for the user group synced to
    add_bot_to_group bool
    Whether the incident.io bot should be added to the group
    new_slack_user_group ScheduleSyncTargetNewSlackUserGroupArgs
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slack_team_id str
    Slack team ID for the user group
    slack_user_group_id str
    Slack ID for the user group synced to
    addBotToGroup Boolean
    Whether the incident.io bot should be added to the group
    newSlackUserGroup Property Map
    Configuration for creating a new Slack user group. Mutually exclusive with slack_user_group_id.
    slackTeamId String
    Slack team ID for the user group
    slackUserGroupId String
    Slack ID for the user group synced to

    Supporting Types

    ScheduleSyncTargetNewSlackUserGroup, ScheduleSyncTargetNewSlackUserGroupArgs

    Description string
    Description of the user group
    Handle string
    Handle of the user group
    Name string
    Name of the user group
    SlackTeamId string
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    Description string
    Description of the user group
    Handle string
    Handle of the user group
    Name string
    Name of the user group
    SlackTeamId string
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    description string
    Description of the user group
    handle string
    Handle of the user group
    name string
    Name of the user group
    slack_team_id string
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    description String
    Description of the user group
    handle String
    Handle of the user group
    name String
    Name of the user group
    slackTeamId String
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    description string
    Description of the user group
    handle string
    Handle of the user group
    name string
    Name of the user group
    slackTeamId string
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    description str
    Description of the user group
    handle str
    Handle of the user group
    name str
    Name of the user group
    slack_team_id str
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.
    description String
    Description of the user group
    handle String
    Handle of the user group
    name String
    Name of the user group
    slackTeamId String
    Slack workspace ID where the user group should be created. Required for Enterprise Grid organizations with multiple workspaces.

    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 5.38.0
    published on Wednesday, May 20, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial