Configurations
A collection of MSK configurations.
URI
/v1/configurations
HTTP methods
GET
Operation ID: ListConfigurations
Returns a list of all the MSK configurations.
| Name | Type | Required | Description |
|---|---|---|---|
nextToken | String | False | The paginated results marker. When the result of the operation is truncated, the call returns |
maxResults | String | False | 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 |
| Status code | Response model | Description |
|---|---|---|
200 |
ListConfigurationsResponse | 200 response |
400 | Error | The request isn't valid because the input is incorrect. Correct your input and then submit it again. |
401 | Error | The request is not authorized. The provided credentials couldn't be validated. |
403 | Error | Access forbidden. Check your credentials and then retry your request. |
404 | Error | The resource could not be found due to incorrect input. Correct the input, then retry the request. |
429 | Error | 429 response |
500 | Error | There was an unexpected internal server error. Retrying your request might resolve the issue. |
503 | Error | 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)
| Status code | Response model | Description |
|---|---|---|
200 |
CreateConfigurationResponse | 200 response |
400 | Error | The request isn't valid because the input is incorrect. Correct your input and then submit it again. |
401 | Error | The request is not authorized. The provided credentials couldn't be validated. |
403 | Error | Access forbidden. Check your credentials and then retry your request. |
404 | Error | The resource could not be found due to incorrect input. Correct the input, then retry the request. |
409 | Error | This cluster name already exists. Retry your request using another name. |
429 | Error | 429 response |
500 | Error | There was an unexpected internal server error. Retrying your request might resolve the issue. |
503 | Error | 503 response |
OPTIONS
Enable CORS by returning the correct headers.
| Status code | Response model | Description |
|---|---|---|
200 | None | Default response for CORS method |
Schemas
Request bodies
{ "name name": "string", "description description": "string", "kafkaVersions kafkaVersions": [ "string" ], "serverProperties serverProperties": "string" }
Response bodies
{ "nextToken nextToken": "string", "configurations configurations": [ { "creationTime creationTime": "string", "name name": "string", "description description": "string", "kafkaVersions kafkaVersions": [ "string" ], "state state": enum, "arn arn": "string", "latestRevision latestRevision": { "creationTime creationTime": "string", "description description": "string", "revision revision": integer } } ] }
{ "creationTime creationTime": "string", "name name": "string", "state state": enum, "arn arn": "string", "latestRevision latestRevision": { "creationTime creationTime": "string", "description description": "string", "revision revision": integer } }
{ "message message": "string", "invalidParameter invalidParameter": "string" }
Properties
Configuration
Represents an MSK Configuration.
| Property | Type | Required | Description |
|---|---|---|---|
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 | 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 | False | State of the configuration. |
creationTime
The time when the configuration was created.
Type: string
Required: True
name
The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".
Type: string
Required: True
description
The description of the configuration.
Type: string
Required: True
kafkaVersions
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.
Type: Array of type string
Required: False
arn
The Amazon Resource Name (ARN) of the configuration.
Type: string
Required: True
ConfigurationRevision
Describes a configuration revision.
| Property | Type | Required | Description |
|---|---|---|---|
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. |
creationTime
The time when the configuration revision was created.
Type: string
Required: True
description
The description of the configuration revision.
Type: string
Required: False
revision
The revision number.
Type: integer
Required: True
Format: int64
ConfigurationState
State of a kafka configuration
ACTIVEDELETINGDELETE_FAILED
CreateConfigurationRequest
Request body for CreateConfiguration.
| Property | Type | Required | Description |
|---|---|---|---|
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 |
name
The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".
Type: string
Required: True
description
The description of the configuration.
Type: string
Required: False
kafkaVersions
The versions of Apache Kafka with which you can use this MSK configuration.
Type: Array of type string
Required: False
serverProperties
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.
Type: string
Required: True
CreateConfigurationResponse
Response body for CreateConfiguration
| Property | Type | Required | Description |
|---|---|---|---|
arn | string | False | The Amazon Resource Name (ARN) of the configuration. |
creationTime | string | False | The time when the configuration was created. |
latestRevision | 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 | False | State of the configuration. |
creationTime
The time when the configuration was created.
Type: string
Required: False
name
The name of the configuration. Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]{0,}$".
Type: string
Required: False
arn
The Amazon Resource Name (ARN) of the configuration.
Type: string
Required: False
Error
Returns information about an error.
| Property | Type | Required | Description |
|---|---|---|---|
invalidParameter | string | False | The parameter that caused the error. |
message | string | False | The description of the error. |
message
The description of the error.
Type: string
Required: False
invalidParameter
The parameter that caused the error.
Type: string
Required: False
ListConfigurationsResponse
The response contains an array of Configuration and a next token if the response is truncated.
| Property | Type | Required | Description |
|---|---|---|---|
configurations | Array of type Configuration | False | An array of MSK configurations. |
nextToken | string | False | The paginated results marker. When the result of a |
nextToken
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.
Type: string
Required: False
configurations
An array of MSK configurations.
Type: Array of type Configuration
Required: False