

# Tag keyspaces, tables, and streams in Amazon Keyspaces
<a name="Tagging.Operations"></a>

You can add, list, edit, or delete tags for keyspaces, tables, and streams using the Amazon Keyspaces console, the AWS CLI, or Cassandra Query Language (CQL). You can then activate these user-defined tags so that they appear on the AWS Billing and Cost Management console for cost allocation tracking. For more information, see [Create cost allocation reports using tags for Amazon Keyspaces](CostAllocationReports.md). 

 For bulk editing, you can also use Tag Editor on the console. For more information, see [Working with Tag Editor](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html) in the *AWS Resource Groups User Guide*. 

For information about tag structure, see [Restrictions for using tags to label resources in Amazon Keyspaces](TaggingRestrictions.md). 

**Topics**
+ [Add tags when creating a new keyspace](Tagging.Operations.new.keyspace.md)
+ [Add tags to a keyspace](Tagging.Operations.existing.keyspace.md)
+ [Delete tags from a keyspace](Tagging.Operations.existing.keyspace.drop.md)
+ [View the tags of a keyspace](Tagging.Operations.view.keyspace.md)
+ [Add tags when creating a new table](Tagging.Operations.new.table.md)
+ [Add tags to a table](Tagging.Operations.existing.table.md)
+ [Delete tags from a table](Tagging.Operations.existing.table.drop.md)
+ [View the tags of a table](Tagging.Operations.view.table.md)
+ [Add tags to a new stream when creating a table](Tagging.Operations.new.table.stream.md)
+ [Add tags to a new stream for an existing table](Tagging.Operations.new.stream.md)
+ [Add new tags to a stream](Tagging.Operations.existing.stream.md)
+ [Delete tags from a stream](Tagging.Operations.existing.stream.drop.md)
+ [View the tags of a stream](Tagging.Operations.view.stream.md)

# Add tags when creating a new keyspace
<a name="Tagging.Operations.new.keyspace"></a>

You can use the Amazon Keyspaces console, CQL or the AWS CLI to add tags when you create a new keyspace. 

------
#### [ Console ]

**Set a tag when creating a new keyspace using the console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Keyspaces**, and then choose **Create keyspace**.

1. On the **Create keyspace** page, provide a name for the keyspace. 

1. Under **Tags** choose **Add new tag** and enter a key and a value.

1. Choose **Create keyspace**.

------
#### [ Cassandra Query Language (CQL) ]

