Skip to main content

cassandra_clusters

Creates, updates, deletes, gets or lists a cassandra_clusters resource.

Overview

Namecassandra_clusters
TypeResource
Idazure.cosmosdb.cassandra_clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
authenticationMethodstringWhich authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Known values are: "None", "Cassandra", and "Ldap". (None, Cassandra, Ldap)
autoReplicatestringThe form of AutoReplicate that is being used by this cluster. Known values are: "None", "SystemKeyspaces", and "AllKeyspaces". (None, SystemKeyspaces, AllKeyspaces)
azureConnectionMethodstringHow to connect to the azure services needed for running the cluster. Known values are: "None" and "VPN". (None, VPN)
backupSchedulesarrayList of backup schedules that define when you want to back up your data.
cassandraAuditLoggingEnabledbooleanWhether Cassandra audit logging is enabled.
cassandraVersionstringWhich version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
clientCertificatesarrayList of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property.
clusterNameOverridestringIf you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set the value to use on this property.
deallocatedbooleanWhether the cluster and associated data centers has been deallocated.
delegatedManagementSubnetIdstringResource id of a subnet that this cluster's management service should have its network interface attached to. The subnet must be routable to all subnets that will be delegated to data centers. The resource id must be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'.
extensionsarrayExtensions to be added or updated on cluster.
externalDataCentersarrayList of the data center names for unmanaged data centers in this cluster to be included in auto-replication.
externalGossipCertificatesarrayList of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property.
externalSeedNodesarrayList of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed node lists of all managed nodes.
gossipCertificatesarrayList of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All managed nodes will present TLS client certificates that are verifiable using one of the certificates provided in this property.
hoursBetweenBackupsinteger(Deprecated) Number of hours to wait between taking a backup of the cluster.
identityobjectIdentity for the resource.
initialCassandraAdminPasswordstringInitial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'.
locationstringThe location of the resource group to which the resource belongs.
privateLinkResourceIdstringIf the Connection Method is Vpn, this is the Id of the private link resource that the datacenters need to connect to.
prometheusEndpointobjectSeedNode.
provisionErrorobjectError related to resource provisioning.
provisioningStatestringThe status of the resource at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled)
repairEnabledbooleanShould automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs.
restoreFromBackupIdstringTo create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to the resource id of the backup.
scheduledEventStrategystringHow the nodes in the cluster react to scheduled events. Known values are: "Ignore", "StopAny", and "StopByRack". (Ignore, StopAny, StopByRack)
seedNodesarrayList of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectTags 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".
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, cluster_name, subscription_idGet the properties of a managed Cassandra cluster.
list_by_resource_groupselectresource_group_name, subscription_idList all managed Cassandra clusters in this resource group.
list_by_subscriptionselectsubscription_idList all managed Cassandra clusters in this subscription.
create_updateinsertresource_group_name, cluster_name, subscription_idCreate or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.
updateupdateresource_group_name, cluster_name, subscription_idUpdates some of the properties of a managed Cassandra cluster.
create_updatereplaceresource_group_name, cluster_name, subscription_idCreate or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.
deletedeleteresource_group_name, cluster_name, subscription_idDeletes a managed Cassandra cluster.
invoke_commandexecresource_group_name, cluster_name, subscription_id, command, hostInvoke a command like nodetool for cassandra maintenance.
deallocateexecresource_group_name, cluster_name, subscription_idx-ms-force-deallocateDeallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster.
startexecresource_group_name, cluster_name, subscription_idStart the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster.
statusexecresource_group_name, cluster_name, subscription_idGets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_namestringManaged Cassandra cluster name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
x-ms-force-deallocatestringForce to deallocate a cluster of Cluster Type Production. Force to deallocate a cluster of Cluster Type Production might cause data loss. Default value is None.

SELECT examples

Get the properties of a managed Cassandra cluster.

SELECT
id,
name,
authenticationMethod,
autoReplicate,
azureConnectionMethod,
backupSchedules,
cassandraAuditLoggingEnabled,
cassandraVersion,
clientCertificates,
clusterNameOverride,
deallocated,
delegatedManagementSubnetId,
extensions,
externalDataCenters,
externalGossipCertificates,
externalSeedNodes,
gossipCertificates,
hoursBetweenBackups,
identity,
initialCassandraAdminPassword,
location,
privateLinkResourceId,
prometheusEndpoint,
provisionError,
provisioningState,
repairEnabled,
restoreFromBackupId,
scheduledEventStrategy,
seedNodes,
systemData,
tags,
type
FROM azure.cosmosdb.cassandra_clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.

INSERT INTO azure.cosmosdb.cassandra_clusters (
properties,
location,
tags,
identity,
resource_group_name,
cluster_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ cluster_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates some of the properties of a managed Cassandra cluster.

UPDATE azure.cosmosdb.cassandra_clusters
SET
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.

REPLACE azure.cosmosdb.cassandra_clusters
SET
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a managed Cassandra cluster.

DELETE FROM azure.cosmosdb.cassandra_clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Invoke a command like nodetool for cassandra maintenance.

EXEC azure.cosmosdb.cassandra_clusters.invoke_command 
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"command": "{{ command }}",
"arguments": "{{ arguments }}",
"host": "{{ host }}",
"cassandra-stop-start": {{ cassandra-stop-start }},
"readwrite": {{ readwrite }}
}'
;