datadog.DowntimeSchedule
Explore with Pulumi AI
Provides a Datadog DowntimeSchedule resource. This can be used to create and manage Datadog downtimes. NOTE: Currently in private beta. To request access, contact Support at support@datadoghq.com.
Example Usage
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DowntimeSchedule;
import com.pulumi.datadog.DowntimeScheduleArgs;
import com.pulumi.datadog.inputs.DowntimeScheduleMonitorIdentifierArgs;
import com.pulumi.datadog.inputs.DowntimeScheduleRecurringScheduleArgs;
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 downtimeScheduleExample = new DowntimeSchedule("downtimeScheduleExample", DowntimeScheduleArgs.builder()
.displayTimezone("America/New_York")
.message("Message about the downtime")
.monitorIdentifier(DowntimeScheduleMonitorIdentifierArgs.builder()
.monitor_tags(
"test:123",
"data:test")
.build())
.muteFirstRecoveryNotification(true)
.notifyEndStates(
"alert",
"warn")
.notifyEndTypes(
"canceled",
"expired")
.recurringSchedule(DowntimeScheduleRecurringScheduleArgs.builder()
.recurrence(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.timezone("America/New_York")
.build())
.scope("env:us9-prod7 AND team:test123")
.build());
}
}
Coming soon!
Coming soon!
resources:
downtimeScheduleExample:
type: datadog:DowntimeSchedule
properties:
displayTimezone: America/New_York
message: Message about the downtime
monitorIdentifier:
monitor_tags:
- test:123
- data:test
muteFirstRecoveryNotification: true
notifyEndStates:
- alert
- warn
notifyEndTypes:
- canceled
- expired
recurringSchedule:
recurrence:
- duration: 1h
rrule: FREQ=DAILY;INTERVAL=1
start: 2050-01-02T03:04:05
timezone: America/New_York
scope: env:us9-prod7 AND team:test123
Create DowntimeSchedule Resource
new DowntimeSchedule(name: string, args: DowntimeScheduleArgs, opts?: CustomResourceOptions);
@overload
def DowntimeSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_timezone: Optional[str] = None,
message: Optional[str] = None,
monitor_identifier: Optional[DowntimeScheduleMonitorIdentifierArgs] = None,
mute_first_recovery_notification: Optional[bool] = None,
notify_end_states: Optional[Sequence[str]] = None,
notify_end_types: Optional[Sequence[str]] = None,
one_time_schedule: Optional[DowntimeScheduleOneTimeScheduleArgs] = None,
recurring_schedule: Optional[DowntimeScheduleRecurringScheduleArgs] = None,
scope: Optional[str] = None)
@overload
def DowntimeSchedule(resource_name: str,
args: DowntimeScheduleArgs,
opts: Optional[ResourceOptions] = None)
func NewDowntimeSchedule(ctx *Context, name string, args DowntimeScheduleArgs, opts ...ResourceOption) (*DowntimeSchedule, error)
public DowntimeSchedule(string name, DowntimeScheduleArgs args, CustomResourceOptions? opts = null)
public DowntimeSchedule(String name, DowntimeScheduleArgs args)
public DowntimeSchedule(String name, DowntimeScheduleArgs args, CustomResourceOptions options)
type: datadog:DowntimeSchedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DowntimeScheduleArgs
- 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 DowntimeScheduleArgs
- 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 DowntimeScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DowntimeScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DowntimeScheduleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DowntimeSchedule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DowntimeSchedule resource accepts the following input properties:
- Scope string
The scope to which the downtime applies. Must follow the common search syntax.
- Display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- Message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- Monitor
Identifier DowntimeSchedule Monitor Identifier - Mute
First boolRecovery Notification If the first recovery notification during a downtime should be muted.
- Notify
End List<string>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- Notify
End List<string>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- One
Time DowntimeSchedule Schedule One Time Schedule - Recurring
Schedule DowntimeSchedule Recurring Schedule
- Scope string
The scope to which the downtime applies. Must follow the common search syntax.
- Display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- Message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- Monitor
Identifier DowntimeSchedule Monitor Identifier Args - Mute
First boolRecovery Notification If the first recovery notification during a downtime should be muted.
- Notify
End []stringStates States that will trigger a monitor notification when the
notify_end_types
action occurs.- Notify
End []stringTypes Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- One
Time DowntimeSchedule Schedule One Time Schedule Args - Recurring
Schedule DowntimeSchedule Recurring Schedule Args
- scope String
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone String The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message String
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier DowntimeSchedule Monitor Identifier - mute
First BooleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End List<String>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End List<String>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time DowntimeSchedule Schedule One Time Schedule - recurring
Schedule DowntimeSchedule Recurring Schedule
- scope string
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier DowntimeSchedule Monitor Identifier - mute
First booleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End string[]States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End string[]Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time DowntimeSchedule Schedule One Time Schedule - recurring
Schedule DowntimeSchedule Recurring Schedule
- scope str
The scope to which the downtime applies. Must follow the common search syntax.
- display_
timezone str The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message str
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor_
identifier DowntimeSchedule Monitor Identifier Args - mute_
first_ boolrecovery_ notification If the first recovery notification during a downtime should be muted.
- notify_
end_ Sequence[str]states States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify_
end_ Sequence[str]types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one_
time_ Downtimeschedule Schedule One Time Schedule Args - recurring_
schedule DowntimeSchedule Recurring Schedule Args
- scope String
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone String The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message String
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier Property Map - mute
First BooleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End List<String>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End List<String>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time Property MapSchedule - recurring
Schedule Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the DowntimeSchedule 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 str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing DowntimeSchedule Resource
Get an existing DowntimeSchedule 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?: DowntimeScheduleState, opts?: CustomResourceOptions): DowntimeSchedule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
display_timezone: Optional[str] = None,
message: Optional[str] = None,
monitor_identifier: Optional[DowntimeScheduleMonitorIdentifierArgs] = None,
mute_first_recovery_notification: Optional[bool] = None,
notify_end_states: Optional[Sequence[str]] = None,
notify_end_types: Optional[Sequence[str]] = None,
one_time_schedule: Optional[DowntimeScheduleOneTimeScheduleArgs] = None,
recurring_schedule: Optional[DowntimeScheduleRecurringScheduleArgs] = None,
scope: Optional[str] = None) -> DowntimeSchedule
func GetDowntimeSchedule(ctx *Context, name string, id IDInput, state *DowntimeScheduleState, opts ...ResourceOption) (*DowntimeSchedule, error)
public static DowntimeSchedule Get(string name, Input<string> id, DowntimeScheduleState? state, CustomResourceOptions? opts = null)
public static DowntimeSchedule get(String name, Output<String> id, DowntimeScheduleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- Message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- Monitor
Identifier DowntimeSchedule Monitor Identifier - Mute
First boolRecovery Notification If the first recovery notification during a downtime should be muted.
- Notify
End List<string>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- Notify
End List<string>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- One
Time DowntimeSchedule Schedule One Time Schedule - Recurring
Schedule DowntimeSchedule Recurring Schedule - Scope string
The scope to which the downtime applies. Must follow the common search syntax.
- Display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- Message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- Monitor
Identifier DowntimeSchedule Monitor Identifier Args - Mute
First boolRecovery Notification If the first recovery notification during a downtime should be muted.
- Notify
End []stringStates States that will trigger a monitor notification when the
notify_end_types
action occurs.- Notify
End []stringTypes Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- One
Time DowntimeSchedule Schedule One Time Schedule Args - Recurring
Schedule DowntimeSchedule Recurring Schedule Args - Scope string
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone String The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message String
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier DowntimeSchedule Monitor Identifier - mute
First BooleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End List<String>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End List<String>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time DowntimeSchedule Schedule One Time Schedule - recurring
Schedule DowntimeSchedule Recurring Schedule - scope String
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone string The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message string
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier DowntimeSchedule Monitor Identifier - mute
First booleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End string[]States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End string[]Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time DowntimeSchedule Schedule One Time Schedule - recurring
Schedule DowntimeSchedule Recurring Schedule - scope string
The scope to which the downtime applies. Must follow the common search syntax.
- display_
timezone str The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message str
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor_
identifier DowntimeSchedule Monitor Identifier Args - mute_
first_ boolrecovery_ notification If the first recovery notification during a downtime should be muted.
- notify_
end_ Sequence[str]states States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify_
end_ Sequence[str]types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one_
time_ Downtimeschedule Schedule One Time Schedule Args - recurring_
schedule DowntimeSchedule Recurring Schedule Args - scope str
The scope to which the downtime applies. Must follow the common search syntax.
- display
Timezone String The timezone in which to display the downtime's start and end times in Datadog applications. This is not used as an offset for scheduling.
- message String
A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same
@username
notation as events.- monitor
Identifier Property Map - mute
First BooleanRecovery Notification If the first recovery notification during a downtime should be muted.
- notify
End List<String>States States that will trigger a monitor notification when the
notify_end_types
action occurs.- notify
End List<String>Types Actions that will trigger a monitor notification if the downtime is in the
notify_end_types
state.- one
Time Property MapSchedule - recurring
Schedule Property Map - scope String
The scope to which the downtime applies. Must follow the common search syntax.
Supporting Types
DowntimeScheduleMonitorIdentifier, DowntimeScheduleMonitorIdentifierArgs
- Monitor
Id int ID of the monitor to prevent notifications.
- List<string>
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
- Monitor
Id int ID of the monitor to prevent notifications.
- []string
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
- monitor
Id Integer ID of the monitor to prevent notifications.
- List<String>
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
- monitor
Id number ID of the monitor to prevent notifications.
- string[]
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
- monitor_
id int ID of the monitor to prevent notifications.
- Sequence[str]
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
- monitor
Id Number ID of the monitor to prevent notifications.
- List<String>
A list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match all provided monitor tags. Setting
monitor_tags
to[*]
configures the downtime to mute all monitors for the given scope.
DowntimeScheduleOneTimeSchedule, DowntimeScheduleOneTimeScheduleArgs
DowntimeScheduleRecurringSchedule, DowntimeScheduleRecurringScheduleArgs
- Recurrences
List<Downtime
Schedule Recurring Schedule Recurrence> - Timezone string
The timezone in which to schedule the downtime.
- Recurrences
[]Downtime
Schedule Recurring Schedule Recurrence - Timezone string
The timezone in which to schedule the downtime.
- recurrences
List<Downtime
Schedule Recurring Schedule Recurrence> - timezone String
The timezone in which to schedule the downtime.
- recurrences
Downtime
Schedule Recurring Schedule Recurrence[] - timezone string
The timezone in which to schedule the downtime.
- recurrences
Sequence[Downtime
Schedule Recurring Schedule Recurrence] - timezone str
The timezone in which to schedule the downtime.
- recurrences List<Property Map>
- timezone String
The timezone in which to schedule the downtime.
DowntimeScheduleRecurringScheduleRecurrence, DowntimeScheduleRecurringScheduleRecurrenceArgs
Import
$ pulumi import datadog:index/downtimeSchedule:DowntimeSchedule new_list "00e000000-0000-1234-0000-000000000000"
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
datadog
Terraform Provider.