tencentcloud.PostgresqlTimeWindow
Explore with Pulumi AI
Provides a resource to create a postgres postgresql_time_window
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const postgresqlTimeWindow = new tencentcloud.PostgresqlTimeWindow("postgresqlTimeWindow", {
dbInstanceId: "postgres-45b0vlmr",
maintainDuration: 2,
maintainStartTime: "04:00",
maintainWeekDays: [
"friday",
"monday",
"saturday",
"sunday",
"thursday",
"tuesday",
"wednesday",
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
postgresql_time_window = tencentcloud.PostgresqlTimeWindow("postgresqlTimeWindow",
db_instance_id="postgres-45b0vlmr",
maintain_duration=2,
maintain_start_time="04:00",
maintain_week_days=[
"friday",
"monday",
"saturday",
"sunday",
"thursday",
"tuesday",
"wednesday",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlTimeWindow(ctx, "postgresqlTimeWindow", &tencentcloud.PostgresqlTimeWindowArgs{
DbInstanceId: pulumi.String("postgres-45b0vlmr"),
MaintainDuration: pulumi.Float64(2),
MaintainStartTime: pulumi.String("04:00"),
MaintainWeekDays: pulumi.StringArray{
pulumi.String("friday"),
pulumi.String("monday"),
pulumi.String("saturday"),
pulumi.String("sunday"),
pulumi.String("thursday"),
pulumi.String("tuesday"),
pulumi.String("wednesday"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var postgresqlTimeWindow = new Tencentcloud.PostgresqlTimeWindow("postgresqlTimeWindow", new()
{
DbInstanceId = "postgres-45b0vlmr",
MaintainDuration = 2,
MaintainStartTime = "04:00",
MaintainWeekDays = new[]
{
"friday",
"monday",
"saturday",
"sunday",
"thursday",
"tuesday",
"wednesday",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlTimeWindow;
import com.pulumi.tencentcloud.PostgresqlTimeWindowArgs;
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 postgresqlTimeWindow = new PostgresqlTimeWindow("postgresqlTimeWindow", PostgresqlTimeWindowArgs.builder()
.dbInstanceId("postgres-45b0vlmr")
.maintainDuration(2)
.maintainStartTime("04:00")
.maintainWeekDays(
"friday",
"monday",
"saturday",
"sunday",
"thursday",
"tuesday",
"wednesday")
.build());
}
}
resources:
postgresqlTimeWindow:
type: tencentcloud:PostgresqlTimeWindow
properties:
dbInstanceId: postgres-45b0vlmr
maintainDuration: 2
maintainStartTime: 04:00
maintainWeekDays:
- friday
- monday
- saturday
- sunday
- thursday
- tuesday
- wednesday
Create PostgresqlTimeWindow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlTimeWindow(name: string, args: PostgresqlTimeWindowArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlTimeWindow(resource_name: str,
args: PostgresqlTimeWindowArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlTimeWindow(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
maintain_duration: Optional[float] = None,
maintain_start_time: Optional[str] = None,
maintain_week_days: Optional[Sequence[str]] = None,
postgresql_time_window_id: Optional[str] = None)
func NewPostgresqlTimeWindow(ctx *Context, name string, args PostgresqlTimeWindowArgs, opts ...ResourceOption) (*PostgresqlTimeWindow, error)
public PostgresqlTimeWindow(string name, PostgresqlTimeWindowArgs args, CustomResourceOptions? opts = null)
public PostgresqlTimeWindow(String name, PostgresqlTimeWindowArgs args)
public PostgresqlTimeWindow(String name, PostgresqlTimeWindowArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlTimeWindow
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 PostgresqlTimeWindowArgs
- 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 PostgresqlTimeWindowArgs
- 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 PostgresqlTimeWindowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlTimeWindowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlTimeWindowArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlTimeWindow 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 PostgresqlTimeWindow resource accepts the following input properties:
- Db
Instance stringId - Instance id.
- Maintain
Duration double - Maintenance duration, Unit: hours.
- Maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- Maintain
Week List<string>Days - Maintenance cycle.
- Postgresql
Time stringWindow Id - ID of the resource.
- Db
Instance stringId - Instance id.
- Maintain
Duration float64 - Maintenance duration, Unit: hours.
- Maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- Maintain
Week []stringDays - Maintenance cycle.
- Postgresql
Time stringWindow Id - ID of the resource.
- db
Instance StringId - Instance id.
- maintain
Duration Double - Maintenance duration, Unit: hours.
- maintain
Start StringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week List<String>Days - Maintenance cycle.
- postgresql
Time StringWindow Id - ID of the resource.
- db
Instance stringId - Instance id.
- maintain
Duration number - Maintenance duration, Unit: hours.
- maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week string[]Days - Maintenance cycle.
- postgresql
Time stringWindow Id - ID of the resource.
- db_
instance_ strid - Instance id.
- maintain_
duration float - Maintenance duration, Unit: hours.
- maintain_
start_ strtime - Maintenance start time. Time zone is UTC+8.
- maintain_
week_ Sequence[str]days - Maintenance cycle.
- postgresql_
time_ strwindow_ id - ID of the resource.
- db
Instance StringId - Instance id.
- maintain
Duration Number - Maintenance duration, Unit: hours.
- maintain
Start StringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week List<String>Days - Maintenance cycle.
- postgresql
Time StringWindow Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlTimeWindow 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 PostgresqlTimeWindow Resource
Get an existing PostgresqlTimeWindow 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?: PostgresqlTimeWindowState, opts?: CustomResourceOptions): PostgresqlTimeWindow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
maintain_duration: Optional[float] = None,
maintain_start_time: Optional[str] = None,
maintain_week_days: Optional[Sequence[str]] = None,
postgresql_time_window_id: Optional[str] = None) -> PostgresqlTimeWindow
func GetPostgresqlTimeWindow(ctx *Context, name string, id IDInput, state *PostgresqlTimeWindowState, opts ...ResourceOption) (*PostgresqlTimeWindow, error)
public static PostgresqlTimeWindow Get(string name, Input<string> id, PostgresqlTimeWindowState? state, CustomResourceOptions? opts = null)
public static PostgresqlTimeWindow get(String name, Output<String> id, PostgresqlTimeWindowState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlTimeWindow 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.
- Db
Instance stringId - Instance id.
- Maintain
Duration double - Maintenance duration, Unit: hours.
- Maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- Maintain
Week List<string>Days - Maintenance cycle.
- Postgresql
Time stringWindow Id - ID of the resource.
- Db
Instance stringId - Instance id.
- Maintain
Duration float64 - Maintenance duration, Unit: hours.
- Maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- Maintain
Week []stringDays - Maintenance cycle.
- Postgresql
Time stringWindow Id - ID of the resource.
- db
Instance StringId - Instance id.
- maintain
Duration Double - Maintenance duration, Unit: hours.
- maintain
Start StringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week List<String>Days - Maintenance cycle.
- postgresql
Time StringWindow Id - ID of the resource.
- db
Instance stringId - Instance id.
- maintain
Duration number - Maintenance duration, Unit: hours.
- maintain
Start stringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week string[]Days - Maintenance cycle.
- postgresql
Time stringWindow Id - ID of the resource.
- db_
instance_ strid - Instance id.
- maintain_
duration float - Maintenance duration, Unit: hours.
- maintain_
start_ strtime - Maintenance start time. Time zone is UTC+8.
- maintain_
week_ Sequence[str]days - Maintenance cycle.
- postgresql_
time_ strwindow_ id - ID of the resource.
- db
Instance StringId - Instance id.
- maintain
Duration Number - Maintenance duration, Unit: hours.
- maintain
Start StringTime - Maintenance start time. Time zone is UTC+8.
- maintain
Week List<String>Days - Maintenance cycle.
- postgresql
Time StringWindow Id - ID of the resource.
Import
postgres postgresql_time_window can be imported using the id, e.g.
$ pulumi import tencentcloud:index/postgresqlTimeWindow:PostgresqlTimeWindow postgresql_time_window instance_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.