**Set a tag when creating a new keyspace using CQL**
+ The following example creates a new keyspace with tags.

  ```
  CREATE KEYSPACE mykeyspace WITH TAGS = {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Set a tag when creating a new keyspace using the AWS CLI**
+ The following statement creates a new keyspace with tags.

  ```
  aws keyspaces create-keyspace --keyspace-name 'myKeyspace' --tags 'key=key1,value=val1' 'key=key2,value=val2'
  ```

------

# Add tags to a keyspace
<a name="Tagging.Operations.existing.keyspace"></a>

The following examples show how to add tags to a keyspace in Amazon Keyspaces.

------
#### [ Console ]

**Add a tag to an existing keyspace using the console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Keyspaces**.

1. Choose a keyspace from the list. Then choose the **Tags** tab where you can view the tags of the keyspace.

1. Choose **Manage tags** to add, edit, or delete tags.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Add a tag to an existing keyspace using CQL**
+ 

  ```
  ALTER KEYSPACE mykeyspace ADD TAGS {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Add a tag to an existing keyspace using the AWS CLI**
+ The following example shows how to add new tags to an existing keyspace.

  ```
  aws keyspaces tag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/myKeyspace/' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# Delete tags from a keyspace
<a name="Tagging.Operations.existing.keyspace.drop"></a>

------
#### [ Console ]

**Delete a tag from an existing keyspace using the console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Keyspaces**.

1. Choose a keyspace from the list. Then choose the **Tags** tab where you can view the tags of the keyspace.

1. Choose **Manage tags** and delete the tags you don't need anymore.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Delete a tag from an existing keyspace using CQL**
+ 

  ```
  ALTER KEYSPACE mykeyspace DROP TAGS {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Delete a tag from an existing keyspace using the AWS CLI**
+ The following statement removes the specified tags from a keyspace.

  ```
  aws keyspaces untag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/myKeyspace/' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# View the tags of a keyspace
<a name="Tagging.Operations.view.keyspace"></a>

The following examples show how to read tags using the console, CQL or the AWS CLI.

------
#### [ Console ]

**View the tags of a keyspace using the Amazon Keyspaces console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Keyspaces**.

1. Choose a keyspace from the list. Then choose the **Tags** tab where you can view the tags of the keyspace.

------
#### [ Cassandra Query Language (CQL) ]

**View the tags of a keyspace using CQL**

To read the tags attached to a keyspace, use the following CQL statement.

```
SELECT * FROM system_schema_mcs.tags WHERE valid_where_clause;
```

The `WHERE` clause is required, and must use one of the following formats:
+ `keyspace_name = 'mykeyspace' AND resource_type = 'keyspace'`
+ `resource_id = arn`
+ The following statement shows whether a keyspace has tags.

  ```
  SELECT * FROM system_schema_mcs.tags WHERE keyspace_name = 'mykeyspace' AND resource_type = 'keyspace';
  ```

  The output of the query looks like the following.

  ```
  resource_id                                                      | keyspace_name | resource_name | resource_type | tags
  -----------------------------------------------------------------+---------------+---------------+---------------+------
  arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/      | mykeyspace    | mykeyspace    | keyspace      | {'key1': 'val1', 'key2': 'val2'}
  ```

------
#### [ CLI ]

**View the tags of a keyspace using the AWS CLI**
+ This example shows how to list the tags of the specified resource.

  ```
  aws keyspaces list-tags-for-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/myKeyspace/'
  ```

  The output of the last command looks like this.

  ```
  {
      "tags": [
          {
              "key": "key1",
              "value": "val1"
          },
          {
              "key": "key2",
              "value": "val2"
          },
          {
              "key": "key3",
              "value": "val3"
          },
          {
              "key": "key4",
              "value": "val4"
          }
      ]
  }
  ```

------

# Add tags when creating a new table
<a name="Tagging.Operations.new.table"></a>

You can use the Amazon Keyspaces console, CQL or the AWS CLI to add tags to new tables when you create them. 

------
#### [ Console ]

**Add a tag when creating a new table using the (console)**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**, and then choose **Create table**.

1. On the **Create table** page in the **Table details** section, select a keyspace and provide a name for the table.

1. In the **Schema** section, create the schema for your table.

1. In the **Table settings** section, choose **Customize settings**.

1. Continue to the **Table tags – *optional*** section, and choose **Add new tag** to create new tags.

1. Choose **Create table**.

------
#### [ Cassandra Query Language (CQL) ]

**Add tags when creating a new table using CQL**
+ The following example creates a new table with tags.

  ```
  CREATE TABLE mytable(...) WITH TAGS = {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Add tags when creating a new table using the AWS CLI**
+ The following example shows how to create a new table with tags. The command creates a table *myTable* in an already existing keyspace *myKeyspace*. Note that the command has been broken up into different lines to help with readability.

  ```
  aws keyspaces create-table --keyspace-name 'myKeyspace' --table-name 'myTable' 
              --schema-definition 'allColumns=[{name=id,type=int},{name=name,type=text},{name=date,type=timestamp}],partitionKeys=[{name=id}]' 
              --tags 'key=key1,value=val1' 'key=key2,value=val2'
  ```

------

# Add tags to a table
<a name="Tagging.Operations.existing.table"></a>

You can add tags to an existing table in Amazon Keyspaces using the console, CQL or the AWS CLI.

------
#### [ Console ]

**Add tags to a table using the Amazon Keyspaces console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**.

1. Choose a table from the list and choose the **Tags** tab. 

1. Choose **Manage tags** to add tags to the table.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Add tags to a table using CQL**
+ The following statement shows how to add tags to an existing table.

  ```
  ALTER TABLE mykeyspace.mytable ADD TAGS {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Add tags to a table using the AWS CLI**
+ The following example shows how to add new tags to an existing table.

  ```
  aws keyspaces tag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/myKeyspace/table/myTable' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# Delete tags from a table
<a name="Tagging.Operations.existing.table.drop"></a>

------
#### [ Console ]

**Delete tags from a table using the Amazon Keyspaces console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**.

1. Choose a table from the list and choose the **Tags** tab. 

1. Choose **Manage tags** to delete tags from the table.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Delete tags from a table using CQL**
+ The following statement shows how to delete tags from an existing table.

  ```
  ALTER TABLE mytable DROP TAGS {'key3':'val3', 'key4':'val4'};
  ```

------
#### [ CLI ]

**Add tags to a table using the AWS CLI**
+ The following statement removes the specified tags from a keyspace.

  ```
  aws keyspaces untag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/myKeyspace/table/myTable' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# View the tags of a table
<a name="Tagging.Operations.view.table"></a>

The following examples show how to view the tags of a table in Amazon Keyspaces using the console, CQL, or the AWS CLI.

------
#### [ Console ]

**View the tags of a table using the console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**.

1. Choose a table from the list and choose the **Tags** tab. 

------
#### [ Cassandra Query Language (CQL) ]

**View the tags of a table using CQL**

To read the tags attached to a table, use the following CQL statement.

```
SELECT * FROM system_schema_mcs.tags WHERE valid_where_clause;
```

The `WHERE` clause is required, and must use one of the following formats:
+ `keyspace_name = 'mykeyspace' AND resource_name = 'mytable'`
+ `resource_id = arn`
+ The following query returns the tags of the specified table.

  ```
  SELECT * FROM system_schema_mcs.tags WHERE keyspace_name = 'mykeyspace' AND resource_name = 'mytable';
  ```

  The output of that query looks like the following.

  ```
  resource_id                                                                 | keyspace_name | resource_name | resource_type | tags
  ----------------------------------------------------------------------------+---------------+---------------+---------------+------
  arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/table/mytable| mykeyspace    | mytable       | table         | {'key1': 'val1', 'key2': 'val2'}
  ```

------
#### [ CLI ]

**View the tags of a table using the AWS CLI**
+ This example shows how to list the tags of the specified resource.

  ```
  aws keyspaces list-tags-for-resource --resource-arn 'arn:aws:arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-11T21:21:33.291cassandra:us-east-1:111122223333:/keyspace/myKeyspace/table/myTable'
  ```

  The output of the last command looks like this.

  ```
  {
      "tags": [
          {
              "key": "key1",
              "value": "val1"
          },
          {
              "key": "key2",
              "value": "val2"
          },
          {
              "key": "key3",
              "value": "val3"
          },
          {
              "key": "key4",
              "value": "val4"
          }
      ]
  }
  ```

------

# Add tags to a new stream when creating a table
<a name="Tagging.Operations.new.table.stream"></a>

You can add tags to streams when you create a new table with a stream using CQL or the AWS CLI to tag a stream.

**Note**  
Amazon Keyspaces CDC requires the presence of a service-linked role (`AWSServiceRoleForAmazonKeyspacesCDC`) that publishes metric data from Amazon Keyspaces CDC streams into the `"cloudwatch:namespace": "AWS/Cassandra"` in your CloudWatch account on your behalf. This role is created automatically for you. For more information, see [Using roles for Amazon Keyspaces CDC streams](using-service-linked-roles-CDC-streams.md).

------
#### [ Cassandra Query Language (CQL) ]

**Add tags to a stream when creating a new table using CQL**

1. To create a new table with a stream and apply the table tags automatically to the stream, you can use the `'propagate_tags': 'TABLE'` flag. The following statement is an example of this.

   ```
   CREATE TABLE mytable (pk int, ck text, PRIMARY KEY(pk))
   WITH TAGS={'key1':'val1', 'key2':'val2'}
   AND cdc = TRUE
   AND CUSTOM_PROPERTIES={
       'cdc_specification': {
           'view_type': 'NEW_IMAGE',
           'propagate_tags': 'TABLE'
       }
   };
   ```

1. To apply new tags to the stream, you can use the following example.

   ```
   CREATE TABLE mytable (pk int, ck text, PRIMARY KEY(pk))
   WITH TAGS={'key1':'val1', 'key2':'val2'}
   AND cdc = TRUE
   AND CUSTOM_PROPERTIES={
       'cdc_specification': {
           'view_type': 'NEW_IMAGE',
           'tags': { 'key': 'string', 'value': 'string' },
       }
   };
   ```

------
#### [ CLI ]

**Add tags to a stream when creating a new table using the AWS CLI**

1. To create a table with a stream and apply the table tags automatically to the stream, you can use the `propagateTags=Table` flag. The following code is an example of this.

   ```
   aws keyspaces create-table \
   --keyspace-name 'my_keyspace' \
   --table-name 'my_table' \
   --schema-definition 'allColumns=[{name=pk,type=int},{name=ck,type=text}],clusteringKeys=[{name=ck,orderBy=ASC}],partitionKeys=[{name=pk}]' \
   --tags key=tag_key,value=tag_value
   --cdc-specification propagateTags=TABLE,status=ENABLED,viewType=NEW_IMAGE
   ```

1. To apply different tags to the stream, you can use the following example.

   ```
   aws keyspaces create-table \
   --keyspace-name 'my_keyspace' \
   --table-name 'my_table' \
   --schema-definition 'allColumns=[{name=pk,type=int},{name=ck,type=text}],clusteringKeys=[{name=ck,orderBy=ASC}],partitionKeys=[{name=pk}]' \
   --tags key=tag_key,value=tag_value 
   --cdc-specification 'status=ENABLED,viewType=NEW_IMAGE,tags=[{key=tag_key, value=tag_value}]'
   ```

------

# Add tags to a new stream for an existing table
<a name="Tagging.Operations.new.stream"></a>

You can add tags when you create a new stream for an existing table. You can either use the `PropagateTags` flag to apply the table tags to the stream or specify new tags for the stream. You can use CQL or the AWS CLI to tag a new stream.

**Note**  
Amazon Keyspaces CDC requires the presence of a service-linked role (`AWSServiceRoleForAmazonKeyspacesCDC`) that publishes metric data from Amazon Keyspaces CDC streams into the `"cloudwatch:namespace": "AWS/Cassandra"` in your CloudWatch account on your behalf. This role is created automatically for you. For more information, see [Using roles for Amazon Keyspaces CDC streams](using-service-linked-roles-CDC-streams.md).

------
#### [ Console ]

**Add tags when creating a new stream using the (console)**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**, and then choose the table you want to add a stream for.

1. Choose the **Streams** tab.

1. In the **Stream details** section, choose **Edit**.

1. Select **Turn on streams** .

1. Select the **View type** and continue to **Tags** to create tags for the stream.

1. You can select one of the following options:
   + **No tags** – Use this option if you don't want to create any tags for the stream.
   + **Copy tags from table** – Use this option if you want to copy the tags from the table to the stream. After copying the tags, you can edit them for the stream. Note that this option is only available if the table has tags.
   + **Add new tags** – You can add up to 50 tags for the stream by choosing **Add new tag**.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Add tags when creating a new stream**

1. To create a new stream for an existing table and apply the table's tags to the stream, you can use the `'propagate_tags': 'TABLE'` flag. The following statements is an example of this.

   ```
   ALTER TABLE mytable WITH cdc = TRUE AND CUSTOM_PROPERTIES={ 'cdc_specification': { 'view_type': 'NEW_IMAGE', 'propagate_tags': 'TABLE' } };
   ```

1. To create a new stream for an existing table and specify new tags, you can use the following example.

   ```
   ALTER TABLE mytable WITH cdc = TRUE AND CUSTOM_PROPERTIES={ 'cdc_specification': { 'view_type': 'NEW_IMAGE', 'tags': { 'key': 'string', 'value': 'string' }} };
   ```

------
#### [ CLI ]

**Add tags when creating a new stream using the AWS CLI**

1. To create a new stream with tags, you can use the `propagateTags=TABLE` flag to apply the table's tags automatically to the stream. The following code is an example of this.

   ```
   aws keyspaces update-table \ 
   --keyspace-name 'my_keyspace' \ 
   --table-name 'my_table' \
   --cdc-specification propagateTags=TABLE,status=ENABLED,viewType=NEW_IMAGE
   ```

1. To create a new stream for an existing table and specify new tags, you can use the following example.

   ```
   aws keyspaces update-table \ 
   --keyspace-name 'my_keyspace' \ 
   --table-name 'my_table' \
   --cdc-specification 'status=ENABLED,viewType=NEW_IMAGE,tags=[{key=tag_key, value=tag_value}]'
   ```

------

# Add new tags to a stream
<a name="Tagging.Operations.existing.stream"></a>

You can add new tags to an existing stream in Amazon Keyspaces using the CQL or the AWS CLI. You can only add tags to the latest stream.

------
#### [ Console ]

**Add tags to an existing stream (console)**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**, and then choose the table with the stream that you want to tag.

1. Choose the **Streams** tab.

1. In the **Tags** section, choose **Manage tags**.

1. Choose **Add new tag** to add a new tag. You can create up to 50 tags by repeating this step.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Add tags to a stream using CQL**
+ The following statement shows how to add tags to an existing stream.

  ```
  ALTER TABLE mykeyspace.mytable ADD TAGS_FOR_CDC {'key1':'val1', 'key2':'val2'};
  ```

------
#### [ CLI ]

**Add tags to a stream using the AWS CLI**
+ The following example shows how to add new tags to an existing stream.

  ```
  aws keyspaces tag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-11T21:21:33.291' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# Delete tags from a stream
<a name="Tagging.Operations.existing.stream.drop"></a>

To delete tags from a stream, you can use CQL or the AWS CLI. You can only delete the tags for the latest stream. 

------
#### [ Console ]

**Delete tags from a table using the Amazon Keyspaces console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**.

1. Choose a table from the list and choose the **Streams** tab. 

1. In the **Tags** section choose **Manage tags** to delete tags from the table.

1. After the tag you want to delete, choose **Remove**.

1. Choose **Save changes**.

------
#### [ Cassandra Query Language (CQL) ]

**Delete tags from a stream using CQL**
+ The following statement shows how to delete tags from an existing stream.

  ```
  ALTER TABLE mytable DROP TAGS_FOR_CDC {'key3':'val3', 'key4':'val4'};
  ```

------
#### [ CLI ]

**Delete tags from a stream using the AWS CLI**
+ The following statement removes the specified tags from a stream.

  ```
  aws keyspaces untag-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-11T21:21:33.291' --tags 'key=key3,value=val3' 'key=key4,value=val4'
  ```

------

# View the tags of a stream
<a name="Tagging.Operations.view.stream"></a>

The following examples show how to view the tags of a stream in Amazon Keyspaces using CQL or the AWS CLI.

------
#### [ Console ]

**View the tags of a stream using the console**

1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at [https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home).

1. In the navigation pane, choose **Tables**.

1. Choose a table from the list and choose the **Streams** tab. 

1. You can view the tags of the stream in the **Tags** section.

------
#### [ Cassandra Query Language (CQL) ]

**View the tags of a stream using CQL**

To read the tags attached to a stream, you must specify the resource ARN of the stream in the `WHERE` clause. The following CQL syntax is an example of this.

```
SELECT * FROM system_schema_mcs.tags WHERE resource_id = stream_arn;
```
+ The following query returns the tags for the specified stream.

  ```
  SELECT tags FROM system_schema_mcs.tags WHERE resource_id = 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-06T17:17:39.800';
  ```

  The output of that query looks like the following.

  ```
   resource_id                                                                                                       | keyspace_name | resource_name           | resource_type | tags   
   ------------------------------------------------------------------------------------------------------------------+---------------+-------------------------+---------------+---------------------- 
   arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-04-02T23:00:07.052     |      singleks | 2025-04-02T23:00:07.052 |        stream | {'tagkey': 'tagval'}
  ```

------
#### [ CLI ]

**View the tags of a stream using the AWS CLI**
+ This example shows how to list the tags for all streams under the specified keyspace.

  ```
  aws keyspaces list-tags-for-resource --resource-arn 'arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-11T21:21:33.291'
  ```

  The output of the last command looks like this.

  ```
  {
      "tags": [
          {
              "key": "key1",
              "value": "val1"
          },
          {
              "key": "key2",
              "value": "val2"
          },
          {
              "key": "key3",
              "value": "val3"
          },
          {
              "key": "key4",
              "value": "val4"
          }
      ]
  }
  ```

------