1. Packages
  2. Upstash
  3. API Docs
  4. getRedisDatabase
Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash

upstash.getRedisDatabase

Explore with Pulumi AI

upstash logo
Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash

    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/pulumi-upstash/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:

    AutoScale bool
    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
    Eviction bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Multizone bool

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    Password string
    Port int
    PrimaryRegion string
    ReadOnlyRestToken string
    ReadRegions List<string>
    Region string
    RestToken string
    State string
    Tls bool
    UserEmail string
    AutoScale bool
    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
    Eviction bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Multizone bool

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    Password string
    Port int
    PrimaryRegion string
    ReadOnlyRestToken string
    ReadRegions []string
    Region string
    RestToken string
    State string
    Tls bool
    UserEmail string
    autoScale Boolean
    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
    eviction Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    multizone Boolean

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    password String
    port Integer
    primaryRegion String
    readOnlyRestToken String
    readRegions List<String>
    region String
    restToken String
    state String
    tls Boolean
    userEmail String
    autoScale boolean
    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
    eviction boolean
    id string
    The provider-assigned unique ID for this managed resource.
    multizone boolean

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    password string
    port number
    primaryRegion string
    readOnlyRestToken string
    readRegions string[]
    region string
    restToken string
    state string
    tls boolean
    userEmail string
    auto_scale bool
    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
    eviction bool
    id str
    The provider-assigned unique ID for this managed resource.
    multizone bool

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    password str
    port int
    primary_region str
    read_only_rest_token str
    read_regions Sequence[str]
    region str
    rest_token str
    state str
    tls bool
    user_email str
    autoScale Boolean
    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
    eviction Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    multizone Boolean

    Deprecated: Multizone option is deprecated. It is enabled by default for paid databases.

    password String
    port Number
    primaryRegion String
    readOnlyRestToken String
    readRegions List<String>
    region String
    restToken String
    state String
    tls Boolean
    userEmail String

    Package Details

    Repository
    upstash upstash/pulumi-upstash
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the upstash Terraform Provider.
    upstash logo
    Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash