1. Registry
  2. Packages
  3. Zenduty Provider
  4. API Docs
  5. ServiceMaintenanceWindow
Viewing docs for zenduty 2.2.0
published on Friday, Oct 30, 2026 by zenduty
zenduty
Viewing docs for zenduty 2.2.0
published on Friday, Oct 30, 2026 by zenduty

    zenduty.ServiceMaintenanceWindow puts one service into maintenance for a period, optionally repeating. Use zenduty.MaintenanceWindow for a team-level window that covers several services at once.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zenduty from "@pulumi/zenduty";
    
    const patching = new zenduty.ServiceMaintenanceWindow("patching", {
        teamId: ops.id,
        serviceId: api.id,
        name: "Monthly patching",
        startTime: "2027-01-15 22:00",
        endTime: "2027-01-16 02:00",
        timezone: "Europe/Berlin",
        repeatInterval: 1,
        repeatUntil: "2027-12-31 02:00",
    });
    
    import pulumi
    import pulumi_zenduty as zenduty
    
    patching = zenduty.ServiceMaintenanceWindow("patching",
        team_id=ops["id"],
        service_id=api["id"],
        name="Monthly patching",
        start_time="2027-01-15 22:00",
        end_time="2027-01-16 02:00",
        timezone="Europe/Berlin",
        repeat_interval=1,
        repeat_until="2027-12-31 02:00")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/v2/zenduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zenduty.NewServiceMaintenanceWindow(ctx, "patching", &zenduty.ServiceMaintenanceWindowArgs{
    			TeamId:         pulumi.Any(ops.Id),
    			ServiceId:      pulumi.Any(api.Id),
    			Name:           pulumi.String("Monthly patching"),
    			StartTime:      pulumi.String("2027-01-15 22:00"),
    			EndTime:        pulumi.String("2027-01-16 02:00"),
    			Timezone:       pulumi.String("Europe/Berlin"),
    			RepeatInterval: pulumi.Float64(1),
    			RepeatUntil:    pulumi.String("2027-12-31 02:00"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zenduty = Pulumi.Zenduty;
    
    return await Deployment.RunAsync(() => 
    {
        var patching = new Zenduty.ServiceMaintenanceWindow("patching", new()
        {
            TeamId = ops.Id,
            ServiceId = api.Id,
            Name = "Monthly patching",
            StartTime = "2027-01-15 22:00",
            EndTime = "2027-01-16 02:00",
            Timezone = "Europe/Berlin",
            RepeatInterval = 1,
            RepeatUntil = "2027-12-31 02:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zenduty.ServiceMaintenanceWindow;
    import com.pulumi.zenduty.ServiceMaintenanceWindowArgs;
    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) {
            var patching = new ServiceMaintenanceWindow("patching", ServiceMaintenanceWindowArgs.builder()
                .teamId(ops.id())
                .serviceId(api.id())
                .name("Monthly patching")
                .startTime("2027-01-15 22:00")
                .endTime("2027-01-16 02:00")
                .timezone("Europe/Berlin")
                .repeatInterval(1.0)
                .repeatUntil("2027-12-31 02:00")
                .build());
    
        }
    }
    
    resources:
      patching:
        type: zenduty:ServiceMaintenanceWindow
        properties:
          teamId: ${ops.id}
          serviceId: ${api.id}
          name: Monthly patching
          startTime: 2027-01-15 22:00
          endTime: 2027-01-16 02:00
          timezone: Europe/Berlin
          repeatInterval: 1
          repeatUntil: 2027-12-31 02:00
    
    Example coming soon!
    

    Create ServiceMaintenanceWindow Resource

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

    Constructor syntax

    new ServiceMaintenanceWindow(name: string, args: ServiceMaintenanceWindowArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceMaintenanceWindow(resource_name: str,
                                 args: ServiceMaintenanceWindowArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceMaintenanceWindow(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 end_time: Optional[str] = None,
                                 service_id: Optional[str] = None,
                                 start_time: Optional[str] = None,
                                 team_id: Optional[str] = None,
                                 timezone: Optional[str] = None,
                                 name: Optional[str] = None,
                                 repeat_interval: Optional[float] = None,
                                 repeat_until: Optional[str] = None,
                                 service_maintenance_window_id: Optional[str] = None)
    func NewServiceMaintenanceWindow(ctx *Context, name string, args ServiceMaintenanceWindowArgs, opts ...ResourceOption) (*ServiceMaintenanceWindow, error)
    public ServiceMaintenanceWindow(string name, ServiceMaintenanceWindowArgs args, CustomResourceOptions? opts = null)
    public ServiceMaintenanceWindow(String name, ServiceMaintenanceWindowArgs args)
    public ServiceMaintenanceWindow(String name, ServiceMaintenanceWindowArgs args, CustomResourceOptions options)
    
    type: zenduty:ServiceMaintenanceWindow
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "zenduty_service_maintenance_window" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ServiceMaintenanceWindowArgs
    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 ServiceMaintenanceWindowArgs
    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 ServiceMaintenanceWindowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceMaintenanceWindowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceMaintenanceWindowArgs
    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 serviceMaintenanceWindowResource = new Zenduty.ServiceMaintenanceWindow("serviceMaintenanceWindowResource", new()
    {
        EndTime = "string",
        ServiceId = "string",
        StartTime = "string",
        TeamId = "string",
        Timezone = "string",
        Name = "string",
        RepeatInterval = 0.0,
        RepeatUntil = "string",
        ServiceMaintenanceWindowId = "string",
    });
    
    example, err := zenduty.NewServiceMaintenanceWindow(ctx, "serviceMaintenanceWindowResource", &zenduty.ServiceMaintenanceWindowArgs{
    	EndTime:                    pulumi.String("string"),
    	ServiceId:                  pulumi.String("string"),
    	StartTime:                  pulumi.String("string"),
    	TeamId:                     pulumi.String("string"),
    	Timezone:                   pulumi.String("string"),
    	Name:                       pulumi.String("string"),
    	RepeatInterval:             pulumi.Float64(0),
    	RepeatUntil:                pulumi.String("string"),
    	ServiceMaintenanceWindowId: pulumi.String("string"),
    })
    
    resource "zenduty_service_maintenance_window" "serviceMaintenanceWindowResource" {
      lifecycle {
        create_before_destroy = true
      }
      end_time                      = "string"
      service_id                    = "string"
      start_time                    = "string"
      team_id                       = "string"
      timezone                      = "string"
      name                          = "string"
      repeat_interval               = 0
      repeat_until                  = "string"
      service_maintenance_window_id = "string"
    }
    
    var serviceMaintenanceWindowResource = new ServiceMaintenanceWindow("serviceMaintenanceWindowResource", ServiceMaintenanceWindowArgs.builder()
        .endTime("string")
        .serviceId("string")
        .startTime("string")
        .teamId("string")
        .timezone("string")
        .name("string")
        .repeatInterval(0.0)
        .repeatUntil("string")
        .serviceMaintenanceWindowId("string")
        .build());
    
    service_maintenance_window_resource = zenduty.ServiceMaintenanceWindow("serviceMaintenanceWindowResource",
        end_time="string",
        service_id="string",
        start_time="string",
        team_id="string",
        timezone="string",
        name="string",
        repeat_interval=float(0),
        repeat_until="string",
        service_maintenance_window_id="string")
    
    const serviceMaintenanceWindowResource = new zenduty.ServiceMaintenanceWindow("serviceMaintenanceWindowResource", {
        endTime: "string",
        serviceId: "string",
        startTime: "string",
        teamId: "string",
        timezone: "string",
        name: "string",
        repeatInterval: 0,
        repeatUntil: "string",
        serviceMaintenanceWindowId: "string",
    });
    
    type: zenduty:ServiceMaintenanceWindow
    properties:
        endTime: string
        name: string
        repeatInterval: 0
        repeatUntil: string
        serviceId: string
        serviceMaintenanceWindowId: string
        startTime: string
        teamId: string
        timezone: string
    

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

    EndTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    ServiceId string
    The unique_id of the service.
    StartTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    TeamId string
    The unique_id of the team.
    Timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    Name string
    Name of the window.
    RepeatInterval double
    Repeat interval of the window. 0 (default) means the window does not repeat.
    RepeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    ServiceMaintenanceWindowId string
    The unique_id of the maintenance window.
    EndTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    ServiceId string
    The unique_id of the service.
    StartTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    TeamId string
    The unique_id of the team.
    Timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    Name string
    Name of the window.
    RepeatInterval float64
    Repeat interval of the window. 0 (default) means the window does not repeat.
    RepeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    ServiceMaintenanceWindowId string
    The unique_id of the maintenance window.
    end_time string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    service_id string
    The unique_id of the service.
    start_time string
    Start as YYYY-MM-DD HH:MM in timezone.
    team_id string
    The unique_id of the team.
    timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    name string
    Name of the window.
    repeat_interval number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeat_until string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    service_maintenance_window_id string
    The unique_id of the maintenance window.
    endTime String
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    serviceId String
    The unique_id of the service.
    startTime String
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId String
    The unique_id of the team.
    timezone String
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    name String
    Name of the window.
    repeatInterval Double
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil String
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceMaintenanceWindowId String
    The unique_id of the maintenance window.
    endTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    serviceId string
    The unique_id of the service.
    startTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId string
    The unique_id of the team.
    timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    name string
    Name of the window.
    repeatInterval number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceMaintenanceWindowId string
    The unique_id of the maintenance window.
    end_time str
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    service_id str
    The unique_id of the service.
    start_time str
    Start as YYYY-MM-DD HH:MM in timezone.
    team_id str
    The unique_id of the team.
    timezone str
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    name str
    Name of the window.
    repeat_interval float
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeat_until str
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    service_maintenance_window_id str
    The unique_id of the maintenance window.
    endTime String
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    serviceId String
    The unique_id of the service.
    startTime String
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId String
    The unique_id of the team.
    timezone String
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    name String
    Name of the window.
    repeatInterval Number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil String
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceMaintenanceWindowId String
    The unique_id of the maintenance window.

    Outputs

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

    Get an existing ServiceMaintenanceWindow 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?: ServiceMaintenanceWindowState, opts?: CustomResourceOptions): ServiceMaintenanceWindow
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            end_time: Optional[str] = None,
            name: Optional[str] = None,
            repeat_interval: Optional[float] = None,
            repeat_until: Optional[str] = None,
            service_id: Optional[str] = None,
            service_maintenance_window_id: Optional[str] = None,
            start_time: Optional[str] = None,
            team_id: Optional[str] = None,
            timezone: Optional[str] = None) -> ServiceMaintenanceWindow
    func GetServiceMaintenanceWindow(ctx *Context, name string, id IDInput, state *ServiceMaintenanceWindowState, opts ...ResourceOption) (*ServiceMaintenanceWindow, error)
    public static ServiceMaintenanceWindow Get(string name, Input<string> id, ServiceMaintenanceWindowState? state, CustomResourceOptions? opts = null)
    public static ServiceMaintenanceWindow get(String name, Output<String> id, ServiceMaintenanceWindowState state, CustomResourceOptions options)
    resources:  _:    type: zenduty:ServiceMaintenanceWindow    get:      id: ${id}
    import {
      to = zenduty_service_maintenance_window.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:
    EndTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    Name string
    Name of the window.
    RepeatInterval double
    Repeat interval of the window. 0 (default) means the window does not repeat.
    RepeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    ServiceId string
    The unique_id of the service.
    ServiceMaintenanceWindowId string
    The unique_id of the maintenance window.
    StartTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    TeamId string
    The unique_id of the team.
    Timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    EndTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    Name string
    Name of the window.
    RepeatInterval float64
    Repeat interval of the window. 0 (default) means the window does not repeat.
    RepeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    ServiceId string
    The unique_id of the service.
    ServiceMaintenanceWindowId string
    The unique_id of the maintenance window.
    StartTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    TeamId string
    The unique_id of the team.
    Timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    end_time string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    name string
    Name of the window.
    repeat_interval number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeat_until string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    service_id string
    The unique_id of the service.
    service_maintenance_window_id string
    The unique_id of the maintenance window.
    start_time string
    Start as YYYY-MM-DD HH:MM in timezone.
    team_id string
    The unique_id of the team.
    timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    endTime String
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    name String
    Name of the window.
    repeatInterval Double
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil String
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceId String
    The unique_id of the service.
    serviceMaintenanceWindowId String
    The unique_id of the maintenance window.
    startTime String
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId String
    The unique_id of the team.
    timezone String
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    endTime string
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    name string
    Name of the window.
    repeatInterval number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil string
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceId string
    The unique_id of the service.
    serviceMaintenanceWindowId string
    The unique_id of the maintenance window.
    startTime string
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId string
    The unique_id of the team.
    timezone string
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    end_time str
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    name str
    Name of the window.
    repeat_interval float
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeat_until str
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    service_id str
    The unique_id of the service.
    service_maintenance_window_id str
    The unique_id of the maintenance window.
    start_time str
    Start as YYYY-MM-DD HH:MM in timezone.
    team_id str
    The unique_id of the team.
    timezone str
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.
    endTime String
    End as YYYY-MM-DD HH:MM in timezone, after start_time.
    name String
    Name of the window.
    repeatInterval Number
    Repeat interval of the window. 0 (default) means the window does not repeat.
    repeatUntil String
    Last repetition as YYYY-MM-DD HH:MM in timezone.
    serviceId String
    The unique_id of the service.
    serviceMaintenanceWindowId String
    The unique_id of the maintenance window.
    startTime String
    Start as YYYY-MM-DD HH:MM in timezone.
    teamId String
    The unique_id of the team.
    timezone String
    IANA time zone the times are expressed in, e.g. UTC or Europe/Berlin.

    Import

    hcl

    resource “zenduty_service_maintenance_window” “patching” {

    }

    $ pulumi import zenduty:index/serviceMaintenanceWindow:ServiceMaintenanceWindow patching team_id/service_id/maintenance_window_id`
    

    $ terraform state show zenduty_service_maintenance_window.patching

    * copy the output data and paste inside zenduty_service_maintenance_window.patching resource block and remove the id attribute

    $ pulumi preview to verify the import

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    zenduty zenduty/terraform-provider-zenduty
    License
    Notes
    This Pulumi package is based on the zenduty Terraform Provider.
    zenduty
    Viewing docs for zenduty 2.2.0
    published on Friday, Oct 30, 2026 by zenduty

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial