All Products
Search
Document Center

ApsaraMQ for Kafka:UpdateInstanceConfig

Last Updated:Apr 12, 2024

Modifies the configurations of an ApsaraMQ for Kafka instance. ApsaraMQ for Kafka allows you to modify the configurations of an instance, including the access control list (ACL) feature, the Secure Sockets Layer (SSL) feature, the message retention period, and the maximum message size.

Operation description

Permissions

If a RAM user wants to call the UpdateInstanceConfig operation, the RAM user must be granted the required permissions. For more information about how to grant permissions, see RAM policies.

APIActionResource
UpdateInstanceConfigalikafka: UpdateInstanceacs:alikafka:::{instanceId}

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
alikafka:UpdateInstanceWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigstringYes

The configurations that you want to update for the ApsaraMQ for Kafka instance. The value must be a valid JSON string.

{"kafka.log.retention.hours":"33"}
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
InstanceIdstringYes

The instance ID.

alikafka_post-cn-v0h1fgs2****

Description of the Config parameter

ParameterTypeValid valueDefault valueDescription
enable.vpc_sasl_sslString"true": enables virtual private cloud (VPC) transmission encryption. "false": disables VPC transmission encryption."false"Specifies whether to enable VPC transmission encryption. If VPC transmission encryption is enabled, you must also enable the access control list (ACL) feature.
enable.aclString"true": enables the ACL feature. "false": disables the ACL feature."false"Specifies whether to enable the ACL feature.
kafka.log.retention.hoursStringOnly integers in the range of 24 to 480 are supported."72"The retention period of messages. Unit: hours.
kafka.message.max.bytesStringOnly integers in the range of 1048576 to 10485760 are supported."1048576"The maximum size of a message. Unit: bytes.

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The returned message.

operation success.
RequestIdstring

The request ID.

4B6D821D-7F67-4CAA-9E13-A5A997C35***
Successboolean

Indicates whether the call is successful.

true

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe %s parameter is required.-
400Instance.StatusNotRunningThe instance is not running and cannot operate this function. Please try again later.The instance is not running and cannot operate this function. Please try again later.
400Instance.Change.NotAllowedThis instance does not allow deployment operations.-
400InvalidParameter.FormatThe %s format is invalid.-
400InvalidParameter.NotSupportThe %s parameter is not supported.-
400InvalidParameterThe %s parameter is invalid.-
400InvalidParameter.VersionNotSupportCurrent version does not support the %s parameter.-
404Instance.NotFoundThe instance does not exist. Please verify the entry and try again.The instance does not exist. Please verify the entry and try again.
500InternalErrorAn internal error occurred. Please try again later.-
500InternalErrorA system exception occurred. Please submit a ticket.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-20The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 404
    Added Error Codes: 500