doc-exports/docs/elb/api-ref/CreateL7Policy.html
zhoumeng b865c4b876 ELBB_API_0208
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>
2024-02-28 14:52:35 +00:00

1058 lines
72 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="CreateL7Policy"></a><a name="CreateL7Policy"></a>
<h1 class="topictitle1">Adding a Forwarding Policy</h1>
<div><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to add a forwarding policy to a listener.</p>
</div>
<div class="section"><h4 class="sectiontitle">Constraints</h4><p>Forwarding policies can be added to only to HTTP or HTTPS listeners.</p>
</div>
<div class="section" id="CreateL7Policy__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>POST /v3/{project_id}/elb/l7policies</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="CreateL7Policy__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="CreateL7Policy__request_CreateL7PolicyRequestBody" 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>l7policy</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="#CreateL7Policy__request_CreateL7PolicyOption">CreateL7PolicyOption</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p>Specifies the forwarding policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateL7PolicyOption"></a><a name="request_CreateL7PolicyOption"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateL7PolicyOption" frame="border" border="1" rules="all"><caption><b>Table 4 </b>CreateL7PolicyOption</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>action</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 where requests will be forwarded. The value can be one of the following:</p>
<ul><li><p><strong>REDIRECT_TO_POOL</strong>: Requests will be forwarded to another backend server group.</p>
</li><li><p><strong>REDIRECT_TO_LISTENER</strong>: Requests will be redirected to an HTTPS listener.</p>
</li><li><p><strong>REDIRECT_TO_URL</strong>: Requests will be redirected to another URL.</p>
</li><li><p><strong>FIXED_RESPONSE</strong>: A fixed response body will be returned.</p>
</li></ul>
<p><strong>REDIRECT_TO_LISTENER</strong> has the highest priority. If requests are to be redirected to an HTTPS listener, other forwarding policies of the listener will become invalid.</p>
<p>Note:</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>, the listener's protocol must be HTTP or HTTPS.</p>
</li><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>, the listener's protocol must be HTTP.</p>
</li></ul>
<p>Minimum: <strong>1</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>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 forwarding policy. The default value is <strong>true</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.4.4.2.5.1.1 "><p>description</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>Provides supplementary information about the forwarding policy.</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>listener_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 listener to which the forwarding policy is added.</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>, the forwarding policy can be added to an HTTP or HTTPS listener.</p>
</li><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>, the forwarding policy can be added to an HTTP listener.</p>
</li></ul>
</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 forwarding policy 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>position</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 forwarding policy priority. The value cannot be updated.</p>
<p>This parameter is unsupported. Please do not use it.</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>priority</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 forwarding policy priority. A smaller value indicates a higher priority. The value must be unique for forwarding policies of the same listener. This parameter will take effect only when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>. If this parameter is passed and <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned. This parameter is unsupported for shared load balancers.</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>, the value can only be <strong>0</strong>, indicating <strong>REDIRECT_TO_LISTENER</strong> has the highest priority.</p>
</li><li><p>If <strong>enhance_l7policy_enable</strong> is not enabled, forwarding policies are automatically prioritized based on the original policy sorting logic. The priorities of domain names are independent from each other. For the same domain name, the priorities are sorted in the order of exact match (<strong>EQUAL_TO</strong>), prefix match (<strong>STARTS_WITH</strong>), and regular expression match (<strong>REGEX</strong>). If the matching types are the same, the longer the URL is, the higher the priority is. If a forwarding policy contains only a domain name without a path specified, the path is <strong>/</strong>, and prefix match is used by default.</p>
</li><li><p>If <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong> and this parameter is not passed, the priority will be a sum of 1 and the highest priority of existing forwarding policy in the same listener by default. If the highest priority of existing forwarding policies is the maximum (10,000), the forwarding policy will fail to be created because the final priority for creating the forwarding policy is the sum of 1 and 10,000, which exceeds the maximum. In this case, specify a value or adjust the priorities of existing forwarding policies. If no forwarding policies exist, the highest priority of existing forwarding policies will be set to 1 by default.</p>
</li></ul>
<p>This parameter is invalid for shared load balancers.</p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>10000</strong></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 ID of the project where the forwarding policy is used.</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>redirect_listener_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 ID of the listener to which requests are redirected. This parameter is mandatory when <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>.</p>
<p>Note:</p>
<ul><li><p>The listener's protocol must be HTTPS.</p>
</li><li><p>A listener added to another load balancer is not allowed.</p>
</li><li><p>This parameter cannot be passed in the API for adding or updating a forwarding policy if <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>.</p>
</li><li><p>This parameter is unsupported for shared load balancers.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>redirect_pool_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 ID of the backend server group to which the requests are forwarded. This parameter is valid only when <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>. Note:</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>, specify either <strong>redirect_pool_id</strong> or <strong>redirect_pools_config</strong>. If both are specified, only <strong>redirect_pools_config</strong> takes effect.</p>
</li><li><p>This parameter cannot be specified when <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>redirect_pools_config</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>Array of <a href="#CreateL7Policy__request_CreateRedirectPoolsConfig">CreateRedirectPoolsConfig</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the configuration of the backend server group that the requests are forwarded to. This parameter is valid only when <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>.</p>
<p>Note:</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>, specify either <strong>redirect_pool_id</strong> or <strong>redirect_pools_config</strong>. If both are specified, only <strong>redirect_pools_config</strong> takes effect.</p>
</li><li><p>This parameter cannot be specified when <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>redirect_url</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 URL to which requests are forwarded.</p>
<p>Format: <em>protocol://host:port/path?query</em></p>
<p>Minimum: <strong>1</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>redirect_url_config</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><a href="#CreateL7Policy__request_CreateRedirectUrlConfig">CreateRedirectUrlConfig</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the URL to which requests are forwarded.</p>
<p>For dedicated load balancers, this parameter will take effect only when advanced forwarding is enabled (<strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>). If it is passed when <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned.</p>
<p>This parameter is mandatory when <strong>action</strong> is set to <strong>REDIRECT_TO_URL</strong>. It cannot be specified if the value of <strong>action</strong> is not <strong>REDIRECT_TO_URL</strong>.</p>
<p>Format: <em>protocol://host:port/path?query</em></p>
<p>At least one of the four parameters (<strong>protocol</strong>, <strong>host</strong>, <strong>port</strong>, and <strong>path</strong>) must be passed, or their values cannot be set to <strong>${xxx}</strong> at the same time. (<strong>${xxx}</strong> indicates that the value in the request will be inherited. For example, <strong>${host}</strong> indicates the host in the URL to be redirected.)</p>
<p>The values of <strong>protocol</strong> and <strong>port</strong> cannot be the same as those of the associated listener, and either <strong>host</strong> or <strong>path</strong> must be passed or their values cannot be <strong>${xxx}</strong> at the same time.</p>
<p>For shared load balancers, this parameter is unsupported. If it is passed, an error will be returned.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>fixed_response_config</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><a href="#CreateL7Policy__request_CreateFixtedResponseConfig">CreateFixtedResponseConfig</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the configuration of the page that will be returned. This parameter will take effect when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>. If this parameter is passed and <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned.</p>
<p>This parameter is mandatory when <strong>action</strong> is set to <strong>FIXED_RESPONSE</strong>. It cannot be specified if the value of <strong>action</strong> is not <strong>FIXED_RESPONSE</strong>.</p>
<p>For shared load balancers, this parameter is unsupported. If it is passed, an error will be returned.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>rules</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>Array of <a href="#CreateL7Policy__request_CreateL7PolicyRuleOption">CreateL7PolicyRuleOption</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Lists the forwarding rules in the forwarding policy.</p>
<p>The list can contain a maximum of 10 forwarding rules (if <strong>conditions</strong> is specified, a condition is considered as a rule).</p>
<p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, <strong>PATH</strong>, <strong>METHOD</strong>, or <strong>SOURCE_IP</strong>, only one forwarding rule can be created for each type. Note:</p>
<ul><li><p>The entire list will be replaced if you update it.</p>
</li><li><p>If the action of <strong>17policy</strong> is set to <strong>Redirect to another listener</strong>, <strong>17rule</strong> cannot be created.</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateRedirectPoolsConfig"></a><a name="request_CreateRedirectPoolsConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateRedirectPoolsConfig" frame="border" border="1" rules="all"><caption><b>Table 5 </b>CreateRedirectPoolsConfig</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.5.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p>pool_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p>Specifies the ID of the backend server group.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p>weight</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p>Specifies the weight of the backend server group. The value ranges from <strong>0</strong> to <strong>100</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateRedirectUrlConfig"></a><a name="request_CreateRedirectUrlConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateRedirectUrlConfig" frame="border" border="1" rules="all"><caption><b>Table 6 </b>CreateRedirectUrlConfig</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.6.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.1 "><p>protocol</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the protocol for redirection.</p>
<p>The value can be <strong>HTTP</strong>, <strong>HTTPS</strong>, or <strong>${protocol}</strong>. The default value is <strong>${protocol}</strong>, indicating that the protocol of the request will be used.</p>
<p>Default: <strong>${protocol}</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>36</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.1 "><p>host</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the host name that requests are redirected to. The value can contain only letters, digits, hyphens (-), and periods (.) and must start with a letter or digit. The default value is <strong>${host}</strong>, indicating that the host of the request will be used.</p>
<p>Default: <strong>${host}</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.1 "><p>port</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the port that requests are redirected to. The default value is <strong>${port}</strong>, indicating that the port of the request will be used.</p>
<p>Default: <strong>${port}</strong></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.6.2.5.1.1 "><p>path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the path that requests are redirected to. The default value is <strong>${path}</strong>, indicating that the path of the request will be used.</p>
<p>The value can contain only letters, digits, and special characters _~';@^- %#&amp;$.*+?,=!:|/()[]{} and must start with a slash (/).</p>
<p>Default: <strong>${path}</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.1 "><p>query</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the query string set in the URL for redirection. The default value is <strong>${query}</strong>, indicating that the query string of the request will be used.</p>
<p>For example, in the URL <strong>https://www.example.com:8080/elb?type=loadbalancer</strong>, <strong>${query}</strong> indicates <strong>type=loadbalancer</strong>. If this parameter is set to <strong>${query}&amp;name=my_name</strong>, the URL will be redirected to <strong>https://www.example.com:8080/elb?type=loadbalancer&amp;name=my_name</strong>.</p>
<p>The value is case-sensitive and can contain only letters, digits, and special characters !$&amp;'()*+,-./:;=?@^_`</p>
<p>Default: <strong>${query}</strong></p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.1 "><p>status_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.6.2.5.1.4 "><p>Specifies the status code returned after the requests are redirected.</p>
<p>The value can be <strong>301</strong>, <strong>302</strong>, <strong>303</strong>, <strong>307</strong>, or <strong>308</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>16</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateFixtedResponseConfig"></a><a name="request_CreateFixtedResponseConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateFixtedResponseConfig" frame="border" border="1" rules="all"><caption><b>Table 7 </b>CreateFixtedResponseConfig</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.7.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.1 "><p>status_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.7.2.5.1.4 "><p>Specifies the fixed HTTP status code configured in the forwarding rule. The value can be any integer in the range of 200299, 400499, or 500599.</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.7.2.5.1.1 "><p>content_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.7.2.5.1.4 "><p>Specifies the format of the response body.</p>
<p>The value can be <strong>text/plain</strong>, <strong>text/css</strong>, <strong>text/html</strong>, <strong>application/javascript</strong>, or <strong>application/json</strong>.</p>
<p>Default: <strong>text/plain</strong></p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>32</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.1 "><p>message_body</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.7.2.5.1.4 "><p>Specifies the content of the response message body.</p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>1024</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateL7PolicyRuleOption"></a><a name="request_CreateL7PolicyRuleOption"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateL7PolicyRuleOption" frame="border" border="1" rules="all"><caption><b>Table 8 </b>CreateL7PolicyRuleOption</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.8.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies the administrative status of the forwarding rule. The value can be <strong>true</strong> or <strong>false</strong>, and the default value is <strong>true</strong>.</p>
<p>This parameter is unsupported. Please do not use it.</p>
<p>Default: <strong>true</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies the type of the forwarding rule. The value can be one of the following:</p>
<ul><li><p><strong>HOST_NAME</strong>: A domain name will be used for matching.</p>
</li><li><p><strong>PATH</strong>: A URL will be used for matching.</p>
</li><li><p><strong>METHOD</strong>: An HTTP request method will be used for matching.</p>
</li><li><p><strong>HEADER</strong>: The request header will be used for matching.</p>
</li><li><p><strong>QUERY_STRING</strong>: A query string will be used for matching.</p>
</li><li><p><strong>SOURCE_IP</strong>: The source IP address will be used for matching.</p>
</li></ul>
<p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, <strong>PATH</strong>, <strong>METHOD</strong>, and <strong>SOURCE_IP</strong>, only one forwarding rule can be created for each type. If <strong>type</strong> is set to <strong>HEADER</strong> and <strong>QUERY_STRING</strong>, multiple forwarding rules can be created for each type.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>compare_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies how requests are matched with the forwarding rule. Values:</p>
<ul><li><p><strong>EQUAL_TO</strong>: exact match.</p>
</li><li><p><strong>REGEX</strong>: regular expression match</p>
</li><li><p><strong>STARTS_WITH</strong>: prefix match</p>
</li></ul>
<p>Note:</p>
<ul><li><p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, the value can only be <strong>EQUAL_TO</strong>, and asterisks (*) can be used as wildcard characters.</p>
</li><li><p>If <strong>type</strong> is set to <strong>PATH</strong>, the value can be <strong>REGEX</strong>, <strong>STARTS_WITH</strong>, or <strong>EQUAL_TO</strong>.</p>
</li><li><p>If <strong>type</strong> is set to <strong>METHOD</strong> or <strong>SOURCE_IP</strong>, the value can only be <strong>EQUAL_TO</strong>.</p>
</li><li><p>If <strong>type</strong> is set to <strong>HEADER</strong> or <strong>QUERY_STRING</strong>, the value can only be <strong>EQUAL_TO</strong>, asterisks (*) and question marks (?) can be used as wildcard characters.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>invert</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies whether reverse matching is supported. The value can be <strong>true</strong> or <strong>false</strong>, and the default value is <strong>false</strong>.</p>
<p>This parameter is unsupported. Please do not use it.</p>
<p>Default: <strong>false</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies the key of the match item. For example, if an HTTP header is used for matching, <strong>key</strong> is the name of the HTTP header parameter.</p>
<p>This parameter is unsupported. Please do not use it.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>255</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies the value of the match item. For example, if a domain name is used for matching, <strong>value</strong> is the domain name. This parameter will take effect only when <strong>conditions</strong> is left blank.</p>
<ul><li><p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, the value can contain letters, digits, hyphens (-), and periods (.) and must start with a letter or digit. If you want to use a wildcard domain name, enter an asterisk (*) as the leftmost label of the domain name.</p>
</li><li><p>If <strong>type</strong> is set to <strong>PATH</strong> and <strong>compare_type</strong> to <strong>STARTS_WITH</strong> or <strong>EQUAL_TO</strong>, the value must start with a slash (/) and can contain only letters, digits, and special characters _~';@^-%#&amp;$.*+?,=!:|/()[]{}</p>
</li><li><p>If <strong>type</strong> is set to <strong>METHOD</strong>, <strong>SOURCE_IP</strong>, <strong>HEADER</strong>, or <strong>QUERY_STRING</strong>, this parameter will not take effect, and <strong>conditions</strong> will be used to specify the key and value.</p>
</li></ul>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.1 "><p>conditions</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.5.1.3 "><p>Array of <a href="#CreateL7Policy__request_CreateRuleCondition">CreateRuleCondition</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.8.2.5.1.4 "><p>Specifies the conditions contained in a forwarding rule. This parameter will take effect when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>.</p>
<p>If <strong>conditions</strong> is specified, <strong>key</strong> and <strong>value</strong> will not take effect, and the value of this parameter will contain all conditions configured for the forwarding rule. The keys in the list must be the same, whereas each value must be unique.</p>
<p>Array Length: <strong>0 - 10</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__request_CreateRuleCondition"></a><a name="request_CreateRuleCondition"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__request_CreateRuleCondition" frame="border" border="1" rules="all"><caption><b>Table 9 </b>CreateRuleCondition</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.9.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.1 "><p>key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.9.2.5.1.4 "><p>Specifies the key of match item.</p>
<ul><li><p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, <strong>PATH</strong>, <strong>METHOD</strong>, or <strong>SOURCE_IP</strong>, this parameter is left blank.</p>
</li><li><p>If <strong>type</strong> is set to <strong>HEADER</strong>, <strong>key</strong> indicates the name of the HTTP header parameter. The value can contain 1 to 40 characters, including letters, digits, hyphens (-), and underscores (_).</p>
</li><li><p>If <strong>type</strong> is set to <strong>QUERY_STRING</strong>, <strong>key</strong> indicates the name of the query parameter. The value is case sensitive and can contain 1 to 128 characters. Spaces, square brackets ([ ]), curly brackets ({ }), angle brackets (&lt; &gt;), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&amp;), vertical bars (|), percent signs (%), and tildes (~) are not supported.</p>
</li></ul>
<p>All keys in the conditions list in the same rule must be the same.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.1 "><p>value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.9.2.5.1.4 "><p>Specifies the value of the match item.</p>
<ul><li><p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, <strong>key</strong> is left blank, and <strong>value</strong> indicates the domain name, which can contain 1 to 128 characters, including letters, digits, hyphens (-), periods (.), and asterisks (<em>), and must start with a letter, digit, or asterisk (</em>). If you want to use a wildcard domain name, enter an asterisk (*) as the leftmost label of the domain name.</p>
</li><li><p>If <strong>type</strong> is set to <strong>PATH</strong>, <strong>key</strong> is left blank, and <strong>value</strong> indicates the request path, which can contain 1 to 128 characters. If <strong>compare_type</strong> is set to <strong>STARTS_WITH</strong> or <strong>EQUAL_TO</strong> for the forwarding rule, the value must start with a slash (/) and can contain only letters, digits, and special characters _~';@^-%#&amp;$.*+?,=!:|/()[]{}</p>
</li><li><p>If <strong>type</strong> is set to <strong>HEADER</strong>, <strong>key</strong> indicates the name of the HTTP header parameter, and <strong>value</strong> indicates the value of the HTTP header parameter. The value can contain 1 to 128 characters. Asterisks (*) and question marks (?) are allowed, but spaces and double quotation marks are not allowed. An asterisk can match zero or more characters, and a question mark can match 1 character.</p>
</li><li><p>If <strong>type</strong> is set to <strong>QUERY_STRING</strong>, <strong>key</strong> indicates the name of the query parameter, and <strong>value</strong> indicates the value of the query parameter. The value is case sensitive and can contain 1 to 128 characters. Spaces, square brackets ([ ]), curly brackets ({ }), angle brackets (&lt; &gt;), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&amp;), vertical bars (|), percent signs (%), and tildes (~) are not supported. Asterisks (*) and question marks (?) are allowed. An asterisk can match zero or more characters, and a question mark can match 1 character.</p>
</li><li><p>If <strong>type</strong> is set to <strong>METHOD</strong>, <strong>key</strong> is left blank, and <strong>value</strong> indicates the HTTP method. The value can be <strong>GET</strong>, <strong>PUT</strong>, <strong>POST</strong>, <strong>DELETE</strong>, <strong>PATCH</strong>, <strong>HEAD</strong>, or <strong>OPTIONS</strong>.</p>
</li><li><p>If <strong>type</strong> is set to <strong>SOURCE_IP</strong>, <strong>key</strong> is left blank, and <strong>value</strong> indicates the source IP address of the request. The value is an IPv4 or IPv6 CIDR block, for example, 192.168.0.2/32 or 2049::49/64.</p>
</li></ul>
<p>All keys in the conditions list in the same rule must be the same.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</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="CreateL7Policy__response_CreateL7PolicyResponseBody" frame="border" border="1" rules="all"><caption><b>Table 10 </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>l7policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p><a href="#CreateL7Policy__response_L7Policy">L7Policy</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p>Specifies the forwarding policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__response_L7Policy"></a><a name="response_L7Policy"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__response_L7Policy" frame="border" border="1" rules="all"><caption><b>Table 11 </b>L7Policy</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>action</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 where requests will be forwarded. The value can be one of the following:</p>
<ul><li><p><strong>REDIRECT_TO_POOL</strong>: Requests will be forwarded to another backend server group.</p>
</li><li><p><strong>REDIRECT_TO_LISTENER</strong>: Requests will be redirected to an HTTPS listener.</p>
</li><li><p><strong>REDIRECT_TO_URL</strong>: Requests will be redirected to another URL.</p>
</li><li><p><strong>FIXED_RESPONSE</strong>: A fixed response body will be returned.</p>
</li></ul>
<p><strong>REDIRECT_TO_LISTENER</strong> has the highest priority. If requests are to be redirected to an HTTPS listener, other forwarding policies of the listener will become invalid.</p>
<p>Note:</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>, the listener's protocol must be HTTP, HTTPS, or TERMINATED_HTTPS.</p>
</li><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>, the listener's protocol must be HTTP.</p>
</li></ul>
</td>
</tr>
<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 forwarding policy. The default value is <strong>true</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>description</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>Provides supplementary information about the forwarding policy.</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 forwarding policy ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>listener_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 ID of the listener to which the forwarding policy is added.</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 forwarding policy name.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>255</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>position</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 forwarding policy priority. This parameter cannot be updated.</p>
<p>This parameter is unsupported. Please do not use it.</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.5.4.2.4.1.1 "><p>priority</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 forwarding policy priority. A smaller value indicates a higher priority. The value must be unique for forwarding policies of the same listener. This parameter will take effect only when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>. If this parameter is passed and <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned. This parameter is unsupported for shared load balancers.</p>
<ul><li><p>If <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>, the value can only be <strong>0</strong>, indicating <strong>REDIRECT_TO_LISTENER</strong> has the highest priority.</p>
</li><li><p>If <strong>enhance_l7policy_enable</strong> is not enabled, forwarding policies are automatically prioritized based on the original policy sorting logic. The priorities of domain names are independent from each other. For the same domain name, the priorities are sorted in the order of exact match (<strong>EQUAL_TO</strong>), prefix match (<strong>STARTS_WITH</strong>), and regular expression match (<strong>REGEX</strong>). If the matching types are the same, the longer the URL is, the higher the priority is. If a forwarding policy contains only a domain name without a path specified, the path is <strong>/</strong>, and prefix match is used by default.</p>
</li><li><p>If <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong> and this parameter is not passed, the priority will be a sum of 1 and the highest priority of existing forwarding policy in the same listener by default. If the highest priority of existing forwarding policies is the maximum (10,000), the forwarding policy will fail to be created because the final priority for creating the forwarding policy is the sum of 1 and 10,000, which exceeds the maximum. In this case, specify a value or adjust the priorities of existing forwarding policies. If no forwarding policies exist, the highest priority of existing forwarding policies will be set to 1 by default.</p>
</li></ul>
<p>This parameter is invalid for shared load balancers.</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 of the forwarding policy.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>provisioning_status</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 provisioning status of the forwarding policy.</p>
<p>The value can be <strong>ACTIVE</strong> or <strong>ERROR</strong>.</p>
<ul><li><p><strong>ACTIVE</strong> (default): The forwarding policy is provisioned successfully.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>redirect_pool_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 ID of the backend server group that requests will be forwarded to.</p>
<ul><li><p>This parameter is valid and mandatory only when <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>.</p>
</li><li><p>If both <strong>redirect_pools_config</strong> and <strong>redirect_pool_id</strong> are specified, <strong>redirect_pools_config</strong> will take effect.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>redirect_pools_config</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Array of <a href="#CreateL7Policy__response_CreateRedirectPoolsConfig">CreateRedirectPoolsConfig</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the configuration of the backend server group that the requests are forwarded to. This parameter is valid only when <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>redirect_listener_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 ID of the listener to which requests are redirected. This parameter is mandatory when <strong>action</strong> is set to <strong>REDIRECT_TO_LISTENER</strong>.</p>
<p>Note:</p>
<ul><li><p>The listener's protocol must be HTTPS or TERMINATED_HTTPS.</p>
</li><li><p>A listener added to another load balancer is not allowed.</p>
</li><li><p>This parameter cannot be passed in the API for adding or updating a forwarding policy if <strong>action</strong> is set to <strong>REDIRECT_TO_POOL</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>redirect_url</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 URL to which requests are forwarded.</p>
<p>Format: <em>protocol://host:port/path?query</em></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>rules</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Array of <a href="#CreateL7Policy__response_RuleRef">RuleRef</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Lists the forwarding rules in the forwarding policy.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>redirect_url_config</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p><a href="#CreateL7Policy__response_RedirectUrlConfig">RedirectUrlConfig</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the URL to which requests are forwarded.</p>
<p>For dedicated load balancers, this parameter will take effect only when advanced forwarding is enabled (<strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>). If it is passed when <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned.</p>
<p>This parameter is mandatory when <strong>action</strong> is set to <strong>REDIRECT_TO_URL</strong>. It cannot be specified if the value of <strong>action</strong> is not <strong>REDIRECT_TO_URL</strong>.</p>
<p>Format: <em>protocol://host:port/path?query</em></p>
<p>At least one of the four parameters (<strong>protocol</strong>, <strong>host</strong>, <strong>port</strong>, and <strong>path</strong>) must be passed, or their values cannot be set to <strong>${xxx}</strong> at the same time. (<strong>${xxx}</strong> indicates that the value in the request will be inherited. For example, <strong>${host}</strong> indicates the host in the URL to be redirected.)</p>
<p>The values of <strong>protocol</strong> and <strong>port</strong> cannot be the same as those of the associated listener, and either <strong>host</strong> or <strong>path</strong> must be passed or their values cannot be <strong>${xxx}</strong> at the same time.</p>
<p>For shared load balancers, this parameter is unsupported. If it is passed, an error will be returned.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>fixed_response_config</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p><a href="#CreateL7Policy__response_FixtedResponseConfig">FixtedResponseConfig</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the configuration of the page that will be returned. This parameter will take effect when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>. If this parameter is passed and <strong>enhance_l7policy_enable</strong> is set to <strong>false</strong>, an error will be returned.</p>
<p>This parameter is mandatory when <strong>action</strong> is set to <strong>FIXED_RESPONSE</strong>. It cannot be specified if the value of <strong>action</strong> is not <strong>FIXED_RESPONSE</strong>.</p>
<p>For shared load balancers, this parameter is unsupported. If it is passed, an error will be returned.</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 forwarding policy was added. 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 forwarding policy 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="CreateL7Policy__response_CreateRedirectPoolsConfig"></a><a name="response_CreateRedirectPoolsConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__response_CreateRedirectPoolsConfig" frame="border" border="1" rules="all"><caption><b>Table 12 </b>CreateRedirectPoolsConfig</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>pool_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>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p>weight</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p>Specifies the weight of the backend server group. The value ranges from <strong>0</strong> to <strong>100</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__response_RuleRef"></a><a name="response_RuleRef"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__response_RuleRef" frame="border" border="1" rules="all"><caption><b>Table 13 </b>RuleRef</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p>Specifies the forwarding rule ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__response_RedirectUrlConfig"></a><a name="response_RedirectUrlConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__response_RedirectUrlConfig" frame="border" border="1" rules="all"><caption><b>Table 14 </b>RedirectUrlConfig</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p>protocol</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the protocol for redirection.</p>
<p>The value can be <strong>HTTP</strong>, <strong>HTTPS</strong>, or <strong>${protocol}</strong>. The default value is <strong>${protocol}</strong>, indicating that the protocol of the request will be used.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>36</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p>host</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the host name that requests are redirected to. The value can contain only letters, digits, hyphens (-), and periods (.) and must start with a letter or digit. The default value is <strong>${host}</strong>, indicating that the host of the request will be used.</p>
<p>Default: <strong>${host}</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p>port</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the port that requests are redirected to. The default value is <strong>${port}</strong>, indicating that the port of the request will be used.</p>
<p>Default: <strong>${port}</strong></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.5.7.2.4.1.1 "><p>path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the path that requests are redirected to. The default value is <strong>${path}</strong>, indicating that the path of the request will be used. The value can contain only letters, digits, and special characters _-';@^- %#&amp;$.*+?,=!:|/()[]{} and must start with a slash (/).</p>
<p>Default: <strong>${path}</strong></p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p>query</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the query string set in the URL for redirection. The default value is <strong>${query}</strong>, indicating that the query string of the request will be used.</p>
<p>For example, in the URL <strong>https://www.example.com:8080/elb?type=loadbalancer</strong>, <strong>${query}</strong> indicates <strong>type=loadbalancer</strong>. If this parameter is set to <strong>${query}&amp;name=my_name</strong>, the URL will be redirected to <strong>https://www.example.com:8080/elb?type=loadbalancer&amp;name=my_name</strong>.</p>
<p>The value is case-sensitive and can contain only letters, digits, and special characters !$&amp;'()*+,-./:;=?@^_`</p>
<p>Default: <strong>${query}</strong></p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>128</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p>status_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p>Specifies the status code returned after the requests are redirected.</p>
<p>The value can be <strong>301</strong>, <strong>302</strong>, <strong>303</strong>, <strong>307</strong>, or <strong>308</strong>.</p>
<p>Minimum: <strong>1</strong></p>
<p>Maximum: <strong>16</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateL7Policy__response_FixtedResponseConfig"></a><a name="response_FixtedResponseConfig"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__response_FixtedResponseConfig" frame="border" border="1" rules="all"><caption><b>Table 15 </b>FixtedResponseConfig</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p>status_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p>Specifies the HTTP status code configured in the forwarding policy. The value can be any integer in the range of 200299, 400499, or 500599.</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.5.8.2.4.1.1 "><p>content_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p>Specifies the format of the response body.</p>
<p>The value can be <strong>text/plain</strong>, <strong>text/css</strong>, <strong>text/html</strong>, <strong>application/javascript</strong>, or <strong>application/json</strong>.</p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>32</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p>message_body</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p>Specifies the content of the response message body.</p>
<p>Minimum: <strong>0</strong></p>
<p>Maximum: <strong>1024</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Creating a redirection for a listener</p>
<pre class="screen">POST https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/l7policies
{
"l7policy" : {
"action" : "REDIRECT_TO_LISTENER",
"listener_id" : "e2220d2a-3faf-44f3-8cd6-0c42952bd0ab",
"redirect_listener_id" : "48a97732-449e-4aab-b561-828d29e45050"
}
}</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" : "b60d1d9a-5263-45b0-b1d6-2810ac7c52a1",
"l7policy" : {
"redirect_pool_id" : "768e9e8c-e7cb-4fef-b24b-af9399dbb240",
"description" : "",
"admin_state_up" : true,
"rules" : [ {
"id" : "c5c2d625-676b-431e-a4c7-c59cc2664881"
} ],
"project_id" : "7a9941d34fc1497d8d0797429ecfd354",
"listener_id" : "cdb03a19-16b7-4e6b-bfec-047aeec74f56",
"redirect_url" : null,
"redirect_url_config" : null,
"fixed_response_config" : null,
"redirect_listener_id" : null,
"action" : "REDIRECT_TO_POOL",
"position" : 100,
"priority" : null,
"provisioning_status" : "ACTIVE",
"id" : "01832d99-bbd8-4340-9d0c-6ff8f7a37307",
"name" : "l7policy-67"
}
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Policy__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_policies.html">Forwarding Policy</a></div>
</div>
</div>