tencentcloud.CynosdbRollBackCluster
Explore with Pulumi AI
Provides a resource to create a cynosdb roll_back_cluster
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const rollBackCluster = new tencentcloud.CynosdbRollBackCluster("rollBackCluster", {
clusterId: "cynosdbmysql-bws8h88b",
expectTimeThresh: 0,
rollbackDatabases: [{
newDatabase: "users_bak_1",
oldDatabase: "users",
}],
rollbackId: 732725,
rollbackMode: "full",
rollbackStrategy: "snapRollback",
rollbackTables: [{
database: "tf_ci_test",
tables: [{
newTable: "test_bak_111",
oldTable: "test",
}],
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
roll_back_cluster = tencentcloud.CynosdbRollBackCluster("rollBackCluster",
cluster_id="cynosdbmysql-bws8h88b",
expect_time_thresh=0,
rollback_databases=[{
"new_database": "users_bak_1",
"old_database": "users",
}],
rollback_id=732725,
rollback_mode="full",
rollback_strategy="snapRollback",
rollback_tables=[{
"database": "tf_ci_test",
"tables": [{
"new_table": "test_bak_111",
"old_table": "test",
}],
}])
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.NewCynosdbRollBackCluster(ctx, "rollBackCluster", &tencentcloud.CynosdbRollBackClusterArgs{
ClusterId: pulumi.String("cynosdbmysql-bws8h88b"),
ExpectTimeThresh: pulumi.Float64(0),
RollbackDatabases: tencentcloud.CynosdbRollBackClusterRollbackDatabaseArray{
&tencentcloud.CynosdbRollBackClusterRollbackDatabaseArgs{
NewDatabase: pulumi.String("users_bak_1"),
OldDatabase: pulumi.String("users"),
},
},
RollbackId: pulumi.Float64(732725),
RollbackMode: pulumi.String("full"),
RollbackStrategy: pulumi.String("snapRollback"),
RollbackTables: tencentcloud.CynosdbRollBackClusterRollbackTableArray{
&tencentcloud.CynosdbRollBackClusterRollbackTableArgs{
Database: pulumi.String("tf_ci_test"),
Tables: tencentcloud.CynosdbRollBackClusterRollbackTableTableArray{
&tencentcloud.CynosdbRollBackClusterRollbackTableTableArgs{
NewTable: pulumi.String("test_bak_111"),
OldTable: pulumi.String("test"),
},
},
},
},
})
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 rollBackCluster = new Tencentcloud.CynosdbRollBackCluster("rollBackCluster", new()
{
ClusterId = "cynosdbmysql-bws8h88b",
ExpectTimeThresh = 0,
RollbackDatabases = new[]
{
new Tencentcloud.Inputs.CynosdbRollBackClusterRollbackDatabaseArgs
{
NewDatabase = "users_bak_1",
OldDatabase = "users",
},
},
RollbackId = 732725,
RollbackMode = "full",
RollbackStrategy = "snapRollback",
RollbackTables = new[]
{
new Tencentcloud.Inputs.CynosdbRollBackClusterRollbackTableArgs
{
Database = "tf_ci_test",
Tables = new[]
{
new Tencentcloud.Inputs.CynosdbRollBackClusterRollbackTableTableArgs
{
NewTable = "test_bak_111",
OldTable = "test",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CynosdbRollBackCluster;
import com.pulumi.tencentcloud.CynosdbRollBackClusterArgs;
import com.pulumi.tencentcloud.inputs.CynosdbRollBackClusterRollbackDatabaseArgs;
import com.pulumi.tencentcloud.inputs.CynosdbRollBackClusterRollbackTableArgs;
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 rollBackCluster = new CynosdbRollBackCluster("rollBackCluster", CynosdbRollBackClusterArgs.builder()
.clusterId("cynosdbmysql-bws8h88b")
.expectTimeThresh(0)
.rollbackDatabases(CynosdbRollBackClusterRollbackDatabaseArgs.builder()
.newDatabase("users_bak_1")
.oldDatabase("users")
.build())
.rollbackId(732725)
.rollbackMode("full")
.rollbackStrategy("snapRollback")
.rollbackTables(CynosdbRollBackClusterRollbackTableArgs.builder()
.database("tf_ci_test")
.tables(CynosdbRollBackClusterRollbackTableTableArgs.builder()
.newTable("test_bak_111")
.oldTable("test")
.build())
.build())
.build());
}
}
resources:
rollBackCluster:
type: tencentcloud:CynosdbRollBackCluster
properties:
clusterId: cynosdbmysql-bws8h88b
# expect_time = "2022-01-20 00:00:00"
expectTimeThresh: 0
rollbackDatabases:
- newDatabase: users_bak_1
oldDatabase: users
rollbackId: 732725
rollbackMode: full
rollbackStrategy: snapRollback
rollbackTables:
- database: tf_ci_test
tables:
- newTable: test_bak_111
oldTable: test
Create CynosdbRollBackCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CynosdbRollBackCluster(name: string, args: CynosdbRollBackClusterArgs, opts?: CustomResourceOptions);
@overload
def CynosdbRollBackCluster(resource_name: str,
args: CynosdbRollBackClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CynosdbRollBackCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
rollback_id: Optional[float] = None,
rollback_strategy: Optional[str] = None,
cynosdb_roll_back_cluster_id: Optional[str] = None,
expect_time: Optional[str] = None,
expect_time_thresh: Optional[float] = None,
rollback_databases: Optional[Sequence[CynosdbRollBackClusterRollbackDatabaseArgs]] = None,
rollback_mode: Optional[str] = None,
rollback_tables: Optional[Sequence[CynosdbRollBackClusterRollbackTableArgs]] = None)
func NewCynosdbRollBackCluster(ctx *Context, name string, args CynosdbRollBackClusterArgs, opts ...ResourceOption) (*CynosdbRollBackCluster, error)
public CynosdbRollBackCluster(string name, CynosdbRollBackClusterArgs args, CustomResourceOptions? opts = null)
public CynosdbRollBackCluster(String name, CynosdbRollBackClusterArgs args)
public CynosdbRollBackCluster(String name, CynosdbRollBackClusterArgs args, CustomResourceOptions options)
type: tencentcloud:CynosdbRollBackCluster
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 CynosdbRollBackClusterArgs
- 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 CynosdbRollBackClusterArgs
- 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 CynosdbRollBackClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CynosdbRollBackClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CynosdbRollBackClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CynosdbRollBackCluster 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 CynosdbRollBackCluster resource accepts the following input properties:
- Cluster
Id string - The ID of cluster.
- Rollback
Id double - Rollback ID.
- Rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- Cynosdb
Roll stringBack Cluster Id - ID of the resource.
- Expect
Time string - Expected rollback Time.
- Expect
Time doubleThresh - Expected Threshold (Obsolete).
- Rollback
Databases List<CynosdbRoll Back Cluster Rollback Database> - Database list.
- Rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- Rollback
Tables List<CynosdbRoll Back Cluster Rollback Table> - Table list.
- Cluster
Id string - The ID of cluster.
- Rollback
Id float64 - Rollback ID.
- Rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- Cynosdb
Roll stringBack Cluster Id - ID of the resource.
- Expect
Time string - Expected rollback Time.
- Expect
Time float64Thresh - Expected Threshold (Obsolete).
- Rollback
Databases []CynosdbRoll Back Cluster Rollback Database Args - Database list.
- Rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- Rollback
Tables []CynosdbRoll Back Cluster Rollback Table Args - Table list.
- cluster
Id String - The ID of cluster.
- rollback
Id Double - Rollback ID.
- rollback
Strategy String - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- cynosdb
Roll StringBack Cluster Id - ID of the resource.
- expect
Time String - Expected rollback Time.
- expect
Time DoubleThresh - Expected Threshold (Obsolete).
- rollback
Databases List<CynosdbRoll Back Cluster Rollback Database> - Database list.
- rollback
Mode String - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Tables List<CynosdbRoll Back Cluster Rollback Table> - Table list.
- cluster
Id string - The ID of cluster.
- rollback
Id number - Rollback ID.
- rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- cynosdb
Roll stringBack Cluster Id - ID of the resource.
- expect
Time string - Expected rollback Time.
- expect
Time numberThresh - Expected Threshold (Obsolete).
- rollback
Databases CynosdbRoll Back Cluster Rollback Database[] - Database list.
- rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Tables CynosdbRoll Back Cluster Rollback Table[] - Table list.
- cluster_
id str - The ID of cluster.
- rollback_
id float - Rollback ID.
- rollback_
strategy str - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- cynosdb_
roll_ strback_ cluster_ id - ID of the resource.
- expect_
time str - Expected rollback Time.
- expect_
time_ floatthresh - Expected Threshold (Obsolete).
- rollback_
databases Sequence[CynosdbRoll Back Cluster Rollback Database Args] - Database list.
- rollback_
mode str - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback_
tables Sequence[CynosdbRoll Back Cluster Rollback Table Args] - Table list.
- cluster
Id String - The ID of cluster.
- rollback
Id Number - Rollback ID.
- rollback
Strategy String - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- cynosdb
Roll StringBack Cluster Id - ID of the resource.
- expect
Time String - Expected rollback Time.
- expect
Time NumberThresh - Expected Threshold (Obsolete).
- rollback
Databases List<Property Map> - Database list.
- rollback
Mode String - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Tables List<Property Map> - Table list.
Outputs
All input properties are implicitly available as output properties. Additionally, the CynosdbRollBackCluster 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 CynosdbRollBackCluster Resource
Get an existing CynosdbRollBackCluster 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?: CynosdbRollBackClusterState, opts?: CustomResourceOptions): CynosdbRollBackCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
cynosdb_roll_back_cluster_id: Optional[str] = None,
expect_time: Optional[str] = None,
expect_time_thresh: Optional[float] = None,
rollback_databases: Optional[Sequence[CynosdbRollBackClusterRollbackDatabaseArgs]] = None,
rollback_id: Optional[float] = None,
rollback_mode: Optional[str] = None,
rollback_strategy: Optional[str] = None,
rollback_tables: Optional[Sequence[CynosdbRollBackClusterRollbackTableArgs]] = None) -> CynosdbRollBackCluster
func GetCynosdbRollBackCluster(ctx *Context, name string, id IDInput, state *CynosdbRollBackClusterState, opts ...ResourceOption) (*CynosdbRollBackCluster, error)
public static CynosdbRollBackCluster Get(string name, Input<string> id, CynosdbRollBackClusterState? state, CustomResourceOptions? opts = null)
public static CynosdbRollBackCluster get(String name, Output<String> id, CynosdbRollBackClusterState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CynosdbRollBackCluster 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.
- Cluster
Id string - The ID of cluster.
- Cynosdb
Roll stringBack Cluster Id - ID of the resource.
- Expect
Time string - Expected rollback Time.
- Expect
Time doubleThresh - Expected Threshold (Obsolete).
- Rollback
Databases List<CynosdbRoll Back Cluster Rollback Database> - Database list.
- Rollback
Id double - Rollback ID.
- Rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- Rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- Rollback
Tables List<CynosdbRoll Back Cluster Rollback Table> - Table list.
- Cluster
Id string - The ID of cluster.
- Cynosdb
Roll stringBack Cluster Id - ID of the resource.
- Expect
Time string - Expected rollback Time.
- Expect
Time float64Thresh - Expected Threshold (Obsolete).
- Rollback
Databases []CynosdbRoll Back Cluster Rollback Database Args - Database list.
- Rollback
Id float64 - Rollback ID.
- Rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- Rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- Rollback
Tables []CynosdbRoll Back Cluster Rollback Table Args - Table list.
- cluster
Id String - The ID of cluster.
- cynosdb
Roll StringBack Cluster Id - ID of the resource.
- expect
Time String - Expected rollback Time.
- expect
Time DoubleThresh - Expected Threshold (Obsolete).
- rollback
Databases List<CynosdbRoll Back Cluster Rollback Database> - Database list.
- rollback
Id Double - Rollback ID.
- rollback
Mode String - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Strategy String - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- rollback
Tables List<CynosdbRoll Back Cluster Rollback Table> - Table list.
- cluster
Id string - The ID of cluster.
- cynosdb
Roll stringBack Cluster Id - ID of the resource.
- expect
Time string - Expected rollback Time.
- expect
Time numberThresh - Expected Threshold (Obsolete).
- rollback
Databases CynosdbRoll Back Cluster Rollback Database[] - Database list.
- rollback
Id number - Rollback ID.
- rollback
Mode string - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Strategy string - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- rollback
Tables CynosdbRoll Back Cluster Rollback Table[] - Table list.
- cluster_
id str - The ID of cluster.
- cynosdb_
roll_ strback_ cluster_ id - ID of the resource.
- expect_
time str - Expected rollback Time.
- expect_
time_ floatthresh - Expected Threshold (Obsolete).
- rollback_
databases Sequence[CynosdbRoll Back Cluster Rollback Database Args] - Database list.
- rollback_
id float - Rollback ID.
- rollback_
mode str - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback_
strategy str - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- rollback_
tables Sequence[CynosdbRoll Back Cluster Rollback Table Args] - Table list.
- cluster
Id String - The ID of cluster.
- cynosdb
Roll StringBack Cluster Id - ID of the resource.
- expect
Time String - Expected rollback Time.
- expect
Time NumberThresh - Expected Threshold (Obsolete).
- rollback
Databases List<Property Map> - Database list.
- rollback
Id Number - Rollback ID.
- rollback
Mode String - Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
- rollback
Strategy String - Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
- rollback
Tables List<Property Map> - Table list.
Supporting Types
CynosdbRollBackClusterRollbackDatabase, CynosdbRollBackClusterRollbackDatabaseArgs
- New
Database string - New database name.
- Old
Database string - Old database name.
- New
Database string - New database name.
- Old
Database string - Old database name.
- new
Database String - New database name.
- old
Database String - Old database name.
- new
Database string - New database name.
- old
Database string - Old database name.
- new_
database str - New database name.
- old_
database str - Old database name.
- new
Database String - New database name.
- old
Database String - Old database name.
CynosdbRollBackClusterRollbackTable, CynosdbRollBackClusterRollbackTableArgs
- Database string
- New database name.
- Tables
List<Cynosdb
Roll Back Cluster Rollback Table Table> - Tables.
- Database string
- New database name.
- Tables
[]Cynosdb
Roll Back Cluster Rollback Table Table - Tables.
- database String
- New database name.
- tables
List<Cynosdb
Roll Back Cluster Rollback Table Table> - Tables.
- database string
- New database name.
- tables
Cynosdb
Roll Back Cluster Rollback Table Table[] - Tables.
- database str
- New database name.
- tables
Sequence[Cynosdb
Roll Back Cluster Rollback Table Table] - Tables.
- database String
- New database name.
- tables List<Property Map>
- Tables.
CynosdbRollBackClusterRollbackTableTable, CynosdbRollBackClusterRollbackTableTableArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.