1. Packages
  2. Astra DB
  3. API Docs
  4. getAstraDatabase
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

astra.getAstraDatabase

Explore with Pulumi AI

astra logo
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

    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 System.Collections.Generic;
    using Pulumi;
    using Astra = Pulumi.Astra;
    
    return await Deployment.RunAsync(() => 
    {
        var db = Astra.GetAstraDatabase.Invoke(new()
        {
            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
    Astra Database ID (system generated)
    DatabaseId string
    Astra Database ID (system generated)
    databaseId String
    Astra Database ID (system generated)
    databaseId string
    Astra Database ID (system generated)
    database_id str
    Astra Database ID (system generated)
    databaseId String
    Astra Database ID (system generated)

    getAstraDatabase Result

    The following output properties are available:

    AdditionalKeyspaces List<string>
    Additional keyspaces
    CloudProvider string
    Cloud provider (AWS, GCP, AZURE)
    CqlshUrl string
    URL for cqlsh web
    DataEndpointUrl string
    REST API URL
    DatabaseId string
    Astra Database ID (system generated)
    Datacenters Dictionary<string, string>
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    GrafanaUrl string
    URL for the grafana dashboard for this database
    GraphqlUrl string
    Graphql URL
    Id string
    The provider-assigned unique ID for this managed resource.
    Keyspace string
    Initial keyspace
    Name string
    Database name (user provided)
    NodeCount int
    Node count (not relevant for serverless databases)
    OrganizationId string
    Ordg id (system generated)
    OwnerId string
    Owner id (system generated)
    Regions List<string>
    Cloud provider region. Get list of supported regions from regions data-source
    ReplicationFactor int
    Replication Factor (not relevant for serverless databases)
    Status string
    Database status
    TotalStorage int
    Storage Capacity (not relevant for serverelss databases)
    AdditionalKeyspaces []string
    Additional keyspaces
    CloudProvider string
    Cloud provider (AWS, GCP, AZURE)
    CqlshUrl string
    URL for cqlsh web
    DataEndpointUrl string
    REST API URL
    DatabaseId string
    Astra Database ID (system generated)
    Datacenters map[string]string
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    GrafanaUrl string
    URL for the grafana dashboard for this database
    GraphqlUrl string
    Graphql URL
    Id string
    The provider-assigned unique ID for this managed resource.
    Keyspace string
    Initial keyspace
    Name string
    Database name (user provided)
    NodeCount int
    Node count (not relevant for serverless databases)
    OrganizationId string
    Ordg id (system generated)
    OwnerId string
    Owner id (system generated)
    Regions []string
    Cloud provider region. Get list of supported regions from regions data-source
    ReplicationFactor int
    Replication Factor (not relevant for serverless databases)
    Status string
    Database status
    TotalStorage int
    Storage Capacity (not relevant for serverelss databases)
    additionalKeyspaces List<String>
    Additional keyspaces
    cloudProvider String
    Cloud provider (AWS, GCP, AZURE)
    cqlshUrl String
    URL for cqlsh web
    dataEndpointUrl String
    REST API URL
    databaseId String
    Astra Database ID (system generated)
    datacenters Map<String,String>
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    grafanaUrl String
    URL for the grafana dashboard for this database
    graphqlUrl String
    Graphql URL
    id String
    The provider-assigned unique ID for this managed resource.
    keyspace String
    Initial keyspace
    name String
    Database name (user provided)
    nodeCount Integer
    Node count (not relevant for serverless databases)
    organizationId String
    Ordg id (system generated)
    ownerId String
    Owner id (system generated)
    regions List<String>
    Cloud provider region. Get list of supported regions from regions data-source
    replicationFactor Integer
    Replication Factor (not relevant for serverless databases)
    status String
    Database status
    totalStorage Integer
    Storage Capacity (not relevant for serverelss databases)
    additionalKeyspaces string[]
    Additional keyspaces
    cloudProvider string
    Cloud provider (AWS, GCP, AZURE)
    cqlshUrl string
    URL for cqlsh web
    dataEndpointUrl string
    REST API URL
    databaseId string
    Astra Database ID (system generated)
    datacenters {[key: string]: string}
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    grafanaUrl string
    URL for the grafana dashboard for this database
    graphqlUrl string
    Graphql URL
    id string
    The provider-assigned unique ID for this managed resource.
    keyspace string
    Initial keyspace
    name string
    Database name (user provided)
    nodeCount number
    Node count (not relevant for serverless databases)
    organizationId string
    Ordg id (system generated)
    ownerId string
    Owner id (system generated)
    regions string[]
    Cloud provider region. Get list of supported regions from regions data-source
    replicationFactor number
    Replication Factor (not relevant for serverless databases)
    status string
    Database status
    totalStorage number
    Storage Capacity (not relevant for serverelss databases)
    additional_keyspaces Sequence[str]
    Additional keyspaces
    cloud_provider str
    Cloud provider (AWS, GCP, AZURE)
    cqlsh_url str
    URL for cqlsh web
    data_endpoint_url str
    REST API URL
    database_id str
    Astra Database ID (system generated)
    datacenters Mapping[str, str]
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    grafana_url str
    URL for the grafana dashboard for this database
    graphql_url str
    Graphql URL
    id str
    The provider-assigned unique ID for this managed resource.
    keyspace str
    Initial keyspace
    name str
    Database name (user provided)
    node_count int
    Node count (not relevant for serverless databases)
    organization_id str
    Ordg id (system generated)
    owner_id str
    Owner id (system generated)
    regions Sequence[str]
    Cloud provider region. Get list of supported regions from regions data-source
    replication_factor int
    Replication Factor (not relevant for serverless databases)
    status str
    Database status
    total_storage int
    Storage Capacity (not relevant for serverelss databases)
    additionalKeyspaces List<String>
    Additional keyspaces
    cloudProvider String
    Cloud provider (AWS, GCP, AZURE)
    cqlshUrl String
    URL for cqlsh web
    dataEndpointUrl String
    REST API URL
    databaseId String
    Astra Database ID (system generated)
    datacenters Map<String>
    Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
    grafanaUrl String
    URL for the grafana dashboard for this database
    graphqlUrl String
    Graphql URL
    id String
    The provider-assigned unique ID for this managed resource.
    keyspace String
    Initial keyspace
    name String
    Database name (user provided)
    nodeCount Number
    Node count (not relevant for serverless databases)
    organizationId String
    Ordg id (system generated)
    ownerId String
    Owner id (system generated)
    regions List<String>
    Cloud provider region. Get list of supported regions from regions data-source
    replicationFactor Number
    Replication Factor (not relevant for serverless databases)
    status String
    Database status
    totalStorage Number
    Storage Capacity (not relevant for serverelss databases)

    Package Details

    Repository
    astra pulumiverse/pulumi-astra
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the astra Terraform Provider.
    astra logo
    Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse