Policy > Networking > Connectivity > Segments > Segments (Fixed)

Create or update a segment

If segment with the segment-id is not already present, create a new segment.
If it already exists, update the segment with specified attributes.
Note:
Extended Segment: Please note that old vpn path deprecated. If user specify old l2vpn path in the
"l2_extension" object in the PATCH API payload, the path returned in the GET response payload may include the new path
instead of the deprecated l2vpn path. Both old and new l2vpn path refer to same resource. there is no functional impact.
Also note that l2vpn path included in the Alarm, GPRR, error messages returned from validation may include the new VPN path
instead of the deprecated l2vpn path. Both new path and old vpn path refer to same resource.

Request:

Method:
PATCH
URI Path(s):
/policy/api/v1/infra/tier-1s/{tier-1-id}/segments/{segment-id}
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/segments/{segment-id}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
Segment+

Example Request:

PATCH https://<policy-mgr>/policy/api/v1/infra/tier-1s/cgw/segments/web-tier { "display_name":"web-tier", "subnets": [ { "gateway_address": "40.1.1.1/16", "dhcp_ranges": [ "40.1.2.0/24" ] } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Example Response:

200 OK

Required Permissions:

crud

Feature:

policy_segment

Additional Errors: