Resource Center/Network Resource/L2 Network Operations
POSTL2 Network OperationsSince 0.6SynchronousAuth Required
CreateL2VlanNetwork
CreateL2VlanNetwork
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
vlanIntegerRequiredNo description provided.
nameStringRequiredThe resource name.
descriptionStringOptional. The detailed description of the resource.
zoneUuidStringRequiredThe zone UUID.
physicalInterfaceStringRequiredNo description provided.
typeStringOptional.
vSwitchTypeStringOptional. The type of the vSwitch.
resourceUuidStringOptional. The resource UUID.
tagUuidsListOptional. The Uuid tags list.
solatedBooleanRequiredNo description provided.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/l2-networks/vlan
/zstack/v1/l2-networks/vlan
Request Example
curl -X POST 'http://{host}/zstack/v1/l2-networks/vlan' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"vlan":1,"name":"<name>","description":"<description>","zoneUuid":"<zoneUuid>","physicalInterface":"<physicalInterface>","type":"<type>","vSwitchType":"<vSwitchType>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"solated":true},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "vlan": 10, "name": "Test-Net", "description": "Test", "zoneUuid": "75aea7e72b5a3ce7a1f87efb70ac6339", "physicalInterface": "eth0", "type": "L2VlanNetwork" } }Change History
This API has no change history records yet.
