Upstash

v0.0.21 published on Thursday, Aug 4, 2022 by Upstash

getRedisDatabase

Example Usage

using Pulumi;
using Upstash = Pulumi.Upstash;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleDBData = Output.Create(Upstash.GetRedisDatabase.InvokeAsync(new Upstash.GetRedisDatabaseArgs
        {
            DatabaseId = resource.Upstash_redis_database.ExampleDB.Database_id,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-upstash/sdk/go/upstash"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/upstash/upstash-pulumi-provider/sdk/go/upstash"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := upstash.LookupRedisDatabase(ctx, &GetRedisDatabaseArgs{
			DatabaseId: resource.Upstash_redis_database.ExampleDB.Database_id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleDBData = Output.of(UpstashFunctions.getRedisDatabase(GetRedisDatabaseArgs.builder()
            .databaseId(resource.upstash_redis_database().exampleDB().database_id())
            .build()));

    }
}
import pulumi
import pulumi_upstash as upstash

example_db_data = upstash.get_redis_database(database_id=resource["upstash_redis_database"]["exampleDB"]["database_id"])
import * as pulumi from "@pulumi/pulumi";
import * as upstash from "@pulumi/upstash";

const exampleDBData = upstash.getRedisDatabase({
    databaseId: resource.upstash_redis_database.exampleDB.database_id,
});
variables:
  exampleDBData:
    Fn::Invoke:
      Function: upstash:getRedisDatabase
      Arguments:
        databaseId: ${resource.upstash_redis_database.exampleDB.database_id}

Using getRedisDatabase

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 getRedisDatabase(args: GetRedisDatabaseArgs, opts?: InvokeOptions): Promise<GetRedisDatabaseResult>
function getRedisDatabaseOutput(args: GetRedisDatabaseOutputArgs, opts?: InvokeOptions): Output<GetRedisDatabaseResult>
def get_redis_database(database_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetRedisDatabaseResult
def get_redis_database_output(database_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetRedisDatabaseResult]
func LookupRedisDatabase(ctx *Context, args *LookupRedisDatabaseArgs, opts ...InvokeOption) (*LookupRedisDatabaseResult, error)
func LookupRedisDatabaseOutput(ctx *Context, args *LookupRedisDatabaseOutputArgs, opts ...InvokeOption) LookupRedisDatabaseResultOutput

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

public static class GetRedisDatabase 
{
    public static Task<GetRedisDatabaseResult> InvokeAsync(GetRedisDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetRedisDatabaseResult> Invoke(GetRedisDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRedisDatabaseResult> getRedisDatabase(GetRedisDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: upstash:index/getRedisDatabase:getRedisDatabase
  arguments:
    # arguments dictionary

The following arguments are supported:

DatabaseId string
DatabaseId string
databaseId String
databaseId string
databaseId String

getRedisDatabase Result

The following output properties are available:

Consistent bool

Deprecated:

Consistent option is deprecated.

CreationTime int
DatabaseId string
DatabaseName string
DatabaseType string
DbDailyBandwidthLimit int
DbDiskThreshold int
DbMaxClients int
DbMaxCommandsPerSecond int
DbMaxEntrySize int
DbMaxRequestSize int
DbMemoryThreshold int
Endpoint string
Id string

The provider-assigned unique ID for this managed resource.

Multizone bool
Password string
Port int
ReadOnlyRestToken string
Region string
RestToken string
State string
Tls bool
UserEmail string
Consistent bool

Deprecated:

Consistent option is deprecated.

CreationTime int
DatabaseId string
DatabaseName string
DatabaseType string
DbDailyBandwidthLimit int
DbDiskThreshold int
DbMaxClients int
DbMaxCommandsPerSecond int
DbMaxEntrySize int
DbMaxRequestSize int
DbMemoryThreshold int
Endpoint string
Id string

The provider-assigned unique ID for this managed resource.

Multizone bool
Password string
Port int
ReadOnlyRestToken string
Region string
RestToken string
State string
Tls bool
UserEmail string
consistent Boolean

Deprecated:

Consistent option is deprecated.

creationTime Integer
databaseId String
databaseName String
databaseType String
dbDailyBandwidthLimit Integer
dbDiskThreshold Integer
dbMaxClients Integer
dbMaxCommandsPerSecond Integer
dbMaxEntrySize Integer
dbMaxRequestSize Integer
dbMemoryThreshold Integer
endpoint String
id String

The provider-assigned unique ID for this managed resource.

multizone Boolean
password String
port Integer
readOnlyRestToken String
region String
restToken String
state String
tls Boolean
userEmail String
consistent boolean

Deprecated:

Consistent option is deprecated.

creationTime number
databaseId string
databaseName string
databaseType string
dbDailyBandwidthLimit number
dbDiskThreshold number
dbMaxClients number
dbMaxCommandsPerSecond number
dbMaxEntrySize number
dbMaxRequestSize number
dbMemoryThreshold number
endpoint string
id string

The provider-assigned unique ID for this managed resource.

multizone boolean
password string
port number
readOnlyRestToken string
region string
restToken string
state string
tls boolean
userEmail string
consistent bool

Deprecated:

Consistent option is deprecated.

creation_time int
database_id str
database_name str
database_type str
db_daily_bandwidth_limit int
db_disk_threshold int
db_max_clients int
db_max_commands_per_second int
db_max_entry_size int
db_max_request_size int
db_memory_threshold int
endpoint str
id str

The provider-assigned unique ID for this managed resource.

multizone bool
password str
port int
read_only_rest_token str
region str
rest_token str
state str
tls bool
user_email str
consistent Boolean

Deprecated:

Consistent option is deprecated.

creationTime Number
databaseId String
databaseName String
databaseType String
dbDailyBandwidthLimit Number
dbDiskThreshold Number
dbMaxClients Number
dbMaxCommandsPerSecond Number
dbMaxEntrySize Number
dbMaxRequestSize Number
dbMemoryThreshold Number
endpoint String
id String

The provider-assigned unique ID for this managed resource.

multizone Boolean
password String
port Number
readOnlyRestToken String
region String
restToken String
state String
tls Boolean
userEmail String

Package Details

Repository
https://github.com/upstash/upstash-pulumi-provider
License
Apache-2.0
Notes

This Pulumi package is based on the upstash Terraform Provider.