doc-exports/docs/elb/api-ref/CreateHealthMonitor.html
zhoumeng 51dc9baefd elb_api_0420
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com>
Co-authored-by: zhoumeng <zhoumeng35@huawei.com>
Co-committed-by: zhoumeng <zhoumeng35@huawei.com>
2023-06-09 13:24:32 +00:00

542 lines
31 KiB
HTML

<a name="CreateHealthMonitor"></a><a name="CreateHealthMonitor"></a>
<h1 class="topictitle1">Configuring a Health Check</h1>
<div><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to configure a health check.</p>
</div>
<div class="section"><h4 class="sectiontitle">Constraints</h4><p>The security groups must have rules that allow traffic to 100.125.0.0/16. If you want to use UDP for health checks, ensure that the protocol of the backend server group is UDP.</p>
</div>
<div class="section" id="CreateHealthMonitor__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>POST /v3/{project_id}/elb/healthmonitors</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p>Specifies the project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p>X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p>Specifies the token used for IAM authentication.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__request_CreateHealthMonitorRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p>healthmonitor</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p><a href="#CreateHealthMonitor__request_CreateHealthMonitorOption">CreateHealthMonitorOption</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p>Specifies the health check.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateHealthMonitor__request_CreateHealthMonitorOption"></a><a name="request_CreateHealthMonitorOption"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__request_CreateHealthMonitorOption" frame="border" border="1" rules="all"><caption><b>Table 4 </b>CreateHealthMonitorOption</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the administrative status of the health check.</p>
<ul><li><p><strong>true</strong> (default): Health check is enabled.</p>
</li><li><p><strong>false</strong>: Health check is disabled.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>delay</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the interval between health checks, in seconds. The value ranges from <strong>1</strong> to <strong>50</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>domain_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the domain name that HTTP requests are sent to during the health check.</p>
<p>The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter.</p>
<p>The value is left blank by default, indicating that the virtual IP address of the load balancer is used as the destination address of HTTP requests.</p>
<p>This parameter is available only when <strong>type</strong> is set to <strong>HTTP</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>100</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>expected_codes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the expected HTTP status code. This parameter will take effect only when <strong>type</strong> is set to <strong>HTTP</strong> or <strong>HTTPS</strong>.</p>
<p>The value options are as follows:</p>
<ul><li><p>A specific value, for example, 200</p>
</li><li><p>A list of values that are separated with commas (,), for example, 200, 202</p>
</li><li><p>A value range, for example, 200-204</p>
</li></ul>
<p>The default value is <strong>200</strong>. Multiple status codes can be queried in the format of <em>expected_codes=xxx&amp;expected_codes=xxx</em>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>64</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>http_method</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the HTTP method. The value can be <strong>GET</strong>, <strong>HEAD</strong>, <strong>POST</strong>, <strong>PUT</strong>, <strong>DELETE</strong>, <strong>TRACE</strong>, <strong>OPTIONS</strong>, <strong>CONNECT</strong>, or <strong>PATCH</strong>. The default value is <strong>GET</strong>.</p>
<p>This parameter is available when <strong>type</strong> is set to <strong>HTTP</strong> or <strong>HTTPS</strong>.</p>
<p>This parameter is unsupported. Please do not use it.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>16</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>max_retries</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the number of consecutive health checks when the health check result of a backend server changes from <strong>OFFLINE</strong> to <strong>ONLINE</strong>.</p>
<p>The value ranges from <strong>1</strong> to <strong>10</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>10</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>max_retries_down</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the number of consecutive health checks when the health check result of a backend server changes from <strong>ONLINE</strong> to <strong>OFFLINE</strong>.</p>
<p>The value ranges from <strong>1</strong> to <strong>10</strong>, and the default value is <strong>3</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>10</strong></p>
<p>Default: <strong>3</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>monitor_port</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the port used for the health check. If this parameter is left blank, a port of the backend server will be used by default. The port number ranges from 1 to 65535.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>65535</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the health check name.</p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>255</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>pool_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the ID of the backend server group for which the health check is configured.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the project ID.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>32</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>timeout</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the maximum time required for waiting for a response from the health check, in seconds. It is recommended that you set the value less than that of parameter <strong>delay</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>50</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the health check protocol. The value can be <strong>TCP</strong>, <strong>UDP_CONNECT</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
<p>Note:</p>
<ul><li><p>If the protocol of the backend server is QUIC, the value can only be <strong>UDP_CONNECT</strong>.</p>
</li><li><p>If the protocol of the backend server is UDP, the value can only be <strong>UDP_CONNECT</strong>.</p>
</li><li><p>If the protocol of the backend server is TCP, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li><li><p>If the protocol of the backend server is HTTP, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li><li><p>If the protocol of the backend server is HTTPS, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li></ul>
<p>QUIC protocol is not supported in <strong>eu-nl</strong> region.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>url_path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the HTTP request path for the health check. The value must start with a slash (/), and the default value is <strong>/</strong>. Note: This parameter is available only when <strong>type</strong> is set to <strong>HTTP</strong>.</p>
<p>Default: <strong>/</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>80</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__response_CreateHealthMonitorResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p>request_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p>Specifies the request ID. The value is automatically generated.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p>healthmonitor</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p><a href="#CreateHealthMonitor__response_HealthMonitor">HealthMonitor</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p>Specifies the health check.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateHealthMonitor__response_HealthMonitor"></a><a name="response_HealthMonitor"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__response_HealthMonitor" frame="border" border="1" rules="all"><caption><b>Table 6 </b>HealthMonitor</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the administrative status of the health check.</p>
<ul><li><p><strong>true</strong>(default) indicates that the health check is enabled.</p>
</li><li><p><strong>false</strong> indicates that the health check is disabled.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>delay</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the interval between health checks, in seconds. The value ranges from <strong>1</strong> to <strong>50</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>50</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>domain_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the domain name that HTTP requests are sent to during the health check.</p>
<p>The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter.</p>
<p>The value is left blank by default, indicating that the virtual IP address of the load balancer is used as the destination address of HTTP requests.</p>
<p>This parameter is available only when <strong>type</strong> is set to <strong>HTTP</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>expected_codes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the expected HTTP status code. This parameter will take effect only when <strong>type</strong> is set to <strong>HTTP</strong> or <strong>HTTPS</strong>.</p>
<p>The value options are as follows:</p>
<ul><li><p>A specific value, for example, 200</p>
</li><li><p>A list of values that are separated with commas (,), for example, 200, 202</p>
</li><li><p>A value range, for example, 200-204</p>
</li></ul>
<p>The default value is <strong>200</strong>. Multiple status codes can be queried in the format of <em>expected_codes=xxx&amp;expected_codes=xxx</em>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>http_method</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the HTTP method. The value can be <strong>GET</strong>, <strong>HEAD</strong>, <strong>POST</strong>, <strong>PUT</strong>, <strong>DELETE</strong>, <strong>TRACE</strong>, <strong>OPTIONS</strong>, <strong>CONNECT</strong>, or <strong>PATCH</strong>. The default value is <strong>GET</strong>.</p>
<p>This parameter is available when <strong>type</strong> is set to <strong>HTTP</strong> or <strong>HTTPS</strong>.</p>
<p>This parameter is unsupported. Please do not use it.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the health check ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>max_retries</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the number of consecutive health checks when the health check result of a backend server changes from <strong>OFFLINE</strong> to <strong>ONLINE</strong>.</p>
<p>The value ranges from <strong>1</strong> to <strong>10</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>10</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>max_retries_down</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the number of consecutive health checks when the health check result of a backend server changes from <strong>ONLINE</strong> to <strong>OFFLINE</strong>.</p>
<p>The value ranges from <strong>1</strong> to <strong>10</strong>, and the default value is <strong>3</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>10</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>monitor_port</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the port used for the health check. If this parameter is left blank, a port of the backend server will be used by default. The port number ranges from 1 to 65535.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>65535</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the health check name.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>pools</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Array of <a href="#CreateHealthMonitor__response_PoolRef">PoolRef</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Lists the IDs of backend server groups for which the health check is configured. Only one ID will be returned.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the project ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>timeout</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the maximum time required for waiting for a response from the health check, in seconds. It is recommended that you set the value less than that of parameter <strong>delay</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>50</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the health check protocol. The value can be <strong>TCP</strong>, <strong>UDP_CONNECT</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
<p>Note:</p>
<ul><li><p>If the protocol of the backend server is QUIC, the value can only be <strong>UDP_CONNECT</strong>.</p>
</li><li><p>If the protocol of the backend server is UDP, the value can only be <strong>UDP_CONNECT</strong>.</p>
</li><li><p>If the protocol of the backend server is TCP, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li><li><p>If the protocol of the backend server is HTTP, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li><li><p>If the protocol of the backend server is HTTPS, the value can only be <strong>TCP</strong>, <strong>HTTP</strong>, or <strong>HTTPS</strong>.</p>
</li></ul>
<p>QUIC protocol is not supported in <strong>eu-nl</strong> region.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>url_path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the HTTP request path for the health check. The value must start with a slash (/), and the default value is <strong>/</strong>. Note: This parameter is available only when <strong>type</strong> is set to <strong>HTTP</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>created_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the time when the health check was configured. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time).</p>
<p>This is a new field in this version, and it will not be returned for resources associated with existing dedicated load balancers and for resources associated with existing and new shared load balancers.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the time when the health check was updated. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time).</p>
<p>This is a new field in this version, and it will not be returned for resources associated with existing dedicated load balancers and for resources associated with existing and new shared load balancers.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateHealthMonitor__response_PoolRef"></a><a name="response_PoolRef"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__response_PoolRef" frame="border" border="1" rules="all"><caption><b>Table 7 </b>PoolRef</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p>Specifies the ID of the backend server group.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><pre class="screen">POST https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/healthmonitors
{
"healthmonitor" : {
"name" : "My Healthmonitor",
"max_retries" : 3,
"pool_id" : "488acc50-6bcf-423d-8f0a-0f4184f5b8a0",
"type" : "HTTP",
"timeout" : 30,
"delay" : 1
}
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 201</strong></p>
<p>Normal response to POST requests.</p>
<pre class="screen">{
"request_id" : "0e837340-f1bd-4037-8f61-9923d0f0b19e",
"healthmonitor" : {
"monitor_port" : null,
"id" : "c2b210b2-60c4-449d-91e2-9e9ea1dd7441",
"project_id" : "99a3fff0d03c428eac3678da6a7d0f24",
"domain_name" : null,
"name" : "My Healthmonitor",
"delay" : 1,
"max_retries" : 3,
"pools" : [ {
"id" : "488acc50-6bcf-423d-8f0a-0f4184f5b8a0"
} ],
"admin_state_up" : true,
"timeout" : 30,
"type" : "HTTP",
"expected_codes" : "200",
"url_path" : "/",
"http_method" : "GET"
}
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateHealthMonitor__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p>201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p>Normal response to POST requests.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="module_health_monitors.html">Health Check</a></div>
</div>
</div>