MaintenanceWindow

Provides a Wavefront Maintenance Window Resource. This allows maintenance windows to be created, updated, and deleted.

Example Usage

using Pulumi;
using Wavefront = Pulumi.Wavefront;

class MyStack : Stack
{
    public MyStack()
    {
        var basic = new Wavefront.MaintenanceWindow("basic", new Wavefront.MaintenanceWindowArgs
        {
            EndTimeInSeconds = 1601123456,
            Reason = "Routine maintenance for 2020",
            RelevantHostNames = 
            {
                "my_hostname",
                "my_other_hostname",
            },
            StartTimeInSeconds = 1600123456,
            Title = "Routine maintenance",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-wavefront/sdk/go/wavefront"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wavefront.NewMaintenanceWindow(ctx, "basic", &wavefront.MaintenanceWindowArgs{
			EndTimeInSeconds: pulumi.Int(1601123456),
			Reason:           pulumi.String("Routine maintenance for 2020"),
			RelevantHostNames: pulumi.StringArray{
				pulumi.String("my_hostname"),
				pulumi.String("my_other_hostname"),
			},
			StartTimeInSeconds: pulumi.Int(1600123456),
			Title:              pulumi.String("Routine maintenance"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_wavefront as wavefront

basic = wavefront.MaintenanceWindow("basic",
    end_time_in_seconds=1601123456,
    reason="Routine maintenance for 2020",
    relevant_host_names=[
        "my_hostname",
        "my_other_hostname",
    ],
    start_time_in_seconds=1600123456,
    title="Routine maintenance")
import * as pulumi from "@pulumi/pulumi";
import * as wavefront from "@pulumi/wavefront";

const basic = new wavefront.MaintenanceWindow("basic", {
    endTimeInSeconds: 1601123456,
    reason: "Routine maintenance for 2020",
    relevantHostNames: [
        "my_hostname",
        "my_other_hostname",
    ],
    startTimeInSeconds: 1600123456,
    title: "Routine maintenance",
});

Create a MaintenanceWindow Resource

new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);
@overload
def MaintenanceWindow(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      end_time_in_seconds: Optional[int] = None,
                      host_tag_group_host_names_group_anded: Optional[bool] = None,
                      reason: Optional[str] = None,
                      relevant_customer_tags: Optional[Sequence[str]] = None,
                      relevant_host_names: Optional[Sequence[str]] = None,
                      relevant_host_tags: Optional[Sequence[str]] = None,
                      relevant_host_tags_anded: Optional[bool] = None,
                      start_time_in_seconds: Optional[int] = None,
                      title: Optional[str] = None)
@overload
def MaintenanceWindow(resource_name: str,
                      args: MaintenanceWindowArgs,
                      opts: Optional[ResourceOptions] = None)
func NewMaintenanceWindow(ctx *Context, name string, args MaintenanceWindowArgs, opts ...ResourceOption) (*MaintenanceWindow, error)
public MaintenanceWindow(string name, MaintenanceWindowArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args MaintenanceWindowArgs
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 MaintenanceWindowArgs
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 MaintenanceWindowArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MaintenanceWindowArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

MaintenanceWindow Resource Properties

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

Inputs

The MaintenanceWindow resource accepts the following input properties:

EndTimeInSeconds int
end time in seconds after 1 Jan 1970 GMT.
Reason string
The reason for the maintenance window
StartTimeInSeconds int
start time in seconds after 1 Jan 1970 GMT.
Title string
The title of the maintenance window
HostTagGroupHostNamesGroupAnded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
RelevantCustomerTags List<string>
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostNames List<string>
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTags List<string>
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTagsAnded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
EndTimeInSeconds int
end time in seconds after 1 Jan 1970 GMT.
Reason string
The reason for the maintenance window
StartTimeInSeconds int
start time in seconds after 1 Jan 1970 GMT.
Title string
The title of the maintenance window
HostTagGroupHostNamesGroupAnded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
RelevantCustomerTags []string
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostNames []string
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTags []string
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTagsAnded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
endTimeInSeconds number
end time in seconds after 1 Jan 1970 GMT.
reason string
The reason for the maintenance window
startTimeInSeconds number
start time in seconds after 1 Jan 1970 GMT.
title string
The title of the maintenance window
hostTagGroupHostNamesGroupAnded boolean
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
relevantCustomerTags string[]
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostNames string[]
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostTags string[]
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostTagsAnded boolean
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
end_time_in_seconds int
end time in seconds after 1 Jan 1970 GMT.
reason str
The reason for the maintenance window
start_time_in_seconds int
start time in seconds after 1 Jan 1970 GMT.
title str
The title of the maintenance window
host_tag_group_host_names_group_anded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
relevant_customer_tags Sequence[str]
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_names Sequence[str]
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_tags Sequence[str]
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_tags_anded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false

Outputs

All input properties are implicitly available as output properties. Additionally, the MaintenanceWindow 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 MaintenanceWindow Resource

Get an existing MaintenanceWindow 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?: MaintenanceWindowState, opts?: CustomResourceOptions): MaintenanceWindow
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        end_time_in_seconds: Optional[int] = None,
        host_tag_group_host_names_group_anded: Optional[bool] = None,
        reason: Optional[str] = None,
        relevant_customer_tags: Optional[Sequence[str]] = None,
        relevant_host_names: Optional[Sequence[str]] = None,
        relevant_host_tags: Optional[Sequence[str]] = None,
        relevant_host_tags_anded: Optional[bool] = None,
        start_time_in_seconds: Optional[int] = None,
        title: Optional[str] = None) -> MaintenanceWindow
func GetMaintenanceWindow(ctx *Context, name string, id IDInput, state *MaintenanceWindowState, opts ...ResourceOption) (*MaintenanceWindow, error)
public static MaintenanceWindow Get(string name, Input<string> id, MaintenanceWindowState? 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:

EndTimeInSeconds int
end time in seconds after 1 Jan 1970 GMT.
HostTagGroupHostNamesGroupAnded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
Reason string
The reason for the maintenance window
RelevantCustomerTags List<string>
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostNames List<string>
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTags List<string>
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTagsAnded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
StartTimeInSeconds int
start time in seconds after 1 Jan 1970 GMT.
Title string
The title of the maintenance window
EndTimeInSeconds int
end time in seconds after 1 Jan 1970 GMT.
HostTagGroupHostNamesGroupAnded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
Reason string
The reason for the maintenance window
RelevantCustomerTags []string
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostNames []string
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTags []string
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
RelevantHostTagsAnded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
StartTimeInSeconds int
start time in seconds after 1 Jan 1970 GMT.
Title string
The title of the maintenance window
endTimeInSeconds number
end time in seconds after 1 Jan 1970 GMT.
hostTagGroupHostNamesGroupAnded boolean
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
reason string
The reason for the maintenance window
relevantCustomerTags string[]
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostNames string[]
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostTags string[]
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevantHostTagsAnded boolean
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
startTimeInSeconds number
start time in seconds after 1 Jan 1970 GMT.
title string
The title of the maintenance window
end_time_in_seconds int
end time in seconds after 1 Jan 1970 GMT.
host_tag_group_host_names_group_anded bool
If true, a source/host must be in ‘relevantHostNames’ and have tags matching the specification formed by ‘relevantHostTags’ and ‘relevantHostTagsAnded’ in order for this maintenance window to apply. If false, a source/host must either be in ‘relevantHostNames’ or match ‘relevantHostTags’ and ‘relevantHostTagsAnded’. Default: false
reason str
The reason for the maintenance window
relevant_customer_tags Sequence[str]
List of alert tags whose matching alerts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_names Sequence[str]
List of source/host names that will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_tags Sequence[str]
List of source/host tags whose matching sources/hosts will be put into maintenance because of this maintenance window. At least one of relevant_customer_tags, relevant_host_tags, or relevant_host_names is required.
relevant_host_tags_anded bool
Whether to AND source/host tags listed in relevantHostTags. If true, a source/host must contain all tags in order for the maintenance window to apply. If false, the tags are OR’ed, and a source/host must contain one of the tags. Default: false
start_time_in_seconds int
start time in seconds after 1 Jan 1970 GMT.
title str
The title of the maintenance window

Import

Maintenance windows can be imported using the id, e.g.

 $ pulumi import wavefront:index/maintenanceWindow:MaintenanceWindow basic 1600383357095

Package Details

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