更新Ingress路由
更新时间 2026-06-22 10:38:33
最近更新时间: 2026-06-22 10:38:33
接口功能介绍
调用updateIngress接口更新Ingress路由
接口约束
无
URI
POST /v2/ingress/updateIngress
路径参数 无
Query参数 无
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 资源池ID,请参考调用前必知-概述 | bb9fdb42056f11eda1610242ac110002 |
请求体body参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| ingressUuid | 是 | String | ingress路由uuid | ||
| labels | 否 | Map of String | 标签 | ||
| annotations | 否 | Map of String | 注解 | ||
| rules | 是 | Array of Objects | Ingress路由转发规则列表 | rules |
表 rules
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| ingressRuleUuid | 否 | String | Ingress路由转发规则uuid,需要更新时填写 | ||
| host | 是 | String | host由小写字母、数组、-和.组成,且最大长度为64位 | ||
| enableTls | 否 | Integer | 开启TLS,0关闭1开启 | ||
| secretName | 否 | String | K8s保密字典名称 | ||
| paths | 是 | Array of Objects | Ingress路由paths列表 | paths |
表 paths
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| ingressPathUuid | 否 | String | path uuid | ||
| path | 是 | String | path路径,最大长度为1024 | ||
| pathType | 是 | String | pathType只能填写ImplementationSpecific值 | ||
| appDeployName | 是 | String | 应用实例名称 | ||
| appDeployUuid | 是 | String | 应用实例uuid | ||
| serviceName | 是 | String | 应用实例绑定的K8s service名称 | ||
| servicePort | 是 | Integer | 应用实例绑定的K8s service服务端口 |
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应编码 2000 success | ||
| message | String | 消息内容 | ||
| returnObj | Object | 返回数据 | {} | |
| error | String | 调用错误时返回的错误编码 |
枚举参数
无
请求示例
请求url
POST https://msap-global.ctapi.ctyun.cn/v2/ingress/updateIngress
请求头header
{
"regionId": "bb9fdb42056f11eda1610242ac110002"
}
请求体body
{
"ingressUuid": "dc1dc9a6ec5547ea89169a42cd1f9b94",
"labels": {},
"annotations": {},
"rules": [
{
"host": "www.test.gogogo",
"enableTls": 0,
"paths": [
{
"path": "/abc",
"pathType": "ImplementationSpecific",
"appDeployName": "consumer666",
"appDeployUuid": "4daa0cfbf1de4c90bee65c16cdbdc16c",
"serviceName": "test-6667",
"servicePort": 28081
}
]
}
]
}
响应示例
{
"statusCode": 2000,
"message": "成功",
"returnObj": {
}
}
状态码
请参考 状态码
错误码
请参考 错误码