Create Logical Port

Create Logical Port

Creates a new logical switch port. The required parameters are the associated logical_switch_id and admin_state (UP or DOWN). Optional parameters are the attachment and switching_profile_ids. If you don't specify switching_profile_ids, default switching profiles are assigned to the port. If you don't specify an attachment, the switch port remains empty. To configure an attachment, you must specify an id, and optionally you can specify an attachment_type (VIF or LOGICALROUTER). The attachment_type is VIF by default.

Request
URI
POST
https://nsxmanager.your.domain/api/v1/logical-ports
COPY
Request Body
LogicalPort of type(s) application/json
Optional
This request body class requires all of the following: ManagedResource , InlineLogicalPort1
{
    "_self": {
        "action": "string",
        "href": "string",
        "rel": "string"
    },
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_schema": "string",
    "_revision": 0,
    "_system_owned": false,
    "display_name": "string",
    "description": "string",
    "tags": [
        {
            "scope": "string",
            "tag": "string"
        }
    ],
    "_create_user": "string",
    "_protection": "string",
    "_create_time": 0,
    "_last_modified_time": 0,
    "_last_modified_user": "string",
    "id": "string",
    "resource_type": "string",
    "logical_switch_id": "string",
    "init_state": "string",
    "switching_profile_ids": [
        {
            "value": "string",
            "key": "string"
        }
    ],
    "attachment": {
        "attachment_type": "string",
        "context": {
            "allocate_addresses": "string",
            "resource_type": "string"
        },
        "id": "string"
    },
    "admin_state": "string",
    "extra_configs": [
        {
            "config_pair": {
                "value": "string",
                "key": "string"
            }
        }
    ],
    "address_bindings": [
        {
            "vlan": 0,
            "ip_address": "string",
            "mac_address": "string"
        }
    ]
}
Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns LogicalPort of type(s) application/json
This response body class contains all of the following: ManagedResource , InlineLogicalPort1
{
    "_self": {
        "action": "string",
        "href": "string",
        "rel": "string"
    },
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_schema": "string",
    "_revision": 0,
    "_system_owned": false,
    "display_name": "string",
    "description": "string",
    "tags": [
        {
            "scope": "string",
            "tag": "string"
        }
    ],
    "_create_user": "string",
    "_protection": "string",
    "_create_time": 0,
    "_last_modified_time": 0,
    "_last_modified_user": "string",
    "id": "string",
    "resource_type": "string",
    "logical_switch_id": "string",
    "init_state": "string",
    "switching_profile_ids": [
        {
            "value": "string",
            "key": "string"
        }
    ],
    "attachment": {
        "attachment_type": "string",
        "context": {
            "allocate_addresses": "string",
            "resource_type": "string"
        },
        "id": "string"
    },
    "admin_state": "string",
    "extra_configs": [
        {
            "config_pair": {
                "value": "string",
                "key": "string"
            }
        }
    ],
    "address_bindings": [
        {
            "vlan": 0,
            "ip_address": "string",
            "mac_address": "string"
        }
    ]
}

400
Returns BadRequest of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


403
Returns Forbidden of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


404
Returns NotFound of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


412
Returns PreconditionFailed of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


500
Returns InternalServerError of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


503
Returns ServiceUnavailable of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code