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",
});
import pulumi
import pulumi_cloudamqp as cloudamqp
this = cloudamqp.MaintenanceWindow("this",
instance_id=instance["id"],
preferred_day="Monday",
preferred_time="23:00")
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
})
}
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",
});
});
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());
}
}
resources:
this:
type: cloudamqp:MaintenanceWindow
properties:
instanceId: ${instance.id}
preferredDay: Monday
preferredTime: 23:00
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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
this:
type: cloudamqp:MaintenanceWindow
properties:
instanceId: ${instance.id}
preferredDay: Monday
preferredTime: 23:00
automaticUpdates: on
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",
});
import pulumi
import pulumi_cloudamqp as cloudamqp
this = cloudamqp.MaintenanceWindow("this",
instance_id=instance["id"],
preferred_time="23:00")
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
})
}
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",
});
});
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());
}
}
resources:
this:
type: cloudamqp:MaintenanceWindow
properties:
instanceId: ${instance.id}
preferredTime: 23:00
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",
});
import pulumi
import pulumi_cloudamqp as cloudamqp
this = cloudamqp.MaintenanceWindow("this",
instance_id=instance["id"],
preferred_day="Monday")
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
})
}
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",
});
});
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());
}
}
resources:
this:
type: cloudamqp:MaintenanceWindow
properties:
instanceId: ${instance.id}
preferredDay: Monday
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 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.
- name String
- The unique name of the resource.
- args 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",
});
example, err := cloudamqp.NewMaintenanceWindow(ctx, "maintenanceWindowResource", &cloudamqp.MaintenanceWindowArgs{
InstanceId: pulumi.Int(0),
AutomaticUpdates: pulumi.String("string"),
PreferredDay: pulumi.String("string"),
PreferredTime: pulumi.String("string"),
})
var maintenanceWindowResource = new MaintenanceWindow("maintenanceWindowResource", MaintenanceWindowArgs.builder()
.instanceId(0)
.automaticUpdates("string")
.preferredDay("string")
.preferredTime("string")
.build());
maintenance_window_resource = cloudamqp.MaintenanceWindow("maintenanceWindowResource",
instance_id=0,
automatic_updates="string",
preferred_day="string",
preferred_time="string")
const maintenanceWindowResource = new cloudamqp.MaintenanceWindow("maintenanceWindowResource", {
instanceId: 0,
automaticUpdates: "string",
preferredDay: "string",
preferredTime: "string",
});
type: cloudamqp:MaintenanceWindow
properties:
automaticUpdates: string
instanceId: 0
preferredDay: string
preferredTime: string
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:
- Instance
Id int - The CloudAMQP instance ID.
- Automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- Preferred
Day string - Preferred day of the week when to schedule maintenance.
- Preferred
Time string - Preferred time (UTC) of the day when to schedule maintenance.
- Instance
Id int - The CloudAMQP instance ID.
- Automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- Preferred
Day string - Preferred day of the week when to schedule maintenance.
- Preferred
Time string - Preferred time (UTC) of the day when to schedule maintenance.
- instance
Id Integer - The CloudAMQP instance ID.
- automatic
Updates String - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- preferred
Day String - Preferred day of the week when to schedule maintenance.
- preferred
Time String - Preferred time (UTC) of the day when to schedule maintenance.
- instance
Id number - The CloudAMQP instance ID.
- automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- preferred
Day string - Preferred day of the week when to schedule maintenance.
- preferred
Time string - Preferred time (UTC) of the day when to schedule maintenance.
- instance_
id 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.
- instance
Id Number - The CloudAMQP instance ID.
- automatic
Updates String - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- preferred
Day String - Preferred day of the week when to schedule maintenance.
- preferred
Time 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
- 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.
- 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.
- Automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- Instance
Id int - The CloudAMQP instance ID.
- Preferred
Day string - Preferred day of the week when to schedule maintenance.
- Preferred
Time string - Preferred time (UTC) of the day when to schedule maintenance.
- Automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- Instance
Id int - The CloudAMQP instance ID.
- Preferred
Day string - Preferred day of the week when to schedule maintenance.
- Preferred
Time string - Preferred time (UTC) of the day when to schedule maintenance.
- automatic
Updates String - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- instance
Id Integer - The CloudAMQP instance ID.
- preferred
Day String - Preferred day of the week when to schedule maintenance.
- preferred
Time String - Preferred time (UTC) of the day when to schedule maintenance.
- automatic
Updates string - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- instance
Id number - The CloudAMQP instance ID.
- preferred
Day string - Preferred day of the week when to schedule maintenance.
- preferred
Time 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 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.
- automatic
Updates String - Allow scheduling of a maintenance for version update once a new LavinMQ version been released.
- instance
Id Number - The CloudAMQP instance ID.
- preferred
Day String - Preferred day of the week when to schedule maintenance.
- preferred
Time 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>`
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.