getServerlessInstances

This data source provides the Mongodb Serverless Instances of the current Alibaba Cloud user.

NOTE: Available in v1.148.0+.

Example Usage

Basic Usage

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.GetServerlessInstancesArgs;
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 example = MongodbFunctions.getServerlessInstances(GetServerlessInstancesArgs.builder()
.ids("example_value")
.dbInstanceClass("example_value")
.dbInstanceDescription("example_value")
.networkType("VPC")
.resourceGroupId("example_value")
.status("Running")
.vpcId("example_value")
.vswitchId("example_value")
.zoneId("example_value")
.tags(Map.ofEntries(
Map.entry("Created", "MongodbServerlessInstance"),
Map.entry("For", "TF")
))
.build());
ctx.export("mongodbServerlessInstanceId1", example.applyValue(getServerlessInstancesResult -> getServerlessInstancesResult.instances()[0].id()));
}
}

Return

A collection of values returned by getServerlessInstances.

Parameters

argument

A collection of arguments for invoking getServerlessInstances.


suspend fun getServerlessInstances(dbInstanceClass: String? = null, dbInstanceDescription: String? = null, enableDetails: Boolean? = null, ids: List<String>? = null, networkType: String? = null, outputFile: String? = null, resourceGroupId: String? = null, status: String? = null, tags: Map<String, Any>? = null, vpcId: String? = null, vswitchId: String? = null, zoneId: String? = null): GetServerlessInstancesResult

Return

A collection of values returned by getServerlessInstances.

See also

Parameters

dbInstanceClass

The db instance class.

dbInstanceDescription

The db instance description.

enableDetails

Default to false. Set it to true can output more details about resource attributes.

ids

A list of Serverless Instance IDs.

networkType

The network type of the instance.

outputFile

File name where to save data source results (after running pulumi preview).

resourceGroupId

The ID of the resource group.

status

The status of the instance.

tags

The tag of the resource.

vpcId

The ID of the VPC network.

vswitchId

The id of the vswitch.

zoneId

The ID of the zone.


Return

A collection of values returned by getServerlessInstances.

See also

Parameters

argument

Builder for com.pulumi.alicloud.mongodb.kotlin.inputs.GetServerlessInstancesPlainArgs.