1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. mongodb
  5. ServerlessInstance
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

alicloud.mongodb.ServerlessInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 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: Available in v1.148.0+.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultZones = AliCloud.MongoDB.GetZones.Invoke();
    
        var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "default-NODELETING",
        });
    
        var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultResourceGroups = 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 = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
            EngineVersion = "4.2",
            Period = 1,
            PeriodPriceType = "Month",
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchId = defaultSwitches.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 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 {
    		defaultZones, err := mongodb.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("default-NODELETING"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(defaultZones.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = mongodb.NewServerlessInstance(ctx, "example", &mongodb.ServerlessInstanceArgs{
    			AccountPassword:       pulumi.String("Abc12345"),
    			DbInstanceDescription: pulumi.String("example_value"),
    			DbInstanceStorage:     pulumi.Int(5),
    			StorageEngine:         pulumi.String("WiredTiger"),
    			CapacityUnit:          pulumi.Int(100),
    			Engine:                pulumi.String("MongoDB"),
    			ResourceGroupId:       *pulumi.String(defaultResourceGroups.Groups[0].Id),
    			EngineVersion:         pulumi.String("4.2"),
    			Period:                pulumi.Int(1),
    			PeriodPriceType:       pulumi.String("Month"),
    			VpcId:                 *pulumi.String(defaultNetworks.Ids[0]),
    			ZoneId:                *pulumi.String(defaultZones.Zones[0].Id),
    			VswitchId:             *pulumi.String(defaultSwitches.Ids[0]),
    			Tags: pulumi.Map{
    				"Created": pulumi.Any("MongodbServerlessInstance"),
    				"For":     pulumi.Any("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
    	})
    }
    
    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 defaultZones = MongodbFunctions.getZones();
    
            final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("default-NODELETING")
                .build());
    
            final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
    
            var example = new ServerlessInstance("example", ServerlessInstanceArgs.builder()        
                .accountPassword("Abc12345")
                .dbInstanceDescription("example_value")
                .dbInstanceStorage(5)
                .storageEngine("WiredTiger")
                .capacityUnit(100)
                .engine("MongoDB")
                .resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
                .engineVersion("4.2")
                .period(1)
                .periodPriceType("Month")
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchId(defaultSwitches.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());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_zones = alicloud.mongodb.get_zones()
    default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
    default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0],
        zone_id=default_zones.zones[0].id)
    default_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_resource_groups.groups[0].id,
        engine_version="4.2",
        period=1,
        period_price_type="Month",
        vpc_id=default_networks.ids[0],
        zone_id=default_zones.zones[0].id,
        vswitch_id=default_switches.ids[0],
        tags={
            "Created": "MongodbServerlessInstance",
            "For": "TF",
        },
        security_ip_groups=[alicloud.mongodb.ServerlessInstanceSecurityIpGroupArgs(
            security_ip_group_attribute="example_value",
            security_ip_group_name="example_value",
            security_ip_list="192.168.0.1",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultZones = alicloud.mongodb.getZones({});
    const defaultNetworks = alicloud.vpc.getNetworks({
        nameRegex: "default-NODELETING",
    });
    const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
        vpcId: defaultNetworks.ids?.[0],
        zoneId: defaultZones.zones?.[0]?.id,
    }));
    const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({});
    const example = new alicloud.mongodb.ServerlessInstance("example", {
        accountPassword: "Abc12345",
        dbInstanceDescription: "example_value",
        dbInstanceStorage: 5,
        storageEngine: "WiredTiger",
        capacityUnit: 100,
        engine: "MongoDB",
        resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.groups?.[0]?.id),
        engineVersion: "4.2",
        period: 1,
        periodPriceType: "Month",
        vpcId: defaultNetworks.then(defaultNetworks => defaultNetworks.ids?.[0]),
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0]),
        tags: {
            Created: "MongodbServerlessInstance",
            For: "TF",
        },
        securityIpGroups: [{
            securityIpGroupAttribute: "example_value",
            securityIpGroupName: "example_value",
            securityIpList: "192.168.0.1",
        }],
    });
    
    resources:
      example:
        type: alicloud:mongodb:ServerlessInstance
        properties:
          accountPassword: Abc12345
          dbInstanceDescription: example_value
          dbInstanceStorage: 5
          storageEngine: WiredTiger
          capacityUnit: 100
          engine: MongoDB
          resourceGroupId: ${defaultResourceGroups.groups[0].id}
          engineVersion: '4.2'
          period: 1
          periodPriceType: Month
          vpcId: ${defaultNetworks.ids[0]}
          zoneId: ${defaultZones.zones[0].id}
          vswitchId: ${defaultSwitches.ids[0]}
          tags:
            Created: MongodbServerlessInstance
            For: TF
          securityIpGroups:
            - securityIpGroupAttribute: example_value
              securityIpGroupName: example_value
              securityIpList: 192.168.0.1
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:mongodb:getZones
          Arguments: {}
      defaultNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: default-NODELETING
      defaultSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultNetworks.ids[0]}
            zoneId: ${defaultZones.zones[0].id}
      defaultResourceGroups:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
    

    Create ServerlessInstance Resource

    new ServerlessInstance(name: string, args: ServerlessInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ServerlessInstance(resource_name: 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,
                           storage_engine: Optional[str] = None,
                           tags: Optional[Mapping[str, Any]] = None,
                           vpc_id: Optional[str] = None,
                           vswitch_id: Optional[str] = None,
                           zone_id: Optional[str] = None)
    @overload
    def ServerlessInstance(resource_name: str,
                           args: ServerlessInstanceArgs,
                           opts: Optional[ResourceOptions] = 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.
    
    
    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.

    ServerlessInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ServerlessInstance resource accepts the following input properties:

    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, object>

    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]interface{}

    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,Object>

    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]: any}

    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, Any]

    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<Any>

    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, Any]] = 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, object>

    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]interface{}

    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,Object>

    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]: any}

    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, Any]

    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<Any>

    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>
    

    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.45.0 published on Monday, Nov 27, 2023 by Pulumi