"condition" : { "{condition-operator}" : { "{condition-key}" : "{condition-value}" }}
192.168.1.1
, and the request date is before 2022-05-31 00:00:00. The Condition is as follows:"condition":{"ip_equal": {"qcs:ip": "192.168.1.1"},"date_less_than": {"qcs:current_time": "2022-05-31 00:00:00"}}
Evaluation Logic | Note |
Condition Fulfillment | A single condition key can have one or more condition values. During condition checking, if the value of the condition key matches any of the specified values, the condition is fulfilled. |
Condition Clause Fulfillment | Under a condition clause with the same condition operation type, if there are multiple condition keys, all condition keys must be satisfied for the condition clause to be deemed fulfilled. |
Condition Block Fulfillment | The condition block is considered fulfilled only if all condition clauses within it are fulfilled simultaneously. |
Condition operators (except null_equal) suffixed with if_exist | indicates that the context information remains effective even if it does not contain the corresponding key-value pair. |
for_all_value | Qualifiers are used in conjunction with condition operators, indicating that the policy will only take effect when each condition value in the context information meets the requirements. |
for_any_value | Qualifiers are used in conjunction with condition operators, indicating that the policy will take effect if any of the condition values in the context information meets the requirements. |
"condition":{"ip_equal": {"qcs:ip": "192.168.1.1"}}
192.168.1.1
. The type of comparison to be performed is specified by the condition operator (ip_equal in this example).10.217.182.3/24
or 111.21.33.72/24
network segments to upload objects (cos:PutObject). The content of the permission policy is as follows:{"version": "2.0","statement": [{"effect": "allow","action": ["cos:PutObject"],"resource": ["*"],"condition":{"ip_equal": {"qcs:ip": ["10.217.182.3/24","111.21.33.72/24"]}}}]}
문제 해결에 도움이 되었나요?