Skip to main content

Update HTTP access policy

Basic Information

Update HTTP access policy

请求路径
PUT /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/httpdomains/{rule_id}
Body请求参数
{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string" ,
"the_weight": 0,
"domain_path": "string",
"rule_extensions": [
"string"
],
"whether_open": true,
"auto_ssl": true,
"auto_ssl_config": " string"
}

request parameters

nameLocationtyperequiredillustrate
app_idpathintegerYesApp ID
rule_idpathstringYesgateway policy id
team_idpathstringYesnone
region_namepathstringYesnone
bodybodyUpdatePostHTTPGatewayRulenonone

return result

status codeStatus code meaningillustratedata model
200OKsuccessHTTPGatewayRule

Model

HTTPGatewayRule

{
"ID": 0,
"rule_extensions": [
"string"
],
"http_rule_id": "string",
"region_id": "string",
"tenant_id": "string",
" service_id": "string",
"service_name": "string",
"domain_name": "string",
"container_port": -2147483648,
"protocol": "string",
"certificate_id": -2147483648,
"domain_type": "string",
"service_alias": "string",
"is_senior": true,
"domain_path": "string",
"domain_cookie": "string",
"domain_heander": "string ",
"type": -2147483648,
"the_weight": -2147483648,
"is_outer_service": true,
"auto_ssl": true,
"auto_ssl_config": "string",
"path_rewrite": true,
" rewrites": "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
IDintegerfalseread-onlyIDnone
rule_extensions[string]falseread-onlynone
http_rule_idstringtruenoneHttp rule idhttp_rule_id
region_idstringtruenoneRegion idregion id
tenant_idstringtruenoneTenant idtenant id
service_idstringtruenoneService idcomponent id
service_namestringtruenoneService namecomponent name
domain_namestringtruenoneDomain namedomain name
container_portintegerfalsenoneContainer portcontainer port
protocolstringfalsenoneProtocolDomain type http https httptp https http and https
certificate_idintegerfalsenoneCertificate idCertificate ID
domain_typestringfalsenoneDomain typeComponent domain name type
service_aliasstringfalsenoneService aliascomponent alias
is_seniorbooleanfalsenoneIs seniorIs there an advanced route
domain_pathstringfalsenoneDomain pathdomain name path
domain_cookiestringfalsenoneDomain cookiesdomain cookie
domain_heanderstringfalsenoneDomain heanderdomain name heander
typeintegerfalsenoneTypeType (default:0, custom:1)
the_weightintegerfalsenoneThe weightWeights
is_outer_servicebooleanfalsenoneIs outer serviceWhether the external port has been opened
auto_sslbooleanfalsenoneAuto sslWhether to automatically match the certificate and upgrade to https, if enabled, the upgrade will be completed by an external service
auto_ssl_configstring¦nullfalsenoneAuto ssl configAutomatic distribution certificate configuration
path_rewritebooleanfalsenonePath rewriteWhether to enable simple route rewriting
rewritesstringfalsenoneRewritesComplex route rewrite configuration

UpdatePostHTTPGatewayRule

{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string" ,
"the_weight": 0,
"domain_path": "string",
"rule_extensions": [
"string"
],
"whether_open": true,
"auto_ssl": true,
"auto_ssl_config": " string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
service_idstringtruenoneService idapplication component id
container_portintegerfalsenoneContainer portbind port
certificate_idintegerfalsenoneCertificate idcertificate id
domain_namestringfalsenoneDomain namedomain name
domain_cookiestringfalsenoneDomain cookiesdomain cookie
domain_headerstringfalsenoneDomain headerdomain header
the_weightintegerfalsenoneThe weightnone
domain_pathstringfalsenoneDomain pathdomain name path
rule_extensions[string]falsenonerule extension
whether_openbooleanfalsenoneWhether openIs it open
auto_sslbooleanfalsenoneAuto sslWhether to automatically match the certificate and upgrade to https, if enabled, the upgrade will be completed by an external service
auto_ssl_configstringfalsenoneAuto ssl configAutomatic distribution certificate configuration