NSX-T Data Center REST API

Update SecurityProfileAttachment

Performs complete replacement of an existing Security Profile Attachment using HTTP PUT semantics.
This operation requires a full attachment representation in the request body and will replace all modifiable
properties of the target attachment. The API enables comprehensive updates to VPC-security-profile associations,
allowing administrators to change the assigned security profile and update attachment metadata.
All required fields must be provided in the request as omitted fields may be reset to default values.
The response includes the updated attachment with current configuration, ensuring that the VPC's security
posture is properly configured according to the new security profile assignment.

Request:

Method:
PUT
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:

PUT 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-3", "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": 1758000058959, "_last_modified_user": "admin", "_revision": 2 }

Successful Response:

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

Required Permissions:

crud

Feature:

policy_edge_fw

Additional Errors: