ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getCloudant
Explore with Pulumi AI
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.
- Resource
Group stringId - 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.
- Resource
Group stringId - 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.
- resource
Group StringId - 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.
- resource
Group stringId - 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_ strid - 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.
- resource
Group StringId - 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.
- Cors
Configs List<GetCloudant Cors Config> - (List of Object) Configuration for CORS.
- Crn string
- (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 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.
- Features
Flags List<string> - (List of String) List of feature flags.
- Guid string
- (String) The
GUID
of the resource instance. - Id string
- Include
Data boolEvents - (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 themanagement
type. - Location string
- Name string
- Onetime
Credentials bool - Parameters
Json string - Plan string
- (String) The plan type of the instance.
- Resource
Controller stringUrl - (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
- Resource
Crn string - (String) The CRN of the resource.
- Resource
Group stringId - Resource
Group stringName - (String) The resource group name in which resource is provisioned.
- Resource
Name string - (String) The name of the resource.
- Resource
Status string - (String) The status of the resource.
- Service string
- (String) The service type of the instance.
- Status string
- (String) The resource instance status.
- 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.
- Cors
Configs []GetCloudant Cors Config - (List of Object) Configuration for CORS.
- Crn string
- (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 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.
- Features
Flags []string - (List of String) List of feature flags.
- Guid string
- (String) The
GUID
of the resource instance. - Id string
- Include
Data boolEvents - (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 themanagement
type. - Location string
- Name string
- Onetime
Credentials bool - Parameters
Json string - Plan string
- (String) The plan type of the instance.
- Resource
Controller stringUrl - (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
- Resource
Crn string - (String) The CRN of the resource.
- Resource
Group stringId - Resource
Group stringName - (String) The resource group name in which resource is provisioned.
- Resource
Name string - (String) The name of the resource.
- Resource
Status string - (String) The status of the resource.
- Service string
- (String) The service type of the instance.
- Status string
- (String) The resource instance status.
- []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.
- cors
Configs List<GetCloudant Cors Config> - (List of Object) Configuration for CORS.
- crn String
- (String) The CRN of the resource instance.
- enable
Cors 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.
- features
Flags List<String> - (List of String) List of feature flags.
- guid String
- (String) The
GUID
of the resource instance. - id String
- include
Data BooleanEvents - (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 themanagement
type. - location String
- name String
- onetime
Credentials Boolean - parameters
Json String - plan String
- (String) The plan type of the instance.
- resource
Controller StringUrl - (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
- resource
Crn String - (String) The CRN of the resource.
- resource
Group StringId - resource
Group StringName - (String) The resource group name in which resource is provisioned.
- resource
Name String - (String) The name of the resource.
- resource
Status String - (String) The status of the resource.
- service String
- (String) The service type of the instance.
- status String
- (String) The resource instance status.
- 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.
- cors
Configs GetCloudant Cors Config[] - (List of Object) Configuration for CORS.
- crn string
- (String) The CRN of the resource instance.
- enable
Cors 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.
- features
Flags string[] - (List of String) List of feature flags.
- guid string
- (String) The
GUID
of the resource instance. - id string
- include
Data booleanEvents - (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 themanagement
type. - location string
- name string
- onetime
Credentials boolean - parameters
Json string - plan string
- (String) The plan type of the instance.
- resource
Controller stringUrl - (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
- resource
Crn string - (String) The CRN of the resource.
- resource
Group stringId - resource
Group stringName - (String) The resource group name in which resource is provisioned.
- resource
Name string - (String) The name of the resource.
- resource
Status string - (String) The status of the resource.
- service string
- (String) The service type of the instance.
- status string
- (String) The resource instance status.
- 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[GetCloudant Cors Config] - (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_ boolevents - (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 themanagement
type. - location str
- name str
- onetime_
credentials bool - parameters_
json str - plan str
- (String) The plan type of the instance.
- resource_
controller_ strurl - (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_ strid - resource_
group_ strname - (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.
- 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.
- cors
Configs List<Property Map> - (List of Object) Configuration for CORS.
- crn String
- (String) The CRN of the resource instance.
- enable
Cors 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.
- features
Flags List<String> - (List of String) List of feature flags.
- guid String
- (String) The
GUID
of the resource instance. - id String
- include
Data BooleanEvents - (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 themanagement
type. - location String
- name String
- onetime
Credentials Boolean - parameters
Json String - plan String
- (String) The plan type of the instance.
- resource
Controller StringUrl - (String) The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource.
- resource
Crn String - (String) The CRN of the resource.
- resource
Group StringId - resource
Group StringName - (String) The resource group name in which resource is provisioned.
- resource
Name String - (String) The name of the resource.
- resource
Status String - (String) The status of the resource.
- service String
- (String) The service type of the instance.
- status String
- (String) The resource instance status.
- 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
- 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 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.
- 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 []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 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.
- allow
Credentials 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.
- allow
Credentials 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.