Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine
volcengine.mongodb.Instance
Explore with Pulumi AI
Import
mongodb instance can be imported using the id, e.g.
$ pulumi import volcengine:mongodb/instance:Instance default mongo-replica-e405f8e2****
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Mongodb.Instance("foo", new()
{
ChargeType = "PostPaid",
DbEngineVersion = "MongoDB_4_0",
InstanceName = "mongo-replica-be9995d32e4a",
InstanceType = "ReplicaSet",
NodeSpec = "mongo.2c4g",
ProjectName = "default",
StorageSpaceGb = 20,
SubnetId = "subnet-rrx4ns6abw1sv0x57wq6h47",
SuperAccountPassword = "******",
Tags = new[]
{
new Volcengine.Mongodb.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
ZoneId = "cn-beijing-a",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/mongodb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mongodb.NewInstance(ctx, "foo", &mongodb.InstanceArgs{
ChargeType: pulumi.String("PostPaid"),
DbEngineVersion: pulumi.String("MongoDB_4_0"),
InstanceName: pulumi.String("mongo-replica-be9995d32e4a"),
InstanceType: pulumi.String("ReplicaSet"),
NodeSpec: pulumi.String("mongo.2c4g"),
ProjectName: pulumi.String("default"),
StorageSpaceGb: pulumi.Int(20),
SubnetId: pulumi.String("subnet-rrx4ns6abw1sv0x57wq6h47"),
SuperAccountPassword: pulumi.String("******"),
Tags: mongodb.InstanceTagArray{
&mongodb.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
ZoneId: pulumi.String("cn-beijing-a"),
})
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.mongodb.Instance;
import com.pulumi.volcengine.mongodb.InstanceArgs;
import com.pulumi.volcengine.mongodb.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) {
var foo = new Instance("foo", InstanceArgs.builder()
.chargeType("PostPaid")
.dbEngineVersion("MongoDB_4_0")
.instanceName("mongo-replica-be9995d32e4a")
.instanceType("ReplicaSet")
.nodeSpec("mongo.2c4g")
.projectName("default")
.storageSpaceGb(20)
.subnetId("subnet-rrx4ns6abw1sv0x57wq6h47")
.superAccountPassword("******")
.tags(InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.zoneId("cn-beijing-a")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.mongodb.Instance("foo",
charge_type="PostPaid",
db_engine_version="MongoDB_4_0",
instance_name="mongo-replica-be9995d32e4a",
instance_type="ReplicaSet",
node_spec="mongo.2c4g",
project_name="default",
storage_space_gb=20,
subnet_id="subnet-rrx4ns6abw1sv0x57wq6h47",
super_account_password="******",
tags=[volcengine.mongodb.InstanceTagArgs(
key="k1",
value="v1",
)],
zone_id="cn-beijing-a")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.mongodb.Instance("foo", {
chargeType: "PostPaid",
dbEngineVersion: "MongoDB_4_0",
instanceName: "mongo-replica-be9995d32e4a",
instanceType: "ReplicaSet",
nodeSpec: "mongo.2c4g",
projectName: "default",
storageSpaceGb: 20,
subnetId: "subnet-rrx4ns6abw1sv0x57wq6h47",
superAccountPassword: "******",
tags: [{
key: "k1",
value: "v1",
}],
zoneId: "cn-beijing-a",
});
resources:
foo:
type: volcengine:mongodb:Instance
properties:
chargeType: PostPaid
dbEngineVersion: MongoDB_4_0
instanceName: mongo-replica-be9995d32e4a
instanceType: ReplicaSet
nodeSpec: mongo.2c4g
projectName: default
# mongos_node_spec="mongo.mongos.2c4g"
# // mongos_node_number = 3
# // shard_number=3
storageSpaceGb: 20
subnetId: subnet-rrx4ns6abw1sv0x57wq6h47
superAccountPassword: '******'
tags:
- key: k1
value: v1
zoneId: cn-beijing-a
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,
node_spec: Optional[str] = None,
subnet_id: Optional[str] = None,
storage_space_gb: Optional[int] = None,
instance_type: Optional[str] = None,
project_name: Optional[str] = None,
mongos_node_number: Optional[int] = None,
mongos_node_spec: Optional[str] = None,
instance_name: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
auto_renew: Optional[bool] = None,
shard_number: Optional[int] = None,
db_engine_version: Optional[str] = None,
charge_type: Optional[str] = None,
super_account_password: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = 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:mongodb: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 exampleinstanceResourceResourceFromMongodbinstance = new Volcengine.Mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance", new()
{
NodeSpec = "string",
SubnetId = "string",
StorageSpaceGb = 0,
InstanceType = "string",
ProjectName = "string",
MongosNodeNumber = 0,
MongosNodeSpec = "string",
InstanceName = "string",
Period = 0,
PeriodUnit = "string",
AutoRenew = false,
ShardNumber = 0,
DbEngineVersion = "string",
ChargeType = "string",
SuperAccountPassword = "string",
Tags = new[]
{
new Volcengine.Mongodb.Inputs.InstanceTagArgs
{
Key = "string",
Value = "string",
},
},
VpcId = "string",
ZoneId = "string",
});
example, err := mongodb.NewInstance(ctx, "exampleinstanceResourceResourceFromMongodbinstance", &mongodb.InstanceArgs{
NodeSpec: pulumi.String("string"),
SubnetId: pulumi.String("string"),
StorageSpaceGb: pulumi.Int(0),
InstanceType: pulumi.String("string"),
ProjectName: pulumi.String("string"),
MongosNodeNumber: pulumi.Int(0),
MongosNodeSpec: pulumi.String("string"),
InstanceName: pulumi.String("string"),
Period: pulumi.Int(0),
PeriodUnit: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
ShardNumber: pulumi.Int(0),
DbEngineVersion: pulumi.String("string"),
ChargeType: pulumi.String("string"),
SuperAccountPassword: pulumi.String("string"),
Tags: mongodb.InstanceTagArray{
&mongodb.InstanceTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VpcId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromMongodbinstance = new Instance("exampleinstanceResourceResourceFromMongodbinstance", InstanceArgs.builder()
.nodeSpec("string")
.subnetId("string")
.storageSpaceGb(0)
.instanceType("string")
.projectName("string")
.mongosNodeNumber(0)
.mongosNodeSpec("string")
.instanceName("string")
.period(0)
.periodUnit("string")
.autoRenew(false)
.shardNumber(0)
.dbEngineVersion("string")
.chargeType("string")
.superAccountPassword("string")
.tags(InstanceTagArgs.builder()
.key("string")
.value("string")
.build())
.vpcId("string")
.zoneId("string")
.build());
exampleinstance_resource_resource_from_mongodbinstance = volcengine.mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance",
node_spec="string",
subnet_id="string",
storage_space_gb=0,
instance_type="string",
project_name="string",
mongos_node_number=0,
mongos_node_spec="string",
instance_name="string",
period=0,
period_unit="string",
auto_renew=False,
shard_number=0,
db_engine_version="string",
charge_type="string",
super_account_password="string",
tags=[volcengine.mongodb.InstanceTagArgs(
key="string",
value="string",
)],
vpc_id="string",
zone_id="string")
const exampleinstanceResourceResourceFromMongodbinstance = new volcengine.mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance", {
nodeSpec: "string",
subnetId: "string",
storageSpaceGb: 0,
instanceType: "string",
projectName: "string",
mongosNodeNumber: 0,
mongosNodeSpec: "string",
instanceName: "string",
period: 0,
periodUnit: "string",
autoRenew: false,
shardNumber: 0,
dbEngineVersion: "string",
chargeType: "string",
superAccountPassword: "string",
tags: [{
key: "string",
value: "string",
}],
vpcId: "string",
zoneId: "string",
});
type: volcengine:mongodb:Instance
properties:
autoRenew: false
chargeType: string
dbEngineVersion: string
instanceName: string
instanceType: string
mongosNodeNumber: 0
mongosNodeSpec: string
nodeSpec: string
period: 0
periodUnit: string
projectName: string
shardNumber: 0
storageSpaceGb: 0
subnetId: string
superAccountPassword: string
tags:
- key: string
value: string
vpcId: string
zoneId: 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:
- Node
Spec string - The spec of node.
- Storage
Space intGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- Subnet
Id string - The subnet id of instance.
- Auto
Renew bool - Whether to enable automatic renewal.
- Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - Db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - Instance
Name string - The instance name.
- Instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - Mongos
Node intNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - Period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - Period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- int
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - Super
Account stringPassword - The password of database account.
- List<Pulumi.
Volcengine. Mongodb. Inputs. Instance Tag> - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id string - The zone ID of instance.
- Node
Spec string - The spec of node.
- Storage
Space intGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- Subnet
Id string - The subnet id of instance.
- Auto
Renew bool - Whether to enable automatic renewal.
- Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - Db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - Instance
Name string - The instance name.
- Instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - Mongos
Node intNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - Period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - Period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- int
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - Super
Account stringPassword - The password of database account.
- []Instance
Tag Args - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id string - The zone ID of instance.
- node
Spec String - The spec of node.
- storage
Space IntegerGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id String - The subnet id of instance.
- auto
Renew Boolean - Whether to enable automatic renewal.
- charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - db
Engine StringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name String - The instance name.
- instance
Type String - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
Node IntegerNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - period Integer
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit String - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- Integer
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - super
Account StringPassword - The password of database account.
- List<Instance
Tag> - Tags.
- vpc
Id String - The vpc ID.
- zone
Id String - The zone ID of instance.
- node
Spec string - The spec of node.
- storage
Space numberGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id string - The subnet id of instance.
- auto
Renew boolean - Whether to enable automatic renewal.
- charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name string - The instance name.
- instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
Node numberNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - period number
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name string - The project name to which the instance belongs.
- number
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - super
Account stringPassword - The password of database account.
- Instance
Tag[] - Tags.
- vpc
Id string - The vpc ID.
- zone
Id string - The zone ID of instance.
- node_
spec str - The spec of node.
- storage_
space_ intgb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet_
id str - The subnet id of instance.
- auto_
renew bool - Whether to enable automatic renewal.
- charge_
type str - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - db_
engine_ strversion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance_
name str - The instance name.
- instance_
type str - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos_
node_ intnumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos_
node_ strspec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period_
unit str - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project_
name str - The project name to which the instance belongs.
- int
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - super_
account_ strpassword - The password of database account.
- Sequence[Instance
Tag Args] - Tags.
- vpc_
id str - The vpc ID.
- zone_
id str - The zone ID of instance.
- node
Spec String - The spec of node.
- storage
Space NumberGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id String - The subnet id of instance.
- auto
Renew Boolean - Whether to enable automatic renewal.
- charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - db
Engine StringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name String - The instance name.
- instance
Type String - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
Node NumberNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - period Number
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit String - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- Number
- The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - super
Account StringPassword - The password of database account.
- List<Property Map>
- Tags.
- vpc
Id String - The vpc ID.
- zone
Id String - The zone ID of instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mongos
List<Pulumi.
Volcengine. Mongodb. Outputs. Instance Mongo> - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- List<Pulumi.
Volcengine. Mongodb. Outputs. Instance Shard> - The shards information of the ShardedCluster instance.
- Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mongos
[]Instance
Mongo - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- []Instance
Shard - The shards information of the ShardedCluster instance.
- config
Servers StringId - The config servers id of the ShardedCluster instance.
- id String
- The provider-assigned unique ID for this managed resource.
- mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- List<Instance
Shard> - The shards information of the ShardedCluster instance.
- config
Servers stringId - The config servers id of the ShardedCluster instance.
- id string
- The provider-assigned unique ID for this managed resource.
- mongos
Instance
Mongo[] - The mongos information of the ShardedCluster instance.
- mongos
Id string - The mongos id of the ShardedCluster instance.
- Instance
Shard[] - The shards information of the ShardedCluster instance.
- config_
servers_ strid - The config servers id of the ShardedCluster instance.
- id str
- The provider-assigned unique ID for this managed resource.
- mongos
Sequence[Instance
Mongo] - The mongos information of the ShardedCluster instance.
- mongos_
id str - The mongos id of the ShardedCluster instance.
- Sequence[Instance
Shard] - The shards information of the ShardedCluster instance.
- config
Servers StringId - The config servers id of the ShardedCluster instance.
- id String
- The provider-assigned unique ID for this managed resource.
- mongos List<Property Map>
- The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- List<Property Map>
- The shards information of the ShardedCluster instance.
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,
auto_renew: Optional[bool] = None,
charge_type: Optional[str] = None,
config_servers_id: Optional[str] = None,
db_engine_version: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
mongos: Optional[Sequence[InstanceMongoArgs]] = None,
mongos_id: Optional[str] = None,
mongos_node_number: Optional[int] = None,
mongos_node_spec: Optional[str] = None,
node_spec: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
project_name: Optional[str] = None,
shard_number: Optional[int] = None,
shards: Optional[Sequence[InstanceShardArgs]] = None,
storage_space_gb: Optional[int] = None,
subnet_id: Optional[str] = None,
super_account_password: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = 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.
- Auto
Renew bool - Whether to enable automatic renewal.
- Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - Instance
Name string - The instance name.
- Instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - Mongos
List<Pulumi.
Volcengine. Mongodb. Inputs. Instance Mongo> - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Mongos
Node intNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - Node
Spec string - The spec of node.
- Period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - Period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- Shard
Number int - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - Shards
List<Pulumi.
Volcengine. Mongodb. Inputs. Instance Shard> - The shards information of the ShardedCluster instance.
- Storage
Space intGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- Subnet
Id string - The subnet id of instance.
- Super
Account stringPassword - The password of database account.
- List<Pulumi.
Volcengine. Mongodb. Inputs. Instance Tag> - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id string - The zone ID of instance.
- Auto
Renew bool - Whether to enable automatic renewal.
- Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - Instance
Name string - The instance name.
- Instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - Mongos
[]Instance
Mongo Args - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Mongos
Node intNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - Node
Spec string - The spec of node.
- Period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - Period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- Shard
Number int - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - Shards
[]Instance
Shard Args - The shards information of the ShardedCluster instance.
- Storage
Space intGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- Subnet
Id string - The subnet id of instance.
- Super
Account stringPassword - The password of database account.
- []Instance
Tag Args - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id string - The zone ID of instance.
- auto
Renew Boolean - Whether to enable automatic renewal.
- charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - config
Servers StringId - The config servers id of the ShardedCluster instance.
- db
Engine StringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name String - The instance name.
- instance
Type String - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- mongos
Node IntegerNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - node
Spec String - The spec of node.
- period Integer
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit String - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- shard
Number Integer - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - shards
List<Instance
Shard> - The shards information of the ShardedCluster instance.
- storage
Space IntegerGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id String - The subnet id of instance.
- super
Account StringPassword - The password of database account.
- List<Instance
Tag> - Tags.
- vpc
Id String - The vpc ID.
- zone
Id String - The zone ID of instance.
- auto
Renew boolean - Whether to enable automatic renewal.
- charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - config
Servers stringId - The config servers id of the ShardedCluster instance.
- db
Engine stringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name string - The instance name.
- instance
Type string - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
Instance
Mongo[] - The mongos information of the ShardedCluster instance.
- mongos
Id string - The mongos id of the ShardedCluster instance.
- mongos
Node numberNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - node
Spec string - The spec of node.
- period number
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit string - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name string - The project name to which the instance belongs.
- shard
Number number - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - shards
Instance
Shard[] - The shards information of the ShardedCluster instance.
- storage
Space numberGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id string - The subnet id of instance.
- super
Account stringPassword - The password of database account.
- Instance
Tag[] - Tags.
- vpc
Id string - The vpc ID.
- zone
Id string - The zone ID of instance.
- auto_
renew bool - Whether to enable automatic renewal.
- charge_
type str - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - config_
servers_ strid - The config servers id of the ShardedCluster instance.
- db_
engine_ strversion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance_
name str - The instance name.
- instance_
type str - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos
Sequence[Instance
Mongo Args] - The mongos information of the ShardedCluster instance.
- mongos_
id str - The mongos id of the ShardedCluster instance.
- mongos_
node_ intnumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos_
node_ strspec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - node_
spec str - The spec of node.
- period int
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period_
unit str - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project_
name str - The project name to which the instance belongs.
- shard_
number int - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - shards
Sequence[Instance
Shard Args] - The shards information of the ShardedCluster instance.
- storage_
space_ intgb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet_
id str - The subnet id of instance.
- super_
account_ strpassword - The password of database account.
- Sequence[Instance
Tag Args] - Tags.
- vpc_
id str - The vpc ID.
- zone_
id str - The zone ID of instance.
- auto
Renew Boolean - Whether to enable automatic renewal.
- charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. - config
Servers StringId - The config servers id of the ShardedCluster instance.
- db
Engine StringVersion - The version of db engine, valid value contains
MongoDB_4_0
,MongoDB_5_0
. - instance
Name String - The instance name.
- instance
Type String - The type of instance,the valid value contains
ReplicaSet
orShardedCluster
. - mongos List<Property Map>
- The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- mongos
Node NumberNumber - The mongos node number of shard cluster,value range is
2~23
, this parameter is required whenInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when
InstanceType
isShardedCluster
. - node
Spec String - The spec of node.
- period Number
- The instance purchase duration,the value range is
1~3
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
, this parameter is required whenChargeType
isPrepaid
. - period
Unit String - The period unit,valid value contains
Year
orMonth
, this parameter is required whenChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- shard
Number Number - The number of shards in shard cluster,value range is
2~32
, this parameter is required whenInstanceType
isShardedCluster
. - shards List<Property Map>
- The shards information of the ShardedCluster instance.
- storage
Space NumberGb - The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster, in GiB.
- subnet
Id String - The subnet id of instance.
- super
Account StringPassword - The password of database account.
- List<Property Map>
- Tags.
- vpc
Id String - The vpc ID.
- zone
Id String - The zone ID of instance.
Supporting Types
InstanceMongo, InstanceMongoArgs
- Mongos
Node stringId - The mongos node ID.
- Node
Spec string - The spec of node.
- Node
Status string - The node status.
- Mongos
Node stringId - The mongos node ID.
- Node
Spec string - The spec of node.
- Node
Status string - The node status.
- mongos
Node StringId - The mongos node ID.
- node
Spec String - The spec of node.
- node
Status String - The node status.
- mongos
Node stringId - The mongos node ID.
- node
Spec string - The spec of node.
- node
Status string - The node status.
- mongos_
node_ strid - The mongos node ID.
- node_
spec str - The spec of node.
- node_
status str - The node status.
- mongos
Node StringId - The mongos node ID.
- node
Spec String - The spec of node.
- node
Status String - The node status.
InstanceShard, InstanceShardArgs
- string
- The shard id.
- string
- The shard id.
- String
- The shard id.
- string
- The shard id.
- str
- The shard id.
- String
- The shard id.
InstanceTag, InstanceTagArgs
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.