Security Groups
A security group is a set of firewall rules on a set of Instances. Security groups enable you to create rules that either drop or allow incoming traffic from certain ports of your Instances.
Security groups are stateful by default, which means that return traffic is automatically allowed, regardless of any rules. You can switch to a stateless mode if you want to only allow explicitly defined traffic. That mode may be difficult to use when filtering outgoing flows.
Set all rules of a security group
Replace all rules of a specified security group with the provided rules.
path Parameters
zoneThe zone you want to target
Set all rules of a security group › Request Body
security_group_idID of the security group to set rules for.
List of rules to set.
Set all rules of a security group › Responses
idUnique ID of the security group.
nameName of the security group.
descriptionDescription of the security group.
project_idProject ID the security group belongs to.
tagsTags associated with the security group.
disable_default_rulesTrue if default rules are disabled.
project_defaultTrue if this is the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessTrue if the security group is stateless.
created_atCreation timestamp of the security group. (RFC 3339 format)
updated_atLast update timestamp of the security group. (RFC 3339 format)
List of default rules applied to the security group.
List of custom rules applied to the security group.
zoneZone in which the security group is located.
Add rules to a security group
Add one or more rules to a security group.
path Parameters
zoneThe zone you want to target
Add rules to a security group › Request Body
security_group_idID of the security group to add rules to.
List of rules to add.
Add rules to a security group › Responses
Updated security group.
List of rules that were added.
Delete rules from a security group
Delete specified security groups.
path Parameters
zoneThe zone you want to target
Delete rules from a security group › Request Body
security_group_rule_idsList of rule IDs to delete.
Delete rules from a security group › Responses
Update a security group rule
Update the properties of a rule from a specified security group.
path Parameters
zoneThe zone you want to target
security_group_rule_idID of the rule to update.
Update a security group rule › Request Body
protocolNew protocol for the rule.
directionNew direction for the rule.
actionNew action for the rule.
source_ip_rangeNew source IP range for the rule. (IP network)
destination_ip_rangeNew destination IP range for the rule. (IP network)
New source port range for the rule.
New destination port range for the rule.
positionNew position for the rule.
Update a security group rule › Responses
idUnique ID of the security group.
nameName of the security group.
descriptionDescription of the security group.
project_idProject ID the security group belongs to.
tagsTags associated with the security group.
disable_default_rulesTrue if default rules are disabled.
project_defaultTrue if this is the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessTrue if the security group is stateless.
created_atCreation timestamp of the security group. (RFC 3339 format)
updated_atLast update timestamp of the security group. (RFC 3339 format)
List of default rules applied to the security group.
List of custom rules applied to the security group.
zoneZone in which the security group is located.
List security groups
List all security groups.
path Parameters
zoneThe zone you want to target
query Parameters
project_idFilter by Project ID.
page_tokenToken for pagination.
page_sizeNumber of items to return per page.
order_byField and direction to sort by.
nameFilter by name.
tagsFilter by tags.
security_group_idsFilter by specific security group IDs.
List security groups › Responses
List of security groups.
next_page_tokenToken for the next page.
total_countTotal number of items.
Create a security group
Create a security group with a specified name and description.
path Parameters
zoneThe zone you want to target
Create a security group › Request Body
nameName of the security group.
descriptionDescription of the security group.
disable_default_rulesWhether to disable default rules.
project_idProject ID the security group belongs to.
tagsTags for the security group.
project_defaultWhether this should be the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessWhether the security group should be stateless.
Create a security group › Responses
idUnique ID of the security group.
nameName of the security group.
descriptionDescription of the security group.
project_idProject ID the security group belongs to.
tagsTags associated with the security group.
disable_default_rulesTrue if default rules are disabled.
project_defaultTrue if this is the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessTrue if the security group is stateless.
created_atCreation timestamp of the security group. (RFC 3339 format)
updated_atLast update timestamp of the security group. (RFC 3339 format)
List of default rules applied to the security group.
List of custom rules applied to the security group.
zoneZone in which the security group is located.
Get a security group
Get the details of a specified security group.
path Parameters
zoneThe zone you want to target
security_group_idID of the security group to retrieve.
Get a security group › Responses
idUnique ID of the security group.
nameName of the security group.
descriptionDescription of the security group.
project_idProject ID the security group belongs to.
tagsTags associated with the security group.
disable_default_rulesTrue if default rules are disabled.
project_defaultTrue if this is the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessTrue if the security group is stateless.
created_atCreation timestamp of the security group. (RFC 3339 format)
updated_atLast update timestamp of the security group. (RFC 3339 format)
List of default rules applied to the security group.
List of custom rules applied to the security group.
zoneZone in which the security group is located.
Delete a security group
Delete a specified security group.
path Parameters
zoneThe zone you want to target
security_group_idID of the security group to delete.
Delete a security group › Responses
Update a security group
Update the properties of a security group.
path Parameters
zoneThe zone you want to target
security_group_idID of the security group to update.
Update a security group › Request Body
nameNew name for the security group.
descriptionNew description for the security group.
disable_default_rulesWhether to disable default rules.
tagsNew tags for the security group.
project_defaultWhether this should be the default security group for the project.
inbound_default_actionNew default action for inbound rules.
outbound_default_actionNew default action for outbound rules.
statelessWhether the security group should be stateless.
Update a security group › Responses
idUnique ID of the security group.
nameName of the security group.
descriptionDescription of the security group.
project_idProject ID the security group belongs to.
tagsTags associated with the security group.
disable_default_rulesTrue if default rules are disabled.
project_defaultTrue if this is the default security group for the project.
inbound_default_actionDefault action for inbound rules.
outbound_default_actionDefault action for outbound rules.
statelessTrue if the security group is stateless.
created_atCreation timestamp of the security group. (RFC 3339 format)
updated_atLast update timestamp of the security group. (RFC 3339 format)
List of default rules applied to the security group.
List of custom rules applied to the security group.
zoneZone in which the security group is located.