Updates the configurations of a routing rule.
Debugging
Request headers
This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request and response headers.
Request syntax
PUT /pop/v1/sam/ingress/Ingress HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
IngressId | Long | Query | Yes | 87 | The ID of the routing rule. |
CertId | String | Query | No | 188077086902****_176993d****_181437****_108724**** | The ID of the certificate that is associated with the Classic Load Balancer (CLB) instance.
For information about how to manage the SSL certificate IDs that are used by CLB instances, see Manage certificates (CLB). |
CertIds | String | Query | No | 87***35-cn-hangzhou,812***3-cn-hangzhou | The IDs of the certificates that are associated with the Application Load Balancer (ALB) instance.
|
Description | String | Query | No | ingress-sae-test | The name of the routing rule. |
ListenerPort | String | Query | No | 443 | The listener port for the Server Load Balancer (SLB) instance. You must specify a vacant port. |
DefaultRule | String | Query | No | {"appId":"395b60e4-0550-458d-9c54-a265d036****","containerPort":8080} | The default forwarding rule. You can specify a port and an application in the default forwarding rule to forward traffic based on the IP address of the application. The following parameters are involved:
Note All requests that do not match the forwarding rules specified in the Rules parameter are forwarded over the port to the specified application. |
Rules | String | FormData | No | [{"appId":"395b60e4-0550-458d-9c54-a265d036****","containerPort":8080,"domain":"www.sae.site","path":"/path1"},{"appId":"666403ce-d25b-47cf-87fe-497565d2****","containerPort":8080,"domain":"sae.site","path":"/path2"}] | The forwarding rules. You can specify a port and an application in a forwarding rule to forward traffic based on the specified domain name and request path. The following parameters are involved:
|
LoadBalanceType | String | Query | No | clb | This parameter is invalid. |
ListenerProtocol | String | Query | No | HTTP | The protocol that is used to forward requests. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** | The request ID. |
Message | String | success | The returned message. Valid values:
|
TraceId | String | 0a98a02315955564772843261e**** | The trace ID. |
Data | Object | The returned result. | |
IngressId | Long | 87 | The ID of the routing rule. |
ErrorCode | String | Null | The error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the configurations of the routing rule were updated. Valid values:
|
Examples
Sample requests
PUT /pop/v1/sam/ingress/Ingress?IngressId=87&CertId=188077086902****_176993d****_181437****_108724****&Description=ingress-sae-test&ListenerPort=443&DefaultRule={"appId":"395b60e4-0550-458d-9c54-a265d036****","containerPort":8080}&LoadBalanceType=clb&ListenerProtocol=HTTP HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Rules=[{"appId":"395b60e4-0550-458d-9c54-a265d036****","containerPort":8080,"domain":"www.sae.site","path":"/path1"},{"appId":"666403ce-d25b-47cf-87fe-497565d2****","containerPort":8080,"domain":"sae.site","path":"/path2"}]
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateIngressResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<IngressId>87</IngressId>
</Data>
<Code>200</Code>
<Success>true</Success>
</UpdateIngressResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"IngressId" : 87
},
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | The value of the %s parameter is invalid. This parameter cannot be left empty. |
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | The value of the {%s} parameter is invalid. |
400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | The value %s of the {%s} parameter is invalid. |
400 | Exceed.IngressRule | The number of Ingress related rules must be less than or equal to 40. | The number of routing rules cannot exceed 40. |
400 | SlbListenerPort.NotAvailable | The SLB listening port is unavailable: slbId [%s], port [%s] | The listener port [%s] of the SLB instance whose ID is [%s] is occupied. |
400 | SSLCert.NotFound | The specified SSL certificate cannot be found. | The SSL certificate is not found. |
For a list of error codes, see Service error codes.