Updated on 2026-04-03 GMT+08:00

Enabling Domain Name Access to a RocketMQ Instance

Function

This API is used to enable domain name access to a RocketMQ instance.

URI

POST /v2/{project_id}/rocketmq/instances/{instance_id}/dns

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain it, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID, which can be obtained from Querying All Instances.

Request Parameters

None

Response Parameters

Status code: 204

Successful

Status code: 400

Table 2 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Constraints

N/A

Range

N/A

Default Value

N/A

error_msg

String

Definition

Error description.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Requests

Enabling domain name access to a RocketMQ instance

POST https://{endpoint}/v2/{project_id}/rocketmq/instances/{instance_id}/dns

Example Responses

Status code: 400

Failed

{
  "error_code" : "DMS.111501035",
  "error_msg" : "dns already enabled"
}

Status Codes

Status Code

Description

204

Successful

400

Failed

Error Codes

See Error Codes.