AWS::MSK::Configuration - Amazon CloudFormation
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).

This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.

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, ... ], "LatestRevision" : LatestRevision, "Name" : String, "ServerProperties" : String } }

YAML

Type: AWS::MSK::Configuration Properties: Description: String KafkaVersionsList: - String LatestRevision: LatestRevision Name: String ServerProperties: String

Properties

Description

The description of the configuration.

Required: No

Type: String

Update requires: No interruption

KafkaVersionsList

The versions of Apache Kafka with which you can use this MSK configuration.

When you update the KafkaVersionsList property, Amazon CloudFormation recreates a new configuration with the updated property before deleting the old configuration. Such an update requires a resource replacement. To successfully update KafkaVersionsList, you must also update the Name property in the same operation.

If your configuration is attached with any clusters created using the Amazon Web Services Management Console or Amazon CLI, you'll need to manually delete the old configuration from the console after the update completes.

For more information, see Can’t update KafkaVersionsList in MSK configuration in the Amazon MSK Developer Guide.

Required: No

Type: Array of String

Update requires: Replacement

LatestRevision

Latest revision of the MSK configuration.

Required: No

Type: LatestRevision

Update requires: No interruption

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.properties file. When using the console, the SDK, or the Amazon CLI, the contents of server.properties can be in plaintext.

Required: Yes

Type: String

Update requires: No interruption

Return values

Ref

When you provide the logical ID of this resource to the Ref intrinsic function, it returns the MSK configuration.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Arn

The Amazon Resource Name (ARN) of the configuration.

LatestRevision.CreationTime

The time when the configuration revision was created.

LatestRevision.Description

The description of the configuration revision.

LatestRevision.Revision

The revision number.