Astra

Community
Package contributed by a community member
v1.0.25 published on Tuesday, Jun 21, 2022 by pulumiverse

getKeyspaces

astra.getKeyspaces provides a datasource that lists the keyspaces in an Astra database.

Example Usage

using Pulumi;
using Astra = Pulumi.Astra;

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

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.LookupKeyspaces(ctx, &GetKeyspacesArgs{
			DatabaseId: "f9f4b1e0-4c05-451e-9bba-d631295a7f73",
		}, 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 dev = Output.of(AstraFunctions.getKeyspaces(GetKeyspacesArgs.builder()
            .databaseId("f9f4b1e0-4c05-451e-9bba-d631295a7f73")
            .build()));

    }
}
import pulumi
import pulumi_astra as astra

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

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

Using getKeyspaces

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 getKeyspaces(args: GetKeyspacesArgs, opts?: InvokeOptions): Promise<GetKeyspacesResult>
function getKeyspacesOutput(args: GetKeyspacesOutputArgs, opts?: InvokeOptions): Output<GetKeyspacesResult>
def get_keyspaces(database_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetKeyspacesResult
def get_keyspaces_output(database_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetKeyspacesResult]
func LookupKeyspaces(ctx *Context, args *LookupKeyspacesArgs, opts ...InvokeOption) (*LookupKeyspacesResult, error)
func LookupKeyspacesOutput(ctx *Context, args *LookupKeyspacesOutputArgs, opts ...InvokeOption) LookupKeyspacesResultOutput

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

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

The following arguments are supported:

DatabaseId string
DatabaseId string
databaseId String
databaseId string
databaseId String

getKeyspaces Result

The following output properties are available:

DatabaseId string
Id string

The provider-assigned unique ID for this managed resource.

Results List<Pulumiverse.Astra.Outputs.GetKeyspacesResult>
DatabaseId string
Id string

The provider-assigned unique ID for this managed resource.

Results []GetKeyspacesResult
databaseId String
id String

The provider-assigned unique ID for this managed resource.

results List<GetKeyspacesResult>
databaseId string
id string

The provider-assigned unique ID for this managed resource.

results GetKeyspacesResult[]
database_id str
id str

The provider-assigned unique ID for this managed resource.

results Sequence[GetKeyspacesResult]
databaseId String
id String

The provider-assigned unique ID for this managed resource.

results List<Property Map>

Supporting Types

GetKeyspacesResult

Name string
Name string
name String
name string
name str
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.