[
{
"id": "afe47b531bb349a38db59adb32b53ce4",
"name": "default.code-trans-demo-100026380639",
"enable": true,
"priority": 0,
"routing_config": {
"@type": "type.googleapis.com/v1.RuleRoutingConfig",
"sources": [
{
"service": "*",
"namespace": "*",
"arguments": []
}
],
"destinations": [
{
"service": "code-trans-demo-100026380639",
"namespace": "default",
"labels": {
"VERSION": {
"value": "v1",
"type": "EXACT",
"valueType": "TEXT"
}
},
"weight": 50,
"priority": 0,
"name": "group-1",
"isolate": false
},
{
"service": "code-trans-demo-100026380639",
"namespace": "default",
"labels": {
"VERSION": {
"value": "v2",
"type": "EXACT",
"valueType": "TEXT"
}
},
"weight": 50,
"priority": 0,
"name": "group-2",
"isolate": false
}
]
}
}
]
curl --location --request PUT 'http://119.91.66.223:8090/naming/v2/routings' \
--header 'X-Polaris-Header;' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "afe47b531bb349a38db59adb32b53ce4",
"name": "default.code-trans-demo-100026380639",
"enable": true,
"priority": 0,
"routing_config": {
"@type": "type.googleapis.com/v1.RuleRoutingConfig",
"sources": [
{
"service": "*",
"namespace": "*",
"arguments": []
}
],
"destinations": [
{
"service": "code-trans-demo-100026380639",
"namespace": "default",
"labels": {
"VERSION": {
"value": "v1",
"type": "EXACT",
"valueType": "TEXT"
}
},
"weight": 50,
"priority": 0,
"name": "group-1",
"isolate": false
},
{
"service": "code-trans-demo-100026380639",
"namespace": "default",
"labels": {
"VERSION": {
"value": "v2",
"type": "EXACT",
"valueType": "TEXT"
}
},
"weight": 50,
"priority": 0,
"name": "group-2",
"isolate": false
}
]
}
}
]'
{
"code": 0,
"info": "string"
}