tencentcloud.SqlserverRollbackInstance
Explore with Pulumi AI
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:
- Instance
Id string - Instance ID.
- Rename
Restores List<SqlserverRollback Instance Rename Restore> - Rename the databases listed in ReNameRestoreDatabase.
- Time string
- Target time point for rollback.
- Sqlserver
Rollback stringInstance Id - ID of the resource.
- Instance
Id string - Instance ID.
- Rename
Restores []SqlserverRollback Instance Rename Restore Args - Rename the databases listed in ReNameRestoreDatabase.
- Time string
- Target time point for rollback.
- Sqlserver
Rollback stringInstance Id - ID of the resource.
- instance
Id String - Instance ID.
- rename
Restores List<SqlserverRollback Instance Rename Restore> - Rename the databases listed in ReNameRestoreDatabase.
- time String
- Target time point for rollback.
- sqlserver
Rollback StringInstance Id - ID of the resource.
- instance
Id string - Instance ID.
- rename
Restores SqlserverRollback Instance Rename Restore[] - Rename the databases listed in ReNameRestoreDatabase.
- time string
- Target time point for rollback.
- sqlserver
Rollback stringInstance Id - ID of the resource.
- instance_
id str - Instance ID.
- rename_
restores Sequence[SqlserverRollback Instance Rename Restore Args] - Rename the databases listed in ReNameRestoreDatabase.
- time str
- Target time point for rollback.
- sqlserver_
rollback_ strinstance_ id - ID of the resource.
- instance
Id String - Instance ID.
- rename
Restores List<Property Map> - Rename the databases listed in ReNameRestoreDatabase.
- time String
- Target time point for rollback.
- sqlserver
Rollback StringInstance Id - 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<Sqlserver
Rollback Instance Encryption> - TDE encryption,
enable
encrypted,disable
unencrypted. - Id string
- The provider-assigned unique ID for this managed resource.
- Encryptions
[]Sqlserver
Rollback Instance Encryption - TDE encryption,
enable
encrypted,disable
unencrypted. - Id string
- The provider-assigned unique ID for this managed resource.
- encryptions
List<Sqlserver
Rollback Instance Encryption> - TDE encryption,
enable
encrypted,disable
unencrypted. - id String
- The provider-assigned unique ID for this managed resource.
- encryptions
Sqlserver
Rollback Instance Encryption[] - TDE encryption,
enable
encrypted,disable
unencrypted. - id string
- The provider-assigned unique ID for this managed resource.
- encryptions
Sequence[Sqlserver
Rollback Instance Encryption] - 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.
- Encryptions
List<Sqlserver
Rollback Instance Encryption> - TDE encryption,
enable
encrypted,disable
unencrypted. - Instance
Id string - Instance ID.
- Rename
Restores List<SqlserverRollback Instance Rename Restore> - Rename the databases listed in ReNameRestoreDatabase.
- Sqlserver
Rollback stringInstance Id - ID of the resource.
- Time string
- Target time point for rollback.
- Encryptions
[]Sqlserver
Rollback Instance Encryption Args - TDE encryption,
enable
encrypted,disable
unencrypted. - Instance
Id string - Instance ID.
- Rename
Restores []SqlserverRollback Instance Rename Restore Args - Rename the databases listed in ReNameRestoreDatabase.
- Sqlserver
Rollback stringInstance Id - ID of the resource.
- Time string
- Target time point for rollback.
- encryptions
List<Sqlserver
Rollback Instance Encryption> - TDE encryption,
enable
encrypted,disable
unencrypted. - instance
Id String - Instance ID.
- rename
Restores List<SqlserverRollback Instance Rename Restore> - Rename the databases listed in ReNameRestoreDatabase.
- sqlserver
Rollback StringInstance Id - ID of the resource.
- time String
- Target time point for rollback.
- encryptions
Sqlserver
Rollback Instance Encryption[] - TDE encryption,
enable
encrypted,disable
unencrypted. - instance
Id string - Instance ID.
- rename
Restores SqlserverRollback Instance Rename Restore[] - Rename the databases listed in ReNameRestoreDatabase.
- sqlserver
Rollback stringInstance Id - ID of the resource.
- time string
- Target time point for rollback.
- encryptions
Sequence[Sqlserver
Rollback Instance Encryption Args] - TDE encryption,
enable
encrypted,disable
unencrypted. - instance_
id str - Instance ID.
- rename_
restores Sequence[SqlserverRollback Instance Rename Restore Args] - Rename the databases listed in ReNameRestoreDatabase.
- sqlserver_
rollback_ strinstance_ id - ID of the resource.
- time str
- Target time point for rollback.
- encryptions List<Property Map>
- TDE encryption,
enable
encrypted,disable
unencrypted. - instance
Id String - Instance ID.
- rename
Restores List<Property Map> - Rename the databases listed in ReNameRestoreDatabase.
- sqlserver
Rollback StringInstance Id - ID of the resource.
- time String
- Target time point for rollback.
Supporting Types
SqlserverRollbackInstanceEncryption, SqlserverRollbackInstanceEncryptionArgs
SqlserverRollbackInstanceRenameRestore, SqlserverRollbackInstanceRenameRestoreArgs
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.