Last updated: 2020-03-16 16:43:43

1. API Description

Domain name for API request:

This API (ListPolicies) is used to query the list of policies.

A maximum of 20 requests can be initiated per second for this API.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ListPolicies.
Version Yes String Common parameter. The value used for this API: 2019-01-16.
Region No String Common parameter. This parameter is not required for this API.
Rp No Integer Number of entries per page: must be greater than 0 and no greater than 200. Default is 20
Page No Integer Page number. Starts from 1 and cannot be greater than 200. Default is 1
Scope No String Valid values: All, QCS, and Local. All means all policies will be returned; QCS means only preset policies will be returned; Local means only custom policies will be returned. All is the default value
Keyword No String Filter by policy name

3. Output Parameters

Parameter Name Type Description
TotalNum Integer Total number of policies
List Array of StrategyInfo Policy array. Each array contains fields including policyId, policyName, addTime, type, description, and createMode.
policyId: policy ID
policyName: policy name
addTime: policy creation time
type: 1: custom policy, 2: preset policy
description: policy description
createMode: 1 indicates a policy created based on business permissions, while other values indicate that the policy syntax can be viewed and the policy can be updated using the policy syntax
Attachments: number of associated users
ServiceType: the product the policy is associated with
IsAttached: this value should not be null when querying if a marked entity has been associated with a policy. 0 indicates that no policy has been associated, and 1 indicates that a policy has been associated
ServiceTypeList Array of String Reserved field
Note: This field may return null, indicating that no valid value was found.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.SystemError Internal error.
InvalidParameter.GroupIdError GroupId field invalid.
InvalidParameter.KeywordError Keyword field invalid.
InvalidParameter.ParamError Invalid input parameter.
InvalidParameter.ScopeError Scope field invalid.
InvalidParameter.ServiceTypeError ServiceType field invalid.
InvalidParameter.UinError Uin field invalid.