DescribeSecurityRules

Last updated: 2020-04-17 15:10:27

1. API Description

Domain name for API request: gaap.tencentcloudapi.com.

This API is used to query the list of security rules based on security rule ID. It supports querying 1 to 20 security rules at a time.

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: DescribeSecurityRules.
Version Yes String Common parameter. The value used for this API: 2018-05-29.
Region No String Common parameter. This parameter is not required for this API.
SecurityRuleIds.N Yes Array of String List of security rule IDs. Up to 20 security rules are supported.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer The number of returned security rules.
SecurityRuleSet Array of SecurityPolicyRuleOut List of returned security rules.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the list of security rules based on security rule ID

Input Example

https://gaap.tencentcloudapi.com/?Action=DescribeSecurityRules
&SecurityRuleIds.0=sr-xxxxxxxx
&<Common request parameter>

Output Example

{
  "Response": {
    "TotalCount": 1,
    "RequestId": "6dc6b074-9bcf-4120-9500-0583aebe375d",
    "SecurityRuleSet": [
      {
        "Protocol": "TCP",
        "SourceCidr": "1.1.1.101",
        "RuleId": "sr-0vr5571x",
        "DestPortRange": "6666,6667",
        "AliasName": "",
        "PolicyId": "sp-8k1l0pat",
        "Action": "ACCEPT"
      }
    ]
  }
}

5. 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.

SDK

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

Command Line Interface

6. 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
FailedOperation Operation failed
FailedOperation.ResourceCanNotAccess This resource is not accessible.
InternalError Internal error
InvalidParameter Parameter error
InvalidParameterValue Parameter value error
MissingParameter Parameter missing
ResourceNotFound Resource does not exist
ResourceUnavailable Resource is unavailable
UnauthorizedOperation Unauthorized operation
UnknownParameter Unknown parameter error
UnsupportedOperation This operation is not supported.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help