Skip to main content

cassandra_views

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

Overview

Namecassandra_views
TypeResource
Idazure.cosmos_db.cassandra_views

Fields

NameDatatypeDescription
idtextThe unique resource identifier of the ARM resource.
nametextThe name of the ARM resource.
accountNametextfield from the properties object
identitytextIdentity for the resource.
keyspaceNametextfield from the properties object
locationtextThe location of the resource group to which the resource belongs.
optionstextfield from the properties object
resourcetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextTags 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".
typetextThe type of Azure resource.
viewNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, keyspaceName, resourceGroupName, subscriptionId, viewNameGets the Cassandra view under an existing Azure Cosmos DB database account.
listSELECTaccountName, keyspaceName, resourceGroupName, subscriptionIdLists the Cassandra materialized views under an existing Azure Cosmos DB database account.
create_updateINSERTaccountName, keyspaceName, resourceGroupName, subscriptionId, viewName, data__propertiesCreate or update an Azure Cosmos DB Cassandra View
deleteDELETEaccountName, keyspaceName, resourceGroupName, subscriptionId, viewNameDeletes an existing Azure Cosmos DB Cassandra view.

SELECT examples

Lists the Cassandra materialized views under an existing Azure Cosmos DB database account.

SELECT
id,
name,
accountName,
identity,
keyspaceName,
location,
options,
resource,
resourceGroupName,
subscriptionId,
tags,
type,
viewName
FROM azure.cosmos_db.vw_cassandra_views
WHERE accountName = '{{ accountName }}'
AND keyspaceName = '{{ keyspaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new cassandra_views resource.

/*+ create */
INSERT INTO azure.cosmos_db.cassandra_views (
accountName,
keyspaceName,
resourceGroupName,
subscriptionId,
viewName,
data__properties,
properties,
location,
tags,
identity
)
SELECT
'{{ accountName }}',
'{{ keyspaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ viewName }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}'
;

DELETE example

Deletes the specified cassandra_views resource.

/*+ delete */
DELETE FROM azure.cosmos_db.cassandra_views
WHERE accountName = '{{ accountName }}'
AND keyspaceName = '{{ keyspaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND viewName = '{{ viewName }}';