Downtime

Provides a Datadog downtime resource. This can be used to create and manage Datadog downtimes.

Example: downtime for a specific monitor

import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Create a new daily 1700-0900 Datadog downtime for a specific monitor id
const foo = new datadog.Downtime("foo", {
    end: 1483365600,
    monitorId: 12345,
    recurrence: {
        period: 1,
        type: "days",
    },
    scopes: ["*"],
    start: 1483308000,
});
import pulumi
import pulumi_datadog as datadog

# Create a new daily 1700-0900 Datadog downtime for a specific monitor id
foo = datadog.Downtime("foo",
    end=1483365600,
    monitor_id=12345,
    recurrence={
        "period": 1,
        "type": "days",
    },
    scopes=["*"],
    start=1483308000)
using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new daily 1700-0900 Datadog downtime for a specific monitor id
        var foo = new Datadog.Downtime("foo", new Datadog.DowntimeArgs
        {
            End = 1483365600,
            MonitorId = 12345,
            Recurrence = new Datadog.Inputs.DowntimeRecurrenceArgs
            {
                Period = 1,
                Type = "days",
            },
            Scopes = 
            {
                "*",
            },
            Start = 1483308000,
        });
    }

}

Example: downtime for all monitors

import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Create a new daily 1700-0900 Datadog downtime for all monitors
const foo = new datadog.Downtime("foo", {
    end: 1483365600,
    recurrence: {
        period: 1,
        type: "days",
    },
    scopes: ["*"],
    start: 1483308000,
});
import pulumi
import pulumi_datadog as datadog

# Create a new daily 1700-0900 Datadog downtime for all monitors
foo = datadog.Downtime("foo",
    end=1483365600,
    recurrence={
        "period": 1,
        "type": "days",
    },
    scopes=["*"],
    start=1483308000)
using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new daily 1700-0900 Datadog downtime for all monitors
        var foo = new Datadog.Downtime("foo", new Datadog.DowntimeArgs
        {
            End = 1483365600,
            Recurrence = new Datadog.Inputs.DowntimeRecurrenceArgs
            {
                Period = 1,
                Type = "days",
            },
            Scopes = 
            {
                "*",
            },
            Start = 1483308000,
        });
    }

}

Create a Downtime Resource

