Skip to main content

cassandra_clusters

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

Overview

Namecassandra_clusters
TypeResource
Idazure.cosmos_db.cassandra_clusters

Fields

The following fields are returned by SELECT queries:

The properties of the managed Cassandra cluster were retrieved successfully.

NameDatatypeDescription
idstringThe unique resource identifier of the ARM resource.
namestringThe name of the ARM resource.
identityobjectIdentity for the resource.
locationstringThe location of the resource group to which the resource belongs.
propertiesobjectProperties of a managed Cassandra cluster.
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 Azure resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, clusterNameGet the properties of a managed Cassandra cluster.
list_by_resource_groupselectsubscriptionId, resourceGroupNameList all managed Cassandra clusters in this resource group.
list_by_subscriptionselectsubscriptionIdList all managed Cassandra clusters in this subscription.
create_updateinsertsubscriptionId, resourceGroupName, clusterNameCreate or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.
updateupdatesubscriptionId, resourceGroupName, clusterNameUpdates some of the properties of a managed Cassandra cluster.
deletedeletesubscriptionId, resourceGroupName, clusterNameDeletes a managed Cassandra cluster.
invoke_commandexecsubscriptionId, resourceGroupName, clusterName, command, hostInvoke a command like nodetool for cassandra maintenance
invoke_command_asyncexecsubscriptionId, resourceGroupName, clusterName, command, hostInvoke a command like nodetool for cassandra maintenance asynchronously
deallocateexecsubscriptionId, resourceGroupName, clusterNamex-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.
startexecsubscriptionId, resourceGroupName, clusterNameStart 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.
statusexecsubscriptionId, resourceGroupName, clusterNameGets 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
clusterNamestringManaged Cassandra cluster name.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
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

SELECT examples

Get the properties of a managed Cassandra cluster.

SELECT
id,
name,
identity,
location,
properties,
tags,
type
FROM azure.cosmos_db.cassandra_clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND clusterName = '{{ clusterName }}' -- 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.cosmos_db.cassandra_clusters (
data__location,
data__tags,
data__identity,
data__properties,
subscriptionId,
resourceGroupName,
clusterName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ identity }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ clusterName }}'
RETURNING
id,
name,
identity,
location,
properties,
tags,
type
;

UPDATE examples

Updates some of the properties of a managed Cassandra cluster.

UPDATE azure.cosmos_db.cassandra_clusters
SET
data__location = '{{ location }}',
data__tags = '{{ tags }}',
data__identity = '{{ identity }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND clusterName = '{{ clusterName }}' --required
RETURNING
id,
name,
identity,
location,
properties,
tags,
type;

DELETE examples

Deletes a managed Cassandra cluster.

DELETE FROM azure.cosmos_db.cassandra_clusters
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND clusterName = '{{ clusterName }}' --required
;

Lifecycle Methods

Invoke a command like nodetool for cassandra maintenance

EXEC azure.cosmos_db.cassandra_clusters.invoke_command 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@clusterName='{{ clusterName }}' --required
@@json=
'{
"command": "{{ command }}",
"arguments": "{{ arguments }}",
"host": "{{ host }}",
"cassandra-stop-start": {{ cassandra-stop-start }},
"readWrite": {{ readWrite }}
}'
;