1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. MaintenanceWindow
CloudAMQP v3.21.0 published on Tuesday, Apr 8, 2025 by Pulumi

cloudamqp.MaintenanceWindow

Explore with Pulumi AI

This resource allows you to set the preferred start of new scheduled maintenances. The maintenance windows are 3 hours long and CloudAMQP attempts to begin the maintenance as close as possible to the preferred start. A maintenance will never start before the window.

Available for dedicated subscription plans.

Example Usage

Set the preferred maintenance start
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const _this = new cloudamqp.MaintenanceWindow("this", {
    instanceId: instance.id,
    preferredDay: "Monday",
    preferredTime: "23:00",
});
Copy
import pulumi
import pulumi_cloudamqp as cloudamqp

this = cloudamqp.MaintenanceWindow("this",
    instance_id=instance["id"],
    preferred_day="Monday",
    preferred_time="23:00")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.NewMaintenanceWindow(ctx, "this", &cloudamqp.MaintenanceWindowArgs{
			InstanceId:    pulumi.Any(instance.Id),
			PreferredDay:  pulumi.String("Monday"),
			PreferredTime: pulumi.String("23:00"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

return await Deployment.RunAsync(() => 
{
    var @this = new CloudAmqp.MaintenanceWindow("this", new()
    {
        InstanceId = instance.Id,
        PreferredDay = "Monday",
        PreferredTime = "23:00",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.MaintenanceWindow;
import com.pulumi.cloudamqp.MaintenanceWindowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var this_ = new MaintenanceWindow("this", MaintenanceWindowArgs.builder()
            .instanceId(instance.id())
            .preferredDay("Monday")
            .preferredTime("23:00")
            .build());

    }
}
Copy
resources:
  this:
    type: cloudamqp:MaintenanceWindow
    properties:
      instanceId: ${instance.id}
      preferredDay: Monday
      preferredTime: 23:00
Copy
Set the preferred maintenance start with automatic updates

When setting the automatic updates to “on”, a maintenance for version update will be scheduled once a new LavinMQ version been released.

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

const _this = new cloudamqp.MaintenanceWindow("this", {
    instanceId: instance.id,
    preferredDay: "Monday",
    preferredTime: "23:00",
    automaticUpdates: "on",
});
Copy
import pulumi
import pulumi_cloudamqp as cloudamqp

this = cloudamqp.MaintenanceWindow("this",
    instance_id=instance["id"],
    preferred_day="Monday",
    preferred_time="23:00",
    automatic_updates="on")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.NewMaintenanceWindow(ctx, "this", &cloudamqp.MaintenanceWindowArgs{
			InstanceId:       pulumi.Any(instance.Id),
			PreferredDay:     pulumi.String("Monday"),
			PreferredTime:    pulumi.String("23:00"),
			AutomaticUpdates: pulumi.String("on"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

return await Deployment.RunAsync(() => 
{
    var @this = new CloudAmqp.MaintenanceWindow("this", new()
    {
        InstanceId = instance.Id,
        PreferredDay = "Monday",
        PreferredTime = "23:00",
        AutomaticUpdates = "on",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.MaintenanceWindow;
import com.pulumi.cloudamqp.MaintenanceWindowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var this_ = new MaintenanceWindow("this", MaintenanceWindowArgs.builder()
            .instanceId(instance.id())
            .preferredDay("Monday")
            .preferredTime("23:00")
            .automaticUpdates("on")
            .build());

    }
}
Copy
resources:
  this:
    type: cloudamqp:MaintenanceWindow
    properties:
      instanceId: ${instance.id}
      preferredDay: Monday
      preferredTime: 23:00
      automaticUpdates: on
Copy
Only set preferred time of day
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const _this = new cloudamqp.MaintenanceWindow("this", {
    instanceId: instance.id,
    preferredTime: "23:00",
});
Copy
import pulumi
import pulumi_cloudamqp as cloudamqp

this = cloudamqp.MaintenanceWindow("this",
    instance_id=instance["id"],
    preferred_time="23:00")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.NewMaintenanceWindow(ctx, "this", &cloudamqp.MaintenanceWindowArgs{
			InstanceId:    pulumi.Any(instance.Id),
			PreferredTime: pulumi.String("23:00"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

return await Deployment.RunAsync(() => 
{
    var @this = new CloudAmqp.MaintenanceWindow("this", new()
    {
        InstanceId = instance.Id,
        PreferredTime = "23:00",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.MaintenanceWindow;
import com.pulumi.cloudamqp.MaintenanceWindowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var this_ = new MaintenanceWindow("this", MaintenanceWindowArgs.builder()
            .instanceId(instance.id())
            .preferredTime("23:00")
            .build());

    }
}
Copy
resources:
  this:
    type: cloudamqp:MaintenanceWindow
    properties:
      instanceId: ${instance.id}
      preferredTime: 23:00
Copy
Only set preferred day of week
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const _this = new cloudamqp.MaintenanceWindow("this", {
    instanceId: instance.id,
    preferredDay: "Monday",
});
Copy
import pulumi
import pulumi_cloudamqp as cloudamqp

this = cloudamqp.MaintenanceWindow("this",
    instance_id=instance["id"],
    preferred_day="Monday")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.NewMaintenanceWindow(ctx, "this", &cloudamqp.MaintenanceWindowArgs{
			InstanceId:   pulumi.Any(instance.Id),
			PreferredDay: pulumi.String("Monday"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

return await Deployment.RunAsync(() => 
{
    var @this = new CloudAmqp.MaintenanceWindow("this", new()
    {
        InstanceId = instance.Id,
        PreferredDay = "Monday",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.MaintenanceWindow;
import com.pulumi.cloudamqp.MaintenanceWindowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var this_ = new MaintenanceWindow("this", MaintenanceWindowArgs.builder()
            .instanceId(instance.id())
            .preferredDay("Monday")
            .build());

    }
}
Copy
resources:
  this:
    type: cloudamqp:MaintenanceWindow
    properties:
      instanceId: ${instance.id}
      preferredDay: Monday
Copy

Dependency

This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

Create MaintenanceWindow Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);
@overload
def MaintenanceWindow(resource_name: str,
                      args: MaintenanceWindowArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def MaintenanceWindow(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      instance_id: Optional[int] = None,
                      automatic_updates: Optional[str] = None,
                      preferred_day: Optional[str] = None,
                      preferred_time: Optional[str] = None)
func NewMaintenanceWindow(ctx *Context, name string, args MaintenanceWindowArgs, opts ...ResourceOption) (*MaintenanceWindow, error)
public MaintenanceWindow(string name, MaintenanceWindowArgs args, CustomResourceOptions? opts = null)
public MaintenanceWindow(String name, MaintenanceWindowArgs args)
public MaintenanceWindow(String name, MaintenanceWindowArgs args, CustomResourceOptions options)
type: cloudamqp:MaintenanceWindow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MaintenanceWindowArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. MaintenanceWindowArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MaintenanceWindowArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MaintenanceWindowArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var maintenanceWindowResource = new CloudAmqp.MaintenanceWindow("maintenanceWindowResource", new()
{
    InstanceId = 0,
    AutomaticUpdates = "string",
    PreferredDay = "string",
    PreferredTime = "string",
});
Copy
example, err := cloudamqp.NewMaintenanceWindow(ctx, "maintenanceWindowResource", &cloudamqp.MaintenanceWindowArgs{
	InstanceId:       pulumi.Int(0),
	AutomaticUpdates: pulumi.String("string"),
	PreferredDay:     pulumi.String("string"),
	PreferredTime:    pulumi.String("string"),
})
Copy
var maintenanceWindowResource = new MaintenanceWindow("maintenanceWindowResource", MaintenanceWindowArgs.builder()
    .instanceId(0)
    .automaticUpdates("string")
    .preferredDay("string")
    .preferredTime("string")
    .build());
Copy
maintenance_window_resource = cloudamqp.MaintenanceWindow("maintenanceWindowResource",
    instance_id=0,
    automatic_updates="string",
    preferred_day="string",
    preferred_time="string")
Copy
const maintenanceWindowResource = new cloudamqp.MaintenanceWindow("maintenanceWindowResource", {
    instanceId: 0,
    automaticUpdates: "string",
    preferredDay: "string",
    preferredTime: "string",
});
Copy
type: cloudamqp:MaintenanceWindow
properties:
    automaticUpdates: string
    instanceId: 0
    preferredDay: string
    preferredTime: string
Copy

MaintenanceWindow Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MaintenanceWindow resource accepts the following input properties:

InstanceId
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
AutomaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
PreferredDay string
Preferred day of the week when to schedule maintenance.
PreferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
InstanceId
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
AutomaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
PreferredDay string
Preferred day of the week when to schedule maintenance.
PreferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
instanceId
This property is required.
Changes to this property will trigger replacement.
Integer
The CloudAMQP instance ID.
automaticUpdates String
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
preferredDay String
Preferred day of the week when to schedule maintenance.
preferredTime String
Preferred time (UTC) of the day when to schedule maintenance.
instanceId
This property is required.
Changes to this property will trigger replacement.
number
The CloudAMQP instance ID.
automaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
preferredDay string
Preferred day of the week when to schedule maintenance.
preferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
instance_id
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
automatic_updates str
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
preferred_day str
Preferred day of the week when to schedule maintenance.
preferred_time str
Preferred time (UTC) of the day when to schedule maintenance.
instanceId
This property is required.
Changes to this property will trigger replacement.
Number
The CloudAMQP instance ID.
automaticUpdates String
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
preferredDay String
Preferred day of the week when to schedule maintenance.
preferredTime String
Preferred time (UTC) of the day when to schedule maintenance.

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 string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up 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,
        automatic_updates: Optional[str] = None,
        instance_id: Optional[int] = None,
        preferred_day: Optional[str] = None,
        preferred_time: 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)
public static MaintenanceWindow get(String name, Output<String> id, MaintenanceWindowState state, CustomResourceOptions options)
resources:  _:    type: cloudamqp:MaintenanceWindow    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AutomaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
InstanceId Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
PreferredDay string
Preferred day of the week when to schedule maintenance.
PreferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
AutomaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
InstanceId Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
PreferredDay string
Preferred day of the week when to schedule maintenance.
PreferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
automaticUpdates String
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
instanceId Changes to this property will trigger replacement. Integer
The CloudAMQP instance ID.
preferredDay String
Preferred day of the week when to schedule maintenance.
preferredTime String
Preferred time (UTC) of the day when to schedule maintenance.
automaticUpdates string
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
instanceId Changes to this property will trigger replacement. number
The CloudAMQP instance ID.
preferredDay string
Preferred day of the week when to schedule maintenance.
preferredTime string
Preferred time (UTC) of the day when to schedule maintenance.
automatic_updates str
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
instance_id Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
preferred_day str
Preferred day of the week when to schedule maintenance.
preferred_time str
Preferred time (UTC) of the day when to schedule maintenance.
automaticUpdates String
Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
instanceId Changes to this property will trigger replacement. Number
The CloudAMQP instance ID.
preferredDay String
Preferred day of the week when to schedule maintenance.
preferredTime String
Preferred time (UTC) of the day when to schedule maintenance.

Import

cloudamqp_maintenance_window can be imported using CloudAMQP instance identifier. To retrieve the

identifier of an instance, use CloudAMQP API list instances.

From Terraform v1.5.0, the import block can be used to import this resource:

hcl

import {

to = cloudamqp_maintenance_window.this

id = cloudamqp_instance.instance.id

}

Or with Terraform CLI:

$ pulumi import cloudamqp:index/maintenanceWindow:MaintenanceWindow this <id>`
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
CloudAMQP pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.