Management Plane API > Security > Services > Service Insertion

Add a Service Attachment.

Adds a new Service attachment. A service attachment represents a point
on NSX entity (Example: Logical Router) to which service instance can be
connected through an InstanceEndpoint.

Request:

Method:
POST
URI Path(s):
/api/v1/serviceinsertion/service-attachments
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ServiceAttachment+

Example Request:

POST https://<nsx-mgr>/api/v1/serviceinsertion/service-attachments { "display_name": "Service Attachment 1", "deployed_to": { "target_display_name": "T0_LR", "target_type": "LogicalRouter", "target_id": "d0ceab3f-866b-42d5-a67a-0eedbe604d35" }, "attachment_status": "UP", "local_ips": [ { "ip_addresses": [ "192.168.100.2" ], "prefix_length": 24 } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ServiceAttachment+

Example Response:

{ "resource_type": "ServiceAttachment", "id": "01dfa028-bc90-4be4-bda1-a98b4eb65abc", "display_name": "Service Attachment 1", "deployed_to": { "target_display_name": "T0_LR", "target_type": "LogicalRouter", "target_id": "d0ceab3f-866b-42d5-a67a-0eedbe604d35" }, "attachment_status": "UP", "logical_switch": { "target_display_name": "b7f69e2c-f42f-4fee-9313-c486b35a6d41", "is_valid": true, "target_type": "LogicalSwitch", "target_id": "b7f69e2c-f42f-4fee-9313-c486b35a6d41" }, "service_port": { "target_display_name": "aaa69e2c-vvvf-4fee-9313-c486b35a6ddd", "is_valid": true, "target_type": "LogicalRouterCentralizedServicePort", "target_id": "aaa69e2c-vvvf-4fee-9313-c486b35a6ddd" }, "local_ips": [ { "ip_addresses": [ "192.168.100.2" ], "prefix_length": 24 } ] }

Required Permissions:

crud

Feature:

service_insertion

Additional Errors: