forked from docs/doc-exports
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>
499 lines
35 KiB
HTML
499 lines
35 KiB
HTML
<a name="CreateL7Rule"></a><a name="CreateL7Rule"></a>
|
|
|
|
<h1 class="topictitle1">Adding a Forwarding Rule</h1>
|
|
<div><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to add a forwarding rule.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Constraints</h4><p>If the action of <strong>17policy</strong> is set to <strong>Redirect to another listener</strong>, <strong>17rule</strong> cannot be created.</p>
|
|
</div>
|
|
<div class="section" id="CreateL7Rule__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>POST /v3/{project_id}/elb/l7policies/{l7policy_id}/rules</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>l7policy_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 forwarding policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<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="CreateL7Rule__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="CreateL7Rule__request_CreateL7RuleRequestBody" 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>rule</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="#CreateL7Rule__request_CreateRuleOption">CreateRuleOption</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p>Specifies the forwarding rule.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateL7Rule__request_CreateRuleOption"></a><a name="request_CreateRuleOption"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Rule__request_CreateRuleOption" frame="border" border="1" rules="all"><caption><b>Table 4 </b>CreateRuleOption</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 forwarding rule. 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>compare_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 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.4.2.5.1.1 "><p>key</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 key of match content. For example, if the request header is used for forwarding, <strong>key</strong> is the request header.</p>
|
|
<p>This parameter is unsupported. Please do not use it.</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>value</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 value of the match content. For example, if a domain name is used for matching, <strong>value</strong> is the domain name. This parameter is valid 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 (-), periods (.), and asterisks (<em>) and must start with a letter or digit. If you want to use a wildcard domain name, enter an asterisk (</em>) 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 can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:|/()[]{}</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.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>32</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>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 match content. 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. Note: 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.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p>invert</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 whether reverse matching is supported. The value can be <strong>true</strong> or <strong>false</strong> (default).</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>conditions</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="#CreateL7Rule__request_CreateRuleCondition">CreateRuleCondition</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p>Specifies the matching conditions of the forwarding rule. This parameter is available only when <strong>enhance_l7policy_enable</strong> is set to <strong>true</strong>.</p>
|
|
<p>If <strong>conditions</strong> is specified, parameters <strong>key</strong> and <strong>value</strong> will not take effect, and the <strong>conditions</strong> value 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>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateL7Rule__request_CreateRuleCondition"></a><a name="request_CreateRuleCondition"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Rule__request_CreateRuleCondition" frame="border" border="1" rules="all"><caption><b>Table 5 </b>CreateRuleCondition</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>key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p>No</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 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 (< >), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&), 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.5.2.5.1.1 "><p>value</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 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 _~';@^-%#&$.*+?,=!:|/()[]{}</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 (< >), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&), 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="CreateL7Rule__response_CreateL7RuleResponseBody" frame="border" border="1" rules="all"><caption><b>Table 6 </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>rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p><a href="#CreateL7Rule__response_L7Rule">L7Rule</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p>Specifies the forwarding rule.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateL7Rule__response_L7Rule"></a><a name="response_L7Rule"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Rule__response_L7Rule" frame="border" border="1" rules="all"><caption><b>Table 7 </b>L7Rule</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 forwarding rule. 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>compare_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 how requests are matched with the domain name or URL.</p>
|
|
<ul><li><p>If <strong>type</strong> is set to <strong>HOST_NAME</strong>, this parameter can only be set to <strong>EQUAL_TO</strong>.</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></ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p>key</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 key of the match content. This parameter will not take effect if <strong>type</strong> is set to <strong>HOST_NAME</strong> or <strong>PATH</strong>.</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>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>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 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>Note:</p>
|
|
<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.5.4.2.4.1.1 "><p>value</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 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 _~';@^-%#&$.*+?,=!:|/()[]{}</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>condition_pair</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.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 rule.</p>
|
|
<p>The value can only be <strong>ACTIVE</strong> (default), <strong>PENDING_CREATE</strong>, or <strong>ERROR</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>invert</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 whether reverse matching is supported. The value is fixed at <strong>false</strong>. This parameter can be updated but will not take effect.</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>conditions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p>Array of <a href="#CreateL7Rule__response_RuleCondition">RuleCondition</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p>Specifies the matching conditions of the forwarding rule. This parameter will take effect when <strong>enhance_l7policy_enable</strong> is set to <strong>.true</strong>. 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>
|
|
</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 rule 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 rule 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="CreateL7Rule__response_RuleCondition"></a><a name="response_RuleCondition"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Rule__response_RuleCondition" frame="border" border="1" rules="all"><caption><b>Table 8 </b>RuleCondition</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>key</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 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 (< >), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&), 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.5.5.2.4.1.1 "><p>value</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 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 _~';@^-%#&$.*+?,=!:|/()[]{}</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 (< >), backslashes (), double quotation marks (" "), pound signs (#), ampersands (&), 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">Example Requests</h4><pre class="screen">POST https://{ELB_Endpoint}/v3/{99a3fff0d03c428eac3678da6a7d0f24}/elb/l7policies/cf4360fd-8631-41ff-a6f5-b72c35da74be/rules
|
|
|
|
{
|
|
"rule" : {
|
|
"compare_type" : "EQUAL_TO",
|
|
"type" : "PATH",
|
|
"value" : "/bbb.html"
|
|
}
|
|
}</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">{
|
|
"rule" : {
|
|
"compare_type" : "EQUAL_TO",
|
|
"provisioning_status" : "ACTIVE",
|
|
"project_id" : "99a3fff0d03c428eac3678da6a7d0f24",
|
|
"invert" : false,
|
|
"admin_state_up" : true,
|
|
"value" : "/bbb.html",
|
|
"key" : null,
|
|
"type" : "PATH",
|
|
"id" : "84f4fcae-9c15-4e19-a99f-72c0b08fd3d7"
|
|
},
|
|
"request_id" : "3639f1b7-f04b-496e-9218-ec5a9e493f69"
|
|
}</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateL7Rule__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_rules.html">Forwarding Rule</a></div>
|
|
</div>
|
|
</div>
|
|
|