Port Forwarding
CreatePortForwardingRule
Creates a port forwarding rule. For
example,
CreatePortForwardingRule name=pf1 protocolType=TCP vipUuid=818351340f534190b37dfead4d17341c \
vipPortStart=22 privatePortStart=23 privatePortEnd=23Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vipUuid | The VIP UUID. | 0.6 | ||
| vipPortStart | The VIP start port. | 0.6 | ||
| vipPortEnd | The VIP end port. If not specified, the value of vipPortStart will be used by default. | Yes | 0.6 | |
| privatePortStart | The start port of the guest IP address (the IP address of the VM NIC). If not specified, the value of vipPortStart will be used by default. | Yes | 0.6 | |
| privatePortEnd | The end port of the guest IP address (the IP address of the VM NIC). If not specified, the value of vipPortEnd will be used by default. | Yes | 0.6 | |
| protocolType | The protocol type of the network traffic. |
|
0.6 | |
| vmNicUuid | The VM NIC UUID. | Yes | 0.6 | |
| allowedCidr | The source CIDR. The port forwarding rule is only applied to the traffics of the source CIDR. If not specified, 0.0.0.0/0 will be used by default. | Yes | 0.6 | |
| name | The name of the port forwarding rule. | 0.6 | ||
| description | The detailed description of the port forwarding rule. | Yes | 0.6 | |
| resourceUuid | The resource UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
DeletePortForwardingRule
Deletes a port forwarding rule. For
example,
DeletePortForwardingRule uuid=1855707e0a4f4894bcdfaa455d213ecbParameters
| Name | Description | Optional | Valid Value | Starting Value |
|---|---|---|---|---|
| uuid | The UUID of the port forwarding rule. | 0.6 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
QueryPortForwardingRule
Queries a port forwarding rule. For
example,
QueryPortForwardingRule uuid=8c3c4c7864c54010a09dbd77e2bfeeddQueryPortForwardingRule vip.name=vip-for-pf1Primitive Fields of Query
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vmNic | VM NIC Inventory | 0.6 | |
| vip | VIP Inventory | 0.6 |
UpdatePortForwardingRule
Updates a port forwarding rule. For
example,
UpdatePortForwardingRule uuid=8c3c4c7864c54010a09dbd77e2bfeedParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID of the port forwarding rule. | 0.6 | ||
| name | The name of the port forwarding rule. | Yes | 0.6 | |
| description | The detailed description of the port forwarding rule. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
ChangePortForwardingRuleState
Changes the state of a port forwarding rule. For
example,
ChangePortForwardingRuleState uuid=8c3c4c7864c54010a09dbd77e2bfeedd stateEvent=disableParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID of the port forwarding rule. | 0.6 | ||
| stateEvent | The state of the port forwarding rule. |
|
0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
GetPortForwardingAttachableVmNics
Obtains a VM NIC list. For
example,
GetPortForwardingAttachableVmNics ruleUuid=8c3c4c7864c54010a09dbd77e2bfeeddParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| ruleUuid | The UUID of the port forwarding rule. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
AttachPortForwardingRule
Attaches a port forwarding rule to a VM NIC. For
example,
AttachPortForwardingRule ruleUuid=8c3c4c7864c54010a09dbd77e2bfeedd \
vmNicUuid=3e6a4cc2eb0941edbac7af24e2ff932fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| ruleUuid | The UUID of the port forwarding rule. | 0.6 | ||
| vmNicUuid | The VM NIC UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
DetachPortForwardingRule
Detaches a port forwarding rule from a VM NIC. For
example,
DetachPortForwardingRule uuid=8c3c4c7864c54010a09dbd77e2bfeeddParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The port forwarding rule UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is PortForwardingRuleVO. | Yes | 0.6 | |
| timeout | Yes |
