Policy > Inventory > Services

Create or update a ServiceEntry

If a service entry with the service-entry-id is not already present,
create a new service entry. If it already exists, update the service
entry.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/services/<service-id>/service-entries/<service-entry-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ALGTypeServiceEntry+
EtherTypeServiceEntry+
ICMPTypeServiceEntry+
IGMPTypeServiceEntry+
IPProtocolServiceEntry+
L4PortSetServiceEntry+
NestedServiceServiceEntry+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/services/my-http/service-entries/https { "resource_type": "L4PortSetServiceEntry", "display_name": "MyHttps", "destination_ports": [ "7443" ], "l4_protocol": "TCP", "_revision": 0 }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ALGTypeServiceEntry+
EtherTypeServiceEntry+
ICMPTypeServiceEntry+
IGMPTypeServiceEntry+
IPProtocolServiceEntry+
L4PortSetServiceEntry+
NestedServiceServiceEntry+

Example Response:

{ "resource_type": "L4PortSetServiceEntry", "id": "https", "display_name": "MyHttps", "path": "/infra/services/my-http/service-entries/https", "parent_path": "/infra/services/my-http", "relative_path": "https", "destination_ports": [ "7443" ], "l4_protocol": "TCP", "_create_user": "admin", "_create_time": 1517316057383, "_last_modified_user": "admin", "_last_modified_time": 1517316057383, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

policy_services

Additional Errors: