Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Add tags to a new stream for an existing table
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 Amazon CLI to tag a new stream.
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.
- Console
-
Add tags when creating a new stream using the (console)
-
Sign in to the Amazon Web Services Management Console, and open the Amazon Keyspaces console at https://console.amazonaws.cn/keyspaces/home.
-
In the navigation pane, choose Tables,
and then choose the table you want to add a stream for.
-
Choose the Streams tab.
-
In the Stream details section, choose Edit.
Select Turn on streams .
-
Select the View type and continue to Tags to create tags for the stream.
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.
-
Choose Save changes.
- Cassandra Query Language (CQL)
-
Add tags when creating a new stream
-
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' } };
-
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 Amazon CLI
-
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
-
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}]'