rediscloud.getDatabase
Explore with Pulumi AI
The Database data source allows access to the details of an existing database within your Redis Enterprise Cloud account.
Example Usage
The following example shows how to locate a single database within a Subscription. This example assumes the subscription only contains a single database.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rediscloud = Pulumi.Rediscloud;
return await Deployment.RunAsync(() =>
{
var example = Rediscloud.GetDatabase.Invoke(new()
{
SubscriptionId = "1234",
});
});
package main
import (
"github.com/RedisLabs/pulumi-rediscloud/sdk/go/rediscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rediscloud.GetDatabase(ctx, &rediscloud.GetDatabaseArgs{
SubscriptionId: "1234",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rediscloud.RediscloudFunctions;
import com.pulumi.rediscloud.inputs.GetDatabaseArgs;
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 example = RediscloudFunctions.getDatabase(GetDatabaseArgs.builder()
.subscriptionId("1234")
.build());
}
}
import pulumi
import pulumi_rediscloud as rediscloud
example = rediscloud.get_database(subscription_id="1234")
import * as pulumi from "@pulumi/pulumi";
import * as rediscloud from "@pulumi/rediscloud";
const example = rediscloud.getDatabase({
subscriptionId: "1234",
});
variables:
example:
fn::invoke:
Function: rediscloud:getDatabase
Arguments:
subscriptionId: '1234'
The following example shows how to use the name to locate a single database within a subscription that has multiple databases.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rediscloud = Pulumi.Rediscloud;
return await Deployment.RunAsync(() =>
{
var example = Rediscloud.GetDatabase.Invoke(new()
{
Name = "first-database",
SubscriptionId = "1234",
});
});
package main
import (
"github.com/RedisLabs/pulumi-rediscloud/sdk/go/rediscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rediscloud.GetDatabase(ctx, &rediscloud.GetDatabaseArgs{
Name: pulumi.StringRef("first-database"),
SubscriptionId: "1234",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rediscloud.RediscloudFunctions;
import com.pulumi.rediscloud.inputs.GetDatabaseArgs;
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 example = RediscloudFunctions.getDatabase(GetDatabaseArgs.builder()
.name("first-database")
.subscriptionId("1234")
.build());
}
}
import pulumi
import pulumi_rediscloud as rediscloud
example = rediscloud.get_database(name="first-database",
subscription_id="1234")
import * as pulumi from "@pulumi/pulumi";
import * as rediscloud from "@pulumi/rediscloud";
const example = rediscloud.getDatabase({
name: "first-database",
subscriptionId: "1234",
});
variables:
example:
fn::invoke:
Function: rediscloud:getDatabase
Arguments:
name: first-database
subscriptionId: '1234'
Using getDatabase
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 getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
def get_database(name: Optional[str] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
subscription_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(name: Optional[pulumi.Input[str]] = None,
protocol: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
subscription_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
func GetDatabase(ctx *Context, args *GetDatabaseArgs, opts ...InvokeOption) (*GetDatabaseResult, error)
func GetDatabaseOutput(ctx *Context, args *GetDatabaseOutputArgs, opts ...InvokeOption) GetDatabaseResultOutput
> Note: This function is named GetDatabase
in the Go SDK.
public static class GetDatabase
{
public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: rediscloud:index/getDatabase:getDatabase
arguments:
# arguments dictionary
The following arguments are supported:
- Subscription
Id string - ID of the subscription that the database belongs to
- Name string
- The name of the database to filter returned databases
- Protocol string
- The protocol of the database to filter returned databases
- Region string
- The region of the database to filter returned databases
- Subscription
Id string - ID of the subscription that the database belongs to
- Name string
- The name of the database to filter returned databases
- Protocol string
- The protocol of the database to filter returned databases
- Region string
- The region of the database to filter returned databases
- subscription
Id String - ID of the subscription that the database belongs to
- name String
- The name of the database to filter returned databases
- protocol String
- The protocol of the database to filter returned databases
- region String
- The region of the database to filter returned databases
- subscription
Id string - ID of the subscription that the database belongs to
- name string
- The name of the database to filter returned databases
- protocol string
- The protocol of the database to filter returned databases
- region string
- The region of the database to filter returned databases
- subscription_
id str - ID of the subscription that the database belongs to
- name str
- The name of the database to filter returned databases
- protocol str
- The protocol of the database to filter returned databases
- region str
- The region of the database to filter returned databases
- subscription
Id String - ID of the subscription that the database belongs to
- name String
- The name of the database to filter returned databases
- protocol String
- The protocol of the database to filter returned databases
- region String
- The region of the database to filter returned databases
getDatabase Result
The following output properties are available:
- Alerts
List<Redis
Labs. Rediscloud. Outputs. Get Database Alert> - Set of alerts to enable on the database, documented below.
- Data
Eviction string - The data items eviction policy.
- Data
Persistence string - The rate of database data persistence (in persistent storage).
- Hashing
Policies List<string> - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory
Limit doubleIn Gb - The maximum memory usage for the database.
- Modules
List<Redis
Labs. Rediscloud. Outputs. Get Database Module> - Name string
- The alert name
- Password string
- The password used to access the database - not present on
memcached
protocol databases. - Private
Endpoint string - Private endpoint to access the database
- Protocol string
- The protocol of the database.
- Public
Endpoint string - Public endpoint to access the database
- Region string
- Replica
Ofs List<string> - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - Replication bool
- Database replication.
- Subscription
Id string - Support
Oss boolCluster Api - Supports the Redis open-source (OSS) Cluster API.
- Throughput
Measurement stringBy - The throughput measurement method.
- Throughput
Measurement intValue - The throughput value.
- Alerts
[]Get
Database Alert - Set of alerts to enable on the database, documented below.
- Data
Eviction string - The data items eviction policy.
- Data
Persistence string - The rate of database data persistence (in persistent storage).
- Hashing
Policies []string - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory
Limit float64In Gb - The maximum memory usage for the database.
- Modules
[]Get
Database Module - Name string
- The alert name
- Password string
- The password used to access the database - not present on
memcached
protocol databases. - Private
Endpoint string - Private endpoint to access the database
- Protocol string
- The protocol of the database.
- Public
Endpoint string - Public endpoint to access the database
- Region string
- Replica
Ofs []string - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - Replication bool
- Database replication.
- Subscription
Id string - Support
Oss boolCluster Api - Supports the Redis open-source (OSS) Cluster API.
- Throughput
Measurement stringBy - The throughput measurement method.
- Throughput
Measurement intValue - The throughput value.
- alerts
List<Get
Database Alert> - Set of alerts to enable on the database, documented below.
- data
Eviction String - The data items eviction policy.
- data
Persistence String - The rate of database data persistence (in persistent storage).
- hashing
Policies List<String> - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- id String
- The provider-assigned unique ID for this managed resource.
- memory
Limit DoubleIn Gb - The maximum memory usage for the database.
- modules
List<Get
Database Module> - name String
- The alert name
- password String
- The password used to access the database - not present on
memcached
protocol databases. - private
Endpoint String - Private endpoint to access the database
- protocol String
- The protocol of the database.
- public
Endpoint String - Public endpoint to access the database
- region String
- replica
Ofs List<String> - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - replication Boolean
- Database replication.
- subscription
Id String - support
Oss BooleanCluster Api - Supports the Redis open-source (OSS) Cluster API.
- throughput
Measurement StringBy - The throughput measurement method.
- throughput
Measurement IntegerValue - The throughput value.
- alerts
Get
Database Alert[] - Set of alerts to enable on the database, documented below.
- data
Eviction string - The data items eviction policy.
- data
Persistence string - The rate of database data persistence (in persistent storage).
- hashing
Policies string[] - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- id string
- The provider-assigned unique ID for this managed resource.
- memory
Limit numberIn Gb - The maximum memory usage for the database.
- modules
Get
Database Module[] - name string
- The alert name
- password string
- The password used to access the database - not present on
memcached
protocol databases. - private
Endpoint string - Private endpoint to access the database
- protocol string
- The protocol of the database.
- public
Endpoint string - Public endpoint to access the database
- region string
- replica
Ofs string[] - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - replication boolean
- Database replication.
- subscription
Id string - support
Oss booleanCluster Api - Supports the Redis open-source (OSS) Cluster API.
- throughput
Measurement stringBy - The throughput measurement method.
- throughput
Measurement numberValue - The throughput value.
- alerts
Sequence[Get
Database Alert] - Set of alerts to enable on the database, documented below.
- data_
eviction str - The data items eviction policy.
- data_
persistence str - The rate of database data persistence (in persistent storage).
- hashing_
policies Sequence[str] - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- id str
- The provider-assigned unique ID for this managed resource.
- memory_
limit_ floatin_ gb - The maximum memory usage for the database.
- modules
Sequence[Get
Database Module] - name str
- The alert name
- password str
- The password used to access the database - not present on
memcached
protocol databases. - private_
endpoint str - Private endpoint to access the database
- protocol str
- The protocol of the database.
- public_
endpoint str - Public endpoint to access the database
- region str
- replica_
ofs Sequence[str] - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - replication bool
- Database replication.
- subscription_
id str - support_
oss_ boolcluster_ api - Supports the Redis open-source (OSS) Cluster API.
- throughput_
measurement_ strby - The throughput measurement method.
- throughput_
measurement_ intvalue - The throughput value.
- alerts List<Property Map>
- Set of alerts to enable on the database, documented below.
- data
Eviction String - The data items eviction policy.
- data
Persistence String - The rate of database data persistence (in persistent storage).
- hashing
Policies List<String> - The list of regular expression rules the database is sharded by. See the documentation on clustering for more information on the hashing policy.
- id String
- The provider-assigned unique ID for this managed resource.
- memory
Limit NumberIn Gb - The maximum memory usage for the database.
- modules List<Property Map>
- name String
- The alert name
- password String
- The password used to access the database - not present on
memcached
protocol databases. - private
Endpoint String - Private endpoint to access the database
- protocol String
- The protocol of the database.
- public
Endpoint String - Public endpoint to access the database
- region String
- replica
Ofs List<String> - The set of Redis database URIs, in the format
redis://user:password@host:port
, that this database will be a replica of. - replication Boolean
- Database replication.
- subscription
Id String - support
Oss BooleanCluster Api - Supports the Redis open-source (OSS) Cluster API.
- throughput
Measurement StringBy - The throughput measurement method.
- throughput
Measurement NumberValue - The throughput value.
Supporting Types
GetDatabaseAlert
GetDatabaseModule
- Name string
- The name of the database to filter returned databases
- Name string
- The name of the database to filter returned databases
- name String
- The name of the database to filter returned databases
- name string
- The name of the database to filter returned databases
- name str
- The name of the database to filter returned databases
- name String
- The name of the database to filter returned databases
Package Details
- Repository
- rediscloud RedisLabs/pulumi-rediscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rediscloud
Terraform Provider.