published on Friday, Sep 25, 2026 by Pulumi
published on Friday, Sep 25, 2026 by Pulumi
Provides a Datadog Fleet Automation Agent upgrade schedule. Schedule mutations use Preview API endpoints and require an application key with the agentUpgradeWrite and hostsRead permissions.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Fleet schedule mutations use Preview API endpoints. The application key must
// have both the agent_upgrade_write and hosts_read permissions.
const nonproduction = new datadog.FleetSchedule("nonproduction", {
name: "Non-production Agent upgrades",
query: "env:staging service:example",
status: "inactive",
versionToLatest: 1,
rule: {
days_of_week: [
"Tue",
"Thu",
],
maintenance_window_duration: 120,
start_maintenance_window: "03:00",
timezone: "America/New_York",
},
});
import pulumi
import pulumi_datadog as datadog
# Fleet schedule mutations use Preview API endpoints. The application key must
# have both the agent_upgrade_write and hosts_read permissions.
nonproduction = datadog.FleetSchedule("nonproduction",
name="Non-production Agent upgrades",
query="env:staging service:example",
status="inactive",
version_to_latest=1,
rule={
"days_of_week": [
"Tue",
"Thu",
],
"maintenance_window_duration": 120,
"start_maintenance_window": "03:00",
"timezone": "America/New_York",
})
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Fleet schedule mutations use Preview API endpoints. The application key must
// have both the agent_upgrade_write and hosts_read permissions.
_, err := datadog.NewFleetSchedule(ctx, "nonproduction", &datadog.FleetScheduleArgs{
Name: pulumi.String("Non-production Agent upgrades"),
Query: pulumi.String("env:staging service:example"),
Status: pulumi.String("inactive"),
VersionToLatest: pulumi.Int(1),
Rule: &datadog.FleetScheduleRuleArgs{
Days_of_week: []string{
"Tue",
"Thu",
},
Maintenance_window_duration: 120,
Start_maintenance_window: "03:00",
Timezone: pulumi.String("America/New_York"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
// Fleet schedule mutations use Preview API endpoints. The application key must
// have both the agent_upgrade_write and hosts_read permissions.
var nonproduction = new Datadog.FleetSchedule("nonproduction", new()
{
Name = "Non-production Agent upgrades",
Query = "env:staging service:example",
Status = "inactive",
VersionToLatest = 1,
Rule = new Datadog.Inputs.FleetScheduleRuleArgs
{
Days_of_week = new[]
{
"Tue",
"Thu",
},
Maintenance_window_duration = 120,
Start_maintenance_window = "03:00",
Timezone = "America/New_York",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.FleetSchedule;
import com.pulumi.datadog.FleetScheduleArgs;
import com.pulumi.datadog.inputs.FleetScheduleRuleArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
// Fleet schedule mutations use Preview API endpoints. The application key must
// have both the agent_upgrade_write and hosts_read permissions.
var nonproduction = new FleetSchedule("nonproduction", FleetScheduleArgs.builder()
.name("Non-production Agent upgrades")
.query("env:staging service:example")
.status("inactive")
.versionToLatest(1)
.rule(FleetScheduleRuleArgs.builder()
.days_of_week(Arrays.asList(
"Tue",
"Thu"))
.maintenance_window_duration(120)
.start_maintenance_window("03:00")
.timezone("America/New_York")
.build())
.build());
}
}
resources:
# Fleet schedule mutations use Preview API endpoints. The application key must
# have both the agent_upgrade_write and hosts_read permissions.
nonproduction:
type: datadog:FleetSchedule
properties:
name: Non-production Agent upgrades
query: env:staging service:example
status: inactive
versionToLatest: 1
rule:
days_of_week:
- Tue
- Thu
maintenance_window_duration: 120
start_maintenance_window: 03:00
timezone: America/New_York
pulumi {
required_providers {
datadog = {
source = "pulumi/datadog"
}
}
}
# Fleet schedule mutations use Preview API endpoints. The application key must
# have both the agent_upgrade_write and hosts_read permissions.
resource "datadog_fleetschedule" "nonproduction" {
name = "Non-production Agent upgrades"
query = "env:staging service:example"
status = "inactive"
version_to_latest = 1
rule = {
days_of_week = ["Tue", "Thu"]
maintenance_window_duration = 120
start_maintenance_window = "03:00"
timezone = "America/New_York"
}
}
Create FleetSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FleetSchedule(name: string, args: FleetScheduleArgs, opts?: CustomResourceOptions);@overload
def FleetSchedule(resource_name: str,
args: FleetScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FleetSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
query: Optional[str] = None,
rule: Optional[FleetScheduleRuleArgs] = None,
status: Optional[str] = None,
version_to_latest: Optional[int] = None)func NewFleetSchedule(ctx *Context, name string, args FleetScheduleArgs, opts ...ResourceOption) (*FleetSchedule, error)public FleetSchedule(string name, FleetScheduleArgs args, CustomResourceOptions? opts = null)
public FleetSchedule(String name, FleetScheduleArgs args)
public FleetSchedule(String name, FleetScheduleArgs args, CustomResourceOptions options)
type: datadog:FleetSchedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "datadog_fleet_schedule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FleetScheduleArgs
- 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 FleetScheduleArgs
- 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 FleetScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetScheduleArgs
- 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 fleetScheduleResource = new Datadog.FleetSchedule("fleetScheduleResource", new()
{
Name = "string",
Query = "string",
Rule = new Datadog.Inputs.FleetScheduleRuleArgs
{
DaysOfWeeks = new[]
{
"string",
},
MaintenanceWindowDuration = 0,
StartMaintenanceWindow = "string",
Timezone = "string",
},
Status = "string",
VersionToLatest = 0,
});
example, err := datadog.NewFleetSchedule(ctx, "fleetScheduleResource", &datadog.FleetScheduleArgs{
Name: pulumi.String("string"),
Query: pulumi.String("string"),
Rule: &datadog.FleetScheduleRuleArgs{
DaysOfWeeks: pulumi.StringArray{
pulumi.String("string"),
},
MaintenanceWindowDuration: pulumi.Int(0),
StartMaintenanceWindow: pulumi.String("string"),
Timezone: pulumi.String("string"),
},
Status: pulumi.String("string"),
VersionToLatest: pulumi.Int(0),
})
resource "datadog_fleet_schedule" "fleetScheduleResource" {
lifecycle {
create_before_destroy = true
}
name = "string"
query = "string"
rule = {
days_of_weeks = ["string"]
maintenance_window_duration = 0
start_maintenance_window = "string"
timezone = "string"
}
status = "string"
version_to_latest = 0
}
var fleetScheduleResource = new FleetSchedule("fleetScheduleResource", FleetScheduleArgs.builder()
.name("string")
.query("string")
.rule(FleetScheduleRuleArgs.builder()
.daysOfWeeks("string")
.maintenanceWindowDuration(0)
.startMaintenanceWindow("string")
.timezone("string")
.build())
.status("string")
.versionToLatest(0)
.build());
fleet_schedule_resource = datadog.FleetSchedule("fleetScheduleResource",
name="string",
query="string",
rule={
"days_of_weeks": ["string"],
"maintenance_window_duration": 0,
"start_maintenance_window": "string",
"timezone": "string",
},
status="string",
version_to_latest=0)
const fleetScheduleResource = new datadog.FleetSchedule("fleetScheduleResource", {
name: "string",
query: "string",
rule: {
daysOfWeeks: ["string"],
maintenanceWindowDuration: 0,
startMaintenanceWindow: "string",
timezone: "string",
},
status: "string",
versionToLatest: 0,
});
type: datadog:FleetSchedule
properties:
name: string
query: string
rule:
daysOfWeeks:
- string
maintenanceWindowDuration: 0
startMaintenanceWindow: string
timezone: string
status: string
versionToLatest: 0
FleetSchedule 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 FleetSchedule resource accepts the following input properties:
- Name string
- Human-readable name for the schedule. String length must be at least 1.
- Query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- Rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- Status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - Version
To intLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- Name string
- Human-readable name for the schedule. String length must be at least 1.
- Query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- Rule
Fleet
Schedule Rule Args - Weekly recurrence and maintenance-window configuration for the schedule.
- Status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - Version
To intLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name string
- Human-readable name for the schedule. String length must be at least 1.
- query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule object
- Weekly recurrence and maintenance-window configuration for the schedule.
- status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version_
to_ numberlatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name String
- Human-readable name for the schedule. String length must be at least 1.
- query String
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- status String
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To IntegerLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name string
- Human-readable name for the schedule. String length must be at least 1.
- query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To numberLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name str
- Human-readable name for the schedule. String length must be at least 1.
- query str
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule Args - Weekly recurrence and maintenance-window configuration for the schedule.
- status str
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version_
to_ intlatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name String
- Human-readable name for the schedule. String length must be at least 1.
- query String
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule Property Map
- Weekly recurrence and maintenance-window configuration for the schedule.
- status String
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To NumberLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
Outputs
All input properties are implicitly available as output properties. Additionally, the FleetSchedule 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 FleetSchedule Resource
Get an existing FleetSchedule 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?: FleetScheduleState, opts?: CustomResourceOptions): FleetSchedule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
query: Optional[str] = None,
rule: Optional[FleetScheduleRuleArgs] = None,
status: Optional[str] = None,
version_to_latest: Optional[int] = None) -> FleetSchedulefunc GetFleetSchedule(ctx *Context, name string, id IDInput, state *FleetScheduleState, opts ...ResourceOption) (*FleetSchedule, error)public static FleetSchedule Get(string name, Input<string> id, FleetScheduleState? state, CustomResourceOptions? opts = null)public static FleetSchedule get(String name, Output<String> id, FleetScheduleState state, CustomResourceOptions options)resources: _: type: datadog:FleetSchedule get: id: ${id}import {
to = datadog_fleet_schedule.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.
- Name string
- Human-readable name for the schedule. String length must be at least 1.
- Query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- Rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- Status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - Version
To intLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- Name string
- Human-readable name for the schedule. String length must be at least 1.
- Query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- Rule
Fleet
Schedule Rule Args - Weekly recurrence and maintenance-window configuration for the schedule.
- Status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - Version
To intLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name string
- Human-readable name for the schedule. String length must be at least 1.
- query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule object
- Weekly recurrence and maintenance-window configuration for the schedule.
- status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version_
to_ numberlatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name String
- Human-readable name for the schedule. String length must be at least 1.
- query String
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- status String
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To IntegerLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name string
- Human-readable name for the schedule. String length must be at least 1.
- query string
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule - Weekly recurrence and maintenance-window configuration for the schedule.
- status string
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To numberLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name str
- Human-readable name for the schedule. String length must be at least 1.
- query str
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule
Fleet
Schedule Rule Args - Weekly recurrence and maintenance-window configuration for the schedule.
- status str
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version_
to_ intlatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
- name String
- Human-readable name for the schedule. String length must be at least 1.
- query String
- Datadog host query used to select the Agent upgrade targets. String length must be at least 1.
- rule Property Map
- Weekly recurrence and maintenance-window configuration for the schedule.
- status String
- Whether the schedule creates deployments. Valid values are
activeandinactive. The API default is used when omitted. Valid values areactive,inactive. - version
To NumberLatest - Number of major Agent versions behind the latest version to target:
0,1, or2. The API default is used when omitted. Value must be between 0 and 2.
Supporting Types
FleetScheduleRule, FleetScheduleRuleArgs
- Days
Of List<string>Weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - Maintenance
Window intDuration - Duration of the maintenance window in minutes. Value must be at least 1.
- Start
Maintenance stringWindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - Timezone string
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- Days
Of []stringWeeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - Maintenance
Window intDuration - Duration of the maintenance window in minutes. Value must be at least 1.
- Start
Maintenance stringWindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - Timezone string
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- days_
of_ list(string)weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - maintenance_
window_ numberduration - Duration of the maintenance window in minutes. Value must be at least 1.
- start_
maintenance_ stringwindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - timezone string
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- days
Of List<String>Weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - maintenance
Window IntegerDuration - Duration of the maintenance window in minutes. Value must be at least 1.
- start
Maintenance StringWindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - timezone String
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- days
Of string[]Weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - maintenance
Window numberDuration - Duration of the maintenance window in minutes. Value must be at least 1.
- start
Maintenance stringWindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - timezone string
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- days_
of_ Sequence[str]weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - maintenance_
window_ intduration - Duration of the maintenance window in minutes. Value must be at least 1.
- start_
maintenance_ strwindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - timezone str
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
- days
Of List<String>Weeks - Days when the schedule may run. Valid values are
Mon,Tue,Wed,Thu,Fri,Sat, andSun. - maintenance
Window NumberDuration - Duration of the maintenance window in minutes. Value must be at least 1.
- start
Maintenance StringWindow - Start of the maintenance window in 24-hour
HH:MMformat. Must use HH:MM format. - timezone String
- IANA time zone used to interpret the maintenance window, for example
America/New_YorkorUTC.
Import
The pulumi import command can be used, for example:
$ pulumi import datadog:index/fleetSchedule:FleetSchedule nonproduction "<schedule_id>"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadogTerraform Provider.
published on Friday, Sep 25, 2026 by Pulumi