UpCloud v0.1.0 published on Friday, Mar 14, 2025 by UpCloudLtd
upcloud.getManagedDatabaseValkeySessions
Explore with Pulumi AI
Current sessions of a Valkey managed database
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@pulumi/upcloud";
import * as upcloud from "@upcloud/pulumi-upcloud";
// Use data source to gather a list of the active sessions for a Managed Valkey Database
// Create a Managed Valkey resource
const exampleManagedDatabaseValkey = new upcloud.ManagedDatabaseValkey("example", {
    name: "example",
    title: "example",
    plan: "1x1xCPU-2GB",
    zone: "fi-hel2",
});
// Read the active sessions of the newly created service
const example = upcloud.getManagedDatabaseValkeySessionsOutput({
    service: exampleManagedDatabaseValkey.id,
});
import pulumi
import pulumi_upcloud as upcloud
# Use data source to gather a list of the active sessions for a Managed Valkey Database
# Create a Managed Valkey resource
example_managed_database_valkey = upcloud.ManagedDatabaseValkey("example",
    name="example",
    title="example",
    plan="1x1xCPU-2GB",
    zone="fi-hel2")
# Read the active sessions of the newly created service
example = upcloud.get_managed_database_valkey_sessions_output(service=example_managed_database_valkey.id)
package main
import (
	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Use data source to gather a list of the active sessions for a Managed Valkey Database
		// Create a Managed Valkey resource
		exampleManagedDatabaseValkey, err := upcloud.NewManagedDatabaseValkey(ctx, "example", &upcloud.ManagedDatabaseValkeyArgs{
			Name:  pulumi.String("example"),
			Title: pulumi.String("example"),
			Plan:  pulumi.String("1x1xCPU-2GB"),
			Zone:  pulumi.String("fi-hel2"),
		})
		if err != nil {
			return err
		}
		// Read the active sessions of the newly created service
		_ = upcloud.GetManagedDatabaseValkeySessionsOutput(ctx, upcloud.GetManagedDatabaseValkeySessionsOutputArgs{
			Service: exampleManagedDatabaseValkey.ID(),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = Pulumi.UpCloud;
using UpCloud = UpCloud.Pulumi.UpCloud;
return await Deployment.RunAsync(() => 
{
    // Use data source to gather a list of the active sessions for a Managed Valkey Database
    // Create a Managed Valkey resource
    var exampleManagedDatabaseValkey = new UpCloud.ManagedDatabaseValkey("example", new()
    {
        Name = "example",
        Title = "example",
        Plan = "1x1xCPU-2GB",
        Zone = "fi-hel2",
    });
    // Read the active sessions of the newly created service
    var example = UpCloud.GetManagedDatabaseValkeySessions.Invoke(new()
    {
        Service = exampleManagedDatabaseValkey.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.ManagedDatabaseValkey;
import com.pulumi.upcloud.ManagedDatabaseValkeyArgs;
import com.pulumi.upcloud.UpcloudFunctions;
import com.pulumi.upcloud.inputs.GetManagedDatabaseValkeySessionsArgs;
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) {
        // Use data source to gather a list of the active sessions for a Managed Valkey Database
        // Create a Managed Valkey resource
        var exampleManagedDatabaseValkey = new ManagedDatabaseValkey("exampleManagedDatabaseValkey", ManagedDatabaseValkeyArgs.builder()
            .name("example")
            .title("example")
            .plan("1x1xCPU-2GB")
            .zone("fi-hel2")
            .build());
        // Read the active sessions of the newly created service
        final var example = UpcloudFunctions.getManagedDatabaseValkeySessions(GetManagedDatabaseValkeySessionsArgs.builder()
            .service(exampleManagedDatabaseValkey.id())
            .build());
    }
}
resources:
  # Use data source to gather a list of the active sessions for a Managed Valkey Database
  # Create a Managed Valkey resource
  exampleManagedDatabaseValkey:
    type: upcloud:ManagedDatabaseValkey
    name: example
    properties:
      name: example
      title: example
      plan: 1x1xCPU-2GB
      zone: fi-hel2
variables:
  # Read the active sessions of the newly created service
  example:
    fn::invoke:
      function: upcloud:getManagedDatabaseValkeySessions
      arguments:
        service: ${exampleManagedDatabaseValkey.id}
Using getManagedDatabaseValkeySessions
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 getManagedDatabaseValkeySessions(args: GetManagedDatabaseValkeySessionsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseValkeySessionsResult>
function getManagedDatabaseValkeySessionsOutput(args: GetManagedDatabaseValkeySessionsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseValkeySessionsResult>def get_managed_database_valkey_sessions(limit: Optional[int] = None,
                                         offset: Optional[int] = None,
                                         order: Optional[str] = None,
                                         service: Optional[str] = None,
                                         sessions: Optional[Sequence[GetManagedDatabaseValkeySessionsSession]] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseValkeySessionsResult
def get_managed_database_valkey_sessions_output(limit: Optional[pulumi.Input[int]] = None,
                                         offset: Optional[pulumi.Input[int]] = None,
                                         order: Optional[pulumi.Input[str]] = None,
                                         service: Optional[pulumi.Input[str]] = None,
                                         sessions: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedDatabaseValkeySessionsSessionArgs]]]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseValkeySessionsResult]func GetManagedDatabaseValkeySessions(ctx *Context, args *GetManagedDatabaseValkeySessionsArgs, opts ...InvokeOption) (*GetManagedDatabaseValkeySessionsResult, error)
func GetManagedDatabaseValkeySessionsOutput(ctx *Context, args *GetManagedDatabaseValkeySessionsOutputArgs, opts ...InvokeOption) GetManagedDatabaseValkeySessionsResultOutput> Note: This function is named GetManagedDatabaseValkeySessions in the Go SDK.
public static class GetManagedDatabaseValkeySessions 
{
    public static Task<GetManagedDatabaseValkeySessionsResult> InvokeAsync(GetManagedDatabaseValkeySessionsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseValkeySessionsResult> Invoke(GetManagedDatabaseValkeySessionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedDatabaseValkeySessionsResult> getManagedDatabaseValkeySessions(GetManagedDatabaseValkeySessionsArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseValkeySessionsResult> getManagedDatabaseValkeySessions(GetManagedDatabaseValkeySessionsArgs args, InvokeOptions options)
fn::invoke:
  function: upcloud:index/getManagedDatabaseValkeySessions:getManagedDatabaseValkeySessions
  arguments:
    # arguments dictionaryThe following arguments are supported:
getManagedDatabaseValkeySessions Result
The following output properties are available:
Supporting Types
GetManagedDatabaseValkeySessionsSession     
- ActiveChannel intSubscriptions 
- Number of active channel subscriptions
- ActiveDatabase string
- Current database ID
- ActivePattern intMatching Channel Subscriptions 
- Number of pattern matching subscriptions.
- ApplicationName string
- Name of the application that is connected to this service.
- ClientAddr string
- Number of pattern matching subscriptions.
- ConnectionAge int
- Total duration of the connection in nanoseconds.
- ConnectionIdle int
- Idle time of the connection in nanoseconds.
- Flags List<string>
- A set containing flags' descriptions.
- FlagsRaw string
- Client connection flags in raw string format.
- Id string
- Process ID of this session.
- MultiExec intCommands 
- Number of commands in a MULTI/EXEC context.
- OutputBuffer int
- Output buffer length.
- OutputBuffer intMemory 
- Output buffer memory usage.
- OutputList intLength 
- Output list length (replies are queued in this list when the buffer is full).
- Query string
- The last executed command.
- QueryBuffer int
- Query buffer length (0 means no query pending).
- QueryBuffer intFree 
- Free space of the query buffer (0 means the buffer is full).
- ActiveChannel intSubscriptions 
- Number of active channel subscriptions
- ActiveDatabase string
- Current database ID
- ActivePattern intMatching Channel Subscriptions 
- Number of pattern matching subscriptions.
- ApplicationName string
- Name of the application that is connected to this service.
- ClientAddr string
- Number of pattern matching subscriptions.
- ConnectionAge int
- Total duration of the connection in nanoseconds.
- ConnectionIdle int
- Idle time of the connection in nanoseconds.
- Flags []string
- A set containing flags' descriptions.
- FlagsRaw string
- Client connection flags in raw string format.
- Id string
- Process ID of this session.
- MultiExec intCommands 
- Number of commands in a MULTI/EXEC context.
- OutputBuffer int
- Output buffer length.
- OutputBuffer intMemory 
- Output buffer memory usage.
- OutputList intLength 
- Output list length (replies are queued in this list when the buffer is full).
- Query string
- The last executed command.
- QueryBuffer int
- Query buffer length (0 means no query pending).
- QueryBuffer intFree 
- Free space of the query buffer (0 means the buffer is full).
- activeChannel IntegerSubscriptions 
- Number of active channel subscriptions
- activeDatabase String
- Current database ID
- activePattern IntegerMatching Channel Subscriptions 
- Number of pattern matching subscriptions.
- applicationName String
- Name of the application that is connected to this service.
- clientAddr String
- Number of pattern matching subscriptions.
- connectionAge Integer
- Total duration of the connection in nanoseconds.
- connectionIdle Integer
- Idle time of the connection in nanoseconds.
- flags List<String>
- A set containing flags' descriptions.
- flagsRaw String
- Client connection flags in raw string format.
- id String
- Process ID of this session.
- multiExec IntegerCommands 
- Number of commands in a MULTI/EXEC context.
- outputBuffer Integer
- Output buffer length.
- outputBuffer IntegerMemory 
- Output buffer memory usage.
- outputList IntegerLength 
- Output list length (replies are queued in this list when the buffer is full).
- query String
- The last executed command.
- queryBuffer Integer
- Query buffer length (0 means no query pending).
- queryBuffer IntegerFree 
- Free space of the query buffer (0 means the buffer is full).
- activeChannel numberSubscriptions 
- Number of active channel subscriptions
- activeDatabase string
- Current database ID
- activePattern numberMatching Channel Subscriptions 
- Number of pattern matching subscriptions.
- applicationName string
- Name of the application that is connected to this service.
- clientAddr string
- Number of pattern matching subscriptions.
- connectionAge number
- Total duration of the connection in nanoseconds.
- connectionIdle number
- Idle time of the connection in nanoseconds.
- flags string[]
- A set containing flags' descriptions.
- flagsRaw string
- Client connection flags in raw string format.
- id string
- Process ID of this session.
- multiExec numberCommands 
- Number of commands in a MULTI/EXEC context.
- outputBuffer number
- Output buffer length.
- outputBuffer numberMemory 
- Output buffer memory usage.
- outputList numberLength 
- Output list length (replies are queued in this list when the buffer is full).
- query string
- The last executed command.
- queryBuffer number
- Query buffer length (0 means no query pending).
- queryBuffer numberFree 
- Free space of the query buffer (0 means the buffer is full).
- active_channel_ intsubscriptions 
- Number of active channel subscriptions
- active_database str
- Current database ID
- active_pattern_ intmatching_ channel_ subscriptions 
- Number of pattern matching subscriptions.
- application_name str
- Name of the application that is connected to this service.
- client_addr str
- Number of pattern matching subscriptions.
- connection_age int
- Total duration of the connection in nanoseconds.
- connection_idle int
- Idle time of the connection in nanoseconds.
- flags Sequence[str]
- A set containing flags' descriptions.
- flags_raw str
- Client connection flags in raw string format.
- id str
- Process ID of this session.
- multi_exec_ intcommands 
- Number of commands in a MULTI/EXEC context.
- output_buffer int
- Output buffer length.
- output_buffer_ intmemory 
- Output buffer memory usage.
- output_list_ intlength 
- Output list length (replies are queued in this list when the buffer is full).
- query str
- The last executed command.
- query_buffer int
- Query buffer length (0 means no query pending).
- query_buffer_ intfree 
- Free space of the query buffer (0 means the buffer is full).
- activeChannel NumberSubscriptions 
- Number of active channel subscriptions
- activeDatabase String
- Current database ID
- activePattern NumberMatching Channel Subscriptions 
- Number of pattern matching subscriptions.
- applicationName String
- Name of the application that is connected to this service.
- clientAddr String
- Number of pattern matching subscriptions.
- connectionAge Number
- Total duration of the connection in nanoseconds.
- connectionIdle Number
- Idle time of the connection in nanoseconds.
- flags List<String>
- A set containing flags' descriptions.
- flagsRaw String
- Client connection flags in raw string format.
- id String
- Process ID of this session.
- multiExec NumberCommands 
- Number of commands in a MULTI/EXEC context.
- outputBuffer Number
- Output buffer length.
- outputBuffer NumberMemory 
- Output buffer memory usage.
- outputList NumberLength 
- Output list length (replies are queued in this list when the buffer is full).
- query String
- The last executed command.
- queryBuffer Number
- Query buffer length (0 means no query pending).
- queryBuffer NumberFree 
- Free space of the query buffer (0 means the buffer is full).
Package Details
- Repository
- upcloud UpCloudLtd/pulumi-upcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the upcloudTerraform Provider.
