tencent cloud

All product documents
Cloud Access Management
Condition Keys and Condition Operators
Last updated: 2024-01-23 17:54:33
Condition Keys and Condition Operators
Last updated: 2024-01-23 17:54:33
When creating a policy through the Cloud Access Management Console's Creating Custom Policy,, you can set the policy's effective conditions as needed.

Condition Keys

The naming format for Tencent Cloud's general condition keys is: qcs:<condition-key>. Currently, only five condition keys are supported. The content and descriptions of these keys are as follows:
General Condition Keys
Local Disk Types
Description
qcs:current_time
Date and time
The time when the Web Server receives a request. This is represented in the ISO8601 standard and must use UTC time.
qcs:ip
IP address
The IP address from which the request is initiated. It must comply with CIDR standards.
qcs:resource_tag
String
Controls access to resources based on the tags attached to them. The policy's specified tag key/value pairs can be compared with the key/value pairs bound to the resource, and the resource can only be accessed when a match is found.
qcs:request_tag
String
Determines which tags can be passed in a request. The policy can compare the specified tag key/value pairs with the key/value pairs passed in the request. Tags can only be bound or unbound when they match.
Note
The current condition key can be applied to both global services and specific services.
Condition keys are case sensitive.

Operator

In the application condition (Condition), use condition operators to match the condition keys and values in the policy with the values in the request context.
Condition operators are divided into seven categories according to their types: String, Number, Date and Time, Boolean, IP Address, Binary, and Null.
Condition Operator Types
Condition Operators
Description
String Condition Operators
string_equal
String is equal to (case-sensitive)
string_not_equal
String is not equal to (case-sensitive)
string_equal_ignore_case
String is equal to (case insensitive)
string_not_equal_ignore_case
String is not equal to (case insensitive)
Numeric Condition Operators
numeric_equal
Number is equal to
numeric_not_equal
Value is not equal to
numeric_less_than
Less than
numeric_less_than_equal
Value is less than or equal to
numeric_greater_than
Greater than or equal to
numeric_greater_than_equal
Value is greater than or equal to
Date Condition Operators
date_equal
The date and time is equal to
date_not_equal
The date and time is not equal to
date_less_than
Date and Time Less Than
date_less_than_equal
Date and time is less than or equal to
date_greater_than
Date and Time Greater Than
date_greater_than_equal
Date and time is greater than or equal to
Boolean Condition Operators
bool_equal
Boolean Value Matching
Binary Condition Operators
binary_equal
Number is equal to
IP Address Condition Operators
ip_equal
IP address is equal to
ip_not_equal
IP address is not equal to
Empty Condition Key Operators
null_equal
Empty Condition Key Matching


Mapping Relationship

In the effective statement, the conditions (Condition) that can be used depend on the selected condition key. The mapping relationship between the condition key and the operator is as follows:
Note
The condition values corresponding to the operators string_like and string_not_like only support uppercase and lowercase letters, numbers, -, and _, and do not support list-type interfaces. For list-type interfaces, please see Overview.
Condition Keys
Operator
qcs:resource_tagqcs:request_tag
string_equal
string_not_equal
string_equal_ignore_case
string_not_equal_ignore_case
string_like
string_not_like
qcs:current_time
date_equal
date_not_equal
date_less_than
date_less_than_equal
date_greater_than
date_greater_than_equal
qcs:ip
ip_equal
ip_not_equal

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon