Skip to main content
Resource Center/Network Service/Network Service Operations/Port Forwarding Operations
GETPort Forwarding OperationsSince 0.6SynchronousAuth Required

QueryPortForwardingRule

QueryPortForwardingRule

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

This API requires no request parameters.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoriesListRequired

    See inventories.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • vipIpStringRequired

      The IP address of the VIP.

    • guestIpStringRequired

      The IP address of the VM NIC.

    • vipUuidStringRequired

      The VIP UUID.

    • vipPortStartIntegerRequired

      The start port of the VIP.

    • vipPortEndIntegerRequired

      The end port of the VIP.

    • privatePortStartIntegerRequired

      The start port of the guest IP address.

    • privatePortEndIntegerRequired

      The end port of the guest IP address.

    • vmNicUuidStringRequired

      The VM NIC UUID.

    • protocolTypeStringRequired

      The protocol type of the network traffic.

    • stateStringRequired

      The state of the rule.

    • allowedCidrStringRequired

      The source CIDR. The port forwarding rule is only applied to the traffics of the source CIDR.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

Endpoint

GET/zstack/v1/port-forwarding

/zstack/v1/port-forwarding

Operation ID

QueryPortForwardingRule

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/port-forwarding' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "c5cf6d7df3164418b3fe5c7569eb1dea", "name": "TestAttachRule", "description": "test atatch rule", "vipIp": "192.168.0.187", "guestIp": "10.0.0.244", "vipUuid": "b5166a0c9adb4aaf8088022b5336209a", "vipPortStart": 33.0, "vipPortEnd": 33.0, "privatePortStart": 33.0, "privatePortEnd": 33.0, "vmNicUuid": "8aa417eb4537475b815b289240e0c0c2", "protocolType": "TCP", "state": "Enabled", "allowedCidr": "0.0.0.0/0", "createDate": "Jun 7, 2017 9:21:17 PM", "lastOpDate": "Jun 7, 2017 9:21:17 PM" } ] }

Change History

This API has no change history records yet.

View all change history