1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CynosdbRollBackCluster
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CynosdbRollBackCluster

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    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:

    ClusterId string
    The ID of cluster.
    RollbackId double
    Rollback ID.
    RollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    CynosdbRollBackClusterId string
    ID of the resource.
    ExpectTime string
    Expected rollback Time.
    ExpectTimeThresh double
    Expected Threshold (Obsolete).
    RollbackDatabases List<CynosdbRollBackClusterRollbackDatabase>
    Database list.
    RollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    RollbackTables List<CynosdbRollBackClusterRollbackTable>
    Table list.
    ClusterId string
    The ID of cluster.
    RollbackId float64
    Rollback ID.
    RollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    CynosdbRollBackClusterId string
    ID of the resource.
    ExpectTime string
    Expected rollback Time.
    ExpectTimeThresh float64
    Expected Threshold (Obsolete).
    RollbackDatabases []CynosdbRollBackClusterRollbackDatabaseArgs
    Database list.
    RollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    RollbackTables []CynosdbRollBackClusterRollbackTableArgs
    Table list.
    clusterId String
    The ID of cluster.
    rollbackId Double
    Rollback ID.
    rollbackStrategy String
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    cynosdbRollBackClusterId String
    ID of the resource.
    expectTime String
    Expected rollback Time.
    expectTimeThresh Double
    Expected Threshold (Obsolete).
    rollbackDatabases List<CynosdbRollBackClusterRollbackDatabase>
    Database list.
    rollbackMode String
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackTables List<CynosdbRollBackClusterRollbackTable>
    Table list.
    clusterId string
    The ID of cluster.
    rollbackId number
    Rollback ID.
    rollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    cynosdbRollBackClusterId string
    ID of the resource.
    expectTime string
    Expected rollback Time.
    expectTimeThresh number
    Expected Threshold (Obsolete).
    rollbackDatabases CynosdbRollBackClusterRollbackDatabase[]
    Database list.
    rollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackTables CynosdbRollBackClusterRollbackTable[]
    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_back_cluster_id str
    ID of the resource.
    expect_time str
    Expected rollback Time.
    expect_time_thresh float
    Expected Threshold (Obsolete).
    rollback_databases Sequence[CynosdbRollBackClusterRollbackDatabaseArgs]
    Database list.
    rollback_mode str
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollback_tables Sequence[CynosdbRollBackClusterRollbackTableArgs]
    Table list.
    clusterId String
    The ID of cluster.
    rollbackId Number
    Rollback ID.
    rollbackStrategy String
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    cynosdbRollBackClusterId String
    ID of the resource.
    expectTime String
    Expected rollback Time.
    expectTimeThresh Number
    Expected Threshold (Obsolete).
    rollbackDatabases List<Property Map>
    Database list.
    rollbackMode String
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackTables 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.
    The following state arguments are supported:
    ClusterId string
    The ID of cluster.
    CynosdbRollBackClusterId string
    ID of the resource.
    ExpectTime string
    Expected rollback Time.
    ExpectTimeThresh double
    Expected Threshold (Obsolete).
    RollbackDatabases List<CynosdbRollBackClusterRollbackDatabase>
    Database list.
    RollbackId double
    Rollback ID.
    RollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    RollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    RollbackTables List<CynosdbRollBackClusterRollbackTable>
    Table list.
    ClusterId string
    The ID of cluster.
    CynosdbRollBackClusterId string
    ID of the resource.
    ExpectTime string
    Expected rollback Time.
    ExpectTimeThresh float64
    Expected Threshold (Obsolete).
    RollbackDatabases []CynosdbRollBackClusterRollbackDatabaseArgs
    Database list.
    RollbackId float64
    Rollback ID.
    RollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    RollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    RollbackTables []CynosdbRollBackClusterRollbackTableArgs
    Table list.
    clusterId String
    The ID of cluster.
    cynosdbRollBackClusterId String
    ID of the resource.
    expectTime String
    Expected rollback Time.
    expectTimeThresh Double
    Expected Threshold (Obsolete).
    rollbackDatabases List<CynosdbRollBackClusterRollbackDatabase>
    Database list.
    rollbackId Double
    Rollback ID.
    rollbackMode String
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackStrategy String
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    rollbackTables List<CynosdbRollBackClusterRollbackTable>
    Table list.
    clusterId string
    The ID of cluster.
    cynosdbRollBackClusterId string
    ID of the resource.
    expectTime string
    Expected rollback Time.
    expectTimeThresh number
    Expected Threshold (Obsolete).
    rollbackDatabases CynosdbRollBackClusterRollbackDatabase[]
    Database list.
    rollbackId number
    Rollback ID.
    rollbackMode string
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackStrategy string
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    rollbackTables CynosdbRollBackClusterRollbackTable[]
    Table list.
    cluster_id str
    The ID of cluster.
    cynosdb_roll_back_cluster_id str
    ID of the resource.
    expect_time str
    Expected rollback Time.
    expect_time_thresh float
    Expected Threshold (Obsolete).
    rollback_databases Sequence[CynosdbRollBackClusterRollbackDatabaseArgs]
    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[CynosdbRollBackClusterRollbackTableArgs]
    Table list.
    clusterId String
    The ID of cluster.
    cynosdbRollBackClusterId String
    ID of the resource.
    expectTime String
    Expected rollback Time.
    expectTimeThresh Number
    Expected Threshold (Obsolete).
    rollbackDatabases List<Property Map>
    Database list.
    rollbackId Number
    Rollback ID.
    rollbackMode String
    Rollback mode by time point, full: normal; Db: fast; Table: Extreme speed (default is normal).
    rollbackStrategy String
    Backfile policy timeRollback - Backfile by point in time snapRollback - Backfile by backup file.
    rollbackTables List<Property Map>
    Table list.

    Supporting Types

    CynosdbRollBackClusterRollbackDatabase, CynosdbRollBackClusterRollbackDatabaseArgs

    NewDatabase string
    New database name.
    OldDatabase string
    Old database name.
    NewDatabase string
    New database name.
    OldDatabase string
    Old database name.
    newDatabase String
    New database name.
    oldDatabase String
    Old database name.
    newDatabase string
    New database name.
    oldDatabase string
    Old database name.
    new_database str
    New database name.
    old_database str
    Old database name.
    newDatabase String
    New database name.
    oldDatabase String
    Old database name.

    CynosdbRollBackClusterRollbackTable, CynosdbRollBackClusterRollbackTableArgs

    database String
    New database name.
    tables List<Property Map>
    Tables.

    CynosdbRollBackClusterRollbackTableTable, CynosdbRollBackClusterRollbackTableTableArgs

    NewTable string
    New table name.
    OldTable string
    Old table name.
    NewTable string
    New table name.
    OldTable string
    Old table name.
    newTable String
    New table name.
    oldTable String
    Old table name.
    newTable string
    New table name.
    oldTable string
    Old table name.
    new_table str
    New table name.
    old_table str
    Old table name.
    newTable String
    New table name.
    oldTable String
    Old table name.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack