volcengine.rds_mssql.Instance
Explore with Pulumi AI
Provides a resource to manage rds mssql instance
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Rds_mssql.Instance("fooInstance", new()
{
DbEngineVersion = "SQLServer_2019_Std",
InstanceType = "HA",
NodeSpec = "rds.mssql.se.ha.d2.2c4g",
StorageSpace = 20,
SubnetIds = new[]
{
fooSubnet.Id,
},
SuperAccountPassword = "Tftest110",
InstanceName = "acc-test-mssql",
ProjectName = "default",
ChargeInfo = new Volcengine.Rds_mssql.Inputs.InstanceChargeInfoArgs
{
ChargeType = "PostPaid",
},
Tags = new[]
{
new Volcengine.Rds_mssql.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
BackupTime = "18:00Z-19:00Z",
FullBackupPeriods = new[]
{
"Monday",
"Tuesday",
},
BackupRetentionPeriod = 14,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_mssql"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
_, err = rds_mssql.NewInstance(ctx, "fooInstance", &rds_mssql.InstanceArgs{
DbEngineVersion: pulumi.String("SQLServer_2019_Std"),
InstanceType: pulumi.String("HA"),
NodeSpec: pulumi.String("rds.mssql.se.ha.d2.2c4g"),
StorageSpace: pulumi.Int(20),
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
SuperAccountPassword: pulumi.String("Tftest110"),
InstanceName: pulumi.String("acc-test-mssql"),
ProjectName: pulumi.String("default"),
ChargeInfo: &rds_mssql.InstanceChargeInfoArgs{
ChargeType: pulumi.String("PostPaid"),
},
Tags: rds_mssql.InstanceTagArray{
&rds_mssql.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
BackupTime: pulumi.String("18:00Z-19:00Z"),
FullBackupPeriods: pulumi.StringArray{
pulumi.String("Monday"),
pulumi.String("Tuesday"),
},
BackupRetentionPeriod: pulumi.Int(14),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.rds_mssql.Instance;
import com.pulumi.volcengine.rds_mssql.InstanceArgs;
import com.pulumi.volcengine.rds_mssql.inputs.InstanceChargeInfoArgs;
import com.pulumi.volcengine.rds_mssql.inputs.InstanceTagArgs;
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) {
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.dbEngineVersion("SQLServer_2019_Std")
.instanceType("HA")
.nodeSpec("rds.mssql.se.ha.d2.2c4g")
.storageSpace(20)
.subnetIds(fooSubnet.id())
.superAccountPassword("Tftest110")
.instanceName("acc-test-mssql")
.projectName("default")
.chargeInfo(InstanceChargeInfoArgs.builder()
.chargeType("PostPaid")
.build())
.tags(InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.backupTime("18:00Z-19:00Z")
.fullBackupPeriods(
"Monday",
"Tuesday")
.backupRetentionPeriod(14)
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.rds_mssql.Instance("fooInstance",
db_engine_version="SQLServer_2019_Std",
instance_type="HA",
node_spec="rds.mssql.se.ha.d2.2c4g",
storage_space=20,
subnet_ids=[foo_subnet.id],
super_account_password="Tftest110",
instance_name="acc-test-mssql",
project_name="default",
charge_info=volcengine.rds_mssql.InstanceChargeInfoArgs(
charge_type="PostPaid",
),
tags=[volcengine.rds_mssql.InstanceTagArgs(
key="k1",
value="v1",
)],
backup_time="18:00Z-19:00Z",
full_backup_periods=[
"Monday",
"Tuesday",
],
backup_retention_period=14)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.rds_mssql.Instance("fooInstance", {
dbEngineVersion: "SQLServer_2019_Std",
instanceType: "HA",
nodeSpec: "rds.mssql.se.ha.d2.2c4g",
storageSpace: 20,
subnetIds: [fooSubnet.id],
superAccountPassword: "Tftest110",
instanceName: "acc-test-mssql",
projectName: "default",
chargeInfo: {
chargeType: "PostPaid",
},
tags: [{
key: "k1",
value: "v1",
}],
backupTime: "18:00Z-19:00Z",
fullBackupPeriods: [
"Monday",
"Tuesday",
],
backupRetentionPeriod: 14,
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:rds_mssql:Instance
properties:
dbEngineVersion: SQLServer_2019_Std
instanceType: HA
nodeSpec: rds.mssql.se.ha.d2.2c4g
storageSpace: 20
subnetIds:
- ${fooSubnet.id}
superAccountPassword: Tftest110
instanceName: acc-test-mssql
projectName: default
chargeInfo:
chargeType: PostPaid
tags:
- key: k1
value: v1
backupTime: 18:00Z-19:00Z
fullBackupPeriods:
- Monday
- Tuesday
backupRetentionPeriod: 14
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_type: Optional[str] = None,
charge_info: Optional[InstanceChargeInfoArgs] = None,
db_engine_version: Optional[str] = None,
node_spec: Optional[str] = None,
storage_space: Optional[int] = None,
subnet_ids: Optional[Sequence[str]] = None,
super_account_password: Optional[str] = None,
backup_time: Optional[str] = None,
full_backup_periods: Optional[Sequence[str]] = None,
instance_name: Optional[str] = None,
backup_retention_period: Optional[int] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: volcengine:rds_mssql:Instance
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 InstanceArgs
- 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 InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleinstanceResourceResourceFromRds_mssqlinstance = new Volcengine.Rds_mssql.Instance("exampleinstanceResourceResourceFromRds_mssqlinstance", new()
{
InstanceType = "string",
ChargeInfo = new Volcengine.Rds_mssql.Inputs.InstanceChargeInfoArgs
{
ChargeType = "string",
AutoRenew = false,
ChargeEndTime = "string",
ChargeStartTime = "string",
ChargeStatus = "string",
OverdueReclaimTime = "string",
OverdueTime = "string",
Period = 0,
},
DbEngineVersion = "string",
NodeSpec = "string",
StorageSpace = 0,
SubnetIds = new[]
{
"string",
},
SuperAccountPassword = "string",
BackupTime = "string",
FullBackupPeriods = new[]
{
"string",
},
InstanceName = "string",
BackupRetentionPeriod = 0,
ProjectName = "string",
Tags = new[]
{
new Volcengine.Rds_mssql.Inputs.InstanceTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := rds_mssql.NewInstance(ctx, "exampleinstanceResourceResourceFromRds_mssqlinstance", &rds_mssql.InstanceArgs{
InstanceType: pulumi.String("string"),
ChargeInfo: &rds_mssql.InstanceChargeInfoArgs{
ChargeType: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
ChargeEndTime: pulumi.String("string"),
ChargeStartTime: pulumi.String("string"),
ChargeStatus: pulumi.String("string"),
OverdueReclaimTime: pulumi.String("string"),
OverdueTime: pulumi.String("string"),
Period: pulumi.Int(0),
},
DbEngineVersion: pulumi.String("string"),
NodeSpec: pulumi.String("string"),
StorageSpace: pulumi.Int(0),
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
SuperAccountPassword: pulumi.String("string"),
BackupTime: pulumi.String("string"),
FullBackupPeriods: pulumi.StringArray{
pulumi.String("string"),
},
InstanceName: pulumi.String("string"),
BackupRetentionPeriod: pulumi.Int(0),
ProjectName: pulumi.String("string"),
Tags: rds_mssql.InstanceTagArray{
&rds_mssql.InstanceTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var exampleinstanceResourceResourceFromRds_mssqlinstance = new Instance("exampleinstanceResourceResourceFromRds_mssqlinstance", InstanceArgs.builder()
.instanceType("string")
.chargeInfo(InstanceChargeInfoArgs.builder()
.chargeType("string")
.autoRenew(false)
.chargeEndTime("string")
.chargeStartTime("string")
.chargeStatus("string")
.overdueReclaimTime("string")
.overdueTime("string")
.period(0)
.build())
.dbEngineVersion("string")
.nodeSpec("string")
.storageSpace(0)
.subnetIds("string")
.superAccountPassword("string")
.backupTime("string")
.fullBackupPeriods("string")
.instanceName("string")
.backupRetentionPeriod(0)
.projectName("string")
.tags(InstanceTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
exampleinstance_resource_resource_from_rds_mssqlinstance = volcengine.rds_mssql.Instance("exampleinstanceResourceResourceFromRds_mssqlinstance",
instance_type="string",
charge_info=volcengine.rds_mssql.InstanceChargeInfoArgs(
charge_type="string",
auto_renew=False,
charge_end_time="string",
charge_start_time="string",
charge_status="string",
overdue_reclaim_time="string",
overdue_time="string",
period=0,
),
db_engine_version="string",
node_spec="string",
storage_space=0,
subnet_ids=["string"],
super_account_password="string",
backup_time="string",
full_backup_periods=["string"],
instance_name="string",
backup_retention_period=0,
project_name="string",
tags=[volcengine.rds_mssql.InstanceTagArgs(
key="string",
value="string",
)])
const exampleinstanceResourceResourceFromRds_mssqlinstance = new volcengine.rds_mssql.Instance("exampleinstanceResourceResourceFromRds_mssqlinstance", {
instanceType: "string",
chargeInfo: {
chargeType: "string",
autoRenew: false,
chargeEndTime: "string",
chargeStartTime: "string",
chargeStatus: "string",
overdueReclaimTime: "string",
overdueTime: "string",
period: 0,
},
dbEngineVersion: "string",
nodeSpec: "string",
storageSpace: 0,
subnetIds: ["string"],
superAccountPassword: "string",
backupTime: "string",
fullBackupPeriods: ["string"],
instanceName: "string",
backupRetentionPeriod: 0,
projectName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcengine:rds_mssql:Instance
properties:
backupRetentionPeriod: 0
backupTime: string
chargeInfo:
autoRenew: false
chargeEndTime: string
chargeStartTime: string
chargeStatus: string
chargeType: string
overdueReclaimTime: string
overdueTime: string
period: 0
dbEngineVersion: string
fullBackupPeriods:
- string
instanceName: string
instanceType: string
nodeSpec: string
projectName: string
storageSpace: 0
subnetIds:
- string
superAccountPassword: string
tags:
- key: string
value: string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Instance resource accepts the following input properties:
- Charge
Info InstanceCharge Info - The charge info.
- Db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - Instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - Node
Spec string - The node specification.
- Storage
Space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- Subnet
Ids List<string> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- Super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Backup
Retention intPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- Backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- Full
Backup List<string>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- Instance
Name string - Name of the instance.
- Project
Name string - The project name.
- List<Instance
Tag> - Tags.
- Charge
Info InstanceCharge Info Args - The charge info.
- Db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - Instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - Node
Spec string - The node specification.
- Storage
Space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- Subnet
Ids []string - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- Super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Backup
Retention intPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- Backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- Full
Backup []stringPeriods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- Instance
Name string - Name of the instance.
- Project
Name string - The project name.
- []Instance
Tag Args - Tags.
- charge
Info InstanceCharge Info - The charge info.
- db
Engine StringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - instance
Type String - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec String - The node specification.
- storage
Space Integer - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids List<String> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account StringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- backup
Retention IntegerPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time String - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- full
Backup List<String>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name String - Name of the instance.
- project
Name String - The project name.
- List<Instance
Tag> - Tags.
- charge
Info InstanceCharge Info - The charge info.
- db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec string - The node specification.
- storage
Space number - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids string[] - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- backup
Retention numberPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- full
Backup string[]Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name string - Name of the instance.
- project
Name string - The project name.
- Instance
Tag[] - Tags.
- charge_
info InstanceCharge Info Args - The charge info.
- db_
engine_ strversion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - instance_
type str - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node_
spec str - The node specification.
- storage_
space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet_
ids Sequence[str] - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super_
account_ strpassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- backup_
retention_ intperiod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup_
time str - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- full_
backup_ Sequence[str]periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance_
name str - Name of the instance.
- project_
name str - The project name.
- Sequence[Instance
Tag Args] - Tags.
- charge
Info Property Map - The charge info.
- db
Engine StringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - instance
Type String - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec String - The node specification.
- storage
Space Number - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids List<String> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account StringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- backup
Retention NumberPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time String - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- full
Backup List<String>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name String - Name of the instance.
- project
Name String - The project name.
- List<Property Map>
- Tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance 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 Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_retention_period: Optional[int] = None,
backup_time: Optional[str] = None,
charge_info: Optional[InstanceChargeInfoArgs] = None,
db_engine_version: Optional[str] = None,
full_backup_periods: Optional[Sequence[str]] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
node_spec: Optional[str] = None,
project_name: Optional[str] = None,
storage_space: Optional[int] = None,
subnet_ids: Optional[Sequence[str]] = None,
super_account_password: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Backup
Retention intPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- Backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- Charge
Info InstanceCharge Info - The charge info.
- Db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - Full
Backup List<string>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- Instance
Name string - Name of the instance.
- Instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - Node
Spec string - The node specification.
- Project
Name string - The project name.
- Storage
Space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- Subnet
Ids List<string> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- Super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- List<Instance
Tag> - Tags.
- Backup
Retention intPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- Backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- Charge
Info InstanceCharge Info Args - The charge info.
- Db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - Full
Backup []stringPeriods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- Instance
Name string - Name of the instance.
- Instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - Node
Spec string - The node specification.
- Project
Name string - The project name.
- Storage
Space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- Subnet
Ids []string - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- Super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- []Instance
Tag Args - Tags.
- backup
Retention IntegerPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time String - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- charge
Info InstanceCharge Info - The charge info.
- db
Engine StringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - full
Backup List<String>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name String - Name of the instance.
- instance
Type String - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec String - The node specification.
- project
Name String - The project name.
- storage
Space Integer - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids List<String> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account StringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- List<Instance
Tag> - Tags.
- backup
Retention numberPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time string - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- charge
Info InstanceCharge Info - The charge info.
- db
Engine stringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - full
Backup string[]Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name string - Name of the instance.
- instance
Type string - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec string - The node specification.
- project
Name string - The project name.
- storage
Space number - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids string[] - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account stringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Instance
Tag[] - Tags.
- backup_
retention_ intperiod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup_
time str - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- charge_
info InstanceCharge Info Args - The charge info.
- db_
engine_ strversion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - full_
backup_ Sequence[str]periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance_
name str - Name of the instance.
- instance_
type str - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node_
spec str - The node specification.
- project_
name str - The project name.
- storage_
space int - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet_
ids Sequence[str] - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super_
account_ strpassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Sequence[Instance
Tag Args] - Tags.
- backup
Retention NumberPeriod - Data backup retention days, value range: 7~30. This field is valid and required when updating the backup plan of instance.
- backup
Time String - The time window for starting the backup task is one hour interval. This field is valid and required when updating the backup plan of instance.
- charge
Info Property Map - The charge info.
- db
Engine StringVersion - The Compatible version. Valid values:
SQLServer_2019_Std
,SQLServer_2019_Web
,SQLServer_2019_Ent
. - full
Backup List<String>Periods - Full backup cycle. Multiple values separated by commas. The values are as follows: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This field is valid and required when updating the backup plan of instance.
- instance
Name String - Name of the instance.
- instance
Type String - The Instance type. When the value of the
db_engine_version
isSQLServer_2019_Std
, the value of this field can beHA
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Ent
, the value of this field can beCluster
orBasic
.When the value of thedb_engine_version
isSQLServer_2019_Web
, the value of this field can beBasic
. - node
Spec String - The node specification.
- project
Name String - The project name.
- storage
Space Number - Storage space size, measured in GiB. The range of values is 20GiB to 4000GiB, with a step size of 10GiB.
- subnet
Ids List<String> - The subnet id of the instance node. When creating an instance that includes primary and backup nodes and needs to deploy primary and backup nodes across availability zones, you can specify two subnet_id. By default, the first is the primary node availability zone, and the second is the backup node availability zone.
- super
Account StringPassword - The super account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- List<Property Map>
- Tags.
Supporting Types
InstanceChargeInfo, InstanceChargeInfoArgs
- Charge
Type string - The charge type. Valid values:
PostPaid
,PrePaid
. - Auto
Renew bool - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - Charge
End stringTime - Charge
Start stringTime - Charge
Status string - Overdue
Reclaim stringTime - Overdue
Time string - Period int
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
- Charge
Type string - The charge type. Valid values:
PostPaid
,PrePaid
. - Auto
Renew bool - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - Charge
End stringTime - Charge
Start stringTime - Charge
Status string - Overdue
Reclaim stringTime - Overdue
Time string - Period int
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
- charge
Type String - The charge type. Valid values:
PostPaid
,PrePaid
. - auto
Renew Boolean - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - charge
End StringTime - charge
Start StringTime - charge
Status String - overdue
Reclaim StringTime - overdue
Time String - period Integer
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
- charge
Type string - The charge type. Valid values:
PostPaid
,PrePaid
. - auto
Renew boolean - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - charge
End stringTime - charge
Start stringTime - charge
Status string - overdue
Reclaim stringTime - overdue
Time string - period number
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
- charge_
type str - The charge type. Valid values:
PostPaid
,PrePaid
. - auto_
renew bool - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - charge_
end_ strtime - charge_
start_ strtime - charge_
status str - overdue_
reclaim_ strtime - overdue_
time str - period int
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
- charge
Type String - The charge type. Valid values:
PostPaid
,PrePaid
. - auto
Renew Boolean - Whether to enable automatic renewal in the prepaid scenario. This parameter can be set when the ChargeType is
Prepaid
. - charge
End StringTime - charge
Start StringTime - charge
Status String - overdue
Reclaim StringTime - overdue
Time String - period Number
- Purchase duration in a prepaid scenario. This parameter is required when the ChargeType is
Prepaid
.
InstanceTag, InstanceTagArgs
Import
Rds Mssql Instance can be imported using the id, e.g.
$ pulumi import volcengine:rds_mssql/instance:Instance default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.