Updates the configurations of a Message Queue for Apache Kafka instance.

Permission description

A Resource Access Management (RAM) user must be authorized before it can call the UpdateInstanceConfig operation. For more information about authorization, see RAM policies.

API

Action

Resource

UpdateInstanceConfig

alikafka: UpdateInstance

acs:alikafka:*:*:{instanceId}

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateInstanceConfig

The operation that you want to perform. Set the value to UpdateInstanceConfig.

Config String Yes {"kafka.log.retention.hours":"33"}

The configurations of the Message Queue for Apache Kafka instance that you want to update. The configuration information must be a valid JSON string.

InstanceId String Yes alikafka_post-cn-v0h1fgs2****

The ID of the Message Queue for Apache Kafka instance.

RegionId String Yes cn-hangzhou

The region ID of the Message Queue for Apache Kafka instance.

Description of the Config parameter

Parameter

Type

Value range

Default value

Description

enable.vpc_sasl_ssl

Boolean

true/false

false

Specifies whether to enable VPC transmission encryption. If you want to enable it, you must also enable access control list (ACL).

enable.acl

Boolean

true/false

false

Specifies whether to enable ACL.

kafka.log.retention.hours

Integer

24~480

72

The message retention period. Unit: hours.

kafka.message.max.bytes

Integer

1048576~10485760

1048576

The maximum message size. Unit: bytes.

Response parameters

Parameter Type Example Description
Code Integer 200

The response code. The HTTP 200 status code indicates that the request is successful.

Message String operation success.

The response message.

RequestId String 4B6D821D-7F67-4CAA-9E13-A5A997C35***

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/? Action=UpdateInstanceConfig
&Config={"kafka.log.retention.hours":"33"}
&InstanceId=alikafka_post-cn-v0h1fgs2****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<UpdateInstanceConfigResponse>
      <Message>operation success. </Message>
      <RequestId>4B6D821D-7F67-4CAA-9E13-A5A997C35***</RequestId>
      <Code>200</Code>
      <Success>true</Success>
</UpdateInstanceConfigResponse>

JSON format

{
    "Message": "operation success.",
    "RequestId": "4B6D821D-7F67-4CAA-9E13-A5A997C35***",
    "Code": 200,
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.