published on Friday, Oct 30, 2026 by zenduty
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:
- End
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - Service
Id string - The unique_id of the service.
- Start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - Team
Id string - The unique_id of the team.
- Timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin. - Name string
- Name of the window.
- Repeat
Interval double - Repeat interval of the window.
0(default) means the window does not repeat. - Repeat
Until string - Last repetition as
YYYY-MM-DD HH:MMintimezone. - Service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- End
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - Service
Id string - The unique_id of the service.
- Start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - Team
Id string - The unique_id of the team.
- Timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin. - Name string
- Name of the window.
- Repeat
Interval float64 - Repeat interval of the window.
0(default) means the window does not repeat. - Repeat
Until string - Last repetition as
YYYY-MM-DD HH:MMintimezone. - Service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- end_
time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - service_
id string - The unique_id of the service.
- start_
time string - Start as
YYYY-MM-DD HH:MMintimezone. - team_
id string - The unique_id of the team.
- timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/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:MMintimezone. - service_
maintenance_ stringwindow_ id - The unique_id of the maintenance window.
- end
Time String - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - service
Id String - The unique_id of the service.
- start
Time String - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id String - The unique_id of the team.
- timezone String
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin. - name String
- Name of the window.
- repeat
Interval Double - Repeat interval of the window.
0(default) means the window does not repeat. - repeat
Until String - Last repetition as
YYYY-MM-DD HH:MMintimezone. - service
Maintenance StringWindow Id - The unique_id of the maintenance window.
- end
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - service
Id string - The unique_id of the service.
- start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id string - The unique_id of the team.
- timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/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:MMintimezone. - service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- end_
time str - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - service_
id str - The unique_id of the service.
- start_
time str - Start as
YYYY-MM-DD HH:MMintimezone. - team_
id str - The unique_id of the team.
- timezone str
- IANA time zone the times are expressed in, e.g.
UTCorEurope/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:MMintimezone. - service_
maintenance_ strwindow_ id - The unique_id of the maintenance window.
- end
Time String - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - service
Id String - The unique_id of the service.
- start
Time String - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id String - The unique_id of the team.
- timezone String
- IANA time zone the times are expressed in, e.g.
UTCorEurope/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:MMintimezone. - service
Maintenance StringWindow Id - 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) -> ServiceMaintenanceWindowfunc 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.
- End
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - Name string
- Name of the window.
- Repeat
Interval double - Repeat interval of the window.
0(default) means the window does not repeat. - Repeat
Until string - Last repetition as
YYYY-MM-DD HH:MMintimezone. - Service
Id string - The unique_id of the service.
- Service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- Start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - Team
Id string - The unique_id of the team.
- Timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- End
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - Name string
- Name of the window.
- Repeat
Interval float64 - Repeat interval of the window.
0(default) means the window does not repeat. - Repeat
Until string - Last repetition as
YYYY-MM-DD HH:MMintimezone. - Service
Id string - The unique_id of the service.
- Service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- Start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - Team
Id string - The unique_id of the team.
- Timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- end_
time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_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:MMintimezone. - service_
id string - The unique_id of the service.
- service_
maintenance_ stringwindow_ id - The unique_id of the maintenance window.
- start_
time string - Start as
YYYY-MM-DD HH:MMintimezone. - team_
id string - The unique_id of the team.
- timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- end
Time String - End as
YYYY-MM-DD HH:MMintimezone, afterstart_time. - name String
- Name of the window.
- repeat
Interval Double - Repeat interval of the window.
0(default) means the window does not repeat. - repeat
Until String - Last repetition as
YYYY-MM-DD HH:MMintimezone. - service
Id String - The unique_id of the service.
- service
Maintenance StringWindow Id - The unique_id of the maintenance window.
- start
Time String - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id String - The unique_id of the team.
- timezone String
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- end
Time string - End as
YYYY-MM-DD HH:MMintimezone, afterstart_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:MMintimezone. - service
Id string - The unique_id of the service.
- service
Maintenance stringWindow Id - The unique_id of the maintenance window.
- start
Time string - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id string - The unique_id of the team.
- timezone string
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- end_
time str - End as
YYYY-MM-DD HH:MMintimezone, afterstart_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:MMintimezone. - service_
id str - The unique_id of the service.
- service_
maintenance_ strwindow_ id - The unique_id of the maintenance window.
- start_
time str - Start as
YYYY-MM-DD HH:MMintimezone. - team_
id str - The unique_id of the team.
- timezone str
- IANA time zone the times are expressed in, e.g.
UTCorEurope/Berlin.
- end
Time String - End as
YYYY-MM-DD HH:MMintimezone, afterstart_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:MMintimezone. - service
Id String - The unique_id of the service.
- service
Maintenance StringWindow Id - The unique_id of the maintenance window.
- start
Time String - Start as
YYYY-MM-DD HH:MMintimezone. - team
Id String - The unique_id of the team.
- timezone String
- IANA time zone the times are expressed in, e.g.
UTCorEurope/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
zendutyTerraform Provider.
published on Friday, Oct 30, 2026 by zenduty