1. Packages
  2. Azure Native
  3. API Docs
  4. cosmosdb
  5. DatabaseAccountCassandraKeyspace
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.cosmosdb.DatabaseAccountCassandraKeyspace

Explore with Pulumi AI

An Azure Cosmos DB Cassandra keyspace.

Uses Azure REST API version 2016-03-31.

Other available API versions: 2015-04-01, 2015-04-08, 2015-11-06, 2016-03-19. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cosmosdb [ApiVersion]. See the version guide for details.

Example Usage

CosmosDBCassandraKeyspaceCreateUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var databaseAccountCassandraKeyspace = new AzureNative.CosmosDB.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspace", new()
    {
        AccountName = "ddb1",
        KeyspaceName = "keyspaceName",
        Options = null,
        Resource = new AzureNative.CosmosDB.Inputs.CassandraKeyspaceResourceArgs
        {
            Id = "keyspaceName",
        },
        ResourceGroupName = "rg1",
    });

});
Copy
package main

import (
	cosmosdb "github.com/pulumi/pulumi-azure-native-sdk/cosmosdb/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cosmosdb.NewDatabaseAccountCassandraKeyspace(ctx, "databaseAccountCassandraKeyspace", &cosmosdb.DatabaseAccountCassandraKeyspaceArgs{
			AccountName:  pulumi.String("ddb1"),
			KeyspaceName: pulumi.String("keyspaceName"),
			Options:      pulumi.StringMap{},
			Resource: &cosmosdb.CassandraKeyspaceResourceArgs{
				Id: pulumi.String("keyspaceName"),
			},
			ResourceGroupName: pulumi.String("rg1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cosmosdb.DatabaseAccountCassandraKeyspace;
import com.pulumi.azurenative.cosmosdb.DatabaseAccountCassandraKeyspaceArgs;
import com.pulumi.azurenative.cosmosdb.inputs.CassandraKeyspaceResourceArgs;
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 databaseAccountCassandraKeyspace = new DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspace", DatabaseAccountCassandraKeyspaceArgs.builder()
            .accountName("ddb1")
            .keyspaceName("keyspaceName")
            .options(Map.ofEntries(
            ))
            .resource(CassandraKeyspaceResourceArgs.builder()
                .id("keyspaceName")
                .build())
            .resourceGroupName("rg1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const databaseAccountCassandraKeyspace = new azure_native.cosmosdb.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspace", {
    accountName: "ddb1",
    keyspaceName: "keyspaceName",
    options: {},
    resource: {
        id: "keyspaceName",
    },
    resourceGroupName: "rg1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

database_account_cassandra_keyspace = azure_native.cosmosdb.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspace",
    account_name="ddb1",
    keyspace_name="keyspaceName",
    options={},
    resource={
        "id": "keyspaceName",
    },
    resource_group_name="rg1")
Copy
resources:
  databaseAccountCassandraKeyspace:
    type: azure-native:cosmosdb:DatabaseAccountCassandraKeyspace
    properties:
      accountName: ddb1
      keyspaceName: keyspaceName
      options: {}
      resource:
        id: keyspaceName
      resourceGroupName: rg1
Copy

Create DatabaseAccountCassandraKeyspace Resource

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

Constructor syntax

new DatabaseAccountCassandraKeyspace(name: string, args: DatabaseAccountCassandraKeyspaceArgs, opts?: CustomResourceOptions);
@overload
def DatabaseAccountCassandraKeyspace(resource_name: str,
                                     args: DatabaseAccountCassandraKeyspaceArgs,
                                     opts: Optional[ResourceOptions] = None)

@overload
def DatabaseAccountCassandraKeyspace(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     account_name: Optional[str] = None,
                                     options: Optional[Mapping[str, str]] = None,
                                     resource: Optional[CassandraKeyspaceResourceArgs] = None,
                                     resource_group_name: Optional[str] = None,
                                     keyspace_name: Optional[str] = None)
func NewDatabaseAccountCassandraKeyspace(ctx *Context, name string, args DatabaseAccountCassandraKeyspaceArgs, opts ...ResourceOption) (*DatabaseAccountCassandraKeyspace, error)
public DatabaseAccountCassandraKeyspace(string name, DatabaseAccountCassandraKeyspaceArgs args, CustomResourceOptions? opts = null)
public DatabaseAccountCassandraKeyspace(String name, DatabaseAccountCassandraKeyspaceArgs args)
public DatabaseAccountCassandraKeyspace(String name, DatabaseAccountCassandraKeyspaceArgs args, CustomResourceOptions options)
type: azure-native:cosmosdb:DatabaseAccountCassandraKeyspace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

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

var databaseAccountCassandraKeyspaceResource = new AzureNative.CosmosDB.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspaceResource", new()
{
    AccountName = "string",
    Options = 
    {
        { "string", "string" },
    },
    Resource = new AzureNative.CosmosDB.Inputs.CassandraKeyspaceResourceArgs
    {
        Id = "string",
    },
    ResourceGroupName = "string",
    KeyspaceName = "string",
});
Copy
example, err := cosmosdb.NewDatabaseAccountCassandraKeyspace(ctx, "databaseAccountCassandraKeyspaceResource", &cosmosdb.DatabaseAccountCassandraKeyspaceArgs{
	AccountName: pulumi.String("string"),
	Options: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Resource: &cosmosdb.CassandraKeyspaceResourceArgs{
		Id: pulumi.String("string"),
	},
	ResourceGroupName: pulumi.String("string"),
	KeyspaceName:      pulumi.String("string"),
})
Copy
var databaseAccountCassandraKeyspaceResource = new DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspaceResource", DatabaseAccountCassandraKeyspaceArgs.builder()
    .accountName("string")
    .options(Map.of("string", "string"))
    .resource(CassandraKeyspaceResourceArgs.builder()
        .id("string")
        .build())
    .resourceGroupName("string")
    .keyspaceName("string")
    .build());
Copy
database_account_cassandra_keyspace_resource = azure_native.cosmosdb.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspaceResource",
    account_name="string",
    options={
        "string": "string",
    },
    resource={
        "id": "string",
    },
    resource_group_name="string",
    keyspace_name="string")
