创建HTTP网关策略
基本信息
创建HTTP网关策略
请求路径
POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/httpdomains
Body请求参数
{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string",
"the_weight": 0,
"domain_path": "/",
"rule_extensions": [],
"whether_open": false,
"auto_ssl": false,
"auto_ssl_config": "string",
"configuration": {
"proxy_body_size": 0,
"proxy_buffer_numbers": 4,
"proxy_buffer_size": 4,
"proxy_buffering": "off",
"proxy_connect_timeout": 75,
"proxy_read_timeout": 60,
"proxy_send_timeout": 60,
"set_headers": [
{
"key": "string",
"value": "string"
}
]
}
}
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
app_id | path | integer | 是 | 应用ID | |
team_id | path | string | 是 | none | |
region_name | path | string | 是 | none | |
body | body | Http | 否 | Http | none |
返回示例
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | HTTPGatewayRule |
模型
Http
{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string",
"the_weight": 0,
"domain_path": "/",
"rule_extensions": [],
"whether_open": false,
"auto_ssl": false,
"auto_ssl_config": "string",
"configuration": {
"proxy_body_size": 0,
"proxy_buffer_numbers": 4,
"proxy_buffer_size": 4,
"proxy_buffering": "off",
"proxy_connect_timeout": 75,
"proxy_read_timeout": 60,
"proxy_send_timeout": 60,
"set_headers": [
{
"key": "string",
"value": "string"
}
]
}
}
属性
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
service_id | string | true | none | Service id | 应用组件id |
container_port | integer | true | none | Container port | 绑定端口 |
certificate_id | integer | false | none | Certificate id | 证书id |
domain_name | string | true | none | Domain name | 域名 |
domain_cookie | string | false | none | Domain cookie | 域名cookie |
domain_header | string | false | none | Domain header | 域名header |
the_weight | integer | false | none | The weight | none |
domain_path | string | false | none | Domain path | 域名路径 |
rule_extensions | [string] | false | none |