Skip to main content
Resource Center/Network Resource/L2 Network Operations
POSTL2 Network OperationsSince 4.8.0SynchronousAuth Required

CreateL2TfNetwork

CreateL2TfNetwork

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • ipPrefixString

      Optional. The IP address prefix.

    • ipPrefixLengthInteger

      Optional. The IP address prefix length.

    • nameStringRequired

      The resource name.

    • descriptionString

      Optional. The detailed description of the resource.

    • zoneUuidStringRequired

      The zone UUID.

    • physicalInterfaceStringRequired

      The physical interface.

    • typeString

      Optional. The L2 network type.

    • vSwitchTypeString

      Optional. The type of the vSwith.

    • resourceUuidString

      Optional. The resource UUID.

    • tagUuidsList

      Optional. The Uuid tags list.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

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, seeerror.

    • 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.

  • inventoryL2NetworkInventoryRequired

    Seeinventory

  • successbooleanRequired

    操作是否成功。

Endpoint

POST/zstack/v1/l2-networks/tf

/zstack/v1/l2-networks/tf

Operation ID

CreateL2TfNetwork

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/l2-networks/tf' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"ipPrefix":"<ipPrefix>","ipPrefixLength":1,"name":"<name>","description":"<description>","zoneUuid":"<zoneUuid>","physicalInterface":"<physicalInterface>","type":"<type>","vSwitchType":"<vSwitchType>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "672906b1aeca3a68a24c1b07a4f8deb5", "name": "test", "zoneUuid": "b478828872db33a4807d90e9f16f39e4", "physicalInterface": "eth0" } }

Change History

This API has no change history records yet.

View all change history