Configurations - Amazon Managed Streaming for Apache Kafka
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).

Configurations

A collection of MSK configurations.

URI

/v1/configurations

HTTP methods

GET

Operation ID: ListConfigurations

Returns a list of all the MSK configurations.

Query parameters
NameTypeRequiredDescription
nextTokenStringFalse

The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.

maxResultsStringFalse

The maximum number of results to return in the response (default maximum 100 results per API call). If there are more results, the response includes a NextToken parameter.

Responses
Status codeResponse modelDescription
200 ListConfigurationsResponse

200 response

400Error

The request isn't valid because the input is incorrect. Correct your input and then submit it again.

401Error

The request is not authorized. The provided credentials couldn't be validated.

403Error

Access forbidden. Check your credentials and then retry your request.

404Error

The resource could not be found due to incorrect input. Correct the input, then retry the request.

429Error

429 response

500Error

There was an unexpected internal server error. Retrying your request might resolve the issue.

503Error

503 response

POST

Operation ID: CreateConfiguration

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)
Responses
Status codeResponse modelDescription
200 CreateConfigurationResponse

200 response

400Error

The request isn't valid because the input is incorrect. Correct your input and then submit it again.

401Error

The request is not authorized. The provided credentials couldn't be validated.

403Error

Access forbidden. Check your credentials and then retry your request.

404Error

The resource could not be found due to incorrect input. Correct the input, then retry the request.

409Error

This cluster name already exists. Retry your request using another name.

429Error

429 response

500Error

There was an unexpected internal server error. Retrying your request might resolve the issue.

503Error

503 response

OPTIONS

Enable CORS by returning the correct headers.

Responses
Status codeResponse modelDescription
200None

Default response for CORS method

Schemas

Request bodies

{ "name": "string", "description": "string", "kafkaVersions": [ "string" ], "serverProperties": "string" }

Response bodies

{ "nextToken": "string", "configurations": [ { "creationTime": "string", "name": "string", "description": "string", "kafkaVersions": [ "string" ], "state": enum, "arn": "string", "latestRevision": { "creationTime": "string", "description": "string", "revision": integer } } ] }
{ "creationTime": "string", "name": "string", "state": enum, "arn": "string", "latestRevision": { "creationTime": "string", "description": "string", "revision": integer } }
{ "message": "string", "invalidParameter": "string" }

Properties

Configuration

Represents an MSK Configuration.

PropertyTypeRequiredDescription
arn

string

True

The Amazon Resource Name (ARN) of the configuration.

creationTime

string

True

The time when the configuration was created.

description

string

True

The description of the configuration.

kafkaVersions

Array of type string

False

An array of the versions of Apache Kafka with which you can use this MSK configuration. You can use this configuration for an MSK cluster only if the Apache Kafka version specified for the cluster appears in this array.

latestRevision

ConfigurationRevision

True

Latest revision of the configuration.

name

string

True

The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".

state

ConfigurationState

False

State of the configuration.

ConfigurationRevision

Describes a configuration revision.

PropertyTypeRequiredDescription
creationTime

string

True

The time when the configuration revision was created.

description

string

False

The description of the configuration revision.

revision

integer

Format: int64

True

The revision number.

ConfigurationState

State of a kafka configuration

  • ACTIVE

  • DELETING

  • DELETE_FAILED

CreateConfigurationRequest

Request body for CreateConfiguration.

PropertyTypeRequiredDescription
description

string

False

The description of the configuration.

kafkaVersions

Array of type string

False

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

name

string

True

The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".

serverProperties

string

True

Contents of the server.properties file. 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 of server.properties can be in plaintext.

CreateConfigurationResponse

Response body for CreateConfiguration

PropertyTypeRequiredDescription
arn

string

False

The Amazon Resource Name (ARN) of the configuration.

creationTime

string

False

The time when the configuration was created.

latestRevision

ConfigurationRevision

False

Latest revision of the configuration.

name

string

False

The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".

state

ConfigurationState

False

State of the configuration.

Error

Returns information about an error.

PropertyTypeRequiredDescription
invalidParameter

string

False

The parameter that caused the error.

message

string

False

The description of the error.

ListConfigurationsResponse

The response contains an array of Configuration and a next token if the response is truncated.

PropertyTypeRequiredDescription
configurations

Array of type Configuration

False

An array of MSK configurations.

nextToken

string

False

The paginated results marker. When the result of a ListConfigurations operation is truncated, the call returns NextToken in the response. To get another batch of configurations, provide this token in your next request.