Class 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>",
});
}
}
Inherited Members
Namespace: Pulumi.Mongodbatlas
Assembly: Pulumi.Mongodbatlas.dll
Syntax
public class MaintenanceWindow : CustomResource
Constructors
View SourceMaintenanceWindow(String, MaintenanceWindowArgs, CustomResourceOptions)
Create a MaintenanceWindow resource with the given unique name, arguments, and options.
Declaration
public MaintenanceWindow(string name, MaintenanceWindowArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| MaintenanceWindowArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDayOfWeek
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.
Declaration
public Output<int> DayOfWeek { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Defer
Defer maintenance for the given project for one week.
Declaration
public Output<bool> Defer { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
HourOfDay
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).
Declaration
public Output<int> HourOfDay { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
NumberOfDeferrals
Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.
Declaration
public Output<int> NumberOfDeferrals { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ProjectId
The unique identifier of the project for the Maintenance Window.
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StartAsap
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.
Declaration
public Output<bool> StartAsap { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, MaintenanceWindowState, CustomResourceOptions)
Get an existing MaintenanceWindow resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static MaintenanceWindow Get(string name, Input<string> id, MaintenanceWindowState 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. |
| MaintenanceWindowState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| MaintenanceWindow |