Class Downtime
Provides a Datadog downtime resource. This can be used to create and manage Datadog downtimes.
Example: downtime for a specific monitor
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
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,
});
}
}
Inherited Members
Namespace: Pulumi.Datadog
Assembly: Pulumi.Datadog.dll
Syntax
public class Downtime : CustomResource
Constructors
View SourceDowntime(String, DowntimeArgs, CustomResourceOptions)
Create a Downtime resource with the given unique name, arguments, and options.
Declaration
public Downtime(string name, DowntimeArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DowntimeArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceActive
A flag indicating if the downtime is active now.
Declaration
public Output<bool?> Active { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Disabled
A flag indicating if the downtime was disabled.
Declaration
public Output<bool?> Disabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
End
POSIX timestamp to end the downtime.
Declaration
public Output<int?> End { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
EndDate
String representing date and time to end the downtime in RFC3339 format.
Declaration
public Output<string> EndDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Message
A message to include with notifications for this downtime.
Declaration
public Output<string> Message { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MonitorId
When specified, this downtime will only apply to this monitor
Declaration
public Output<int?> MonitorId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
MonitorTags
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.
Declaration
public Output<ImmutableArray<string>> MonitorTags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Recurrence
A dictionary to configure the downtime to be recurring.
Declaration
public Output<DowntimeRecurrence> Recurrence { get; }
Property Value
| Type | Description |
|---|---|
| Output<DowntimeRecurrence> |
Scopes
A list of items to apply the downtime to, e.g. host:X
Declaration
public Output<ImmutableArray<string>> Scopes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Start
POSIX timestamp to start the downtime.
Declaration
public Output<int?> Start { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
StartDate
String representing date and time to start the downtime in RFC3339 format.
Declaration
public Output<string> StartDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Timezone
The timezone for the downtime, default UTC. It must be a valid IANA Time Zone.
Declaration
public Output<string> Timezone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DowntimeState, CustomResourceOptions)
Get an existing Downtime resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Downtime Get(string name, Input<string> id, DowntimeState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DowntimeState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Downtime |