Note: Updating the list of Security Groups attached to an existing server specified by its ID. Security Groups should already exist as part of the datacenter.
Note: Only contract administrators, owners, and users with permissions to the VDC concerned can create and manage NSGs via API.
Prerequisite: You need an IONOS Cloud account with API credentials configured with the appropriate permissions.
To attach a list of NSGs to a server, you need to use the following Cloud API PUT
request providing the datacenterId
,serverId
and the IDs of the security groups in the body:
PUT /datacenters/{datacenterId}/servers/{serverId}/securitygroups
Similarly for a NIC, provide the datacenterId
, nicId
and the IDs of the security groups in the body:
PUT /datacenters/{datacenterId}/servers/{serverId}/nic/{nicId}/securitygroups
200 Accepted