ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getCloudantDatabase
Explore with Pulumi AI
Provides a read-only data source for cloudant_database. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const cloudantDatabase = ibm.getCloudantDatabase({
db: _var.db_name,
instanceCrn: ibm_cloudant.cloudant.crn,
});
import pulumi
import pulumi_ibm as ibm
cloudant_database = ibm.get_cloudant_database(db=var["db_name"],
instance_crn=ibm_cloudant["cloudant"]["crn"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupCloudantDatabase(ctx, &ibm.LookupCloudantDatabaseArgs{
Db: _var.Db_name,
InstanceCrn: ibm_cloudant.Cloudant.Crn,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var cloudantDatabase = Ibm.GetCloudantDatabase.Invoke(new()
{
Db = @var.Db_name,
InstanceCrn = ibm_cloudant.Cloudant.Crn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetCloudantDatabaseArgs;
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 cloudantDatabase = IbmFunctions.getCloudantDatabase(GetCloudantDatabaseArgs.builder()
.db(var_.db_name())
.instanceCrn(ibm_cloudant.cloudant().crn())
.build());
}
}
variables:
cloudantDatabase:
fn::invoke:
function: ibm:getCloudantDatabase
arguments:
db: ${var.db_name}
instanceCrn: ${ibm_cloudant.cloudant.crn}
Using getCloudantDatabase
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCloudantDatabase(args: GetCloudantDatabaseArgs, opts?: InvokeOptions): Promise<GetCloudantDatabaseResult>
function getCloudantDatabaseOutput(args: GetCloudantDatabaseOutputArgs, opts?: InvokeOptions): Output<GetCloudantDatabaseResult>
def get_cloudant_database(db: Optional[str] = None,
id: Optional[str] = None,
instance_crn: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudantDatabaseResult
def get_cloudant_database_output(db: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_crn: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudantDatabaseResult]
func LookupCloudantDatabase(ctx *Context, args *LookupCloudantDatabaseArgs, opts ...InvokeOption) (*LookupCloudantDatabaseResult, error)
func LookupCloudantDatabaseOutput(ctx *Context, args *LookupCloudantDatabaseOutputArgs, opts ...InvokeOption) LookupCloudantDatabaseResultOutput
> Note: This function is named LookupCloudantDatabase
in the Go SDK.
public static class GetCloudantDatabase
{
public static Task<GetCloudantDatabaseResult> InvokeAsync(GetCloudantDatabaseArgs args, InvokeOptions? opts = null)
public static Output<GetCloudantDatabaseResult> Invoke(GetCloudantDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudantDatabaseResult> getCloudantDatabase(GetCloudantDatabaseArgs args, InvokeOptions options)
public static Output<GetCloudantDatabaseResult> getCloudantDatabase(GetCloudantDatabaseArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getCloudantDatabase:getCloudantDatabase
arguments:
# arguments dictionary
The following arguments are supported:
- Db string
- Path parameter to specify the database name.
- Instance
Crn string - Path parameter to specify the cloudant instance CRN.
- Id string
- The unique identifier of the cloudant_database.
- Db string
- Path parameter to specify the database name.
- Instance
Crn string - Path parameter to specify the cloudant instance CRN.
- Id string
- The unique identifier of the cloudant_database.
- db String
- Path parameter to specify the database name.
- instance
Crn String - Path parameter to specify the cloudant instance CRN.
- id String
- The unique identifier of the cloudant_database.
- db string
- Path parameter to specify the database name.
- instance
Crn string - Path parameter to specify the cloudant instance CRN.
- id string
- The unique identifier of the cloudant_database.
- db str
- Path parameter to specify the database name.
- instance_
crn str - Path parameter to specify the cloudant instance CRN.
- id str
- The unique identifier of the cloudant_database.
- db String
- Path parameter to specify the database name.
- instance
Crn String - Path parameter to specify the cloudant instance CRN.
- id String
- The unique identifier of the cloudant_database.
getCloudantDatabase Result
The following output properties are available:
- Clusters
List<Get
Cloudant Database Cluster> - Schema for database cluster information. Nested
cluster
blocks have the following structure: - Committed
Update stringSeq - An opaque string that describes the committed state of the database.
- Compact
Running bool - True if the database compaction routine is operating on this database.
- Compacted
Seq string - An opaque string that describes the compaction state of the database.
- Db string
- Disk
Format doubleVersion - The version of the physical format used for the data when it is stored on disk.
- Doc
Count double - A count of the documents in the specified database.
- Doc
Del doubleCount - Number of deleted documents.
- Engine string
- The engine used for the database.
- Id string
- The unique identifier of the cloudant_database.
- Instance
Crn string - Props
List<Get
Cloudant Database Prop> - Schema for database properties. Nested
props
blocks have the following structure: - Sizes
List<Get
Cloudant Database Size> - Schema for size information of content. Nested
sizes
blocks have the following structure: - Update
Seq string - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- Uuid string
- The UUID of the database.
- Clusters
[]Get
Cloudant Database Cluster - Schema for database cluster information. Nested
cluster
blocks have the following structure: - Committed
Update stringSeq - An opaque string that describes the committed state of the database.
- Compact
Running bool - True if the database compaction routine is operating on this database.
- Compacted
Seq string - An opaque string that describes the compaction state of the database.
- Db string
- Disk
Format float64Version - The version of the physical format used for the data when it is stored on disk.
- Doc
Count float64 - A count of the documents in the specified database.
- Doc
Del float64Count - Number of deleted documents.
- Engine string
- The engine used for the database.
- Id string
- The unique identifier of the cloudant_database.
- Instance
Crn string - Props
[]Get
Cloudant Database Prop - Schema for database properties. Nested
props
blocks have the following structure: - Sizes
[]Get
Cloudant Database Size - Schema for size information of content. Nested
sizes
blocks have the following structure: - Update
Seq string - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- Uuid string
- The UUID of the database.
- clusters
List<Get
Cloudant Database Cluster> - Schema for database cluster information. Nested
cluster
blocks have the following structure: - committed
Update StringSeq - An opaque string that describes the committed state of the database.
- compact
Running Boolean - True if the database compaction routine is operating on this database.
- compacted
Seq String - An opaque string that describes the compaction state of the database.
- db String
- disk
Format DoubleVersion - The version of the physical format used for the data when it is stored on disk.
- doc
Count Double - A count of the documents in the specified database.
- doc
Del DoubleCount - Number of deleted documents.
- engine String
- The engine used for the database.
- id String
- The unique identifier of the cloudant_database.
- instance
Crn String - props
List<Get
Cloudant Database Prop> - Schema for database properties. Nested
props
blocks have the following structure: - sizes
List<Get
Cloudant Database Size> - Schema for size information of content. Nested
sizes
blocks have the following structure: - update
Seq String - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- uuid String
- The UUID of the database.
- clusters
Get
Cloudant Database Cluster[] - Schema for database cluster information. Nested
cluster
blocks have the following structure: - committed
Update stringSeq - An opaque string that describes the committed state of the database.
- compact
Running boolean - True if the database compaction routine is operating on this database.
- compacted
Seq string - An opaque string that describes the compaction state of the database.
- db string
- disk
Format numberVersion - The version of the physical format used for the data when it is stored on disk.
- doc
Count number - A count of the documents in the specified database.
- doc
Del numberCount - Number of deleted documents.
- engine string
- The engine used for the database.
- id string
- The unique identifier of the cloudant_database.
- instance
Crn string - props
Get
Cloudant Database Prop[] - Schema for database properties. Nested
props
blocks have the following structure: - sizes
Get
Cloudant Database Size[] - Schema for size information of content. Nested
sizes
blocks have the following structure: - update
Seq string - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- uuid string
- The UUID of the database.
- clusters
Sequence[Get
Cloudant Database Cluster] - Schema for database cluster information. Nested
cluster
blocks have the following structure: - committed_
update_ strseq - An opaque string that describes the committed state of the database.
- compact_
running bool - True if the database compaction routine is operating on this database.
- compacted_
seq str - An opaque string that describes the compaction state of the database.
- db str
- disk_
format_ floatversion - The version of the physical format used for the data when it is stored on disk.
- doc_
count float - A count of the documents in the specified database.
- doc_
del_ floatcount - Number of deleted documents.
- engine str
- The engine used for the database.
- id str
- The unique identifier of the cloudant_database.
- instance_
crn str - props
Sequence[Get
Cloudant Database Prop] - Schema for database properties. Nested
props
blocks have the following structure: - sizes
Sequence[Get
Cloudant Database Size] - Schema for size information of content. Nested
sizes
blocks have the following structure: - update_
seq str - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- uuid str
- The UUID of the database.
- clusters List<Property Map>
- Schema for database cluster information. Nested
cluster
blocks have the following structure: - committed
Update StringSeq - An opaque string that describes the committed state of the database.
- compact
Running Boolean - True if the database compaction routine is operating on this database.
- compacted
Seq String - An opaque string that describes the compaction state of the database.
- db String
- disk
Format NumberVersion - The version of the physical format used for the data when it is stored on disk.
- doc
Count Number - A count of the documents in the specified database.
- doc
Del NumberCount - Number of deleted documents.
- engine String
- The engine used for the database.
- id String
- The unique identifier of the cloudant_database.
- instance
Crn String - props List<Property Map>
- Schema for database properties. Nested
props
blocks have the following structure: - sizes List<Property Map>
- Schema for size information of content. Nested
sizes
blocks have the following structure: - update
Seq String - An opaque string that describes the state of the database. Do not rely on this string for counting the number of updates.
- uuid String
- The UUID of the database.
Supporting Types
GetCloudantDatabaseCluster
- Read
Quorum double - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- Replicas double
- Schema for the number of replicas of a database in a cluster.
- double
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- Write
Quorum double - Write quorum. The number of copies of a document that need to be written before a successful reply.
- Read
Quorum float64 - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- Replicas float64
- Schema for the number of replicas of a database in a cluster.
- float64
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- Write
Quorum float64 - Write quorum. The number of copies of a document that need to be written before a successful reply.
- read
Quorum Double - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- replicas Double
- Schema for the number of replicas of a database in a cluster.
- Double
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- write
Quorum Double - Write quorum. The number of copies of a document that need to be written before a successful reply.
- read
Quorum number - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- replicas number
- Schema for the number of replicas of a database in a cluster.
- number
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- write
Quorum number - Write quorum. The number of copies of a document that need to be written before a successful reply.
- read_
quorum float - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- replicas float
- Schema for the number of replicas of a database in a cluster.
- float
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- write_
quorum float - Write quorum. The number of copies of a document that need to be written before a successful reply.
- read
Quorum Number - Read quorum. The number of consistent copies of a document that need to be read before a successful reply.
- replicas Number
- Schema for the number of replicas of a database in a cluster.
- Number
- Schema for the number of shards in a database. Each shard is a partition of the hash value range.
- write
Quorum Number - Write quorum. The number of copies of a document that need to be written before a successful reply.
GetCloudantDatabaseProp
- Partitioned bool
- The value is
true
for a partitioned database.
- Partitioned bool
- The value is
true
for a partitioned database.
- partitioned Boolean
- The value is
true
for a partitioned database.
- partitioned boolean
- The value is
true
for a partitioned database.
- partitioned bool
- The value is
true
for a partitioned database.
- partitioned Boolean
- The value is
true
for a partitioned database.
GetCloudantDatabaseSize
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.