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

tencentcloud.SqlserverRollbackInstance

Explore with Pulumi AI

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

    Provides a resource to create a sqlserver rollback_instance

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const rollbackInstance = new tencentcloud.SqlserverRollbackInstance("rollbackInstance", {
        instanceId: "mssql-qelbzgwf",
        renameRestores: [{
            newName: "rollback_pubsub_db3",
            oldName: "keep_pubsub_db2",
        }],
        time: "2023-05-23 01:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    rollback_instance = tencentcloud.SqlserverRollbackInstance("rollbackInstance",
        instance_id="mssql-qelbzgwf",
        rename_restores=[{
            "new_name": "rollback_pubsub_db3",
            "old_name": "keep_pubsub_db2",
        }],
        time="2023-05-23 01:00:00")
    
    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.NewSqlserverRollbackInstance(ctx, "rollbackInstance", &tencentcloud.SqlserverRollbackInstanceArgs{
    			InstanceId: pulumi.String("mssql-qelbzgwf"),
    			RenameRestores: tencentcloud.SqlserverRollbackInstanceRenameRestoreArray{
    				&tencentcloud.SqlserverRollbackInstanceRenameRestoreArgs{
    					NewName: pulumi.String("rollback_pubsub_db3"),
    					OldName: pulumi.String("keep_pubsub_db2"),
    				},
    			},
    			Time: pulumi.String("2023-05-23 01:00:00"),
    		})
    		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 rollbackInstance = new Tencentcloud.SqlserverRollbackInstance("rollbackInstance", new()
        {
            InstanceId = "mssql-qelbzgwf",
            RenameRestores = new[]
            {
                new Tencentcloud.Inputs.SqlserverRollbackInstanceRenameRestoreArgs
                {
                    NewName = "rollback_pubsub_db3",
                    OldName = "keep_pubsub_db2",
                },
            },
            Time = "2023-05-23 01:00:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.SqlserverRollbackInstance;
    import com.pulumi.tencentcloud.SqlserverRollbackInstanceArgs;
    import com.pulumi.tencentcloud.inputs.SqlserverRollbackInstanceRenameRestoreArgs;
    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 rollbackInstance = new SqlserverRollbackInstance("rollbackInstance", SqlserverRollbackInstanceArgs.builder()
                .instanceId("mssql-qelbzgwf")
                .renameRestores(SqlserverRollbackInstanceRenameRestoreArgs.builder()
                    .newName("rollback_pubsub_db3")
                    .oldName("keep_pubsub_db2")
                    .build())
                .time("2023-05-23 01:00:00")
                .build());
    
        }
    }
    
    resources:
      rollbackInstance:
        type: tencentcloud:SqlserverRollbackInstance
        properties:
          instanceId: mssql-qelbzgwf
          renameRestores:
            - newName: rollback_pubsub_db3
              oldName: keep_pubsub_db2
          time: 2023-05-23 01:00:00
    

    Create SqlserverRollbackInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SqlserverRollbackInstance(name: string, args: SqlserverRollbackInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def SqlserverRollbackInstance(resource_name: str,
                                  args: SqlserverRollbackInstanceArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SqlserverRollbackInstance(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  instance_id: Optional[str] = None,
                                  rename_restores: Optional[Sequence[SqlserverRollbackInstanceRenameRestoreArgs]] = None,
                                  time: Optional[str] = None,
                                  sqlserver_rollback_instance_id: Optional[str] = None)
    func NewSqlserverRollbackInstance(ctx *Context, name string, args SqlserverRollbackInstanceArgs, opts ...ResourceOption) (*SqlserverRollbackInstance, error)
    public SqlserverRollbackInstance(string name, SqlserverRollbackInstanceArgs args, CustomResourceOptions? opts = null)
    public SqlserverRollbackInstance(String name, SqlserverRollbackInstanceArgs args)
    public SqlserverRollbackInstance(String name, SqlserverRollbackInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:SqlserverRollbackInstance
    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 SqlserverRollbackInstanceArgs
    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 SqlserverRollbackInstanceArgs
    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 SqlserverRollbackInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlserverRollbackInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SqlserverRollbackInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SqlserverRollbackInstance 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 SqlserverRollbackInstance resource accepts the following input properties:

    InstanceId string
    Instance ID.
    RenameRestores List<SqlserverRollbackInstanceRenameRestore>
    Rename the databases listed in ReNameRestoreDatabase.
    Time string
    Target time point for rollback.
    SqlserverRollbackInstanceId string
    ID of the resource.
    InstanceId string
    Instance ID.
    RenameRestores []SqlserverRollbackInstanceRenameRestoreArgs
    Rename the databases listed in ReNameRestoreDatabase.
    Time string
    Target time point for rollback.
    SqlserverRollbackInstanceId string
    ID of the resource.
    instanceId String
    Instance ID.
    renameRestores List<SqlserverRollbackInstanceRenameRestore>
    Rename the databases listed in ReNameRestoreDatabase.
    time String
    Target time point for rollback.
    sqlserverRollbackInstanceId String
    ID of the resource.
    instanceId string
    Instance ID.
    renameRestores SqlserverRollbackInstanceRenameRestore[]
    Rename the databases listed in ReNameRestoreDatabase.
    time string
    Target time point for rollback.
    sqlserverRollbackInstanceId string
    ID of the resource.
    instance_id str
    Instance ID.
    rename_restores Sequence[SqlserverRollbackInstanceRenameRestoreArgs]
    Rename the databases listed in ReNameRestoreDatabase.
    time str
    Target time point for rollback.
    sqlserver_rollback_instance_id str
    ID of the resource.
    instanceId String
    Instance ID.
    renameRestores List<Property Map>
    Rename the databases listed in ReNameRestoreDatabase.
    time String
    Target time point for rollback.
    sqlserverRollbackInstanceId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SqlserverRollbackInstance resource produces the following output properties:

    Encryptions List<SqlserverRollbackInstanceEncryption>
    TDE encryption, enable encrypted, disable unencrypted.
    Id string
    The provider-assigned unique ID for this managed resource.
    Encryptions []SqlserverRollbackInstanceEncryption
    TDE encryption, enable encrypted, disable unencrypted.
    Id string
    The provider-assigned unique ID for this managed resource.
    encryptions List<SqlserverRollbackInstanceEncryption>
    TDE encryption, enable encrypted, disable unencrypted.
    id String
    The provider-assigned unique ID for this managed resource.
    encryptions SqlserverRollbackInstanceEncryption[]
    TDE encryption, enable encrypted, disable unencrypted.
    id string
    The provider-assigned unique ID for this managed resource.
    encryptions Sequence[SqlserverRollbackInstanceEncryption]
    TDE encryption, enable encrypted, disable unencrypted.
    id str
    The provider-assigned unique ID for this managed resource.
    encryptions List<Property Map>
    TDE encryption, enable encrypted, disable unencrypted.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SqlserverRollbackInstance Resource

    Get an existing SqlserverRollbackInstance 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?: SqlserverRollbackInstanceState, opts?: CustomResourceOptions): SqlserverRollbackInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            encryptions: Optional[Sequence[SqlserverRollbackInstanceEncryptionArgs]] = None,
            instance_id: Optional[str] = None,
            rename_restores: Optional[Sequence[SqlserverRollbackInstanceRenameRestoreArgs]] = None,
            sqlserver_rollback_instance_id: Optional[str] = None,
            time: Optional[str] = None) -> SqlserverRollbackInstance
    func GetSqlserverRollbackInstance(ctx *Context, name string, id IDInput, state *SqlserverRollbackInstanceState, opts ...ResourceOption) (*SqlserverRollbackInstance, error)
    public static SqlserverRollbackInstance Get(string name, Input<string> id, SqlserverRollbackInstanceState? state, CustomResourceOptions? opts = null)
    public static SqlserverRollbackInstance get(String name, Output<String> id, SqlserverRollbackInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:SqlserverRollbackInstance    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:
    Encryptions List<SqlserverRollbackInstanceEncryption>
    TDE encryption, enable encrypted, disable unencrypted.
    InstanceId string
    Instance ID.
    RenameRestores List<SqlserverRollbackInstanceRenameRestore>
    Rename the databases listed in ReNameRestoreDatabase.
    SqlserverRollbackInstanceId string
    ID of the resource.
    Time string
    Target time point for rollback.
    Encryptions []SqlserverRollbackInstanceEncryptionArgs
    TDE encryption, enable encrypted, disable unencrypted.
    InstanceId string
    Instance ID.
    RenameRestores []SqlserverRollbackInstanceRenameRestoreArgs
    Rename the databases listed in ReNameRestoreDatabase.
    SqlserverRollbackInstanceId string
    ID of the resource.
    Time string
    Target time point for rollback.
    encryptions List<SqlserverRollbackInstanceEncryption>
    TDE encryption, enable encrypted, disable unencrypted.
    instanceId String
    Instance ID.
    renameRestores List<SqlserverRollbackInstanceRenameRestore>
    Rename the databases listed in ReNameRestoreDatabase.
    sqlserverRollbackInstanceId String
    ID of the resource.
    time String
    Target time point for rollback.
    encryptions SqlserverRollbackInstanceEncryption[]
    TDE encryption, enable encrypted, disable unencrypted.
    instanceId string
    Instance ID.
    renameRestores SqlserverRollbackInstanceRenameRestore[]
    Rename the databases listed in ReNameRestoreDatabase.
    sqlserverRollbackInstanceId string
    ID of the resource.
    time string
    Target time point for rollback.
    encryptions Sequence[SqlserverRollbackInstanceEncryptionArgs]
    TDE encryption, enable encrypted, disable unencrypted.
    instance_id str
    Instance ID.
    rename_restores Sequence[SqlserverRollbackInstanceRenameRestoreArgs]
    Rename the databases listed in ReNameRestoreDatabase.
    sqlserver_rollback_instance_id str
    ID of the resource.
    time str
    Target time point for rollback.
    encryptions List<Property Map>
    TDE encryption, enable encrypted, disable unencrypted.
    instanceId String
    Instance ID.
    renameRestores List<Property Map>
    Rename the databases listed in ReNameRestoreDatabase.
    sqlserverRollbackInstanceId String
    ID of the resource.
    time String
    Target time point for rollback.

    Supporting Types

    SqlserverRollbackInstanceEncryption, SqlserverRollbackInstanceEncryptionArgs

    DbName string
    Database name.
    Status string
    encryption, enable encrypted, disable unencrypted.
    DbName string
    Database name.
    Status string
    encryption, enable encrypted, disable unencrypted.
    dbName String
    Database name.
    status String
    encryption, enable encrypted, disable unencrypted.
    dbName string
    Database name.
    status string
    encryption, enable encrypted, disable unencrypted.
    db_name str
    Database name.
    status str
    encryption, enable encrypted, disable unencrypted.
    dbName String
    Database name.
    status String
    encryption, enable encrypted, disable unencrypted.

    SqlserverRollbackInstanceRenameRestore, SqlserverRollbackInstanceRenameRestoreArgs

    NewName string
    New database name.
    OldName string
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.
    NewName string
    New database name.
    OldName string
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.
    newName String
    New database name.
    oldName String
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.
    newName string
    New database name.
    oldName string
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.
    new_name str
    New database name.
    old_name str
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.
    newName String
    New database name.
    oldName String
    Database name. If the OldName database does not exist, a failure will be returned. It can be left empty in offline migration tasks.

    Import

    sqlserver rollback_instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/sqlserverRollbackInstance:SqlserverRollbackInstance rollback_instance mssql-qelbzgwf#2023-05-23 01:00:00#keep_pubsub_db2#rollback_pubsub_db3
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack