tencent cloud

피드백

Condition Keys and Condition Operators

마지막 업데이트 시간: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
    
    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원