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, &mongodb.GetZonesArgs{}, 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, &resourcemanager.GetResourceGroupsArgs{}, 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=[{
        "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServerlessInstance resource accepts the following input properties:
- AccountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- CapacityUnit int
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- DbInstance intStorage 
- The db instance storage. Valid values: 1to100.
- EngineVersion string
- The database version number. Valid values: 4.2.
- VpcId string
- The ID of the VPC network.
- VswitchId string
- The of the vswitch.
- ZoneId string
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- AutoRenew bool
- Set whether the instance is automatically renewed.
- DbInstance stringDescription 
- The db instance description.
- Engine string
- The database engine of the instance. Valid values: MongoDB.
- MaintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- MaintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- Period int
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- PeriodPrice stringType 
- The period price type. Valid values: Day,Month.
- ResourceGroup stringId 
- The ID of the resource group.
- SecurityIp List<Pulumi.Groups Ali Cloud. Mongo DB. Inputs. Serverless Instance Security Ip Group> 
- An array that consists of the information of IP whitelists.
- StorageEngine string
- The storage engine used by the instance. Valid values: WiredTiger.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- AccountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- CapacityUnit int
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- DbInstance intStorage 
- The db instance storage. Valid values: 1to100.
- EngineVersion string
- The database version number. Valid values: 4.2.
- VpcId string
- The ID of the VPC network.
- VswitchId string
- The of the vswitch.
- ZoneId string
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- AutoRenew bool
- Set whether the instance is automatically renewed.
- DbInstance stringDescription 
- The db instance description.
- Engine string
- The database engine of the instance. Valid values: MongoDB.
- MaintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- MaintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- Period int
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- PeriodPrice stringType 
- The period price type. Valid values: Day,Month.
- ResourceGroup stringId 
- The ID of the resource group.
- SecurityIp []ServerlessGroups Instance Security Ip Group Args 
- An array that consists of the information of IP whitelists.
- StorageEngine string
- The storage engine used by the instance. Valid values: WiredTiger.
- map[string]string
- A mapping of tags to assign to the resource.
- accountPassword String
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- capacityUnit Integer
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance IntegerStorage 
- The db instance storage. Valid values: 1to100.
- engineVersion String
- The database version number. Valid values: 4.2.
- vpcId String
- The ID of the VPC network.
- vswitchId String
- The of the vswitch.
- zoneId String
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- autoRenew Boolean
- Set whether the instance is automatically renewed.
- dbInstance StringDescription 
- The db instance description.
- engine String
- The database engine of the instance. Valid values: MongoDB.
- maintainEnd StringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart StringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period Integer
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice StringType 
- The period price type. Valid values: Day,Month.
- resourceGroup StringId 
- The ID of the resource group.
- securityIp List<ServerlessGroups Instance Security Ip Group> 
- An array that consists of the information of IP whitelists.
- storageEngine String
- The storage engine used by the instance. Valid values: WiredTiger.
- Map<String,String>
- A mapping of tags to assign to the resource.
- accountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- capacityUnit number
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance numberStorage 
- The db instance storage. Valid values: 1to100.
- engineVersion string
- The database version number. Valid values: 4.2.
- vpcId string
- The ID of the VPC network.
- vswitchId string
- The of the vswitch.
- zoneId string
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- autoRenew boolean
- Set whether the instance is automatically renewed.
- dbInstance stringDescription 
- The db instance description.
- engine string
- The database engine of the instance. Valid values: MongoDB.
- maintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period number
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice stringType 
- The period price type. Valid values: Day,Month.
- resourceGroup stringId 
- The ID of the resource group.
- securityIp ServerlessGroups Instance Security Ip Group[] 
- An array that consists of the information of IP whitelists.
- storageEngine 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 8to32bits.
- 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: 100to8000.
- db_instance_ intstorage 
- The db instance storage. Valid values: 1to100.
- 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:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintain_start_ strtime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period int
- The purchase duration of the instance, in months. Valid values: 1to9,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.
- accountPassword String
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- capacityUnit Number
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance NumberStorage 
- The db instance storage. Valid values: 1to100.
- engineVersion String
- The database version number. Valid values: 4.2.
- vpcId String
- The ID of the VPC network.
- vswitchId String
- The of the vswitch.
- zoneId String
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- autoRenew Boolean
- Set whether the instance is automatically renewed.
- dbInstance StringDescription 
- The db instance description.
- engine String
- The database engine of the instance. Valid values: MongoDB.
- maintainEnd StringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart StringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period Number
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice StringType 
- The period price type. Valid values: Day,Month.
- resourceGroup StringId 
- The ID of the resource group.
- securityIp List<Property Map>Groups 
- An array that consists of the information of IP whitelists.
- storageEngine 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) -> ServerlessInstancefunc 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)resources:  _:    type: alicloud:mongodb:ServerlessInstance    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- AutoRenew bool
- Set whether the instance is automatically renewed.
- CapacityUnit int
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- DbInstance stringDescription 
- The db instance description.
- DbInstance intStorage 
- The db instance storage. Valid values: 1to100.
- Engine string
- The database engine of the instance. Valid values: MongoDB.
- EngineVersion string
- The database version number. Valid values: 4.2.
- MaintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- MaintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- Period int
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- PeriodPrice stringType 
- The period price type. Valid values: Day,Month.
- ResourceGroup stringId 
- The ID of the resource group.
- SecurityIp 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.
- StorageEngine string
- The storage engine used by the instance. Valid values: WiredTiger.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VpcId string
- The ID of the VPC network.
- VswitchId string
- The of the vswitch.
- ZoneId string
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- AccountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- AutoRenew bool
- Set whether the instance is automatically renewed.
- CapacityUnit int
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- DbInstance stringDescription 
- The db instance description.
- DbInstance intStorage 
- The db instance storage. Valid values: 1to100.
- Engine string
- The database engine of the instance. Valid values: MongoDB.
- EngineVersion string
- The database version number. Valid values: 4.2.
- MaintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- MaintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- Period int
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- PeriodPrice stringType 
- The period price type. Valid values: Day,Month.
- ResourceGroup stringId 
- The ID of the resource group.
- SecurityIp []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.
- StorageEngine string
- The storage engine used by the instance. Valid values: WiredTiger.
- map[string]string
- A mapping of tags to assign to the resource.
- VpcId string
- The ID of the VPC network.
- VswitchId string
- The of the vswitch.
- ZoneId string
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- accountPassword String
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- autoRenew Boolean
- Set whether the instance is automatically renewed.
- capacityUnit Integer
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance StringDescription 
- The db instance description.
- dbInstance IntegerStorage 
- The db instance storage. Valid values: 1to100.
- engine String
- The database engine of the instance. Valid values: MongoDB.
- engineVersion String
- The database version number. Valid values: 4.2.
- maintainEnd StringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart StringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period Integer
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice StringType 
- The period price type. Valid values: Day,Month.
- resourceGroup StringId 
- The ID of the resource group.
- securityIp 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.
- storageEngine String
- The storage engine used by the instance. Valid values: WiredTiger.
- Map<String,String>
- A mapping of tags to assign to the resource.
- vpcId String
- The ID of the VPC network.
- vswitchId String
- The of the vswitch.
- zoneId String
- The ID of the zone. Use this parameter to specify the zone created by the instance.
- accountPassword string
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- autoRenew boolean
- Set whether the instance is automatically renewed.
- capacityUnit number
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance stringDescription 
- The db instance description.
- dbInstance numberStorage 
- The db instance storage. Valid values: 1to100.
- engine string
- The database engine of the instance. Valid values: MongoDB.
- engineVersion string
- The database version number. Valid values: 4.2.
- maintainEnd stringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart stringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period number
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice stringType 
- The period price type. Valid values: Day,Month.
- resourceGroup stringId 
- The ID of the resource group.
- securityIp 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.
- storageEngine string
- The storage engine used by the instance. Valid values: WiredTiger.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpcId string
- The ID of the VPC network.
- vswitchId string
- The of the vswitch.
- zoneId 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 8to32bits.
- 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: 100to8000.
- db_instance_ strdescription 
- The db instance description.
- db_instance_ intstorage 
- The db instance storage. Valid values: 1to100.
- 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:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintain_start_ strtime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period int
- The purchase duration of the instance, in months. Valid values: 1to9,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.
- accountPassword String
- The password of the database logon account.- The password length is 8to32bits.
- 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 
- autoRenew Boolean
- Set whether the instance is automatically renewed.
- capacityUnit Number
- The I/O throughput consumed by the instance. Valid values: 100to8000.
- dbInstance StringDescription 
- The db instance description.
- dbInstance NumberStorage 
- The db instance storage. Valid values: 1to100.
- engine String
- The database engine of the instance. Valid values: MongoDB.
- engineVersion String
- The database version number. Valid values: 4.2.
- maintainEnd StringTime 
- The end time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC. NOTE: The difference between the start time and end time must be one hour. For example, ifmaintain_start_timeis01:00Z,maintain_end_timemust be02:00Z.
- maintainStart StringTime 
- The start time of the maintenance window. Specify the time in the HH:mmZformat. The time must be in UTC.
- period Number
- The purchase duration of the instance, in months. Valid values: 1to9,12,24,36,60.
- periodPrice StringType 
- The period price type. Valid values: Day,Month.
- resourceGroup StringId 
- The ID of the resource group.
- securityIp 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.
- storageEngine String
- The storage engine used by the instance. Valid values: WiredTiger.
- Map<String>
- A mapping of tags to assign to the resource.
- vpcId String
- The ID of the VPC network.
- vswitchId String
- The of the vswitch.
- zoneId String
- The ID of the zone. Use this parameter to specify the zone created by the instance.
Supporting Types
ServerlessInstanceSecurityIpGroup, ServerlessInstanceSecurityIpGroupArgs          
- SecurityIp stringGroup Attribute 
- The attribute of the IP whitelist. This parameter is empty by default.
- SecurityIp stringGroup Name 
- The name of the IP whitelist.
- SecurityIp stringList 
- The IP addresses in the whitelist.
- SecurityIp stringGroup Attribute 
- The attribute of the IP whitelist. This parameter is empty by default.
- SecurityIp stringGroup Name 
- The name of the IP whitelist.
- SecurityIp stringList 
- The IP addresses in the whitelist.
- securityIp StringGroup Attribute 
- The attribute of the IP whitelist. This parameter is empty by default.
- securityIp StringGroup Name 
- The name of the IP whitelist.
- securityIp StringList 
- The IP addresses in the whitelist.
- securityIp stringGroup Attribute 
- The attribute of the IP whitelist. This parameter is empty by default.
- securityIp stringGroup Name 
- The name of the IP whitelist.
- securityIp 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.
- securityIp StringGroup Attribute 
- The attribute of the IP whitelist. This parameter is empty by default.
- securityIp StringGroup Name 
- The name of the IP whitelist.
- securityIp 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 alicloudTerraform Provider.