Policy > Networking > Connectivity > Segments

Create or update a infra segment

If segment with the segment-id is not already present, create a new segment.
If it already exists, replace the segment with this object.

Force parameter is required when workload connectivity is indirectly impacted
with the current replacement.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost) or VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/segments/<segment-id>?force=true
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
Segment+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/segments/web-tier?force=true { "display_name":"web-tier", "subnets": [ { "gateway_address": "40.1.1.1/16", "dhcp_ranges": [ "40.1.2.0/24" ] } ], "connectivity_path": "/infra/tier-1s/mgw", "_revision": 0 }

Successful Response:

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

Example Response:

{ "resource_type": "Segment", "id": "web-tier", "display_name": "web-tier", "path": "/infra/tier-1s/cgw/segments/web-tier", "parent_path": "/infra/tier-1s/cgw", "relative_path": "web-tier", "subnets": [ { "gateway_address": "40.1.1.1/16", "dhcp_ranges": [ "40.1.2.0/24" ] } ], "connectivity_path": "/infra/tier-1s/mgw", "_create_user": "admin", "_create_time": 1516668961954, "_last_modified_user": "admin", "_last_modified_time": 1516668961954, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

policy_segment

Additional Errors: