published on Thursday, Nov 12, 2026 by planetscale
published on Thursday, Nov 12, 2026 by planetscale
PostgresBranchMaintenanceWindow Resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const myPostgresbranchmaintenancewindow = new planetscale.PostgresBranchMaintenanceWindow("my_postgresbranchmaintenancewindow", {
organization: "my-organization",
database: "my-database",
branch: "main",
day: 0,
hour: 3,
});
import pulumi
import pulumi_planetscale as planetscale
my_postgresbranchmaintenancewindow = planetscale.PostgresBranchMaintenanceWindow("my_postgresbranchmaintenancewindow",
organization="my-organization",
database="my-database",
branch="main",
day=0,
hour=3)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := planetscale.NewPostgresBranchMaintenanceWindow(ctx, "my_postgresbranchmaintenancewindow", &planetscale.PostgresBranchMaintenanceWindowArgs{
Organization: pulumi.String("my-organization"),
Database: pulumi.String("my-database"),
Branch: pulumi.String("main"),
Day: pulumi.Float64(0),
Hour: pulumi.Float64(3),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() =>
{
var myPostgresbranchmaintenancewindow = new Planetscale.PostgresBranchMaintenanceWindow("my_postgresbranchmaintenancewindow", new()
{
Organization = "my-organization",
Database = "my-database",
Branch = "main",
Day = 0,
Hour = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.PostgresBranchMaintenanceWindow;
import com.pulumi.planetscale.PostgresBranchMaintenanceWindowArgs;
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 myPostgresbranchmaintenancewindow = new PostgresBranchMaintenanceWindow("myPostgresbranchmaintenancewindow", PostgresBranchMaintenanceWindowArgs.builder()
.organization("my-organization")
.database("my-database")
.branch("main")
.day(0.0)
.hour(3.0)
.build());
}
}
resources:
myPostgresbranchmaintenancewindow:
type: planetscale:PostgresBranchMaintenanceWindow
name: my_postgresbranchmaintenancewindow
properties:
organization: my-organization
database: my-database
branch: main
day: 0
hour: 3
Example coming soon!
Create PostgresBranchMaintenanceWindow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresBranchMaintenanceWindow(name: string, args: PostgresBranchMaintenanceWindowArgs, opts?: CustomResourceOptions);@overload
def PostgresBranchMaintenanceWindow(resource_name: str,
args: PostgresBranchMaintenanceWindowArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresBranchMaintenanceWindow(resource_name: str,
opts: Optional[ResourceOptions] = None,
branch: Optional[str] = None,
database: Optional[str] = None,
day: Optional[float] = None,
hour: Optional[float] = None,
organization: Optional[str] = None)func NewPostgresBranchMaintenanceWindow(ctx *Context, name string, args PostgresBranchMaintenanceWindowArgs, opts ...ResourceOption) (*PostgresBranchMaintenanceWindow, error)public PostgresBranchMaintenanceWindow(string name, PostgresBranchMaintenanceWindowArgs args, CustomResourceOptions? opts = null)
public PostgresBranchMaintenanceWindow(String name, PostgresBranchMaintenanceWindowArgs args)
public PostgresBranchMaintenanceWindow(String name, PostgresBranchMaintenanceWindowArgs args, CustomResourceOptions options)
type: planetscale:PostgresBranchMaintenanceWindow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "planetscale_postgres_branch_maintenance_window" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresBranchMaintenanceWindowArgs
- 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 PostgresBranchMaintenanceWindowArgs
- 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 PostgresBranchMaintenanceWindowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresBranchMaintenanceWindowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresBranchMaintenanceWindowArgs
- 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 postgresBranchMaintenanceWindowResource = new Planetscale.PostgresBranchMaintenanceWindow("postgresBranchMaintenanceWindowResource", new()
{
Branch = "string",
Database = "string",
Day = 0.0,
Hour = 0.0,
Organization = "string",
});
example, err := planetscale.NewPostgresBranchMaintenanceWindow(ctx, "postgresBranchMaintenanceWindowResource", &planetscale.PostgresBranchMaintenanceWindowArgs{
Branch: pulumi.String("string"),
Database: pulumi.String("string"),
Day: pulumi.Float64(0),
Hour: pulumi.Float64(0),
Organization: pulumi.String("string"),
})
resource "planetscale_postgres_branch_maintenance_window" "postgresBranchMaintenanceWindowResource" {
lifecycle {
create_before_destroy = true
}
branch = "string"
database = "string"
day = 0
hour = 0
organization = "string"
}
var postgresBranchMaintenanceWindowResource = new PostgresBranchMaintenanceWindow("postgresBranchMaintenanceWindowResource", PostgresBranchMaintenanceWindowArgs.builder()
.branch("string")
.database("string")
.day(0.0)
.hour(0.0)
.organization("string")
.build());
postgres_branch_maintenance_window_resource = planetscale.PostgresBranchMaintenanceWindow("postgresBranchMaintenanceWindowResource",
branch="string",
database="string",
day=float(0),
hour=float(0),
organization="string")
const postgresBranchMaintenanceWindowResource = new planetscale.PostgresBranchMaintenanceWindow("postgresBranchMaintenanceWindowResource", {
branch: "string",
database: "string",
day: 0,
hour: 0,
organization: "string",
});
type: planetscale:PostgresBranchMaintenanceWindow
properties:
branch: string
database: string
day: 0
hour: 0
organization: string
PostgresBranchMaintenanceWindow 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 PostgresBranchMaintenanceWindow resource accepts the following input properties:
- Branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Day double
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- Hour double
- Hour of the day the window opens, in UTC, from 0 to 23.
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- Branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Day float64
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- Hour float64
- Hour of the day the window opens, in UTC, from 0 to 23.
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- hour number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch String
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day Double
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- hour Double
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- hour number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch str
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database str
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day float
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- hour float
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization str
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch String
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day Number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- hour Number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresBranchMaintenanceWindow resource produces the following output properties:
Look up Existing PostgresBranchMaintenanceWindow Resource
Get an existing PostgresBranchMaintenanceWindow 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?: PostgresBranchMaintenanceWindowState, opts?: CustomResourceOptions): PostgresBranchMaintenanceWindow@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
branch: Optional[str] = None,
database: Optional[str] = None,
day: Optional[float] = None,
duration: Optional[float] = None,
hour: Optional[float] = None,
organization: Optional[str] = None) -> PostgresBranchMaintenanceWindowfunc GetPostgresBranchMaintenanceWindow(ctx *Context, name string, id IDInput, state *PostgresBranchMaintenanceWindowState, opts ...ResourceOption) (*PostgresBranchMaintenanceWindow, error)public static PostgresBranchMaintenanceWindow Get(string name, Input<string> id, PostgresBranchMaintenanceWindowState? state, CustomResourceOptions? opts = null)public static PostgresBranchMaintenanceWindow get(String name, Output<String> id, PostgresBranchMaintenanceWindowState state, CustomResourceOptions options)resources: existingPostgresBranchMaintenanceWindow: type: planetscale:PostgresBranchMaintenanceWindow get: id: ${id}import {
to = planetscale_postgres_branch_maintenance_window.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state PostgresBranchMaintenanceWindowState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state PostgresBranchMaintenanceWindowState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state PostgresBranchMaintenanceWindowState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state PostgresBranchMaintenanceWindowState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Day double
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- Duration double
- The duration of the maintenance window in hours
- Hour double
- Hour of the day the window opens, in UTC, from 0 to 23.
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- Branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Day float64
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- Duration float64
- The duration of the maintenance window in hours
- Hour float64
- Hour of the day the window opens, in UTC, from 0 to 23.
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- duration number
- The duration of the maintenance window in hours
- hour number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch String
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day Double
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- duration Double
- The duration of the maintenance window in hours
- hour Double
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch string
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- duration number
- The duration of the maintenance window in hours
- hour number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch str
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database str
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day float
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- duration float
- The duration of the maintenance window in hours
- hour float
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization str
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
- branch String
- Branch name from
list_branches. Example:main. Requires replacement if changed. - database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - day Number
- Day of the week the window opens, in UTC, from 0 (Sunday) to 6 (Saturday).
- duration Number
- The duration of the maintenance window in hours
- hour Number
- Hour of the day the window opens, in UTC, from 0 to 23.
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = planetscale_postgres_branch_maintenance_window.my_planetscale_postgres_branch_maintenance_window
id = jsonencode({
branch = "..."
database = "..."
organization = "..."
})
}
The pulumi import command can be used, for example:
$ pulumi import planetscale:index/postgresBranchMaintenanceWindow:PostgresBranchMaintenanceWindow my_planetscale_postgres_branch_maintenance_window '{"branch": "...", "database": "...", "organization": "..."}'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
published on Thursday, Nov 12, 2026 by planetscale