View the tags of a stream
The following examples show how to view the tags of a stream in Amazon Keyspaces using CQL or the Amazon CLI.
- 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-cn:cassandra:
';aws-region
:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-06T17:17:39.800The output of that query looks like the following.
resource_id | keyspace_name | resource_name | resource_type | tags ------------------------------------------------------------------------------------------------------------------+---------------+-------------------------+---------------+---------------------- arn:aws-cn:cassandra:
aws-region
: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 Amazon 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-cn:cassandra:
'aws-region
:111122223333:/keyspace/my_keyspace/table/my_table/stream/2025-05-11T21:21:33.291The 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" } ] }
-
Delete tags from a stream
Create cost allocation reports