Create Firewall rule to a Security Group
1 min
POST
https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules
datacenterIdstringThe unique ID of the data center
securityGroupIdstringThe unique ID of the security group.
acceptstringGenerated from available response content types
bodyobject<p>The firewall to be attached (or created and attached).</p>
200Successful operation
default<p>Any erroneous status code:
400 (parse error),
401 (auth error),
402 (trial access),
403 (insufficient privileges),
404 (not found),
405 (unsupported HTTP method),
415 (unsupported content type),
422 (validation error),
429 (request rate limit exceeded),
500 (server error),
or 503 (maintenance).</p>
curl --request POST \
--url https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"type": {},
"properties": {
"protocol": "TCP"
}
}'Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.