aws kafka list-clusters
Returns a list of all the MSK clusters in the current Region. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To list the available clusters
The following list-clusters example lists the Amazon MSK clusters in your AWS account.
aws kafka list-clustersIdentifyIts output, shortened
{
"ClusterInfoList": [
{
"BrokerNodeGroupInfo": {
"BrokerAZDistribution": "DEFAULT",
"ClientSubnets": [
"subnet-cbfff283",
"subnet-6746046b"
],
"InstanceType": "kafka.m5.large",
"SecurityGroups": [
"sg-f839b688"
],
"StorageInfo": {
"EbsStorageInfo": {
"VolumeSize": 100
}
}
},
"ClusterArn": "arn:aws:kafka:us-west-2:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5",
"ClusterName": "demo-cluster-1",
"CreationTime": "2020-07-09T02:31:36.223000+00:00",
"CurrentBrokerSoftwareInfo": {
"KafkaVersion": "2.2.1"
},
"CurrentVersion": "K3AEGXETSR30VB",
"EncryptionInfo": {
"EncryptionAtRest": {
"DataVolumeKMSKeyId": "arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
},
… 23 more linesFor more information, see Listing Amazon MSK Clusters in the Amazon Managed Streaming for Apache Kafka Developer Guide.
Options
--cluster-name-filterSpecify a prefix of the name of the clusters that you want to list.--max-resultsThe maximum number of results to return in the response.--next-tokenThe paginated results marker.