ClassicFirewallRulesResource


Create a classic firewall rule


POST https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Content-Type : classicfirewallrule Accept : classicfirewallrule

Error Codes

  • CLASSIC-FIREWALL-6 - The classic firewall is performing another operation, please wait
  • CLASSIC-FIREWALL-RULE-3 - Source and Destination ports should be positive integers. Range can only be informed if when port informed and should be greater
  • CLASSIC-FIREWALL-RULE-5 - Cannot specify a not contiguous sequence

Example

List classic firewall rules


Retrieve classic firewall rules.

GET https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
has String If present, filter by PROVIDERID, SEQUENCE, ENABLED, LOGGED, DESCRIPTION, POLICY, PROTOCOLS, DESTINATIONPORT, DESTINATIONPORTRANGE, DESTINATION, SOURCEPORT, SOURCEPORTRANGE, SOURCE, CLASSICFIREWALL
by String Order by : {@link ClassicFirewallRuleDAO.ORDER_BY}
asc boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Example

Delete a classic firewall rule


DELETE https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules/{classicfirewallrule}

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Example

Get a classic firewall rule


GET https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules/{classicfirewallrule}

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Example

Update a classic firewall rule


PUT https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules/{classicfirewallrule}

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Content-Type : classicfirewallrule Accept : classicfirewallrule

Error Codes

  • CLASSIC-FIREWALL-6 - The classic firewall is performing another operation, please wait
  • CLASSIC-FIREWALL-RULE-4 - Cannot edit the sequence, use the reorder action

Example

Reorder a classic firewall rule


Expects a request body with only the new sequence

POST https://example.com/api/cloud/locations/{location}/devices/{device}/classicfirewalls/{classicfirewall}/classicfirewallrules/{classicfirewallrule}/action/reorder

Roles : [ROLE_MANAGE_CLASSIC_FIREWALLS]

Content-Type : classicfirewallrule Accept : classicfirewallrule

Error Codes

  • CLASSIC-FIREWALL-RULE-5 - Cannot specify a not contiguous sequence
  • CLASSIC-FIREWALL-RULE-6 - Cannot reorder in the current sequence

Example