Create a Custom Network Security Group
To create a Custom NSG, you need to use the following Cloud API POST
request providing the datacenterId
and the required properties:
POST /datacenters/{datacenterId}/securitygroups
Request
curl --location 'https://api.ionos.com/cloudapi/v6/datacenters/5a88aa8b-8aa1-51f6-XXd1-XXXXXe9f31/securitygroups' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YYXabCDeFmLMO0c2hyYUBpb25vcy5jb206I1Bha2lzdGFuXzE=' \
--data '{
"properties": {
"name": "NSG-1",
"description": "Description for NSG-1"
}
}'
Response
202 Accepted
{
"id": "bxxxx-axXX-0008-8888-99k0444e5555",
"type": "security-group",
"href": "https://api.ionos.com/cloudapi/v6/datacenters/5a88aa8b-8aa1-51f6-XXd1-XXXXXe9f31/securitygroups/bxxxx-axXX-0008-8888-99k0444e5555",
"metadata": {
"etag": "64c593ebd78b0d9da52baba4079e119d",
"createdDate": "2024-05-17T15:11:09Z",
"createdBy": "[email protected]",
"createdByUserId": "XYaf0375-1c1d-4387-9ef1-6ee95d30e54a",
"lastModifiedDate": "2024-05-17T15:11:09Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "XYaf0375-1c1d-4387-9ef1-6ee95d30e54a",
"state": "BUSY"
},
"properties": {
"name": "NSG-1",
"description": "Description for NSG-1"
}
}
PreviousCreate a Default Network Security GroupNextConvert a Custom Network Security Group to Default
Last updated
Was this helpful?