alicloud.mongodb.ServerlessInstance
Explore with Pulumi AI
Provides a MongoDB Serverless Instance resource.
For information about MongoDB Serverless Instance and how to use it, see What is Serverless Instance.
NOTE: Deprecated since v1.214.0.
DEPRECATED: This resource has been deprecated from version
1.214.0
.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.mongodb.getZones({});
const defaultGetNetworks = alicloud.vpc.getNetworks({
nameRegex: "default-NODELETING",
});
const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
vpcId: defaultGetNetworks.ids?.[0],
zoneId: _default.zones?.[0]?.id,
}));
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({});
const example = new alicloud.mongodb.ServerlessInstance("example", {
accountPassword: "Abc12345",
dbInstanceDescription: "example_value",
dbInstanceStorage: 5,
storageEngine: "WiredTiger",
capacityUnit: 100,
engine: "MongoDB",
resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.groups?.[0]?.id),
engineVersion: "4.2",
period: 1,
periodPriceType: "Month",
vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
zoneId: _default.then(_default => _default.zones?.[0]?.id),
vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
tags: {
Created: "MongodbServerlessInstance",
For: "TF",
},
securityIpGroups: [{
securityIpGroupAttribute: "example_value",
securityIpGroupName: "example_value",
securityIpList: "192.168.0.1",
}],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.mongodb.get_zones()
default_get_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
zone_id=default.zones[0].id)
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups()
example = alicloud.mongodb.ServerlessInstance("example",
account_password="Abc12345",
db_instance_description="example_value",
db_instance_storage=5,
storage_engine="WiredTiger",
capacity_unit=100,
engine="MongoDB",
resource_group_id=default_get_resource_groups.groups[0].id,
engine_version="4.2",
period=1,
period_price_type="Month",
vpc_id=default_get_networks.ids[0],
zone_id=default.zones[0].id,
vswitch_id=default_get_switches.ids[0],
tags={
"Created": "MongodbServerlessInstance",
"For": "TF",
},
security_ip_groups=[{
"security_ip_group_attribute": "example_value",
"security_ip_group_name": "example_value",
"security_ip_list": "192.168.0.1",
}])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mongodb"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := mongodb.GetZones(ctx, nil, nil)
if err != nil {
return err
}
defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("default-NODELETING"),
}, nil)
if err != nil {
return err
}
defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(defaultGetNetworks.Ids[0]),
ZoneId: pulumi.StringRef(_default.Zones[0].Id),
}, nil)
if err != nil {
return err
}
defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
_, err = mongodb.NewServerlessInstance(ctx, "example", &mongodb.ServerlessInstanceArgs{
AccountPassword: pulumi.String("Abc12345"),
DbInstanceDescription: pulumi.String("example_value"),
DbInstanceStorage: pulumi.Int(5),
StorageEngine: pulumi.String("WiredTiger"),
CapacityUnit: pulumi.Int(100),
Engine: pulumi.String("MongoDB"),
ResourceGroupId: pulumi.String(defaultGetResourceGroups.Groups[0].Id),
EngineVersion: pulumi.String("4.2"),
Period: pulumi.Int(1),
PeriodPriceType: pulumi.String("Month"),
VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
ZoneId: pulumi.String(_default.Zones[0].Id),
VswitchId: pulumi.String(defaultGetSwitches.Ids[0]),
Tags: pulumi.StringMap{
"Created": pulumi.String("MongodbServerlessInstance"),
"For": pulumi.String("TF"),
},
SecurityIpGroups: mongodb.ServerlessInstanceSecurityIpGroupArray{
&mongodb.ServerlessInstanceSecurityIpGroupArgs{
SecurityIpGroupAttribute: pulumi.String("example_value"),
SecurityIpGroupName: pulumi.String("example_value"),
SecurityIpList: pulumi.String("192.168.0.1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.MongoDB.GetZones.Invoke();
var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "default-NODELETING",
});
var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var example = new AliCloud.MongoDB.ServerlessInstance("example", new()
{
AccountPassword = "Abc12345",
DbInstanceDescription = "example_value",
DbInstanceStorage = 5,
StorageEngine = "WiredTiger",
CapacityUnit = 100,
Engine = "MongoDB",
ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
EngineVersion = "4.2",
Period = 1,
PeriodPriceType = "Month",
VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
Tags =
{
{ "Created", "MongodbServerlessInstance" },
{ "For", "TF" },
},
SecurityIpGroups = new[]
{
new AliCloud.MongoDB.Inputs.ServerlessInstanceSecurityIpGroupArgs
{
SecurityIpGroupAttribute = "example_value",
SecurityIpGroupName = "example_value",
SecurityIpList = "192.168.0.1",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mongodb.MongodbFunctions;
import com.pulumi.alicloud.mongodb.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.mongodb.ServerlessInstance;
import com.pulumi.alicloud.mongodb.ServerlessInstanceArgs;
import com.pulumi.alicloud.mongodb.inputs.ServerlessInstanceSecurityIpGroupArgs;
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 default = MongodbFunctions.getZones();
final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("default-NODELETING")
.build());
final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.zoneId(default_.zones()[0].id())
.build());
final var defaultGetResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var example = new ServerlessInstance("example", ServerlessInstanceArgs.builder()
.accountPassword("Abc12345")
.dbInstanceDescription("example_value")
.dbInstanceStorage(5)
.storageEngine("WiredTiger")
.capacityUnit(100)
.engine("MongoDB")
.resourceGroupId(defaultGetResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
.engineVersion("4.2")
.period(1)
.periodPriceType("Month")
.vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.zoneId(default_.zones()[0].id())
.vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
.tags(Map.ofEntries(
Map.entry("Created", "MongodbServerlessInstance"),
Map.entry("For", "TF")
))
.securityIpGroups(ServerlessInstanceSecurityIpGroupArgs.builder()
.securityIpGroupAttribute("example_value")
.securityIpGroupName("example_value")
.securityIpList("192.168.0.1")
.build())
.build());
}
}
resources:
example:
type: alicloud:mongodb:ServerlessInstance
properties:
accountPassword: Abc12345
dbInstanceDescription: example_value
dbInstanceStorage: 5
storageEngine: WiredTiger
capacityUnit: 100
engine: MongoDB
resourceGroupId: ${defaultGetResourceGroups.groups[0].id}
engineVersion: '4.2'
period: 1
periodPriceType: Month
vpcId: ${defaultGetNetworks.ids[0]}
zoneId: ${default.zones[0].id}
vswitchId: ${defaultGetSwitches.ids[0]}
tags:
Created: MongodbServerlessInstance
For: TF
securityIpGroups:
- securityIpGroupAttribute: example_value
securityIpGroupName: example_value
securityIpList: 192.168.0.1
variables:
default:
fn::invoke:
Function: alicloud:mongodb:getZones
Arguments: {}
defaultGetNetworks:
fn::invoke:
Function: alicloud:vpc:getNetworks
Arguments:
nameRegex: default-NODELETING
defaultGetSwitches:
fn::invoke:
Function: alicloud:vpc:getSwitches
Arguments:
vpcId: ${defaultGetNetworks.ids[0]}
zoneId: ${default.zones[0].id}
defaultGetResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
Create ServerlessInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerlessInstance(name: string, args: ServerlessInstanceArgs, opts?: CustomResourceOptions);
@overload
def ServerlessInstance(resource_name: str,
args: ServerlessInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerlessInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_password: Optional[str] = None,
zone_id: Optional[str] = None,
capacity_unit: Optional[int] = None,
vswitch_id: Optional[str] = None,
db_instance_storage: Optional[int] = None,
vpc_id: Optional[str] = None,
engine_version: Optional[str] = None,
maintain_start_time: Optional[str] = None,
maintain_end_time: Optional[str] = None,
period: Optional[int] = None,
period_price_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
security_ip_groups: Optional[Sequence[ServerlessInstanceSecurityIpGroupArgs]] = None,
storage_engine: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
engine: Optional[str] = None,
db_instance_description: Optional[str] = None,
auto_renew: Optional[bool] = None)
func NewServerlessInstance(ctx *Context, name string, args ServerlessInstanceArgs, opts ...ResourceOption) (*ServerlessInstance, error)
public ServerlessInstance(string name, ServerlessInstanceArgs args, CustomResourceOptions? opts = null)
public ServerlessInstance(String name, ServerlessInstanceArgs args)
public ServerlessInstance(String name, ServerlessInstanceArgs args, CustomResourceOptions options)
type: alicloud:mongodb:ServerlessInstance
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 ServerlessInstanceArgs
- 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 ServerlessInstanceArgs
- 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 ServerlessInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerlessInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerlessInstanceArgs
- 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 serverlessInstanceResource = new AliCloud.MongoDB.ServerlessInstance("serverlessInstanceResource", new()
{
AccountPassword = "string",
ZoneId = "string",
CapacityUnit = 0,
VswitchId = "string",
DbInstanceStorage = 0,
VpcId = "string",
EngineVersion = "string",
MaintainStartTime = "string",
MaintainEndTime = "string",
Period = 0,
PeriodPriceType = "string",
ResourceGroupId = "string",
SecurityIpGroups = new[]
{
new AliCloud.MongoDB.Inputs.ServerlessInstanceSecurityIpGroupArgs
{
SecurityIpGroupAttribute = "string",
SecurityIpGroupName = "string",
SecurityIpList = "string",
},
},
StorageEngine = "string",
Tags =
{
{ "string", "string" },
},
Engine = "string",
DbInstanceDescription = "string",
AutoRenew = false,
});
example, err := mongodb.NewServerlessInstance(ctx, "serverlessInstanceResource", &mongodb.ServerlessInstanceArgs{
AccountPassword: pulumi.String("string"),
ZoneId: pulumi.String("string"),
CapacityUnit: pulumi.Int(0),
VswitchId: pulumi.String("string"),
DbInstanceStorage: pulumi.Int(0),
VpcId: pulumi.String("string"),
EngineVersion: pulumi.String("string"),
MaintainStartTime: pulumi.String("string"),
MaintainEndTime: pulumi.String("string"),
Period: pulumi.Int(0),
PeriodPriceType: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
SecurityIpGroups: mongodb.ServerlessInstanceSecurityIpGroupArray{
&mongodb.ServerlessInstanceSecurityIpGroupArgs{
SecurityIpGroupAttribute: pulumi.String("string"),
SecurityIpGroupName: pulumi.String("string"),
SecurityIpList: pulumi.String("string"),
},
},
StorageEngine: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Engine: pulumi.String("string"),
DbInstanceDescription: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
})
var serverlessInstanceResource = new ServerlessInstance("serverlessInstanceResource", ServerlessInstanceArgs.builder()
.accountPassword("string")
.zoneId("string")
.capacityUnit(0)
.vswitchId("string")
.dbInstanceStorage(0)
.vpcId("string")
.engineVersion("string")
.maintainStartTime("string")
.maintainEndTime("string")
.period(0)
.periodPriceType("string")
.resourceGroupId("string")
.securityIpGroups(ServerlessInstanceSecurityIpGroupArgs.builder()
.securityIpGroupAttribute("string")
.securityIpGroupName("string")
.securityIpList("string")
.build())
.storageEngine("string")
.tags(Map.of("string", "string"))
.engine("string")
.dbInstanceDescription("string")
.autoRenew(false)
.build());
serverless_instance_resource = alicloud.mongodb.ServerlessInstance("serverlessInstanceResource",
account_password="string",
zone_id="string",
capacity_unit=0,
vswitch_id="string",
db_instance_storage=0,
vpc_id="string",
engine_version="string",
maintain_start_time="string",
maintain_end_time="string",
period=0,
period_price_type="string",
resource_group_id="string",
security_ip_groups=[alicloud.mongodb.ServerlessInstanceSecurityIpGroupArgs(
security_ip_group_attribute="string",
security_ip_group_name="string",
security_ip_list="string",
)],
storage_engine="string",
tags={
"string": "string",
},
engine="string",
db_instance_description="string",
auto_renew=False)
const serverlessInstanceResource = new alicloud.mongodb.ServerlessInstance("serverlessInstanceResource", {
accountPassword: "string",
zoneId: "string",
capacityUnit: 0,
vswitchId: "string",
dbInstanceStorage: 0,
vpcId: "string",
engineVersion: "string",
maintainStartTime: "string",
maintainEndTime: "string",
period: 0,
periodPriceType: "string",
resourceGroupId: "string",
securityIpGroups: [{
securityIpGroupAttribute: "string",
securityIpGroupName: "string",
securityIpList: "string",
}],
storageEngine: "string",
tags: {
string: "string",
},
engine: "string",
dbInstanceDescription: "string",
autoRenew: false,
});
type: alicloud:mongodb:ServerlessInstance
properties:
accountPassword: string
autoRenew: false
capacityUnit: 0
dbInstanceDescription: string
dbInstanceStorage: 0
engine: string
engineVersion: string
maintainEndTime: string
maintainStartTime: string
period: 0
periodPriceType: string
resourceGroupId: string
securityIpGroups:
- securityIpGroupAttribute: string
securityIpGroupName: string
securityIpList: string
storageEngine: string
tags:
string: string
vpcId: string
vswitchId: string
zoneId: string
ServerlessInstance 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 ServerlessInstance resource accepts the following input properties:
- Account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- Capacity
Unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - Db
Instance intStorage - The db instance storage. Valid values:
1
to100
. - Engine
Version string - The database version number. Valid values:
4.2
. - Vpc
Id string - The ID of the VPC network.
- Vswitch
Id string - The of the vswitch.
- Zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- Auto
Renew bool - Set whether the instance is automatically renewed.
- Db
Instance stringDescription - The db instance description.
- Engine string
- The database engine of the instance. Valid values:
MongoDB
. - Maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - Maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - Period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - Period
Price stringType - The period price type. Valid values:
Day
,Month
. - Resource
Group stringId - The ID of the resource group.
- Security
Ip List<Pulumi.Groups Ali Cloud. Mongo DB. Inputs. Serverless Instance Security Ip Group> - An array that consists of the information of IP whitelists.
- Storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- Capacity
Unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - Db
Instance intStorage - The db instance storage. Valid values:
1
to100
. - Engine
Version string - The database version number. Valid values:
4.2
. - Vpc
Id string - The ID of the VPC network.
- Vswitch
Id string - The of the vswitch.
- Zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- Auto
Renew bool - Set whether the instance is automatically renewed.
- Db
Instance stringDescription - The db instance description.
- Engine string
- The database engine of the instance. Valid values:
MongoDB
. - Maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - Maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - Period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - Period
Price stringType - The period price type. Valid values:
Day
,Month
. - Resource
Group stringId - The ID of the resource group.
- Security
Ip []ServerlessGroups Instance Security Ip Group Args - An array that consists of the information of IP whitelists.
- Storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - map[string]string
- A mapping of tags to assign to the resource.
- account
Password String - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- capacity
Unit Integer - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance IntegerStorage - The db instance storage. Valid values:
1
to100
. - engine
Version String - The database version number. Valid values:
4.2
. - vpc
Id String - The ID of the VPC network.
- vswitch
Id String - The of the vswitch.
- zone
Id String - The ID of the zone. Use this parameter to specify the zone created by the instance.
- auto
Renew Boolean - Set whether the instance is automatically renewed.
- db
Instance StringDescription - The db instance description.
- engine String
- The database engine of the instance. Valid values:
MongoDB
. - maintain
End StringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start StringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period Integer
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price StringType - The period price type. Valid values:
Day
,Month
. - resource
Group StringId - The ID of the resource group.
- security
Ip List<ServerlessGroups Instance Security Ip Group> - An array that consists of the information of IP whitelists.
- storage
Engine String - The storage engine used by the instance. Valid values:
WiredTiger
. - Map<String,String>
- A mapping of tags to assign to the resource.
- account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- capacity
Unit number - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance numberStorage - The db instance storage. Valid values:
1
to100
. - engine
Version string - The database version number. Valid values:
4.2
. - vpc
Id string - The ID of the VPC network.
- vswitch
Id string - The of the vswitch.
- zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- auto
Renew boolean - Set whether the instance is automatically renewed.
- db
Instance stringDescription - The db instance description.
- engine string
- The database engine of the instance. Valid values:
MongoDB
. - maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period number
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price stringType - The period price type. Valid values:
Day
,Month
. - resource
Group stringId - The ID of the resource group.
- security
Ip ServerlessGroups Instance Security Ip Group[] - An array that consists of the information of IP whitelists.
- storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- account_
password str - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- capacity_
unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db_
instance_ intstorage - The db instance storage. Valid values:
1
to100
. - engine_
version str - The database version number. Valid values:
4.2
. - vpc_
id str - The ID of the VPC network.
- vswitch_
id str - The of the vswitch.
- zone_
id str - The ID of the zone. Use this parameter to specify the zone created by the instance.
- auto_
renew bool - Set whether the instance is automatically renewed.
- db_
instance_ strdescription - The db instance description.
- engine str
- The database engine of the instance. Valid values:
MongoDB
. - maintain_
end_ strtime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain_
start_ strtime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period_
price_ strtype - The period price type. Valid values:
Day
,Month
. - resource_
group_ strid - The ID of the resource group.
- security_
ip_ Sequence[Serverlessgroups Instance Security Ip Group Args] - An array that consists of the information of IP whitelists.
- storage_
engine str - The storage engine used by the instance. Valid values:
WiredTiger
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- account
Password String - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- capacity
Unit Number - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance NumberStorage - The db instance storage. Valid values:
1
to100
. - engine
Version String - The database version number. Valid values:
4.2
. - vpc
Id String - The ID of the VPC network.
- vswitch
Id String - The of the vswitch.
- zone
Id String - The ID of the zone. Use this parameter to specify the zone created by the instance.
- auto
Renew Boolean - Set whether the instance is automatically renewed.
- db
Instance StringDescription - The db instance description.
- engine String
- The database engine of the instance. Valid values:
MongoDB
. - maintain
End StringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start StringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period Number
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price StringType - The period price type. Valid values:
Day
,Month
. - resource
Group StringId - The ID of the resource group.
- security
Ip List<Property Map>Groups - An array that consists of the information of IP whitelists.
- storage
Engine String - The storage engine used by the instance. Valid values:
WiredTiger
. - Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerlessInstance resource produces the following output properties:
Look up Existing ServerlessInstance Resource
Get an existing ServerlessInstance 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?: ServerlessInstanceState, opts?: CustomResourceOptions): ServerlessInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_password: Optional[str] = None,
auto_renew: Optional[bool] = None,
capacity_unit: Optional[int] = None,
db_instance_description: Optional[str] = None,
db_instance_storage: Optional[int] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
maintain_end_time: Optional[str] = None,
maintain_start_time: Optional[str] = None,
period: Optional[int] = None,
period_price_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
security_ip_groups: Optional[Sequence[ServerlessInstanceSecurityIpGroupArgs]] = None,
status: Optional[str] = None,
storage_engine: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
zone_id: Optional[str] = None) -> ServerlessInstance
func GetServerlessInstance(ctx *Context, name string, id IDInput, state *ServerlessInstanceState, opts ...ResourceOption) (*ServerlessInstance, error)
public static ServerlessInstance Get(string name, Input<string> id, ServerlessInstanceState? state, CustomResourceOptions? opts = null)
public static ServerlessInstance get(String name, Output<String> id, ServerlessInstanceState 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.
- Account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- Auto
Renew bool - Set whether the instance is automatically renewed.
- Capacity
Unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - Db
Instance stringDescription - The db instance description.
- Db
Instance intStorage - The db instance storage. Valid values:
1
to100
. - Engine string
- The database engine of the instance. Valid values:
MongoDB
. - Engine
Version string - The database version number. Valid values:
4.2
. - Maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - Maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - Period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - Period
Price stringType - The period price type. Valid values:
Day
,Month
. - Resource
Group stringId - The ID of the resource group.
- Security
Ip List<Pulumi.Groups Ali Cloud. Mongo DB. Inputs. Serverless Instance Security Ip Group> - An array that consists of the information of IP whitelists.
- Status string
- The instance status. For more information, see the instance Status Table.
- Storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Vpc
Id string - The ID of the VPC network.
- Vswitch
Id string - The of the vswitch.
- Zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- Account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- Auto
Renew bool - Set whether the instance is automatically renewed.
- Capacity
Unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - Db
Instance stringDescription - The db instance description.
- Db
Instance intStorage - The db instance storage. Valid values:
1
to100
. - Engine string
- The database engine of the instance. Valid values:
MongoDB
. - Engine
Version string - The database version number. Valid values:
4.2
. - Maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - Maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - Period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - Period
Price stringType - The period price type. Valid values:
Day
,Month
. - Resource
Group stringId - The ID of the resource group.
- Security
Ip []ServerlessGroups Instance Security Ip Group Args - An array that consists of the information of IP whitelists.
- Status string
- The instance status. For more information, see the instance Status Table.
- Storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - map[string]string
- A mapping of tags to assign to the resource.
- Vpc
Id string - The ID of the VPC network.
- Vswitch
Id string - The of the vswitch.
- Zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- account
Password String - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- auto
Renew Boolean - Set whether the instance is automatically renewed.
- capacity
Unit Integer - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance StringDescription - The db instance description.
- db
Instance IntegerStorage - The db instance storage. Valid values:
1
to100
. - engine String
- The database engine of the instance. Valid values:
MongoDB
. - engine
Version String - The database version number. Valid values:
4.2
. - maintain
End StringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start StringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period Integer
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price StringType - The period price type. Valid values:
Day
,Month
. - resource
Group StringId - The ID of the resource group.
- security
Ip List<ServerlessGroups Instance Security Ip Group> - An array that consists of the information of IP whitelists.
- status String
- The instance status. For more information, see the instance Status Table.
- storage
Engine String - The storage engine used by the instance. Valid values:
WiredTiger
. - Map<String,String>
- A mapping of tags to assign to the resource.
- vpc
Id String - The ID of the VPC network.
- vswitch
Id String - The of the vswitch.
- zone
Id String - The ID of the zone. Use this parameter to specify the zone created by the instance.
- account
Password string - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- auto
Renew boolean - Set whether the instance is automatically renewed.
- capacity
Unit number - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance stringDescription - The db instance description.
- db
Instance numberStorage - The db instance storage. Valid values:
1
to100
. - engine string
- The database engine of the instance. Valid values:
MongoDB
. - engine
Version string - The database version number. Valid values:
4.2
. - maintain
End stringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start stringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period number
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price stringType - The period price type. Valid values:
Day
,Month
. - resource
Group stringId - The ID of the resource group.
- security
Ip ServerlessGroups Instance Security Ip Group[] - An array that consists of the information of IP whitelists.
- status string
- The instance status. For more information, see the instance Status Table.
- storage
Engine string - The storage engine used by the instance. Valid values:
WiredTiger
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpc
Id string - The ID of the VPC network.
- vswitch
Id string - The of the vswitch.
- zone
Id string - The ID of the zone. Use this parameter to specify the zone created by the instance.
- account_
password str - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- auto_
renew bool - Set whether the instance is automatically renewed.
- capacity_
unit int - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db_
instance_ strdescription - The db instance description.
- db_
instance_ intstorage - The db instance storage. Valid values:
1
to100
. - engine str
- The database engine of the instance. Valid values:
MongoDB
. - engine_
version str - The database version number. Valid values:
4.2
. - maintain_
end_ strtime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain_
start_ strtime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period int
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period_
price_ strtype - The period price type. Valid values:
Day
,Month
. - resource_
group_ strid - The ID of the resource group.
- security_
ip_ Sequence[Serverlessgroups Instance Security Ip Group Args] - An array that consists of the information of IP whitelists.
- status str
- The instance status. For more information, see the instance Status Table.
- storage_
engine str - The storage engine used by the instance. Valid values:
WiredTiger
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- vpc_
id str - The ID of the VPC network.
- vswitch_
id str - The of the vswitch.
- zone_
id str - The ID of the zone. Use this parameter to specify the zone created by the instance.
- account
Password String - The password of the database logon account.
- The password length is
8
to32
bits. - The password consists of at least any three of uppercase letters, lowercase letters, numbers, and special characters. The special character is
!#$%^&*()_+-=
. The MongoDB Serverless instance provides a default database login account. This account cannot be modified. You can only set or modify the password for this account.
- The password length is
- auto
Renew Boolean - Set whether the instance is automatically renewed.
- capacity
Unit Number - The I/O throughput consumed by the instance. Valid values:
100
to8000
. - db
Instance StringDescription - The db instance description.
- db
Instance NumberStorage - The db instance storage. Valid values:
1
to100
. - engine String
- The database engine of the instance. Valid values:
MongoDB
. - engine
Version String - The database version number. Valid values:
4.2
. - maintain
End StringTime - The end time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_time
is01:00Z
,maintain_end_time
must be02:00Z
. - maintain
Start StringTime - The start time of the maintenance window. Specify the time in the
HH:mmZ
format. The time must be in UTC. - period Number
- The purchase duration of the instance, in months. Valid values:
1
to9
,12
,24
,36
,60
. - period
Price StringType - The period price type. Valid values:
Day
,Month
. - resource
Group StringId - The ID of the resource group.
- security
Ip List<Property Map>Groups - An array that consists of the information of IP whitelists.
- status String
- The instance status. For more information, see the instance Status Table.
- storage
Engine String - The storage engine used by the instance. Valid values:
WiredTiger
. - Map<String>
- A mapping of tags to assign to the resource.
- vpc
Id String - The ID of the VPC network.
- vswitch
Id String - The of the vswitch.
- zone
Id String - The ID of the zone. Use this parameter to specify the zone created by the instance.
Supporting Types
ServerlessInstanceSecurityIpGroup, ServerlessInstanceSecurityIpGroupArgs
- Security
Ip stringGroup Attribute - The attribute of the IP whitelist. This parameter is empty by default.
- Security
Ip stringGroup Name - The name of the IP whitelist.
- Security
Ip stringList - The IP addresses in the whitelist.
- Security
Ip stringGroup Attribute - The attribute of the IP whitelist. This parameter is empty by default.
- Security
Ip stringGroup Name - The name of the IP whitelist.
- Security
Ip stringList - The IP addresses in the whitelist.
- security
Ip StringGroup Attribute - The attribute of the IP whitelist. This parameter is empty by default.
- security
Ip StringGroup Name - The name of the IP whitelist.
- security
Ip StringList - The IP addresses in the whitelist.
- security
Ip stringGroup Attribute - The attribute of the IP whitelist. This parameter is empty by default.
- security
Ip stringGroup Name - The name of the IP whitelist.
- security
Ip stringList - The IP addresses in the whitelist.
- security_
ip_ strgroup_ attribute - The attribute of the IP whitelist. This parameter is empty by default.
- security_
ip_ strgroup_ name - The name of the IP whitelist.
- security_
ip_ strlist - The IP addresses in the whitelist.
- security
Ip StringGroup Attribute - The attribute of the IP whitelist. This parameter is empty by default.
- security
Ip StringGroup Name - The name of the IP whitelist.
- security
Ip StringList - The IP addresses in the whitelist.
Import
MongoDB Serverless Instance can be imported using the id, e.g.
$ pulumi import alicloud:mongodb/serverlessInstance:ServerlessInstance example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.