AWS::MSK::Configuration
Creates a new MSK configuration. To see an example of how to use this operation, first save the following text to a file and name the file config-file.txt.
auto.create.topics.enable = true zookeeper.connection.timeout.ms = 1000 log.roll.ms = 604800000
Now run the following Python 3.6 script in the folder where you saved config-file.txt. This script uses the properties specified in config-file.txt to create a configuration named SalesClusterConfiguration. This configuration can work with Apache Kafka versions 1.1.1 and 2.1.0.
import boto3 client = boto3.client('kafka') config_file = open('config-file.txt', 'r') server_properties = config_file.read() response = client.create_configuration( Name='SalesClusterConfiguration', Description='The configuration to use on all sales clusters.', KafkaVersions=['1.1.1', '2.1.0'], ServerProperties=server_properties ) print(response)
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::MSK::Configuration", "Properties" : { "Description" :String, "KafkaVersionsList" :[ String, ... ], "Name" :String, "ServerProperties" :String} }
YAML
Type: AWS::MSK::Configuration Properties: Description:StringKafkaVersionsList:- StringName:StringServerProperties:String
Properties
Description-
The description of the configuration.
Required: No
Type: String
Update requires: No interruption
KafkaVersionsListProperty description not available.
Required: No
Type: List of String
Update requires: Replacement
Name-
The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".
Required: Yes
Type: String
Update requires: Replacement
ServerProperties-
Contents of the
server.propertiesfile. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents ofserver.propertiescan be in plaintext.Required: Yes
Type: String
Update requires: No interruption