SecurityGroupsApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Delete /datacenters/{datacenterId}/securitygroups/{securityGroupId}
Delete a Security Group
Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}
Retrieve a Security Group
Delete /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}
Remove a Firewall Rule from a Security Group
Post /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules
Create Firewall rule to a Security Group
Patch /datacenters/{datacenterId}/securitygroups/{securityGroupId}
Partially modify Security Group
Put /datacenters/{datacenterId}/securitygroups/{securityGroupId}
Modify Security Group
Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}
Retrieve security group rule by id
Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules
List Security Group rules
Patch /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}
Partially modify Security Group Rules
Put /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}
Modify a Security Group Rule
Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups
Attach a list of Security Groups to a NIC
Put /datacenters/{datacenterId}/servers/{serverId}/securitygroups
Attach a list of Security Groups to a Server
DatacentersSecuritygroupsDelete
var result = DatacentersSecuritygroupsDelete(ctx, datacenterId, securityGroupId)
.Pretty(pretty)
.Execute()Delete a Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the Security Group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsDeleteRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsFindById
Retrieve a Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center
securityGroupId
string
The unique ID of the security group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsFindByIdRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsFirewallrulesDelete
Remove a Firewall Rule from a Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center
securityGroupId
string
The unique ID of the security group.
ruleId
string
The unique ID of the firewall rule.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsFirewallrulesDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsFirewallrulesPost
Create Firewall rule to a Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center
securityGroupId
string
The unique ID of the security group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsFirewallrulesPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersSecuritygroupsGet
List Security Groups
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsGetRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
offset
int32
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[default to 0]
limit
int32
The maximum number of elements to return (use together with offset for pagination).
[default to 1000]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsPatch
Partially modify Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the Security Group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsPatchRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersSecuritygroupsPost
Create a Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsPostRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersSecuritygroupsPut
Modify Security Group
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the Security Group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsPutRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersSecuritygroupsRulesFindById
Retrieve security group rule by id
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the Security Group.
ruleId
string
The unique ID of the Security Group rule.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsRulesFindByIdRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsRulesGet
List Security Group rules
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the security group.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsRulesGetRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
offset
int32
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[default to 0]
limit
int32
The maximum number of elements to return (use together with offset for pagination).
[default to 1000]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersSecuritygroupsRulesPatch
Partially modify Security Group Rules
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the security group.
ruleId
string
The unique ID of the Security Group Rule.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsRulesPatchRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersSecuritygroupsRulesPut
Modify a Security Group Rule
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
securityGroupId
string
The unique ID of the security group.
ruleId
string
The unique ID of the Security Group Rule.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersSecuritygroupsRulesPutRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersServersNicsSecuritygroupsPut
Attach a list of Security Groups to a NIC
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
serverId
string
The unique ID of the server.
nicId
string
The unique ID of the server.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersServersNicsSecuritygroupsPutRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersServersSecuritygroupsPut
Attach a list of Security Groups to a Server
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the data center.
serverId
string
The unique ID of the server.
Other Parameters
Other parameters are passed through a pointer to an apiDatacentersServersSecuritygroupsPutRequest struct via the builder pattern
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
Last updated
