Astra

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

getAstraDatabase

astra.Database provides a datasource for Astra an Astra database. This can be used to select an existing database within your Astra Organization.

Example Usage

using Pulumi;
using Astra = Pulumi.Astra;

class MyStack : Stack
{
    public MyStack()
    {
        var db = Output.Create(Astra.GetAstraDatabase.InvokeAsync(new Astra.GetAstraDatabaseArgs
        {
            DatabaseId = "8d356587-73b3-430a-9c0e-d780332e2afb",
        }));
    }

}
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.GetAstraDatabase(ctx, &GetAstraDatabaseArgs{
			DatabaseId: "8d356587-73b3-430a-9c0e-d780332e2afb",
		}, 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.GetAstraDatabaseArgs;
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 db = AstraFunctions.getAstraDatabase(GetAstraDatabaseArgs.builder()
            .databaseId("8d356587-73b3-430a-9c0e-d780332e2afb")
            .build());

    }
}
import pulumi
import pulumi_astra as astra

db = astra.get_astra_database(database_id="8d356587-73b3-430a-9c0e-d780332e2afb")
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";

const db = pulumi.output(astra.getAstraDatabase({
    databaseId: "8d356587-73b3-430a-9c0e-d780332e2afb",
}));
variables:
  db:
    Fn::Invoke:
      Function: astra:getAstraDatabase
      Arguments:
        databaseId: 8d356587-73b3-430a-9c0e-d780332e2afb

Using getAstraDatabase

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 getAstraDatabase(args: GetAstraDatabaseArgs, opts?: InvokeOptions): Promise<GetAstraDatabaseResult>
function getAstraDatabaseOutput(args: GetAstraDatabaseOutputArgs, opts?: InvokeOptions): Output<GetAstraDatabaseResult>
def get_astra_database(database_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAstraDatabaseResult
def get_astra_database_output(database_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAstraDatabaseResult]
func GetAstraDatabase(ctx *Context, args *GetAstraDatabaseArgs, opts ...InvokeOption) (*GetAstraDatabaseResult, error)
func GetAstraDatabaseOutput(ctx *Context, args *GetAstraDatabaseOutputArgs, opts ...InvokeOption) GetAstraDatabaseResultOutput

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

public static class GetAstraDatabase 
{
    public static Task<GetAstraDatabaseResult> InvokeAsync(GetAstraDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetAstraDatabaseResult> Invoke(GetAstraDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAstraDatabaseResult> getAstraDatabase(GetAstraDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: astra:index/getAstraDatabase:getAstraDatabase
  arguments:
    # arguments dictionary

The following arguments are supported:

DatabaseId string
DatabaseId string
databaseId String
databaseId string
databaseId String

getAstraDatabase Result

The following output properties are available:

AdditionalKeyspaces List<string>
CloudProvider string
CqlshUrl string
DataEndpointUrl string
DatabaseId string
Datacenters Dictionary<string, string>
GrafanaUrl string
GraphqlUrl string
Id string

The provider-assigned unique ID for this managed resource.

Keyspace string
Name string
NodeCount int
OrganizationId string
OwnerId string
Regions List<string>
ReplicationFactor int
Status string
TotalStorage int
AdditionalKeyspaces []string
CloudProvider string
CqlshUrl string
DataEndpointUrl string
DatabaseId string
Datacenters map[string]string
GrafanaUrl string
GraphqlUrl string
Id string

The provider-assigned unique ID for this managed resource.

Keyspace string
Name string
NodeCount int
OrganizationId string
OwnerId string
Regions []string
ReplicationFactor int
Status string
TotalStorage int
additionalKeyspaces List<String>
cloudProvider String
cqlshUrl String
dataEndpointUrl String
databaseId String
datacenters Map<String,String>
grafanaUrl String
graphqlUrl String
id String

The provider-assigned unique ID for this managed resource.

keyspace String
name String
nodeCount Integer
organizationId String
ownerId String
regions List<String>
replicationFactor Integer
status String
totalStorage Integer
additionalKeyspaces string[]
cloudProvider string
cqlshUrl string
dataEndpointUrl string
databaseId string
datacenters {[key: string]: string}
grafanaUrl string
graphqlUrl string
id string

The provider-assigned unique ID for this managed resource.

keyspace string
name string
nodeCount number
organizationId string
ownerId string
regions string[]
replicationFactor number
status string
totalStorage number
additional_keyspaces Sequence[str]
cloud_provider str
cqlsh_url str
data_endpoint_url str
database_id str
datacenters Mapping[str, str]
grafana_url str
graphql_url str
id str

The provider-assigned unique ID for this managed resource.

keyspace str
name str
node_count int
organization_id str
owner_id str
regions Sequence[str]
replication_factor int
status str
total_storage int
additionalKeyspaces List<String>
cloudProvider String
cqlshUrl String
dataEndpointUrl String
databaseId String
datacenters Map<String>
grafanaUrl String
graphqlUrl String
id String

The provider-assigned unique ID for this managed resource.

keyspace String
name String
nodeCount Number
organizationId String
ownerId String
regions List<String>
replicationFactor Number
status String
totalStorage Number

Package Details

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

This Pulumi package is based on the astra Terraform Provider.