MaintenanceWindow
mongodbatlas..MaintenanceWindow provides a resource to schedule a maintenance window for your MongoDB Atlas Project and/or set to defer a scheduled maintenance up to two times.
NOTE: Groups and projects are synonymous terms. You may find
groupIdin the official documentation.
Maintenance Window Considerations:
- Urgent Maintenance Activities Cannot Wait: Urgent maintenance activities such as security patches cannot wait for your chosen window. Atlas will start those maintenance activities when needed.
Once maintenance is scheduled for your cluster, you cannot change your maintenance window until the current maintenance efforts have completed. - Maintenance Requires Replica Set Elections: Atlas performs maintenance the same way as the manual maintenance procedure. This requires at least one replica set election during the maintenance window per replica set. - Maintenance Starts As Close to the Hour As Possible: Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or expected system issues could delay the start time.
Example Usage
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var test = new Mongodbatlas.MaintenanceWindow("test", new Mongodbatlas.MaintenanceWindowArgs
{
DayOfWeek = 3,
HourOfDay = 4,
ProjectId = "<your-project-id>",
});
}
}
Coming soon!
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.MaintenanceWindow("test",
day_of_week=3,
hour_of_day=4,
project_id="<your-project-id>")import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = new mongodbatlas.MaintenanceWindow("test", {
dayOfWeek: 3,
hourOfDay: 4,
projectId: "<your-project-id>",
});Create a MaintenanceWindow Resource
new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);def MaintenanceWindow(resource_name, opts=None, day_of_week=None, defer=None, hour_of_day=None, number_of_deferrals=None, project_id=None, __props__=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.
- 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 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:
- Project
Id string The unique identifier of the project for the Maintenance Window.
- Day
Of intWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- Defer bool
Defer maintenance for the given project for one week.
- Hour
Of intDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- Number
Of intDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- Project
Id string The unique identifier of the project for the Maintenance Window.
- Day
Of intWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- Defer bool
Defer maintenance for the given project for one week.
- Hour
Of intDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- Number
Of intDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- project
Id string The unique identifier of the project for the Maintenance Window.
- day
Of numberWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- defer boolean
Defer maintenance for the given project for one week.
- hour
Of numberDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- number
Of numberDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- project_
id str The unique identifier of the project for the Maintenance Window.
- day_
of_ floatweek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- defer bool
Defer maintenance for the given project for one week.
- hour_
of_ floatday Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- number_
of_ floatdeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
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.
- Start
Asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Start
Asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- id string
- The provider-assigned unique ID for this managed resource.
- start
Asap boolean Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- id str
- The provider-assigned unique ID for this managed resource.
- start_
asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
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): MaintenanceWindowstatic get(resource_name, id, opts=None, day_of_week=None, defer=None, hour_of_day=None, number_of_deferrals=None, project_id=None, start_asap=None, __props__=None);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:
- Day
Of intWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- Defer bool
Defer maintenance for the given project for one week.
- Hour
Of intDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- Number
Of intDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- Project
Id string The unique identifier of the project for the Maintenance Window.
- Start
Asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- Day
Of intWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- Defer bool
Defer maintenance for the given project for one week.
- Hour
Of intDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- Number
Of intDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- Project
Id string The unique identifier of the project for the Maintenance Window.
- Start
Asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- day
Of numberWeek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- defer boolean
Defer maintenance for the given project for one week.
- hour
Of numberDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- number
Of numberDeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- project
Id string The unique identifier of the project for the Maintenance Window.
- start
Asap boolean Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
- day_
of_ floatweek Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.
- defer bool
Defer maintenance for the given project for one week.
- hour_
of_ floatday Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
- number_
of_ floatdeferrals Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
- project_
id str The unique identifier of the project for the Maintenance Window.
- start_
asap bool Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.