def Downtime(resource_name, opts=None, active=None, disabled=None, end=None, end_date=None, message=None, monitor_id=None, monitor_tags=None, recurrence=None, scopes=None, start=None, start_date=None, timezone=None, __props__=None);
func NewDowntime(ctx *Context, name string, args DowntimeArgs, opts ...ResourceOption) (*Downtime, error)
public Downtime(string name, DowntimeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DowntimeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DowntimeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DowntimeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Downtime Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Downtime resource accepts the following input properties:

Scopes List<string>

A list of items to apply the downtime to, e.g. host:X

Active bool

A flag indicating if the downtime is active now.

Disabled bool

A flag indicating if the downtime was disabled.

End int

POSIX timestamp to end the downtime.

EndDate string

String representing date and time to end the downtime in RFC3339 format.

Message string

A message to include with notifications for this downtime.

MonitorId int

When specified, this downtime will only apply to this monitor

MonitorTags List<string>

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

Recurrence DowntimeRecurrenceArgs

A dictionary to configure the downtime to be recurring.

Start int

POSIX timestamp to start the downtime.

StartDate string

String representing date and time to start the downtime in RFC3339 format.

Timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

Scopes []string

A list of items to apply the downtime to, e.g. host:X

Active bool

A flag indicating if the downtime is active now.

Disabled bool

A flag indicating if the downtime was disabled.

End int

POSIX timestamp to end the downtime.

EndDate string

String representing date and time to end the downtime in RFC3339 format.

Message string

A message to include with notifications for this downtime.

MonitorId int

When specified, this downtime will only apply to this monitor

MonitorTags []string

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

Recurrence DowntimeRecurrence

A dictionary to configure the downtime to be recurring.

Start int

POSIX timestamp to start the downtime.

StartDate string

String representing date and time to start the downtime in RFC3339 format.

Timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

scopes string[]

A list of items to apply the downtime to, e.g. host:X

active boolean

A flag indicating if the downtime is active now.

disabled boolean

A flag indicating if the downtime was disabled.

end number

POSIX timestamp to end the downtime.

endDate string

String representing date and time to end the downtime in RFC3339 format.

message string

A message to include with notifications for this downtime.

monitorId number

When specified, this downtime will only apply to this monitor

monitorTags string[]

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

recurrence DowntimeRecurrence

A dictionary to configure the downtime to be recurring.

start number

POSIX timestamp to start the downtime.

startDate string

String representing date and time to start the downtime in RFC3339 format.

timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

scopes List[str]

A list of items to apply the downtime to, e.g. host:X

active bool

A flag indicating if the downtime is active now.

disabled bool

A flag indicating if the downtime was disabled.

end float

POSIX timestamp to end the downtime.

end_date str

String representing date and time to end the downtime in RFC3339 format.

message str

A message to include with notifications for this downtime.

monitor_id float

When specified, this downtime will only apply to this monitor

monitor_tags List[str]

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

recurrence Dict[DowntimeRecurrence]

A dictionary to configure the downtime to be recurring.

start float

POSIX timestamp to start the downtime.

start_date str

String representing date and time to start the downtime in RFC3339 format.

timezone str

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

Outputs

All input properties are implicitly available as output properties. Additionally, the Downtime 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing Downtime Resource

Get an existing Downtime 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?: DowntimeState, opts?: CustomResourceOptions): Downtime
static get(resource_name, id, opts=None, active=None, disabled=None, end=None, end_date=None, message=None, monitor_id=None, monitor_tags=None, recurrence=None, scopes=None, start=None, start_date=None, timezone=None, __props__=None);
func GetDowntime(ctx *Context, name string, id IDInput, state *DowntimeState, opts ...ResourceOption) (*Downtime, error)
public static Downtime Get(string name, Input<string> id, DowntimeState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Active bool

A flag indicating if the downtime is active now.

Disabled bool

A flag indicating if the downtime was disabled.

End int

POSIX timestamp to end the downtime.

EndDate string

String representing date and time to end the downtime in RFC3339 format.

Message string

A message to include with notifications for this downtime.

MonitorId int

When specified, this downtime will only apply to this monitor

MonitorTags List<string>

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

Recurrence DowntimeRecurrenceArgs

A dictionary to configure the downtime to be recurring.

Scopes List<string>

A list of items to apply the downtime to, e.g. host:X

Start int

POSIX timestamp to start the downtime.

StartDate string

String representing date and time to start the downtime in RFC3339 format.

Timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

Active bool

A flag indicating if the downtime is active now.

Disabled bool

A flag indicating if the downtime was disabled.

End int

POSIX timestamp to end the downtime.

EndDate string

String representing date and time to end the downtime in RFC3339 format.

Message string

A message to include with notifications for this downtime.

MonitorId int

When specified, this downtime will only apply to this monitor

MonitorTags []string

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

Recurrence DowntimeRecurrence

A dictionary to configure the downtime to be recurring.

Scopes []string

A list of items to apply the downtime to, e.g. host:X

Start int

POSIX timestamp to start the downtime.

StartDate string

String representing date and time to start the downtime in RFC3339 format.

Timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

active boolean

A flag indicating if the downtime is active now.

disabled boolean

A flag indicating if the downtime was disabled.

end number

POSIX timestamp to end the downtime.

endDate string

String representing date and time to end the downtime in RFC3339 format.

message string

A message to include with notifications for this downtime.

monitorId number

When specified, this downtime will only apply to this monitor

monitorTags string[]

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

recurrence DowntimeRecurrence

A dictionary to configure the downtime to be recurring.

scopes string[]

A list of items to apply the downtime to, e.g. host:X

start number

POSIX timestamp to start the downtime.

startDate string

String representing date and time to start the downtime in RFC3339 format.

timezone string

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

active bool

A flag indicating if the downtime is active now.

disabled bool

A flag indicating if the downtime was disabled.

end float

POSIX timestamp to end the downtime.

end_date str

String representing date and time to end the downtime in RFC3339 format.

message str

A message to include with notifications for this downtime.

monitor_id float

When specified, this downtime will only apply to this monitor

monitor_tags List[str]

A list of monitor tags to match. The resulting downtime applies to monitors that match all provided monitor tags. This option conflicts with monitor_id as it will match all monitors that match these tags.

recurrence Dict[DowntimeRecurrence]

A dictionary to configure the downtime to be recurring.

scopes List[str]

A list of items to apply the downtime to, e.g. host:X

start float

POSIX timestamp to start the downtime.

start_date str

String representing date and time to start the downtime in RFC3339 format.

timezone str

The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.

Supporting Types

DowntimeRecurrence

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Period int

How often to repeat as an integer. For example to repeat every 3 days, select a type of days and a period of 3.

Type string

days, weeks, months, or years

UntilDate int

The date at which the recurrence should end as a POSIX timestamp. until_occurrences and until_date are mutually exclusive.

UntilOccurrences int

How many times the downtime will be rescheduled. until_occurrences and until_date are mutually exclusive.

WeekDays List<string>

A list of week days to repeat on. Choose from: Mon, Tue, Wed, Thu, Fri, Sat or Sun. Only applicable when type is weeks. First letter must be capitalized.

Period int

How often to repeat as an integer. For example to repeat every 3 days, select a type of days and a period of 3.

Type string

days, weeks, months, or years

UntilDate int

The date at which the recurrence should end as a POSIX timestamp. until_occurrences and until_date are mutually exclusive.

UntilOccurrences int

How many times the downtime will be rescheduled. until_occurrences and until_date are mutually exclusive.

WeekDays []string

A list of week days to repeat on. Choose from: Mon, Tue, Wed, Thu, Fri, Sat or Sun. Only applicable when type is weeks. First letter must be capitalized.

period number

How often to repeat as an integer. For example to repeat every 3 days, select a type of days and a period of 3.

type string

days, weeks, months, or years

untilDate number

The date at which the recurrence should end as a POSIX timestamp. until_occurrences and until_date are mutually exclusive.

untilOccurrences number

How many times the downtime will be rescheduled. until_occurrences and until_date are mutually exclusive.

weekDays string[]

A list of week days to repeat on. Choose from: Mon, Tue, Wed, Thu, Fri, Sat or Sun. Only applicable when type is weeks. First letter must be capitalized.

period float

How often to repeat as an integer. For example to repeat every 3 days, select a type of days and a period of 3.

type str

days, weeks, months, or years

untilDate float

The date at which the recurrence should end as a POSIX timestamp. until_occurrences and until_date are mutually exclusive.

untilOccurrences float

How many times the downtime will be rescheduled. until_occurrences and until_date are mutually exclusive.

weekDays List[str]

A list of week days to repeat on. Choose from: Mon, Tue, Wed, Thu, Fri, Sat or Sun. Only applicable when type is weeks. First letter must be capitalized.

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.