Query ACL Policy for Local Source IP Port Translation

Last updated: 2019-11-29 19:35:27

PDF

1. API Description

This API (DescribeLocalSourceIPPortTranslationAclRule) is used to query the ACL rules for local IP port translation.
Domain for API request:vpc.api.qcloud.com

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is DescribeLocalSourceIPPortTranslationAclRule.

Parameter Name Required Type Description
vpcId Yes String Virtual private cloud ID assigned by the system, for example: vpc-dfg5445.
directConnectGatewayId Yes String Direct Connect gateway ID assigned by the system, for example: dcg-4d545d.
translationIPPool Yes String Mapped IP pool, for example: 11.1.1.1-11.1.1.10.
aclRules.n No Array ID array of ACL rules, for example: aclRules.0=25.

3. Output Parameters

Parameter Name Type Description
code Int Common error code. A value of 0 indicates success, and other values indicate failure. For more information, please refer to Common Error Codes on the Error Code page.
message String Module error message description depending on API.
data.n Array Information array of ACL rules.
data.n.aclRuleId Int ACL rule ID, for example: 25.
data.n.protocol String Protocol, for example TCP.
data.n.sourceCidr String The accessed source IP, 11.0.0.1/16.
data.n.sourcePort String The accessed source port, for example: 900.
data.n.destinationCidr String The accessed destination IP, for example: 10.0.0.2/16.
data.n.destinationPort String The accessed destination port, for example: 80-90.

4. Error Code Table

The following list only provides the business logic error codes for this API. For additional common error codes, refer toVPC Error Codes.

Error code Description
InvalidVpc.NotFound Invalid VPC, VPC resource does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Virtual Private Cloud List (DescribeVpcEx) API.
InvalidDirectConnectGateway.NotFound Invalid Direct Connect gateway. Direct Connect gateway resource does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Direct Connect Gateway (DescribeDirectConnectGateway) API.
InvalidLocalSourceIPPortTranslation.NotFound Invalid local IP port translation rules. Local IP port translation rule does not exist. Please verify that the resource information you entered is correct.

5. Example

Input

https://vpc.api.qcloud.com/v2/index.php?Action=DescribeLocalSourceIPPortTranslationAclRule
&>
&vpcId=vpc-dfgg190
&directConnectGatewayId=dcg-ddf14d
&translationIPPool=11.1.1.1-11.1.1.10
&aclRules.0=25

Output

{
    "code":"0",
    "message":"",
        "data":[
                {
                            "aclRuleId":67,
                            "protocol":"TCP",
                            "sourceCidr":"11.1.0.2/16",
                            "sourcePort":"80",
                            "destinationCidr":"10.0.0.2/18",
                            "destinationPort":"90"
                }
        ]
}