1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCloudantDatabase
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getCloudantDatabase

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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.
    InstanceCrn 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.
    InstanceCrn 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.
    instanceCrn 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.
    instanceCrn 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.
    instanceCrn 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<GetCloudantDatabaseCluster>
    Schema for database cluster information. Nested cluster blocks have the following structure:
    CommittedUpdateSeq string
    An opaque string that describes the committed state of the database.
    CompactRunning bool
    True if the database compaction routine is operating on this database.
    CompactedSeq string
    An opaque string that describes the compaction state of the database.
    Db string
    DiskFormatVersion double
    The version of the physical format used for the data when it is stored on disk.
    DocCount double
    A count of the documents in the specified database.
    DocDelCount double
    Number of deleted documents.
    Engine string
    The engine used for the database.
    Id string
    The unique identifier of the cloudant_database.
    InstanceCrn string
    Props List<GetCloudantDatabaseProp>
    Schema for database properties. Nested props blocks have the following structure:
    Sizes List<GetCloudantDatabaseSize>
    Schema for size information of content. Nested sizes blocks have the following structure:
    UpdateSeq 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 []GetCloudantDatabaseCluster
    Schema for database cluster information. Nested cluster blocks have the following structure:
    CommittedUpdateSeq string
    An opaque string that describes the committed state of the database.
    CompactRunning bool
    True if the database compaction routine is operating on this database.
    CompactedSeq string
    An opaque string that describes the compaction state of the database.
    Db string
    DiskFormatVersion float64
    The version of the physical format used for the data when it is stored on disk.
    DocCount float64
    A count of the documents in the specified database.
    DocDelCount float64
    Number of deleted documents.
    Engine string
    The engine used for the database.
    Id string
    The unique identifier of the cloudant_database.
    InstanceCrn string
    Props []GetCloudantDatabaseProp
    Schema for database properties. Nested props blocks have the following structure:
    Sizes []GetCloudantDatabaseSize
    Schema for size information of content. Nested sizes blocks have the following structure:
    UpdateSeq 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<GetCloudantDatabaseCluster>
    Schema for database cluster information. Nested cluster blocks have the following structure:
    committedUpdateSeq String
    An opaque string that describes the committed state of the database.
    compactRunning Boolean
    True if the database compaction routine is operating on this database.
    compactedSeq String
    An opaque string that describes the compaction state of the database.
    db String
    diskFormatVersion Double
    The version of the physical format used for the data when it is stored on disk.
    docCount Double
    A count of the documents in the specified database.
    docDelCount Double
    Number of deleted documents.
    engine String
    The engine used for the database.
    id String
    The unique identifier of the cloudant_database.
    instanceCrn String
    props List<GetCloudantDatabaseProp>
    Schema for database properties. Nested props blocks have the following structure:
    sizes List<GetCloudantDatabaseSize>
    Schema for size information of content. Nested sizes blocks have the following structure:
    updateSeq 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 GetCloudantDatabaseCluster[]
    Schema for database cluster information. Nested cluster blocks have the following structure:
    committedUpdateSeq string
    An opaque string that describes the committed state of the database.
    compactRunning boolean
    True if the database compaction routine is operating on this database.
    compactedSeq string
    An opaque string that describes the compaction state of the database.
    db string
    diskFormatVersion number
    The version of the physical format used for the data when it is stored on disk.
    docCount number
    A count of the documents in the specified database.
    docDelCount number
    Number of deleted documents.
    engine string
    The engine used for the database.
    id string
    The unique identifier of the cloudant_database.
    instanceCrn string
    props GetCloudantDatabaseProp[]
    Schema for database properties. Nested props blocks have the following structure:
    sizes GetCloudantDatabaseSize[]
    Schema for size information of content. Nested sizes blocks have the following structure:
    updateSeq 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[GetCloudantDatabaseCluster]
    Schema for database cluster information. Nested cluster blocks have the following structure:
    committed_update_seq str
    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_version float
    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_count float
    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[GetCloudantDatabaseProp]
    Schema for database properties. Nested props blocks have the following structure:
    sizes Sequence[GetCloudantDatabaseSize]
    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:
    committedUpdateSeq String
    An opaque string that describes the committed state of the database.
    compactRunning Boolean
    True if the database compaction routine is operating on this database.
    compactedSeq String
    An opaque string that describes the compaction state of the database.
    db String
    diskFormatVersion Number
    The version of the physical format used for the data when it is stored on disk.
    docCount Number
    A count of the documents in the specified database.
    docDelCount Number
    Number of deleted documents.
    engine String
    The engine used for the database.
    id String
    The unique identifier of the cloudant_database.
    instanceCrn 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:
    updateSeq 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

    ReadQuorum 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.
    Shards double
    Schema for the number of shards in a database. Each shard is a partition of the hash value range.
    WriteQuorum double
    Write quorum. The number of copies of a document that need to be written before a successful reply.
    ReadQuorum 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.
    Shards float64
    Schema for the number of shards in a database. Each shard is a partition of the hash value range.
    WriteQuorum float64
    Write quorum. The number of copies of a document that need to be written before a successful reply.
    readQuorum 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.
    shards Double
    Schema for the number of shards in a database. Each shard is a partition of the hash value range.
    writeQuorum Double
    Write quorum. The number of copies of a document that need to be written before a successful reply.
    readQuorum 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.
    shards number
    Schema for the number of shards in a database. Each shard is a partition of the hash value range.
    writeQuorum 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.
    shards 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.
    readQuorum 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.
    shards Number
    Schema for the number of shards in a database. Each shard is a partition of the hash value range.
    writeQuorum 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

    Active double
    The active size of the content, in bytes.
    External double
    The total uncompressed size of the content, in bytes.
    File double
    The total size of the content as stored on disk, in bytes.
    Active float64
    The active size of the content, in bytes.
    External float64
    The total uncompressed size of the content, in bytes.
    File float64
    The total size of the content as stored on disk, in bytes.
    active Double
    The active size of the content, in bytes.
    external Double
    The total uncompressed size of the content, in bytes.
    file Double
    The total size of the content as stored on disk, in bytes.
    active number
    The active size of the content, in bytes.
    external number
    The total uncompressed size of the content, in bytes.
    file number
    The total size of the content as stored on disk, in bytes.
    active float
    The active size of the content, in bytes.
    external float
    The total uncompressed size of the content, in bytes.
    file float
    The total size of the content as stored on disk, in bytes.
    active Number
    The active size of the content, in bytes.
    external Number
    The total uncompressed size of the content, in bytes.
    file Number
    The total size of the content as stored on disk, in bytes.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud