Error pages¶
An error page is the HTML file that is shown to an end user who is attempting to access a load balancer node that is offline/unavailable.
During provisioning, every load balancer is configured with a default error page that gets displayed when traffic is requested for an offline node.
You can add a single custom error page with an HTTP-based protocol to a load balancer. Page updates override existing content. If a custom error page is deleted, or the load balancer is changed to a non-HTTP protocol, the default error page is restored.
Show custom error page¶
GET /v1.0/{account}/loadbalancers/{loadBalancerId}/errorpage
Shows the custom error page that is configured for a specified load balancer.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
Success |
Request succeeded. |
400 |
Bad Request |
The request is missing one or more elements, or the values of some elements are invalid. |
401 |
Unauthorized |
You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token. |
404 |
Not Found |
The requested item was not found. |
413 |
Over Limit |
The number of items returned is above the allowed limit. |
422 |
ImmutableEntity |
This fault is returned when a user attempts to modify an item that is not currently in a state that allows modification. For example, load balancers in a status of PENDING_UPDATE,BUILD, or DELETED may not be modified. |
500 |
Load Balancer Fault |
The load balancer has experienced a fault. |
503 |
Service Unavailable |
The service is not available. |
Request¶
The following table shows the URI parameters for the request:
Name |
Type |
Description |
---|---|---|
{account} |
String |
The ID for the tenant or account in a multi- tenancy cloud. |
{loadBalancerId} |
String |
The ID for the load balancer. |
The following table shows the body parameters for the request:
Name |
Type |
Description |
---|---|---|
content |
String (Required) |
The HTML content for the custom error page. Must be 65536 characters or fewer. See the request examples in this section for the required XML and JSON formats. |
Response¶
Example Show custom error page: JSON response
{"errorpage":
{"content":"<html> DEFAULT ERROR PAGE</html>"}
}
Example Show custom error page: XML response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errorpage xmlns="http://docs.openstack.org/loadbalancers/api/v1.0">
<content>
<html> DEFAULT ERROR PAGE
</html>
</content>
</errorpage>
Set custom error page¶
PUT /v1.0/{account}/loadbalancers/{loadBalancerId}/errorpage
Sets a custom error page for a specified load balancer.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
Success |
Request succeeded. |
400 |
Bad Request |
The request is missing one or more elements, or the values of some elements are invalid. |
401 |
Unauthorized |
You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token. |
404 |
Not Found |
The requested item was not found. |
413 |
Over Limit |
The number of items returned is above the allowed limit. |
422 |
ImmutableEntity |
This fault is returned when a user attempts to modify an item that is not currently in a state that allows modification. For example, load balancers in a status of PENDING_UPDATE,BUILD, or DELETED may not be modified. |
500 |
Load Balancer Fault |
The load balancer has experienced a fault. |
503 |
Service Unavailable |
The service is not available. |
Request¶
The following table shows the URI parameters for the request:
Name |
Type |
Description |
---|---|---|
{account} |
String |
The ID for the tenant or account in a multi- tenancy cloud. |
{loadBalancerId} |
String |
The ID for the load balancer. |
The following table shows the body parameters for the request:
Name |
Type |
Description |
---|---|---|
content |
String (Required) |
The HTML content for the custom error page. Must be 65536 characters or fewer. See the request examples in this section for the required XML and JSON formats. |
Example Set custom error page: JSON request
{"errorpage":
{"content":"\n<html>\n DEFAULT ERROR PAGE\n</html>\n"}
}
Example Set custom error page: XML request
<errorpage xmlns="http://docs.openstack.org/loadbalancers/api/v1.0">
<content>
<![CDATA[
<html> DEFAULT ERROR PAGE
</html>
]]>
</content>
</errorpage>
Response¶
This operation does not return a response body.
Delete custom error page¶
DELETE /v1.0/{account}/loadbalancers/{loadBalancerId}/errorpage
Deletes the custom error page for a specified load balancer.
The following table shows the possible response codes for this operation:
Response Code |
Name |
Description |
---|---|---|
200 |
Success |
Request succeeded. |
400 |
Bad Request |
The request is missing one or more elements, or the values of some elements are invalid. |
401 |
Unauthorized |
You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token. |
404 |
Not Found |
The requested item was not found. |
413 |
Over Limit |
The number of items returned is above the allowed limit. |
422 |
ImmutableEntity |
This fault is returned when a user attempts to modify an item that is not currently in a state that allows modification. For example, load balancers in a status of PENDING_UPDATE,BUILD, or DELETED may not be modified. |
500 |
Load Balancer Fault |
The load balancer has experienced a fault. |
503 |
Service Unavailable |
The service is not available. |
Request¶
The following table shows the URI parameters for the request:
Name |
Type |
Description |
---|---|---|
{account} |
String |
The ID for the tenant or account in a multi- tenancy cloud. |
{loadBalancerId} |
String |
The ID for the load balancer. |
This operation does not accept a request body.
Response¶
This operation does not return a response body.