GetInstances

The alicloud.mongodb.getInstances data source provides a collection of MongoDB instances available in Alicloud account. Filters support regular expression for the instance name, engine or instance type.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var mongo = Output.Create(AliCloud.MongoDB.GetInstances.InvokeAsync(new AliCloud.MongoDB.GetInstancesArgs
        {
            AvailabilityZone = "eu-central-1a",
            InstanceClass = "dds.mongo.mid",
            InstanceType = "replicate",
            NameRegex = "dds-.+\\d+",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

mongo = alicloud.mongodb.get_instances(availability_zone="eu-central-1a",
    instance_class="dds.mongo.mid",
    instance_type="replicate",
    name_regex="dds-.+\\d+")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const mongo = pulumi.output(alicloud.mongodb.getInstances({
    availabilityZone: "eu-central-1a",
    instanceClass: "dds.mongo.mid",
    instanceType: "replicate",
    nameRegex: "dds-.+\\d+",
}, { async: true }));

Using GetInstances

function getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function  get_instances(availability_zone=None, ids=None, instance_class=None, instance_type=None, name_regex=None, output_file=None, tags=None, opts=None)
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
public static class GetInstances {
    public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AvailabilityZone string

Instance availability zone.

Ids List<string>

The ids list of MongoDB instances

InstanceClass string

Sizing of the instance to be queried.

InstanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

NameRegex string

A regex string to apply to the instance name.

OutputFile string
Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

AvailabilityZone string

Instance availability zone.

Ids []string

The ids list of MongoDB instances

InstanceClass string

Sizing of the instance to be queried.

InstanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

NameRegex string

A regex string to apply to the instance name.

OutputFile string
Tags map[string]interface{}

A mapping of tags to assign to the resource.

availabilityZone string

Instance availability zone.

ids string[]

The ids list of MongoDB instances

instanceClass string

Sizing of the instance to be queried.

instanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

nameRegex string

A regex string to apply to the instance name.

outputFile string
tags {[key: string]: any}

A mapping of tags to assign to the resource.

availability_zone str

Instance availability zone.

ids List[str]

The ids list of MongoDB instances

instance_class str

Sizing of the instance to be queried.

instance_type str

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

name_regex str

A regex string to apply to the instance name.

output_file str
tags Dict[str, Any]

A mapping of tags to assign to the resource.

GetInstances Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

The ids list of MongoDB instances

Instances List<Pulumi.AliCloud.MongoDB.Outputs.GetInstancesInstance>

A list of MongoDB instances. Its every element contains the following attributes:

Names List<string>

The names list of MongoDB instances

AvailabilityZone string

Instance availability zone.

InstanceClass string

Sizing of the MongoDB instance.

InstanceType string

Instance type. Optional values sharding or replicate.

NameRegex string
OutputFile string
Tags Dictionary<string, object>
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

The ids list of MongoDB instances

Instances []GetInstancesInstance

A list of MongoDB instances. Its every element contains the following attributes:

Names []string

The names list of MongoDB instances

AvailabilityZone string

Instance availability zone.

InstanceClass string

Sizing of the MongoDB instance.

InstanceType string

Instance type. Optional values sharding or replicate.

NameRegex string
OutputFile string
Tags map[string]interface{}
id string

The provider-assigned unique ID for this managed resource.

ids string[]

The ids list of MongoDB instances

instances GetInstancesInstance[]

A list of MongoDB instances. Its every element contains the following attributes:

names string[]

The names list of MongoDB instances

availabilityZone string

Instance availability zone.

instanceClass string

Sizing of the MongoDB instance.

instanceType string

Instance type. Optional values sharding or replicate.

nameRegex string
outputFile string
tags {[key: string]: any}
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

The ids list of MongoDB instances

instances List[GetInstancesInstance]

A list of MongoDB instances. Its every element contains the following attributes:

names List[str]

The names list of MongoDB instances

availability_zone str

Instance availability zone.

instance_class str

Sizing of the MongoDB instance.

instance_type str

Instance type. Optional values sharding or replicate.

name_regex str
output_file str
tags Dict[str, Any]

Supporting Types

GetInstancesInstance

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AvailabilityZone string

Instance availability zone.

ChargeType string

Billing method. Value options are PostPaid for Pay-As-You-Go and PrePaid for yearly or monthly subscription.

CreationTime string

Creation time of the instance in RFC3339 format.

Engine string

Database engine type. Supported option is MongoDB.

EngineVersion string

Database engine version.

ExpirationTime string

Expiration time in RFC3339 format. Pay-As-You-Go instances are never expire.

Id string

The ID of the MongoDB instance.

InstanceClass string

Sizing of the instance to be queried.

InstanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

LockMode string

Lock status of the instance.

Mongos List<Pulumi.AliCloud.MongoDB.Inputs.GetInstancesInstanceMongoArgs>

Array composed of Mongos.

Name string

The name of the MongoDB instance.

NetworkType string

Classic network or VPC.

RegionId string

Region ID the instance belongs to.

Replication string

Replication factor corresponds to number of nodes. Optional values are 1 for single node and 3 for three nodes replica set.

Shards List<Pulumi.AliCloud.MongoDB.Inputs.GetInstancesInstanceShardArgs>

Array composed of shards.

Status string

Status of the instance.

Storage int

Shard disk.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

AvailabilityZone string

Instance availability zone.

ChargeType string

Billing method. Value options are PostPaid for Pay-As-You-Go and PrePaid for yearly or monthly subscription.

CreationTime string

Creation time of the instance in RFC3339 format.

Engine string

Database engine type. Supported option is MongoDB.

EngineVersion string

Database engine version.

ExpirationTime string

Expiration time in RFC3339 format. Pay-As-You-Go instances are never expire.

Id string

The ID of the MongoDB instance.

InstanceClass string

Sizing of the instance to be queried.

InstanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

LockMode string

Lock status of the instance.

Mongos []GetInstancesInstanceMongo

Array composed of Mongos.

Name string

The name of the MongoDB instance.

NetworkType string

Classic network or VPC.

RegionId string

Region ID the instance belongs to.

Replication string

Replication factor corresponds to number of nodes. Optional values are 1 for single node and 3 for three nodes replica set.

Shards []GetInstancesInstanceShard

Array composed of shards.

Status string

Status of the instance.

Storage int

Shard disk.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

availabilityZone string

Instance availability zone.

chargeType string

Billing method. Value options are PostPaid for Pay-As-You-Go and PrePaid for yearly or monthly subscription.

creationTime string

Creation time of the instance in RFC3339 format.

engine string

Database engine type. Supported option is MongoDB.

engineVersion string

Database engine version.

expirationTime string

Expiration time in RFC3339 format. Pay-As-You-Go instances are never expire.

id string

The ID of the MongoDB instance.

instanceClass string

Sizing of the instance to be queried.

instanceType string

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

lockMode string

Lock status of the instance.

mongos GetInstancesInstanceMongo[]

Array composed of Mongos.

name string

The name of the MongoDB instance.

networkType string

Classic network or VPC.

regionId string

Region ID the instance belongs to.

replication string

Replication factor corresponds to number of nodes. Optional values are 1 for single node and 3 for three nodes replica set.

shards GetInstancesInstanceShard[]

Array composed of shards.

status string

Status of the instance.

storage number

Shard disk.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

availability_zone str

Instance availability zone.

charge_type str

Billing method. Value options are PostPaid for Pay-As-You-Go and PrePaid for yearly or monthly subscription.

creation_time str

Creation time of the instance in RFC3339 format.

engine str

Database engine type. Supported option is MongoDB.

engine_version str

Database engine version.

expirationTime str

Expiration time in RFC3339 format. Pay-As-You-Go instances are never expire.

id str

The ID of the MongoDB instance.

instance_class str

Sizing of the instance to be queried.

instance_type str

Type of the instance to be queried. If it is set to sharding, the sharded cluster instances are listed. If it is set to replicate, replica set instances are listed. Default value replicate.

lockMode str

Lock status of the instance.

mongos List[GetInstancesInstanceMongo]

Array composed of Mongos.

name str

The name of the MongoDB instance.

network_type str

Classic network or VPC.

regionId str

Region ID the instance belongs to.

replication str

Replication factor corresponds to number of nodes. Optional values are 1 for single node and 3 for three nodes replica set.

shards List[GetInstancesInstanceShard]

Array composed of shards.

status str

Status of the instance.

storage float

Shard disk.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

GetInstancesInstanceMongo

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Class string

Shard instance specification.

Description string

Shard instance description.

NodeId string

Shard instance ID.

Class string

Shard instance specification.

Description string

Shard instance description.

NodeId string

Shard instance ID.

class string

Shard instance specification.

description string

Shard instance description.

nodeId string

Shard instance ID.

class str

Shard instance specification.

description str

Shard instance description.

nodeId str

Shard instance ID.

GetInstancesInstanceShard

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Class string

Shard instance specification.

Description string

Shard instance description.

NodeId string

Shard instance ID.

Storage int

Shard disk.

Class string

Shard instance specification.

Description string

Shard instance description.

NodeId string

Shard instance ID.

Storage int

Shard disk.

class string

Shard instance specification.

description string

Shard instance description.

nodeId string

Shard instance ID.

storage number

Shard disk.

class str

Shard instance specification.

description str

Shard instance description.

nodeId str

Shard instance ID.

storage float

Shard disk.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.