public class ModifyWebPreciseAccessRuleRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
domain
The domain name of the website.
|
Integer |
expires
The validity period of the rule.
|
String |
resourceGroupId
The ID of the resource group to which the instance belongs in Resource Management.
|
String |
rules
The settings of the accurate access control rule.
|
| 构造器和说明 |
|---|
ModifyWebPreciseAccessRuleRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ModifyWebPreciseAccessRuleRequest |
build(Map<String,?> map) |
String |
getDomain() |
Integer |
getExpires() |
String |
getResourceGroupId() |
String |
getRules() |
ModifyWebPreciseAccessRuleRequest |
setDomain(String domain) |
ModifyWebPreciseAccessRuleRequest |
setExpires(Integer expires) |
ModifyWebPreciseAccessRuleRequest |
setResourceGroupId(String resourceGroupId) |
ModifyWebPreciseAccessRuleRequest |
setRules(String rules) |
@NameInMap(value="Domain") public String domain
The domain name of the website.
A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.
This parameter is required.
example:example.aliyundoc.com
@NameInMap(value="Expires") public Integer expires
The validity period of the rule. Unit: seconds. This parameter takes effect only when action of a rule is block. Access requests that match the rule are blocked within the specified validity period of the rule. If you do not specify this parameter, this rule takes effect all the time.
example:600
@NameInMap(value="ResourceGroupId") public String resourceGroupId
The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.
example:rg-acfm2pz25js****
@NameInMap(value="Rules") public String rules
The settings of the accurate access control rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter:
action: the action that is performed if the rule is matched. This field is required and must be of the string type. Valid values:
name: the name of the rule. This field is required and must be of the string type.
condition: the match conditions. This field is required and must be of the map type. A match condition contains the following parameters.
**
NoteThe AND logical operator is used to define the relationship among multiple match conditions.
field: the match field. This parameter is required and must be of the string type.
match_method: the logical relation. This parameter is required and must be of the string type.
**
NoteFor information about the mappings between the field and match_method parameters, see the Mappings between the field and match_method parameters table in this topic.
content: the match content. This parameter is required and must be of the string type.
header_name: the HTTP header. This parameter is optional and must be of the string type. This parameter takes effect only when field is header.
This parameter is required.
example:[{"action":"block","name":"testrule","condition":[{"field":"uri","match_method":"contain","content":"/test/123"}]}]
public static ModifyWebPreciseAccessRuleRequest build(Map<String,?> map) throws Exception
Exceptionpublic ModifyWebPreciseAccessRuleRequest setDomain(String domain)
public String getDomain()
public ModifyWebPreciseAccessRuleRequest setExpires(Integer expires)
public Integer getExpires()
public ModifyWebPreciseAccessRuleRequest setResourceGroupId(String resourceGroupId)
public String getResourceGroupId()
public ModifyWebPreciseAccessRuleRequest setRules(String rules)
public String getRules()
Copyright © 2026. All rights reserved.