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

astra.Keyspace

Explore with Pulumi AI

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

    astra.Keyspace provides a keyspace resource. Keyspaces are groupings of tables for Cassandra. astra.Keyspace resources are associated with a database id. You can have multiple keyspaces per DB in addition to the default keyspace provided in the astra.Database resource.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Astra = Pulumiverse.Astra;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Astra.Keyspace("example", new()
        {
            DatabaseId = "48bfc13b-c1a5-48db-b70f-b6ef9709872b",
        });
    
    });
    
    package main
    
    import (
    	"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.NewKeyspace(ctx, "example", &astra.KeyspaceArgs{
    			DatabaseId: pulumi.String("48bfc13b-c1a5-48db-b70f-b6ef9709872b"),
    		})
    		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.Keyspace;
    import com.pulumi.astra.KeyspaceArgs;
    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) {
            var example = new Keyspace("example", KeyspaceArgs.builder()        
                .databaseId("48bfc13b-c1a5-48db-b70f-b6ef9709872b")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_astra as astra
    
    example = astra.Keyspace("example", database_id="48bfc13b-c1a5-48db-b70f-b6ef9709872b")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as astra from "@pulumi/astra";
    
    const example = new astra.Keyspace("example", {
        databaseId: "48bfc13b-c1a5-48db-b70f-b6ef9709872b",
    });
    
    resources:
      example:
        type: astra:Keyspace
        properties:
          databaseId: 48bfc13b-c1a5-48db-b70f-b6ef9709872b
    

    Create Keyspace Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Keyspace(name: string, args: KeyspaceArgs, opts?: CustomResourceOptions);
    @overload
    def Keyspace(resource_name: str,
                 args: KeyspaceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Keyspace(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 database_id: Optional[str] = None,
                 name: Optional[str] = None)
    func NewKeyspace(ctx *Context, name string, args KeyspaceArgs, opts ...ResourceOption) (*Keyspace, error)
    public Keyspace(string name, KeyspaceArgs args, CustomResourceOptions? opts = null)
    public Keyspace(String name, KeyspaceArgs args)
    public Keyspace(String name, KeyspaceArgs args, CustomResourceOptions options)
    
    type: astra:Keyspace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KeyspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KeyspaceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KeyspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyspaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var keyspaceResource = new Astra.Keyspace("keyspaceResource", new()
    {
        DatabaseId = "string",
        Name = "string",
    });
    
    example, err := astra.NewKeyspace(ctx, "keyspaceResource", &astra.KeyspaceArgs{
    	DatabaseId: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    })
    
    var keyspaceResource = new Keyspace("keyspaceResource", KeyspaceArgs.builder()
        .databaseId("string")
        .name("string")
        .build());
    
    keyspace_resource = astra.Keyspace("keyspaceResource",
        database_id="string",
        name="string")
    
    const keyspaceResource = new astra.Keyspace("keyspaceResource", {
        databaseId: "string",
        name: "string",
    });
    
    type: astra:Keyspace
    properties:
        databaseId: string
        name: string
    

    Keyspace Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Keyspace resource accepts the following input properties:

    DatabaseId string
    Astra database to create the keyspace.
    Name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    DatabaseId string
    Astra database to create the keyspace.
    Name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId String
    Astra database to create the keyspace.
    name String
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId string
    Astra database to create the keyspace.
    name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    database_id str
    Astra database to create the keyspace.
    name str
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId String
    Astra database to create the keyspace.
    name String
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Keyspace resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Keyspace Resource

    Get an existing Keyspace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KeyspaceState, opts?: CustomResourceOptions): Keyspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            database_id: Optional[str] = None,
            name: Optional[str] = None) -> Keyspace
    func GetKeyspace(ctx *Context, name string, id IDInput, state *KeyspaceState, opts ...ResourceOption) (*Keyspace, error)
    public static Keyspace Get(string name, Input<string> id, KeyspaceState? state, CustomResourceOptions? opts = null)
    public static Keyspace get(String name, Output<String> id, KeyspaceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DatabaseId string
    Astra database to create the keyspace.
    Name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    DatabaseId string
    Astra database to create the keyspace.
    Name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId String
    Astra database to create the keyspace.
    name String
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId string
    Astra database to create the keyspace.
    name string
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    database_id str
    Astra database to create the keyspace.
    name str
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.
    databaseId String
    Astra database to create the keyspace.
    name String
    Keyspace name can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character.

    Import

    the import id includes the database_id and the keyspace name.

     $ pulumi import astra:index/keyspace:Keyspace example 48bfc13b-c1a5-48db-b70f-b6ef9709872b/keyspace/example
    

    To learn more about importing existing cloud resources, see Importing resources.

    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