NSX-T Data Center REST API
Update Security Profile
Creates a new Security Profile Attachment or performs partial updates to an existing attachment using HTTP PATCH semantics.This operation enables project administrators to associate a VPC with a specific security profile or modify
an existing attachment by changing the assigned security profile. The API supports attaching different
security profiles to VPCs to customize their security posture based on workload requirements and compliance needs.
When updating an existing attachment, only the provided fields in the request body will be modified while
preserving other attachment properties. The operation ensures that each VPC maintains exactly one active
security profile attachment at any time, automatically managing the association lifecycle.
Request:
Method:
PATCH
URI Path(s):
/policy/api/v1/orgs/{org-id}/projects/{project-id}/security-profile-attachments/{security-profile-attachment-id}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
SecurityProfileAttachment+
Example Request:
PATCH https://<policy-mgr>/policy/api/v1/orgs/default/projects/Production_Prj/security-profile-attachments/vpc1 { "attached_to": "/orgs/default/projects/Production_Prj/vpcs/vpc1", "security_profile": "/orgs/default/projects/Production_Prj/vpc-security-profiles/system-security-profile-5", "resource_type": "SecurityProfileAttachment", "id": "vpc1", "display_name": "vpc1", "path": "/orgs/default/projects/Production_Prj/security-profile-attachments/vpc1", "relative_path": "vpc1", "parent_path": "/orgs/default/projects/Production_Prj", "remote_path": "", "unique_id": "5449d7df-78c8-4d78-8449-f16445722797", "realization_id": "5449d7df-78c8-4d78-8449-f16445722797", "owner_id": "3ae63613-323b-4465-bf36-14274fd591e3", "marked_for_delete": false, "overridden": false, "_system_owned": false, "_protection": "NOT_PROTECTED", "_create_time": 1757929365242, "_create_user": "system", "_last_modified_time": 1757999739610, "_last_modified_user": "admin", "_revision": 1 }Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a