public static class UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions
extends com.aliyun.tea.TeaModel
限定符和类型 | 字段和说明 |
---|---|
UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActionsForwardGroupConfig |
forwardGroupConfig
The forwarding configuration.
|
Integer |
order
The forwarding priority.
|
String |
ruleActionType
The type of the forwarding action.
|
String |
ruleActionValue
The value of the forwarding action.
|
构造器和说明 |
---|
UpdateForwardingRulesRequestForwardingRulesRuleActions() |
@NameInMap(value="ForwardGroupConfig") public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActionsForwardGroupConfig forwardGroupConfig
The forwarding configuration.
> We recommend that you use **RuleActionType** and **RuleActionValue** rather than this parameter to configure forwarding actions.
@NameInMap(value="Order") public Integer order
The forwarding priority.
> This parameter does not take effect. Ignore this parameter.
@NameInMap(value="RuleActionType") public String ruleActionType
The type of the forwarding action. Valid values:
* **ForwardGroup**: forwards a request.
* **Redirect**: redirects a request.
* **FixResponse**: returns a fixed response.
* **Rewrite**: rewrites a request.
* **AddHeader**: adds a header to a request.
* **RemoveHeader**: deletes the header of a request.
@NameInMap(value="RuleActionValue") public String ruleActionValue
The value of the forwarding action.
You must specify different JSON strings based on the value of **RuleActionType**.
A forwarding rule can contain only one forwarding action whose type is **ForwardGroup**, **Redirect**, or **FixResponse**. You must specify a forwarding action whose type is **Rewrite**, **AddHeader**, or **RemoveHeader** before a forwarding action whose type is **ForwardGroup**.
* If you set **RuleActionType** to **ForwardGroup**, this parameter specifies the information of a virtual endpoint group. You can forward requests to only one virtual endpoint group. Example: `{"type":"endpointgroup", "value":"epg-bp1enpdcrqhl78g6r****"}`.
* `type`: Set this parameter to `endpointgroup`.
* `value`: Set this parameter to the ID of a virtual endpoint group.
* If you set **RuleActionType** to **Redirect**, this parameter specifies the redirect configuration. You cannot leave all the following parameters empty or use the default values for all the following parameters for a forwarding action whose type is **Redirect**: `protocol`, `domain`, `port`, `path`, and `query`. Example: `{"protocol":"HTTP", "domain":"www.example.com", "port":"80", "path":"/a","query":"value1", "code":"301" }`.
* `protocol`: the protocol of requests after the requests are redirected. Valid values: `${protocol}` (default), `HTTP`, and `HTTPS`.
* `domain`: the domain name to which requests are redirected. Default value: `${host}`. You can also enter a domain name. The domain name must be 3 to 128 characters in length, and can contain only letters, digits, and the following special characters: `. - ? = ~ _ - + / ^ * ! $ & | ( ) [ ]`.
* `port`: the port to which requests are redirected. Default value: `${port}`. You can enter a port number that ranges from 1 to 63335.
* `path`: the path to which requests are redirected. Default value: `${path}`. The path must be 1 to 128 characters in length. To use a regular expression, the path can contain letters, digits, and the following special characters: `. - _ / = ? ~ ^ * $ : ( ) [ ] + |`. The path must start with a tilde (~). If you do not want to use a regular expression, the path can contain letters, digits, and the following special characters: `. - _ / = ? :`. The path must start with a forward slash (/).
* `query`: the query string to which requests are redirected. Default value: `${query}`. You can also specify a query string. The query string must be 1 to 128 characters in length, and can contain printable characters whose ASCII values are `greater than or equal to 32 and smaller than 127`. The query string cannot contain uppercase letters, space characters, or the following special characters: `[ ] { } < > # | &`.
* `code`: the redirect code. Valid values: `301`, `302`, `303`, `307`, and `308`.
* If you set **RuleActionType** to **FixResponse**, this parameter specifies a fixed response. Example: `{"code":"200", "type":"text/plain", "content":"dssacav" }`.
* `code`: the HTTP response status code. The response status code must be one of the following numeric strings: `2xx`, `4xx`, and `5xx`. The letter `x` is a digit.
* `type`: the type of the response content. Valid values: **text/plain**, **text/css**, **text/html**, **application/javascript**, and **application/json**.
* `content`: the response content. The response content cannot exceed 1,000 characters in length and does not support Chinese characters.
* If you set **RuleActionType** to **AddHeader**, this parameter specifies an HTTP header to be added. If a forwarding rule contains a forwarding action whose type is **AddHeader**, you must specify another forwarding action whose type is **ForwardGroup**. Example: `[{"name":"header1","type":"userdefined", "value":"value"}]`.
* `name`: the name of the HTTP header. The name must be 1 to 40 characters in length, and can contain letters, digits, hyphens (-), and underscores (\_). The name of the HTTP header specified by **AddHeader** must be unique and cannot be the same as the name of the HTTP header specified by **RemoveHeader**.
* `type`: the content type of the HTTP header. Valid values: `user-defined`, `ref`, and `system-defined`.
* `value`: the content of the HTTP header. You cannot leave this parameter empty. If you set `type` to `user-defined`, the content must be 1 to 128 characters in length, and can contain printable characters whose ASCII values are `greater than or equal to 32 and smaller than 127`. The content can contain letters, digits, hyphens (-), and underscores (\_). The content cannot start or end with a space character. If you set `type` to `ref`, the content must be 1 to 128 characters in length, and can contain letters, digits, hyphens (-), and underscores (\_). The content cannot start or end with a space character. If you set `type` to `system-defined`, only `ClientSrcIp` is supported.**
* If you set **RuleActionType** to **RemoveHeader**, this parameter specifies an HTTP header to be removed. If a forwarding rule contains a forwarding action whose type is **RemoveHeader**, you must specify another forwarding action whose type is **ForwardGroup**. The header must be 1 to 40 characters in length, and can contain letters, digits, hyphens (-), and underscores (\_). Example: `["header1"]`.
* If you set **RuleActionType** to **Rewrite**, this parameter specifies the rewriting configuration. If a forwarding rule contains a forwarding action whose type is **Rewrite**, you must specify another forwarding action whose type is **ForwardGroup**. Example: `{"domain":"value1", "path":"value2", "query":"value3"}`.
* `domain`: the domain name to which requests are redirected. Default value: `${host}`. You can also enter a domain name. The domain name must be 3 to 128 characters in length, and can contain only lowercase letters, digits, and the following special characters: `. - ? = ~ _ - + / ^ * ! $ & | ( ) [ ]`.
* `path`: the path to which requests are redirected. Default value: `${path}`. The path must be 1 to 128 characters in length. To use a regular expression, the path can contain letters, digits, and the following special characters: `. - _ / = ? ~ ^ * $ : ( ) [ ] + |`. The path must start with a tilde (~). If you do not want to use a regular expression, the path can contain letters, digits, and the following special characters: `. - _ / = ? :`. The path must start with a forward slash (/).
* `query`: the query string to which requests are redirected. Default value: `${query}`. You can also specify a query string. The query string must be 1 to 128 characters in length, and can contain printable characters whose ASCII values are `greater than or equal to 32 and smaller than 127`. The query string cannot contain uppercase letters, space characters, or the following special characters: `[ ] { } < > # | &`.
public UpdateForwardingRulesRequestForwardingRulesRuleActions()
public static UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions build(Map<String,?> map) throws Exception
Exception
public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions setForwardGroupConfig(UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActionsForwardGroupConfig forwardGroupConfig)
public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActionsForwardGroupConfig getForwardGroupConfig()
public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions setOrder(Integer order)
public Integer getOrder()
public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions setRuleActionType(String ruleActionType)
public String getRuleActionType()
public UpdateForwardingRulesRequest.UpdateForwardingRulesRequestForwardingRulesRuleActions setRuleActionValue(String ruleActionValue)
public String getRuleActionValue()
Copyright © 2024. All rights reserved.