Rotate a Kafka cluster's credentials

Set a new password for the cluster's default user. The old password stops working once the brokers apply the new one in the background. Open connections stay open, and new connections need the new password.

POST https://{availability_zone}.betterstackcloud.com/v1/kafka/{id}/credentials/rotate
id string required

The ID of the Kafka cluster to rotate.

Authorization string required

Bearer $TOKEN

202 Accepted
{
  "username": "example",
  "password": "example",
  "bootstrap_servers": "example",
  "public_bootstrap_servers": "example",
  "security_protocol": "example",
  "sasl_mechanism": "example",
  "ca_certificate": "example",
  "properties": {
    "bootstrap.servers": "example",
    "security.protocol": "example",
    "sasl.mechanism": "example",
    "sasl.username": "example",
    "sasl.password": "example",
    "ssl.ca.location": "example"
  }
}

Returns the new credentials and the client settings as one object.

username string or null

The default user's username.

password string or null

The new SCRAM password.

bootstrap_servers string

The private bootstrap address, as host:port.

public_bootstrap_servers string

The public bootstrap address, as host:port. Present only when public_access is on.

security_protocol string

The protocol clients connect with, always SASL_SSL.

sasl_mechanism string

The authentication mechanism, always SCRAM-SHA-512.

ca_certificate string

The CA certificate bundle that signs the cluster's TLS certificate.

properties object

The client settings to connect with, including the new password. Replace /path/to/betterstack-ca.pem in ssl.ca.location with the path of the saved ca_certificate.

properties.bootstrap.servers string

The bootstrap.servers.

properties.security.protocol string

The security.protocol.

properties.sasl.mechanism string

The sasl.mechanism.

properties.sasl.username string or null

The sasl.username.

properties.sasl.password string or null

The sasl.password.

properties.ssl.ca.location string

The ssl.ca.location.