Modify ACL Policy for Local Source IP Port Translation

Last updated: 2020-06-04 18:41:25

    Note:

    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new VPC API 3.0 which is standardized and faster.

    1. API Description

    This API (ModifyLocalSourceIPPortTranslationAclRule) is used to modify 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 ModifyLocalSourceIPPortTranslationAclRule.

    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.
    aclRules.n Yes Array ACL rule information.
    aclRules.n.aclRuleId Yes Int ACL rule ID, for example: 25.
    aclRules.n.protocol Yes String Protocol: TCP, UDP or ALL.
    aclRules.n.sourceCidr Yes String The accessed source IP. Support IP and IP segment (CIDR format). If left blank, it refers to all IPs.
    aclRules.n.sourcePort Yes String The accessed source port, supporting xx-xx range. If left blank or filled with 0 or 0-0, it means any port is OK.
    aclRules.n.destinationCidr Yes String The accessed destination IP, supporting IP and IP segment (CIDR format). If left blank, it refers to all IPs.
    aclRules.n.destinationPort Yes String The accessed destination port, supporting xx-xx range. If left blank or filled with 0 or 0-0, it means any port is OK.

    3. Output Parameters

    Parameter Name Type Description
    code Int Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page.
    message String Module error message description depending on API.

    4. Error Code Table

    The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC 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.
    InvalidLocalSourceIPPortTranslationAcl.Conflict ACL rule conflict between local IP port translation rules. The ACL rules for different local IP port translation cannot conflict under the same Direct Connect gateway.

    5. Example

    Input

    https://vpc.api.qcloud.com/v2/index.php?Action=ModifyLocalSourceIPPortTranslationAclRule
    &<Common request parameters>
    &vpcId=vpc-dfgg190
    &directConnectGatewayId=dcg-ddf14d
    &translationIPPool=138.0.0.11-138.0.0.111
    &aclRules.0.aclRuleId=26
    &aclRules.0.protocol=tcp
    &aclRules.0.sourceCidr=111.0.0.1/18
    &aclRules.0.sourcePort=80
    &aclRules.0.destinationCidr=10.0.0.2/18
    &aclRules.0.destinationPort=90
    

    Output

    {
        "code":"0",
        "message":""
    }

    Was this page helpful?

    Was this page helpful?

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