Astra

v1.0.35 published on Wednesday, Jul 27, 2022 by pulumiverse

getKeyspace

astra.Keyspace provides a datasource for a particular keyspace. See astra.getKeyspaces if you’re looking to fetch all the keyspaces for a particular database.

Example Usage

using Pulumi;
using Astra = Pulumi.Astra;

class MyStack : Stack
{
    public MyStack()
    {
        var dev = Output.Create(Astra.GetKeyspace.InvokeAsync(new Astra.GetKeyspaceArgs
        {
            DatabaseId = "f9f4b1e0-4c05-451e-9bba-d631295a7f73",
            Name = "puppies",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-astra/sdk/go/astra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-astra/sdk/go/astra"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.LookupKeyspace(ctx, &GetKeyspaceArgs{
			DatabaseId: "f9f4b1e0-4c05-451e-9bba-d631295a7f73",
			Name:       "puppies",
		}, 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.astra.AstraFunctions;
import com.pulumi.astra.inputs.GetKeyspaceArgs;
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 dev = AstraFunctions.getKeyspace(GetKeyspaceArgs.builder()
            .databaseId("f9f4b1e0-4c05-451e-9bba-d631295a7f73")
            .name("puppies")
            .build());

    }
}
import pulumi
import pulumi_astra as astra

dev = astra.get_keyspace(database_id="f9f4b1e0-4c05-451e-9bba-d631295a7f73",
    name="puppies")
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";

const dev = pulumi.output(astra.getKeyspace({
    databaseId: "f9f4b1e0-4c05-451e-9bba-d631295a7f73",
    name: "puppies",
}));
variables:
  dev:
    Fn::Invoke:
      Function: astra:getKeyspace
      Arguments:
        databaseId: f9f4b1e0-4c05-451e-9bba-d631295a7f73
        name: puppies

Using getKeyspace

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 getKeyspace(args: GetKeyspaceArgs, opts?: InvokeOptions): Promise<GetKeyspaceResult>
function getKeyspaceOutput(args: GetKeyspaceOutputArgs, opts?: InvokeOptions): Output<GetKeyspaceResult>
def get_keyspace(database_id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetKeyspaceResult
def get_keyspace_output(database_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetKeyspaceResult]
func LookupKeyspace(ctx *Context, args *LookupKeyspaceArgs, opts ...InvokeOption) (*LookupKeyspaceResult, error)
func LookupKeyspaceOutput(ctx *Context, args *LookupKeyspaceOutputArgs, opts ...InvokeOption) LookupKeyspaceResultOutput

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

public static class GetKeyspace 
{
    public static Task<GetKeyspaceResult> InvokeAsync(GetKeyspaceArgs args, InvokeOptions? opts = null)
    public static Output<GetKeyspaceResult> Invoke(GetKeyspaceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKeyspaceResult> getKeyspace(GetKeyspaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: astra:index/getKeyspace:getKeyspace
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DatabaseId string
Name string
DatabaseId string
Name string
databaseId String
name String
databaseId string
name string
databaseId String
name String

getKeyspace Result

The following output properties are available:

DatabaseId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
DatabaseId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
databaseId String
id String

The provider-assigned unique ID for this managed resource.

name String
databaseId string
id string

The provider-assigned unique ID for this managed resource.

name string
database_id str
id str

The provider-assigned unique ID for this managed resource.

name str
databaseId String
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/pulumiverse/pulumi-astra
License
Apache-2.0
Notes

This Pulumi package is based on the astra Terraform Provider.