Copy
const databaseAccountCassandraKeyspaceResource = new azure_native.cosmosdb.DatabaseAccountCassandraKeyspace("databaseAccountCassandraKeyspaceResource", {
    accountName: "string",
    options: {
        string: "string",
    },
    resource: {
        id: "string",
    },
    resourceGroupName: "string",
    keyspaceName: "string",
});
Copy
type: azure-native:cosmosdb:DatabaseAccountCassandraKeyspace
properties:
    accountName: string
    keyspaceName: string
    options:
        string: string
    resource:
        id: string
    resourceGroupName: string
Copy

DatabaseAccountCassandraKeyspace Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DatabaseAccountCassandraKeyspace resource accepts the following input properties:

AccountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
Options This property is required. Dictionary<string, string>
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
Resource This property is required. Pulumi.AzureNative.CosmosDB.Inputs.CassandraKeyspaceResource
The standard JSON format of a Cassandra keyspace
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure resource group.
KeyspaceName Changes to this property will trigger replacement. string
Cosmos DB keyspace name.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
Options This property is required. map[string]string
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
Resource This property is required. CassandraKeyspaceResourceArgs
The standard JSON format of a Cassandra keyspace
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure resource group.
KeyspaceName Changes to this property will trigger replacement. string
Cosmos DB keyspace name.
accountName
This property is required.
Changes to this property will trigger replacement.
String
Cosmos DB database account name.
options This property is required. Map<String,String>
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
resource This property is required. CassandraKeyspaceResource
The standard JSON format of a Cassandra keyspace
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of an Azure resource group.
keyspaceName Changes to this property will trigger replacement. String
Cosmos DB keyspace name.
accountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
options This property is required. {[key: string]: string}
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
resource This property is required. CassandraKeyspaceResource
The standard JSON format of a Cassandra keyspace
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure resource group.
keyspaceName Changes to this property will trigger replacement. string
Cosmos DB keyspace name.
account_name
This property is required.
Changes to this property will trigger replacement.
str
Cosmos DB database account name.
options This property is required. Mapping[str, str]
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
resource This property is required. CassandraKeyspaceResourceArgs
The standard JSON format of a Cassandra keyspace
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of an Azure resource group.
keyspace_name Changes to this property will trigger replacement. str
Cosmos DB keyspace name.
accountName
This property is required.
Changes to this property will trigger replacement.
String
Cosmos DB database account name.
options This property is required. Map<String>
A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
resource This property is required. Property Map
The standard JSON format of a Cassandra keyspace
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of an Azure resource group.
keyspaceName Changes to this property will trigger replacement. String
Cosmos DB keyspace name.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the database account.
Type string
The type of Azure resource.
Location string
The location of the resource group to which the resource belongs.
Tags Dictionary<string, string>
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the database account.
Type string
The type of Azure resource.
Location string
The location of the resource group to which the resource belongs.
Tags map[string]string
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the database account.
type String
The type of Azure resource.
location String
The location of the resource group to which the resource belongs.
tags Map<String,String>
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the database account.
type string
The type of Azure resource.
location string
The location of the resource group to which the resource belongs.
tags {[key: string]: string}
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the database account.
type str
The type of Azure resource.
location str
The location of the resource group to which the resource belongs.
tags Mapping[str, str]
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the database account.
type String
The type of Azure resource.
location String
The location of the resource group to which the resource belongs.
tags Map<String>
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

Supporting Types

CassandraKeyspaceResource
, CassandraKeyspaceResourceArgs

Id This property is required. string
Name of the Cosmos DB Cassandra keyspace
Id This property is required. string
Name of the Cosmos DB Cassandra keyspace
id This property is required. String
Name of the Cosmos DB Cassandra keyspace
id This property is required. string
Name of the Cosmos DB Cassandra keyspace
id This property is required. str
Name of the Cosmos DB Cassandra keyspace
id This property is required. String
Name of the Cosmos DB Cassandra keyspace

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cosmosdb:DatabaseAccountCassandraKeyspace keyspaceName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName} 
Copy

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

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0