Class GetClusters
Inheritance
System.Object
GetClusters
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Mongodbatlas
Assembly: Pulumi.Mongodbatlas.dll
Syntax
public static class GetClusters
Methods
View SourceInvokeAsync(GetClustersArgs, InvokeOptions)
mongodbatlas..Cluster describes all Clusters by the provided project_id. The data source requires your Project ID.
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
IMPORTANT: <br> • Changes to cluster configurations can affect costs. Before making changes, please see Billing. <br> • If your Atlas project contains a custom role that uses actions introduced in a specific MongoDB version, you cannot create a cluster with a MongoDB version less than that version unless you delete the custom role.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var testCluster = new Mongodbatlas.Cluster("testCluster", new Mongodbatlas.ClusterArgs
{
ProjectId = "<YOUR-PROJECT-ID>",
DiskSizeGb = 100,
NumShards = 1,
ReplicationFactor = 3,
ProviderBackupEnabled = true,
AutoScalingDiskGbEnabled = true,
ProviderName = "AWS",
ProviderDiskIops = 300,
ProviderVolumeType = "STANDARD",
ProviderEncryptEbsVolume = true,
ProviderInstanceSizeName = "M40",
ProviderRegionName = "US_EAST_1",
});
var testClusters = testCluster.ProjectId.Apply(projectId => Mongodbatlas.GetClusters.InvokeAsync(new Mongodbatlas.GetClustersArgs
{
ProjectId = projectId,
}));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetClustersArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetClustersResult> |