Management Plane API > Security > Services > Service Insertion

Deploys a particular service

This will deploy a particular service on a given cluster / host. Internally multiple service instance can be
created during the deployment. If there are no issues in the parameters, the call returns immediately,
and the service VMs will be deployed asynchronously. To get the overall status of the deployment or to get
the status of individual service vm, please use the deployment status APIs.

Request:

Method:
POST
URI Path(s):
/api/v1/serviceinsertion/services/<service-id>/service-deployments
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ServiceDeployment+

Example Request:

POST https://<nsx-mgr>/api/v1/serviceinsertion/services/65a60890-6f48-418d-a7d5-5aaf65f2344b/service-deployments { "perimeter": "CLUSTER", "deployment_type": "HOSTLOCAL", "deployment_spec_name": "GISpec", "deployment_mode": "STAND_ALONE", "instance_deployment_template": { "name": "GI_GOLD", "attributes": [ { "attribute_type": "STRING", "display_name": "dns_server1", "key": "dns_server1", "value": "" }, { "attribute_type": "STRING", "display_name": "vsm_password", "key": "vsm_password", "value": "" } ] }, "service_deployment_config": { "compute_collection_id": "f42c11d3-fe88-46d4-a1e5-b9f73a30c31a:domain-c7", "compute_manager_id": "f42c11d3-fe88-46d4-a1e5-b9f73a30c31a", "storage_id": "datastore-30", "vm_nic_info": { "nic_infos": [ { "nic_metadata": { "interface_label": "eth0", "interface_index": 0, "interface_type": "MANAGEMENT" }, "network_id": "network-28", "ip_pool_id": "a3cf1339-9cf7-4834-88ec-d4ad813bd130" } ] } } }

Successful Response:

Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
ServiceDeployment+

Example Response:

{ "perimeter": "CLUSTER", "deployment_type": "HOSTLOCAL", "clustered_deployment_count": 1, "deployment_spec_name": "GISpec", "deployment_mode": "STAND_ALONE", "instance_deployment_template": { "name": "GI_GOLD", "attributes": [ { "key": "DNS", "display_name": "DNS", "value": "", "attribute_type": "STRING" }, { "key": "sva_key", "display_name": "sva_key", "value": "", "attribute_type": "STRING" } ] }, "service_deployment_config": { "compute_manager_id": "f42c11d3-fe88-46d4-a1e5-b9f73a30c31a", "compute_collection_id": "f42c11d3-fe88-46d4-a1e5-b9f73a30c31a:domain-c7", "storage_id": "datastore-30", "vm_nic_info": { "nic_infos": [ { "nic_metadata": { "interface_label": "eth0", "interface_index": 0, "interface_type": "MANAGEMENT" }, "ip_pool_id": "a3cf1339-9cf7-4834-88ec-d4ad813bd130", "network_id": "network-28" } ] } }, "service_id": "c729678f-443a-4822-bdd2-aadd7a483e5a", "resource_type": "ServiceDeployment", "id": "e6c2693f-2335-43de-8885-95db0b7c7478", "display_name": "e6c2693f-2335-43de-8885-95db0b7c7478", "_create_user": "admin", "_create_time": 1543950168765, "_last_modified_user": "admin", "_last_modified_time": 1543950168765, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

service_insertion

Additional Errors: