Modifying Kafka Access Modes
Function
This API is used to modify private or public access for Kafka.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/{engine}/instances/{instance_id}/plain-ssl-switch
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
|
engine |
Yes |
String |
Message engine. |
|
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
job_id |
String |
Background task ID. |
|
protocol |
String |
Enabling or disabling the Kafka access mode. |
|
enable |
Boolean |
Enablement or disablement. |
Example Requests
Requiring the username and password when SASL_SSL is enabled for the first time
POST https://{endpoint}/v2/{project_id}/{engine}/instances/{instance_id}/plain-ssl-switch
{
"protocol" : "private_sasl_ssl_enable",
"enable" : true,
"user_name" : "root",
"pass_word" : "password",
"sasl_enabled_mechanisms" : [ "SCRAM-SHA-512", "PLAIN" ]
}
Example Responses
Status code: 200
Successful
{
"job_id" : "ff8080828bdc0f64018bdcadfd8f00d7",
"protocol" : "private_plain_enable",
"enable" : true
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.