1. Packages
  2. Datadog
  3. API Docs
  4. DowntimeSchedule
Datadog v4.22.0 published on Monday, Aug 28, 2023 by Pulumi

datadog.DowntimeSchedule

Explore with Pulumi AI

datadog logo
Datadog v4.22.0 published on Monday, Aug 28, 2023 by Pulumi

    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.

    DisplayTimezone 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.

    MonitorIdentifier DowntimeScheduleMonitorIdentifier
    MuteFirstRecoveryNotification bool

    If the first recovery notification during a downtime should be muted.

    NotifyEndStates List<string>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    NotifyEndTypes List<string>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    OneTimeSchedule DowntimeScheduleOneTimeSchedule
    RecurringSchedule DowntimeScheduleRecurringSchedule
    Scope string

    The scope to which the downtime applies. Must follow the common search syntax.

    DisplayTimezone 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.

    MonitorIdentifier DowntimeScheduleMonitorIdentifierArgs
    MuteFirstRecoveryNotification bool

    If the first recovery notification during a downtime should be muted.

    NotifyEndStates []string

    States that will trigger a monitor notification when the notify_end_types action occurs.

    NotifyEndTypes []string

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    OneTimeSchedule DowntimeScheduleOneTimeScheduleArgs
    RecurringSchedule DowntimeScheduleRecurringScheduleArgs
    scope String

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier DowntimeScheduleMonitorIdentifier
    muteFirstRecoveryNotification Boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates List<String>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes List<String>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule DowntimeScheduleOneTimeSchedule
    recurringSchedule DowntimeScheduleRecurringSchedule
    scope string

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier DowntimeScheduleMonitorIdentifier
    muteFirstRecoveryNotification boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates string[]

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes string[]

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule DowntimeScheduleOneTimeSchedule
    recurringSchedule DowntimeScheduleRecurringSchedule
    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 DowntimeScheduleMonitorIdentifierArgs
    mute_first_recovery_notification bool

    If the first recovery notification during a downtime should be muted.

    notify_end_states Sequence[str]

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notify_end_types Sequence[str]

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    one_time_schedule DowntimeScheduleOneTimeScheduleArgs
    recurring_schedule DowntimeScheduleRecurringScheduleArgs
    scope String

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier Property Map
    muteFirstRecoveryNotification Boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates List<String>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes List<String>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule Property Map
    recurringSchedule 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.
    The following state arguments are supported:
    DisplayTimezone 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.

    MonitorIdentifier DowntimeScheduleMonitorIdentifier
    MuteFirstRecoveryNotification bool

    If the first recovery notification during a downtime should be muted.

    NotifyEndStates List<string>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    NotifyEndTypes List<string>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    OneTimeSchedule DowntimeScheduleOneTimeSchedule
    RecurringSchedule DowntimeScheduleRecurringSchedule
    Scope string

    The scope to which the downtime applies. Must follow the common search syntax.

    DisplayTimezone 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.

    MonitorIdentifier DowntimeScheduleMonitorIdentifierArgs
    MuteFirstRecoveryNotification bool

    If the first recovery notification during a downtime should be muted.

    NotifyEndStates []string

    States that will trigger a monitor notification when the notify_end_types action occurs.

    NotifyEndTypes []string

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    OneTimeSchedule DowntimeScheduleOneTimeScheduleArgs
    RecurringSchedule DowntimeScheduleRecurringScheduleArgs
    Scope string

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier DowntimeScheduleMonitorIdentifier
    muteFirstRecoveryNotification Boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates List<String>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes List<String>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule DowntimeScheduleOneTimeSchedule
    recurringSchedule DowntimeScheduleRecurringSchedule
    scope String

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier DowntimeScheduleMonitorIdentifier
    muteFirstRecoveryNotification boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates string[]

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes string[]

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule DowntimeScheduleOneTimeSchedule
    recurringSchedule DowntimeScheduleRecurringSchedule
    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 DowntimeScheduleMonitorIdentifierArgs
    mute_first_recovery_notification bool

    If the first recovery notification during a downtime should be muted.

    notify_end_states Sequence[str]

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notify_end_types Sequence[str]

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    one_time_schedule DowntimeScheduleOneTimeScheduleArgs
    recurring_schedule DowntimeScheduleRecurringScheduleArgs
    scope str

    The scope to which the downtime applies. Must follow the common search syntax.

    displayTimezone 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.

    monitorIdentifier Property Map
    muteFirstRecoveryNotification Boolean

    If the first recovery notification during a downtime should be muted.

    notifyEndStates List<String>

    States that will trigger a monitor notification when the notify_end_types action occurs.

    notifyEndTypes List<String>

    Actions that will trigger a monitor notification if the downtime is in the notify_end_types state.

    oneTimeSchedule Property Map
    recurringSchedule Property Map
    scope String

    The scope to which the downtime applies. Must follow the common search syntax.

    Supporting Types

    DowntimeScheduleMonitorIdentifier, DowntimeScheduleMonitorIdentifierArgs

    MonitorId int

    ID of the monitor to prevent notifications.

    MonitorTags 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.

    MonitorId int

    ID of the monitor to prevent notifications.

    MonitorTags []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.

    monitorId Integer

    ID of the monitor to prevent notifications.

    monitorTags 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.

    monitorId number

    ID of the monitor to prevent notifications.

    monitorTags 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.

    monitor_tags 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.

    monitorId Number

    ID of the monitor to prevent notifications.

    monitorTags 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

    End string

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    Start string

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    End string

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    Start string

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    end String

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    start String

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    end string

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    start string

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    end str

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    start str

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    end String

    ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the downtime never ends.

    start String

    ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the downtime starts the moment it is created.

    DowntimeScheduleRecurringSchedule, DowntimeScheduleRecurringScheduleArgs

    Recurrences List<DowntimeScheduleRecurringScheduleRecurrence>
    Timezone string

    The timezone in which to schedule the downtime.

    Recurrences []DowntimeScheduleRecurringScheduleRecurrence
    Timezone string

    The timezone in which to schedule the downtime.

    recurrences List<DowntimeScheduleRecurringScheduleRecurrence>
    timezone String

    The timezone in which to schedule the downtime.

    recurrences DowntimeScheduleRecurringScheduleRecurrence[]
    timezone string

    The timezone in which to schedule the downtime.

    recurrences Sequence[DowntimeScheduleRecurringScheduleRecurrence]
    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

    Duration string
    Rrule string
    Start string
    Duration string
    Rrule string
    Start string
    duration String
    rrule String
    start String
    duration string
    rrule string
    start string
    duration str
    rrule str
    start str
    duration String
    rrule String
    start String

    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.

    datadog logo
    Datadog v4.22.0 published on Monday, Aug 28, 2023 by Pulumi