Delete a Port Forwarding Rule

Last updated: 2019-11-29 16:31:51

PDF

1. API Description

This API (DeleteDnaptRule) is used to delete NAT gateway port forwarding rules.
Domain name for API requests: vpc.api.qcloud.com

Before using this API, please go to About NAT Gateway to learn about the features of NAT gateways.

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters are required when the API is called. For more information, see the Common Request Parameters page. The Action field for this API is DeleteDnaptRule.

Parameter name Required Type Description
vpcId Yes String VPC ID, for example: vpc-8e0ypm3z.
natId Yes String NAT gateway ID, for example: nat-dqbak2vy.
dnatList Yes Array List of port forwarding rules to be deleted.
dnatList.N.proto Yes String Protocol; available values: tcp and udp.
dnatList.N.eip Yes String External IP address, namely the associated EIP.
dnatList.N.eport Yes String External port number.

3. Output Parameters

Parameter name Type Description
code Int Error code. 0: Successful; other values: Failed.
message string Error message.

4. Error Codes

This API has no business logic error codes. For additional common error codes, see VPC Error Codes.

5. Example

Input

https://vpc.api.qcloud.com/v2/index.php?Action=DeleteDnaptRule
&>
&vpcId=vpc-d8vg6rev
&natId=nat-k6npdayk
&dnatList.0.proto=tcp
&dnatList.0.eip=139.199.232.178
&dnatList.0.eport=303

Output

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