tencentcloud.PostgresqlRebalanceReadonlyGroupOperation
Explore with Pulumi AI
Provides a resource to create a postgresql rebalance_readonly_group_operation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const groupRebalance = new tencentcloud.PostgresqlReadonlyGroup("groupRebalance", {
masterDbInstanceId: local.pgsql_id,
projectId: 0,
vpcId: "vpc-86v957zb",
subnetId: "subnet-enm92y0m",
replayLagEliminate: 1,
replayLatencyEliminate: 1,
maxReplayLag: 100,
maxReplayLatency: 512,
minDelayEliminateReserve: 1,
});
const rebalanceReadonlyGroupOperation = new tencentcloud.PostgresqlRebalanceReadonlyGroupOperation("rebalanceReadonlyGroupOperation", {readOnlyGroupId: groupRebalance.postgresqlReadonlyGroupId});
import pulumi
import pulumi_tencentcloud as tencentcloud
group_rebalance = tencentcloud.PostgresqlReadonlyGroup("groupRebalance",
master_db_instance_id=local["pgsql_id"],
project_id=0,
vpc_id="vpc-86v957zb",
subnet_id="subnet-enm92y0m",
replay_lag_eliminate=1,
replay_latency_eliminate=1,
max_replay_lag=100,
max_replay_latency=512,
min_delay_eliminate_reserve=1)
rebalance_readonly_group_operation = tencentcloud.PostgresqlRebalanceReadonlyGroupOperation("rebalanceReadonlyGroupOperation", read_only_group_id=group_rebalance.postgresql_readonly_group_id)
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 {
groupRebalance, err := tencentcloud.NewPostgresqlReadonlyGroup(ctx, "groupRebalance", &tencentcloud.PostgresqlReadonlyGroupArgs{
MasterDbInstanceId: pulumi.Any(local.Pgsql_id),
ProjectId: pulumi.Float64(0),
VpcId: pulumi.String("vpc-86v957zb"),
SubnetId: pulumi.String("subnet-enm92y0m"),
ReplayLagEliminate: pulumi.Float64(1),
ReplayLatencyEliminate: pulumi.Float64(1),
MaxReplayLag: pulumi.Float64(100),
MaxReplayLatency: pulumi.Float64(512),
MinDelayEliminateReserve: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = tencentcloud.NewPostgresqlRebalanceReadonlyGroupOperation(ctx, "rebalanceReadonlyGroupOperation", &tencentcloud.PostgresqlRebalanceReadonlyGroupOperationArgs{
ReadOnlyGroupId: groupRebalance.PostgresqlReadonlyGroupId,
})
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 groupRebalance = new Tencentcloud.PostgresqlReadonlyGroup("groupRebalance", new()
{
MasterDbInstanceId = local.Pgsql_id,
ProjectId = 0,
VpcId = "vpc-86v957zb",
SubnetId = "subnet-enm92y0m",
ReplayLagEliminate = 1,
ReplayLatencyEliminate = 1,
MaxReplayLag = 100,
MaxReplayLatency = 512,
MinDelayEliminateReserve = 1,
});
var rebalanceReadonlyGroupOperation = new Tencentcloud.PostgresqlRebalanceReadonlyGroupOperation("rebalanceReadonlyGroupOperation", new()
{
ReadOnlyGroupId = groupRebalance.PostgresqlReadonlyGroupId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlReadonlyGroup;
import com.pulumi.tencentcloud.PostgresqlReadonlyGroupArgs;
import com.pulumi.tencentcloud.PostgresqlRebalanceReadonlyGroupOperation;
import com.pulumi.tencentcloud.PostgresqlRebalanceReadonlyGroupOperationArgs;
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 groupRebalance = new PostgresqlReadonlyGroup("groupRebalance", PostgresqlReadonlyGroupArgs.builder()
.masterDbInstanceId(local.pgsql_id())
.projectId(0)
.vpcId("vpc-86v957zb")
.subnetId("subnet-enm92y0m")
.replayLagEliminate(1)
.replayLatencyEliminate(1)
.maxReplayLag(100)
.maxReplayLatency(512)
.minDelayEliminateReserve(1)
.build());
var rebalanceReadonlyGroupOperation = new PostgresqlRebalanceReadonlyGroupOperation("rebalanceReadonlyGroupOperation", PostgresqlRebalanceReadonlyGroupOperationArgs.builder()
.readOnlyGroupId(groupRebalance.postgresqlReadonlyGroupId())
.build());
}
}
resources:
groupRebalance:
type: tencentcloud:PostgresqlReadonlyGroup
properties:
masterDbInstanceId: ${local.pgsql_id}
projectId: 0
vpcId: vpc-86v957zb
subnetId: subnet-enm92y0m
replayLagEliminate: 1
replayLatencyEliminate: 1
maxReplayLag: 100
maxReplayLatency: 512
minDelayEliminateReserve: 1
rebalanceReadonlyGroupOperation:
type: tencentcloud:PostgresqlRebalanceReadonlyGroupOperation
properties:
readOnlyGroupId: ${groupRebalance.postgresqlReadonlyGroupId}
Create PostgresqlRebalanceReadonlyGroupOperation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlRebalanceReadonlyGroupOperation(name: string, args: PostgresqlRebalanceReadonlyGroupOperationArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlRebalanceReadonlyGroupOperation(resource_name: str,
args: PostgresqlRebalanceReadonlyGroupOperationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlRebalanceReadonlyGroupOperation(resource_name: str,
opts: Optional[ResourceOptions] = None,
read_only_group_id: Optional[str] = None,
postgresql_rebalance_readonly_group_operation_id: Optional[str] = None)
func NewPostgresqlRebalanceReadonlyGroupOperation(ctx *Context, name string, args PostgresqlRebalanceReadonlyGroupOperationArgs, opts ...ResourceOption) (*PostgresqlRebalanceReadonlyGroupOperation, error)
public PostgresqlRebalanceReadonlyGroupOperation(string name, PostgresqlRebalanceReadonlyGroupOperationArgs args, CustomResourceOptions? opts = null)
public PostgresqlRebalanceReadonlyGroupOperation(String name, PostgresqlRebalanceReadonlyGroupOperationArgs args)
public PostgresqlRebalanceReadonlyGroupOperation(String name, PostgresqlRebalanceReadonlyGroupOperationArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlRebalanceReadonlyGroupOperation
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 PostgresqlRebalanceReadonlyGroupOperationArgs
- 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 PostgresqlRebalanceReadonlyGroupOperationArgs
- 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 PostgresqlRebalanceReadonlyGroupOperationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlRebalanceReadonlyGroupOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlRebalanceReadonlyGroupOperationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlRebalanceReadonlyGroupOperation 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 PostgresqlRebalanceReadonlyGroupOperation resource accepts the following input properties:
- Read
Only stringGroup Id - readonly Group ID.
- Postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- Read
Only stringGroup Id - readonly Group ID.
- Postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- read
Only StringGroup Id - readonly Group ID.
- postgresql
Rebalance StringReadonly Group Operation Id - ID of the resource.
- read
Only stringGroup Id - readonly Group ID.
- postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- read_
only_ strgroup_ id - readonly Group ID.
- postgresql_
rebalance_ strreadonly_ group_ operation_ id - ID of the resource.
- read
Only StringGroup Id - readonly Group ID.
- postgresql
Rebalance StringReadonly Group Operation Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlRebalanceReadonlyGroupOperation 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 PostgresqlRebalanceReadonlyGroupOperation Resource
Get an existing PostgresqlRebalanceReadonlyGroupOperation 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?: PostgresqlRebalanceReadonlyGroupOperationState, opts?: CustomResourceOptions): PostgresqlRebalanceReadonlyGroupOperation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
postgresql_rebalance_readonly_group_operation_id: Optional[str] = None,
read_only_group_id: Optional[str] = None) -> PostgresqlRebalanceReadonlyGroupOperation
func GetPostgresqlRebalanceReadonlyGroupOperation(ctx *Context, name string, id IDInput, state *PostgresqlRebalanceReadonlyGroupOperationState, opts ...ResourceOption) (*PostgresqlRebalanceReadonlyGroupOperation, error)
public static PostgresqlRebalanceReadonlyGroupOperation Get(string name, Input<string> id, PostgresqlRebalanceReadonlyGroupOperationState? state, CustomResourceOptions? opts = null)
public static PostgresqlRebalanceReadonlyGroupOperation get(String name, Output<String> id, PostgresqlRebalanceReadonlyGroupOperationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlRebalanceReadonlyGroupOperation 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.
- Postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- Read
Only stringGroup Id - readonly Group ID.
- Postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- Read
Only stringGroup Id - readonly Group ID.
- postgresql
Rebalance StringReadonly Group Operation Id - ID of the resource.
- read
Only StringGroup Id - readonly Group ID.
- postgresql
Rebalance stringReadonly Group Operation Id - ID of the resource.
- read
Only stringGroup Id - readonly Group ID.
- postgresql_
rebalance_ strreadonly_ group_ operation_ id - ID of the resource.
- read_
only_ strgroup_ id - readonly Group ID.
- postgresql
Rebalance StringReadonly Group Operation Id - ID of the resource.
- read
Only StringGroup Id - readonly Group ID.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.