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

ibm.getCloudant

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 an existing IBM Cloud Cloudant service. 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 cloudant = new ibm.ResourceInstance("cloudant", {
        service: "cloudantnosqldb",
        plan: "lite",
        location: "us-south",
    });
    const instance = ibm.getCloudantOutput({
        name: cloudant.name,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    cloudant = ibm.ResourceInstance("cloudant",
        service="cloudantnosqldb",
        plan="lite",
        location="us-south")
    instance = ibm.get_cloudant_output(name=cloudant.name)
    
    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 {
    		cloudant, err := ibm.NewResourceInstance(ctx, "cloudant", &ibm.ResourceInstanceArgs{
    			Service:  pulumi.String("cloudantnosqldb"),
    			Plan:     pulumi.String("lite"),
    			Location: pulumi.String("us-south"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = ibm.LookupCloudantOutput(ctx, ibm.GetCloudantOutputArgs{
    			Name: cloudant.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var cloudant = new Ibm.ResourceInstance("cloudant", new()
        {
            Service = "cloudantnosqldb",
            Plan = "lite",
            Location = "us-south",
        });
    
        var instance = Ibm.GetCloudant.Invoke(new()
        {
            Name = cloudant.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.ResourceInstance;
    import com.pulumi.ibm.ResourceInstanceArgs;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetCloudantArgs;
    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) {
            var cloudant = new ResourceInstance("cloudant", ResourceInstanceArgs.builder()
                .service("cloudantnosqldb")
                .plan("lite")
                .location("us-south")
                .build());
    
            final var instance = IbmFunctions.getCloudant(GetCloudantArgs.builder()
                .name(cloudant.name())
                .build());
    
        }
    }
    
    resources:
      cloudant:
        type: ibm:ResourceInstance
        properties:
          service: cloudantnosqldb
          plan: lite
          location: us-south
    variables:
      instance:
        fn::invoke:
          function: ibm:getCloudant
          arguments:
            name: ${cloudant.name}
    

    Using getCloudant

    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 getCloudant(args: GetCloudantArgs, opts?: InvokeOptions): Promise<GetCloudantResult>
    function getCloudantOutput(args: GetCloudantOutputArgs, opts?: InvokeOptions): Output<GetCloudantResult>
    def get_cloudant(id: Optional[str] = None,
                     identifier: Optional[str] = None,
                     location: Optional[str] = None,
                     name: Optional[str] = None,
                     resource_group_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetCloudantResult
    def get_cloudant_output(id: Optional[pulumi.Input[str]] = None,
                     identifier: Optional[pulumi.Input[str]] = None,
                     location: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     resource_group_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetCloudantResult]
    func LookupCloudant(ctx *Context, args *LookupCloudantArgs, opts ...InvokeOption) (*LookupCloudantResult, error)
    func LookupCloudantOutput(ctx *Context, args *LookupCloudantOutputArgs, opts ...InvokeOption) LookupCloudantResultOutput

    > Note: This function is named LookupCloudant in the Go SDK.

    public static class GetCloudant 
    {
        public static Task<GetCloudantResult> InvokeAsync(GetCloudantArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudantResult> Invoke(GetCloudantInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudantResult> getCloudant(GetCloudantArgs args, InvokeOptions options)
    public static Output<GetCloudantResult> getCloudant(GetCloudantArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCloudant:getCloudant
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique identifier of the IBM Cloudant resource instance.
    Identifier string
    Location string
    The location or the environment where an instance is deployed.
    Name string
    The name of the IBM Cloudant resource instance.
    ResourceGroupId string
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.
    Id string
    The unique identifier of the IBM Cloudant resource instance.
    Identifier string
    Location string
    The location or the environment where an instance is deployed.
    Name string
    The name of the IBM Cloudant resource instance.
    ResourceGroupId string
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.
    id String
    The unique identifier of the IBM Cloudant resource instance.
    identifier String
    location String
    The location or the environment where an instance is deployed.
    name String
    The name of the IBM Cloudant resource instance.
    resourceGroupId String
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.
    id string
    The unique identifier of the IBM Cloudant resource instance.
    identifier string
    location string
    The location or the environment where an instance is deployed.
    name string
    The name of the IBM Cloudant resource instance.
    resourceGroupId string
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.
    id str
    The unique identifier of the IBM Cloudant resource instance.
    identifier str
    location str
    The location or the environment where an instance is deployed.
    name str
    The name of the IBM Cloudant resource instance.
    resource_group_id str
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.
    id String
    The unique identifier of the IBM Cloudant resource instance.
    identifier String
    location String
    The location or the environment where an instance is deployed.
    name String
    The name of the IBM Cloudant resource instance.
    resourceGroupId String
    The ID of the resource group where an instance is present. If resource_group_id is not provided default resource group is assigned.

    getCloudant Result

    The following output properties are available:

    Capacity double
    (Number) A number of blocks of throughput units.
    CorsConfigs List<GetCloudantCorsConfig>
    (List of Object) Configuration for CORS.
    Crn string
    (String) The CRN of the resource instance.
    EnableCors bool
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    Extensions Dictionary<string, string>
    (Map of String) The extended metadata as a map associated with the resource instance.
    Features List<string>
    (List of String) List of enabled optional features.
    FeaturesFlags List<string>
    (List of String) List of feature flags.
    Guid string
    (String) The GUID of the resource instance.
    Id string
    IncludeDataEvents bool
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    Location string
    Name string
    OnetimeCredentials bool
    ParametersJson string
    Plan string
    (String) The plan type of the instance.
    ResourceControllerUrl string
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    ResourceCrn string
    (String) The CRN of the resource.
    ResourceGroupId string
    ResourceGroupName string
    (String) The resource group name in which resource is provisioned.
    ResourceName string
    (String) The name of the resource.
    ResourceStatus string
    (String) The status of the resource.
    Service string
    (String) The service type of the instance.
    Status string
    (String) The resource instance status.
    Tags List<string>
    Throughput Dictionary<string, double>
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    Version string
    (String) The vendor version.
    Identifier string
    Capacity float64
    (Number) A number of blocks of throughput units.
    CorsConfigs []GetCloudantCorsConfig
    (List of Object) Configuration for CORS.
    Crn string
    (String) The CRN of the resource instance.
    EnableCors bool
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    Extensions map[string]string
    (Map of String) The extended metadata as a map associated with the resource instance.
    Features []string
    (List of String) List of enabled optional features.
    FeaturesFlags []string
    (List of String) List of feature flags.
    Guid string
    (String) The GUID of the resource instance.
    Id string
    IncludeDataEvents bool
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    Location string
    Name string
    OnetimeCredentials bool
    ParametersJson string
    Plan string
    (String) The plan type of the instance.
    ResourceControllerUrl string
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    ResourceCrn string
    (String) The CRN of the resource.
    ResourceGroupId string
    ResourceGroupName string
    (String) The resource group name in which resource is provisioned.
    ResourceName string
    (String) The name of the resource.
    ResourceStatus string
    (String) The status of the resource.
    Service string
    (String) The service type of the instance.
    Status string
    (String) The resource instance status.
    Tags []string
    Throughput map[string]float64
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    Version string
    (String) The vendor version.
    Identifier string
    capacity Double
    (Number) A number of blocks of throughput units.
    corsConfigs List<GetCloudantCorsConfig>
    (List of Object) Configuration for CORS.
    crn String
    (String) The CRN of the resource instance.
    enableCors Boolean
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    extensions Map<String,String>
    (Map of String) The extended metadata as a map associated with the resource instance.
    features List<String>
    (List of String) List of enabled optional features.
    featuresFlags List<String>
    (List of String) List of feature flags.
    guid String
    (String) The GUID of the resource instance.
    id String
    includeDataEvents Boolean
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    location String
    name String
    onetimeCredentials Boolean
    parametersJson String
    plan String
    (String) The plan type of the instance.
    resourceControllerUrl String
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    resourceCrn String
    (String) The CRN of the resource.
    resourceGroupId String
    resourceGroupName String
    (String) The resource group name in which resource is provisioned.
    resourceName String
    (String) The name of the resource.
    resourceStatus String
    (String) The status of the resource.
    service String
    (String) The service type of the instance.
    status String
    (String) The resource instance status.
    tags List<String>
    throughput Map<String,Double>
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    version String
    (String) The vendor version.
    identifier String
    capacity number
    (Number) A number of blocks of throughput units.
    corsConfigs GetCloudantCorsConfig[]
    (List of Object) Configuration for CORS.
    crn string
    (String) The CRN of the resource instance.
    enableCors boolean
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    extensions {[key: string]: string}
    (Map of String) The extended metadata as a map associated with the resource instance.
    features string[]
    (List of String) List of enabled optional features.
    featuresFlags string[]
    (List of String) List of feature flags.
    guid string
    (String) The GUID of the resource instance.
    id string
    includeDataEvents boolean
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    location string
    name string
    onetimeCredentials boolean
    parametersJson string
    plan string
    (String) The plan type of the instance.
    resourceControllerUrl string
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    resourceCrn string
    (String) The CRN of the resource.
    resourceGroupId string
    resourceGroupName string
    (String) The resource group name in which resource is provisioned.
    resourceName string
    (String) The name of the resource.
    resourceStatus string
    (String) The status of the resource.
    service string
    (String) The service type of the instance.
    status string
    (String) The resource instance status.
    tags string[]
    throughput {[key: string]: number}
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    version string
    (String) The vendor version.
    identifier string
    capacity float
    (Number) A number of blocks of throughput units.
    cors_configs Sequence[GetCloudantCorsConfig]
    (List of Object) Configuration for CORS.
    crn str
    (String) The CRN of the resource instance.
    enable_cors bool
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    extensions Mapping[str, str]
    (Map of String) The extended metadata as a map associated with the resource instance.
    features Sequence[str]
    (List of String) List of enabled optional features.
    features_flags Sequence[str]
    (List of String) List of feature flags.
    guid str
    (String) The GUID of the resource instance.
    id str
    include_data_events bool
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    location str
    name str
    onetime_credentials bool
    parameters_json str
    plan str
    (String) The plan type of the instance.
    resource_controller_url str
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    resource_crn str
    (String) The CRN of the resource.
    resource_group_id str
    resource_group_name str
    (String) The resource group name in which resource is provisioned.
    resource_name str
    (String) The name of the resource.
    resource_status str
    (String) The status of the resource.
    service str
    (String) The service type of the instance.
    status str
    (String) The resource instance status.
    tags Sequence[str]
    throughput Mapping[str, float]
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    version str
    (String) The vendor version.
    identifier str
    capacity Number
    (Number) A number of blocks of throughput units.
    corsConfigs List<Property Map>
    (List of Object) Configuration for CORS.
    crn String
    (String) The CRN of the resource instance.
    enableCors Boolean
    (Boolean) The boolean value to enable CORS. The supported values are true and false.
    extensions Map<String>
    (Map of String) The extended metadata as a map associated with the resource instance.
    features List<String>
    (List of String) List of enabled optional features.
    featuresFlags List<String>
    (List of String) List of feature flags.
    guid String
    (String) The GUID of the resource instance.
    id String
    includeDataEvents Boolean
    (Boolean) Include data event types in events sent to IBM Cloud Activity Tracker with LogDNA for the IBM Cloudant instance. By default emitted events are only of the management type.
    location String
    name String
    onetimeCredentials Boolean
    parametersJson String
    plan String
    (String) The plan type of the instance.
    resourceControllerUrl String
    (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
    resourceCrn String
    (String) The CRN of the resource.
    resourceGroupId String
    resourceGroupName String
    (String) The resource group name in which resource is provisioned.
    resourceName String
    (String) The name of the resource.
    resourceStatus String
    (String) The status of the resource.
    service String
    (String) The service type of the instance.
    status String
    (String) The resource instance status.
    tags List<String>
    throughput Map<Number>
    (Map of Number) Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes.
    version String
    (String) The vendor version.
    identifier String

    Supporting Types

    GetCloudantCorsConfig

    AllowCredentials bool
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    Origins List<string>
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.
    AllowCredentials bool
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    Origins []string
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.
    allowCredentials Boolean
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    origins List<String>
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.
    allowCredentials boolean
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    origins string[]
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.
    allow_credentials bool
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    origins Sequence[str]
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.
    allowCredentials Boolean
    (Boolean) - Boolean value to allow authentication credentials. If set to true, browser requests must be done by setting XmlHttpRequest.withCredentials = true on the request object.
    origins List<String>
    (List of String) - Contains the list of allowed origin domains with the full URL including the protocol. Subdomains count as separate domains, so all subdomains used have to be listed.

    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