Creating a Metadata Migration Task
Function
This API is used to create a metadata migration task.
URI
POST /v2/{project_id}/instances/{instance_id}/metadata
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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
overwrite |
Yes |
String |
true: Configurations in the metadata file with the same name as the uploaded file will be overwritten. false: An error is reported when a topic or group already exists. |
name |
Yes |
String |
Migration task name. For details about the naming rules, see the API for creating an instance. |
type |
Yes |
String |
Migration task type. The value can be rocketmq or rabbitToRocket. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
CreateRocketMqMigrationTaskRequestBody |
Yes |
String |
Metadata JSON file. |
Response Parameters
None
Example Requests
Creating a metadata migration task
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/metadata { "rabbit_version" : "3.8.35", "rabbitmq_version" : "3.8.35", "product_name" : "RabbitMQ", "product_version" : "3.8.35", "users" : [ { "name" : "root", "password_hash" : "password_hash", "hashing_algorithm" : "rabbit_password_hashing_sha256", "tags" : "administrator", "limits" : { } } ], "vhosts" : [ { "name" : "DeleteVhost123" } ], "permissions" : [ { "name" : "root", "vhost" : "DeleteVhost123", "configure" : ".*", "write" : ".*", "read" : ".*" } ], "topic_permissions" : [ ], "parameters" : [ ], "global_parameters" : [ { "name" : "internal_cluster_id", "value" : "rabbitmq-cluster-id-123" } ], "policies" : [ ], "queues" : [ { "name" : "test-001", "vhost" : "/", "durable" : false, "auto_delete" : false, "arguments" : { } } ], "exchanges" : [ { "name" : "direct", "vhost" : "/", "durable" : false, "auto_delete" : false, "internal" : false, "arguments" : { } } ], "bindings" : [ { "source" : "direct", "vhost" : "/", "destination" : "test-001", "destination_type" : "queue", "routing_key" : "test-001", "arguments" : { } } ] }
Example Responses
Status code: 200
Status code.
6cf4dcd3-8471-4139-8b5b-8a3a71f704c7
Status Codes
Status Code |
Description |
---|---|
200 |
Status code. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot