1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. mongodb
  5. ServerlessInstance
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.mongodb.ServerlessInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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 8 to 32 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.
    CapacityUnit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    DbInstanceStorage int
    The db instance storage. Valid values: 1 to 100.
    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.
    DbInstanceDescription string
    The db instance description.
    Engine string
    The database engine of the instance. Valid values: MongoDB.
    MaintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    MaintainStartTime string
    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 to 9, 12, 24, 36, 60.
    PeriodPriceType string
    The period price type. Valid values: Day, Month.
    ResourceGroupId string
    The ID of the resource group.
    SecurityIpGroups List<Pulumi.AliCloud.MongoDB.Inputs.ServerlessInstanceSecurityIpGroup>
    An array that consists of the information of IP whitelists.
    StorageEngine string
    The storage engine used by the instance. Valid values: WiredTiger.
    Tags 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 8 to 32 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.
    CapacityUnit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    DbInstanceStorage int
    The db instance storage. Valid values: 1 to 100.
    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.
    DbInstanceDescription string
    The db instance description.
    Engine string
    The database engine of the instance. Valid values: MongoDB.
    MaintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    MaintainStartTime string
    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 to 9, 12, 24, 36, 60.
    PeriodPriceType string
    The period price type. Valid values: Day, Month.
    ResourceGroupId string
    The ID of the resource group.
    SecurityIpGroups []ServerlessInstanceSecurityIpGroupArgs
    An array that consists of the information of IP whitelists.
    StorageEngine string
    The storage engine used by the instance. Valid values: WiredTiger.
    Tags 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 8 to 32 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.
    capacityUnit Integer
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceStorage Integer
    The db instance storage. Valid values: 1 to 100.
    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.
    dbInstanceDescription String
    The db instance description.
    engine String
    The database engine of the instance. Valid values: MongoDB.
    maintainEndTime String
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime String
    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 to 9, 12, 24, 36, 60.
    periodPriceType String
    The period price type. Valid values: Day, Month.
    resourceGroupId String
    The ID of the resource group.
    securityIpGroups List<ServerlessInstanceSecurityIpGroup>
    An array that consists of the information of IP whitelists.
    storageEngine String
    The storage engine used by the instance. Valid values: WiredTiger.
    tags 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 8 to 32 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.
    capacityUnit number
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceStorage number
    The db instance storage. Valid values: 1 to 100.
    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.
    dbInstanceDescription string
    The db instance description.
    engine string
    The database engine of the instance. Valid values: MongoDB.
    maintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime string
    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 to 9, 12, 24, 36, 60.
    periodPriceType string
    The period price type. Valid values: Day, Month.
    resourceGroupId string
    The ID of the resource group.
    securityIpGroups ServerlessInstanceSecurityIpGroup[]
    An array that consists of the information of IP whitelists.
    storageEngine string
    The storage engine used by the instance. Valid values: WiredTiger.
    tags {[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 to 32 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.
    capacity_unit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    db_instance_storage int
    The db instance storage. Valid values: 1 to 100.
    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_description str
    The db instance description.
    engine str
    The database engine of the instance. Valid values: MongoDB.
    maintain_end_time str
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintain_start_time str
    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 to 9, 12, 24, 36, 60.
    period_price_type str
    The period price type. Valid values: Day, Month.
    resource_group_id str
    The ID of the resource group.
    security_ip_groups Sequence[ServerlessInstanceSecurityIpGroupArgs]
    An array that consists of the information of IP whitelists.
    storage_engine str
    The storage engine used by the instance. Valid values: WiredTiger.
    tags 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 8 to 32 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.
    capacityUnit Number
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceStorage Number
    The db instance storage. Valid values: 1 to 100.
    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.
    dbInstanceDescription String
    The db instance description.
    engine String
    The database engine of the instance. Valid values: MongoDB.
    maintainEndTime String
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime String
    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 to 9, 12, 24, 36, 60.
    periodPriceType String
    The period price type. Valid values: Day, Month.
    resourceGroupId String
    The ID of the resource group.
    securityIpGroups List<Property Map>
    An array that consists of the information of IP whitelists.
    storageEngine String
    The storage engine used by the instance. Valid values: WiredTiger.
    tags 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The instance status. For more information, see the instance Status Table.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The instance status. For more information, see the instance Status Table.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The instance status. For more information, see the instance Status Table.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The instance status. For more information, see the instance Status Table.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The instance status. For more information, see the instance Status Table.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The instance status. For more information, see the instance Status Table.

    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.
    The following state arguments are supported:
    AccountPassword string
    The password of the database logon account.

    • The password length is 8 to 32 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.
    AutoRenew bool
    Set whether the instance is automatically renewed.
    CapacityUnit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    DbInstanceDescription string
    The db instance description.
    DbInstanceStorage int
    The db instance storage. Valid values: 1 to 100.
    Engine string
    The database engine of the instance. Valid values: MongoDB.
    EngineVersion string
    The database version number. Valid values: 4.2.
    MaintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    MaintainStartTime string
    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 to 9, 12, 24, 36, 60.
    PeriodPriceType string
    The period price type. Valid values: Day, Month.
    ResourceGroupId string
    The ID of the resource group.
    SecurityIpGroups List<Pulumi.AliCloud.MongoDB.Inputs.ServerlessInstanceSecurityIpGroup>
    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.
    Tags 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 8 to 32 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.
    AutoRenew bool
    Set whether the instance is automatically renewed.
    CapacityUnit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    DbInstanceDescription string
    The db instance description.
    DbInstanceStorage int
    The db instance storage. Valid values: 1 to 100.
    Engine string
    The database engine of the instance. Valid values: MongoDB.
    EngineVersion string
    The database version number. Valid values: 4.2.
    MaintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    MaintainStartTime string
    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 to 9, 12, 24, 36, 60.
    PeriodPriceType string
    The period price type. Valid values: Day, Month.
    ResourceGroupId string
    The ID of the resource group.
    SecurityIpGroups []ServerlessInstanceSecurityIpGroupArgs
    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.
    Tags 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 8 to 32 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.
    autoRenew Boolean
    Set whether the instance is automatically renewed.
    capacityUnit Integer
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceDescription String
    The db instance description.
    dbInstanceStorage Integer
    The db instance storage. Valid values: 1 to 100.
    engine String
    The database engine of the instance. Valid values: MongoDB.
    engineVersion String
    The database version number. Valid values: 4.2.
    maintainEndTime String
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime String
    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 to 9, 12, 24, 36, 60.
    periodPriceType String
    The period price type. Valid values: Day, Month.
    resourceGroupId String
    The ID of the resource group.
    securityIpGroups List<ServerlessInstanceSecurityIpGroup>
    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.
    tags 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 8 to 32 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.
    autoRenew boolean
    Set whether the instance is automatically renewed.
    capacityUnit number
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceDescription string
    The db instance description.
    dbInstanceStorage number
    The db instance storage. Valid values: 1 to 100.
    engine string
    The database engine of the instance. Valid values: MongoDB.
    engineVersion string
    The database version number. Valid values: 4.2.
    maintainEndTime string
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime string
    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 to 9, 12, 24, 36, 60.
    periodPriceType string
    The period price type. Valid values: Day, Month.
    resourceGroupId string
    The ID of the resource group.
    securityIpGroups ServerlessInstanceSecurityIpGroup[]
    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.
    tags {[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 8 to 32 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.
    auto_renew bool
    Set whether the instance is automatically renewed.
    capacity_unit int
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    db_instance_description str
    The db instance description.
    db_instance_storage int
    The db instance storage. Valid values: 1 to 100.
    engine str
    The database engine of the instance. Valid values: MongoDB.
    engine_version str
    The database version number. Valid values: 4.2.
    maintain_end_time str
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintain_start_time str
    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 to 9, 12, 24, 36, 60.
    period_price_type str
    The period price type. Valid values: Day, Month.
    resource_group_id str
    The ID of the resource group.
    security_ip_groups Sequence[ServerlessInstanceSecurityIpGroupArgs]
    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.
    tags 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 8 to 32 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.
    autoRenew Boolean
    Set whether the instance is automatically renewed.
    capacityUnit Number
    The I/O throughput consumed by the instance. Valid values: 100 to 8000.
    dbInstanceDescription String
    The db instance description.
    dbInstanceStorage Number
    The db instance storage. Valid values: 1 to 100.
    engine String
    The database engine of the instance. Valid values: MongoDB.
    engineVersion String
    The database version number. Valid values: 4.2.
    maintainEndTime String
    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, if maintain_start_time is 01:00Z, maintain_end_time must be 02:00Z.
    maintainStartTime String
    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 to 9, 12, 24, 36, 60.
    periodPriceType String
    The period price type. Valid values: Day, Month.
    resourceGroupId String
    The ID of the resource group.
    securityIpGroups List<Property Map>
    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.
    tags 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

    SecurityIpGroupAttribute string
    The attribute of the IP whitelist. This parameter is empty by default.
    SecurityIpGroupName string
    The name of the IP whitelist.
    SecurityIpList string
    The IP addresses in the whitelist.
    SecurityIpGroupAttribute string
    The attribute of the IP whitelist. This parameter is empty by default.
    SecurityIpGroupName string
    The name of the IP whitelist.
    SecurityIpList string
    The IP addresses in the whitelist.
    securityIpGroupAttribute String
    The attribute of the IP whitelist. This parameter is empty by default.
    securityIpGroupName String
    The name of the IP whitelist.
    securityIpList String
    The IP addresses in the whitelist.
    securityIpGroupAttribute string
    The attribute of the IP whitelist. This parameter is empty by default.
    securityIpGroupName string
    The name of the IP whitelist.
    securityIpList string
    The IP addresses in the whitelist.
    security_ip_group_attribute str
    The attribute of the IP whitelist. This parameter is empty by default.
    security_ip_group_name str
    The name of the IP whitelist.
    security_ip_list str
    The IP addresses in the whitelist.
    securityIpGroupAttribute String
    The attribute of the IP whitelist. This parameter is empty by default.
    securityIpGroupName String
    The name of the IP whitelist.
    securityIpList String
    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi