Convert a Custom Network Security Group to Default
You can convert a Custom NSG to a Default NSG during the update of a datacenter. You can use any of the following Cloud API requests with the property defaultSecurityGroupId
set to UUID of the NSG to be converted and the other required properties:
PUT /datacenters/{datacenterId}
PATCH /datacenters/{datacenterId}
Request
curl --location 'https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YYXabCDeFmLMO0c2hyYUBpb25vcy5jb206I1Bha2lzdGFuXzE=' \
--data '{
"properties": {
"name": "Production Datacenter",
"description": "My Production Datacenter",
"location": "us/las",
"defaultSecurityGroupId": "15f67991-0f51-4efc-a8ad-ef1fb31a480c"
}
}'
Response
202 Accepted
{
"id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
"type": "datacenter",
"href": "<RESOURCE-URI>",
"metadata": {
"etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
"createdDate": "2015-12-04T14:34:09.809Z",
"createdBy": "[email protected]",
"createdByUserId": "[email protected]",
"lastModifiedDate": "2015-12-04T14:34:09.809Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
"state": "AVAILABLE"
},
"properties": {
"name": "Production datacenter",
"description": "My Production Datacenter",
"location": "us/las",
"version": 8,
"features": [
"SSD"
],
"secAuthProtection": true,
"cpuArchitecture": [
{
"cpuFamily": "INTEL_ICELAKE",
"maxCores": 62,
"maxRam": 245760,
"vendor": "AuthenticAMD"
}
],
"ipv6CidrBlock": "2001:db8:b06d:8f00::/56",
"defaultSecurityGroupId": "15f67991-0f51-4efc-a8ad-ef1fb31a480c"
}
}
Last updated
Was this helpful?