Resource Center/Network Service/Network Service Operations/Port Forwarding Operations
POSTPort Forwarding OperationsSince 0.6SynchronousAuth Required
AttachPortForwardingRule
AttachPortForwardingRule
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
ruleUuidStringRequiredThe UUID of the port forwarding rule.
vmNicUuidStringRequiredThe VM NIC UUID.
Body Fields
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/port-forwarding/{ruleUuid}/vm-instances/nics/{vmNicUuid}
/zstack/v1/port-forwarding/{ruleUuid}/vm-instances/nics/{vmNicUuid}
Request Example
curl -X POST 'http://{host}/zstack/v1/port-forwarding/{ruleUuid}/vm-instances/nics/{vmNicUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "8727976deceb42e898d9efc50863564a", "name": "TestAttachRule", "description": "test atatch rule", "vipIp": "192.168.0.187", "guestIp": "10.0.0.244", "vipUuid": "2aa6a4055ce94c319894dfddc330376f", "vipPortStart": 33, "vipPortEnd": 33, "privatePortStart": 33, "privatePortEnd": 33, "vmNicUuid": "39f90e4259784eee880e1cbef31c88da", "protocolType": "TCP", "state": "Enabled", "allowedCidr": "0.0.0.0/0", "createDate": "Jun 7, 2017 9:20:32 PM", "lastOpDate": "Jun 7, 2017 9:20:32 PM" } }Change History
This API has no change history records yet.
