You can call this operation to change the name of a Message Queue for Apache Kafka instance.

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 ModifyInstanceName

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

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

The ID of the Message Queue for Apache Kafka instance.

InstanceName String Yes dev-test

The new name of the Message Queue for Apache Kafka instance. The value of this parameter must meet the following requirements:

  • The name can only contain letters, digits, hyphens (-), and underscores (_).
  • The name must be 3 to 64 characters in length, and will be automatically truncated if it contains more characters.
RegionId String Yes cn-hangzhou

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

Response parameters

Parameter Type Example Description
Success Boolean true

Indicates whether the request is successful.

RequestId String 06084011-E093-46F3-A51F-4B19A8AD****

The ID of the request.

Code Integer 200

The returned status code. If "200" is returned, the request is successful.

Message String operation success.

The returned message.

Examples

Sample requests

http(s)://[Endpoint]/? Action=ModifyInstanceName
&InstanceId=alikafka_post-cn-v0h1fgs2****
&InstanceName=dev-test
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<Message>operation success. </Message>
<RequestId>06084011-E093-46F3-A51F-4B19A8AD7A94</RequestId>
<Success>true</Success>
<Code>200</Code>

JSON format

{
    "Message": "operation success.",
    "RequestId": "06084011-E093-46F3-A51F-4B19A8AD7A94",
    "Success": true,
    "Code": 200
}

Error codes

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