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 update a firewall rule of a NSG, you need to use the following Cloud APIPUT or PATCH request providing the datacenterId, securityGroupId and ruleId:
PUT /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}
Note: For CloudAPI, some resources are created asynchronously. You can check for the progress via the Status URL that is returned in the response header of the POST or PUT call.