• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Firewall as a Service
  6. Create firewall policy

Create firewall policy

Function Description

This interface is used to create a firewall policy.

Interface Format

Method

URI

Description

POST

/v2.0/fwaas/firewall_policies

Creates a firewall policy.

Restrictions

N/A

Request Parameter

Parameter

Type

Mandatory

Description

firewall_policy

Dict

Yes

Specifies the firewall policy. For details, see Table 2.

This parameter has no mandatory fields.

Response Parameter

Parameter

Type

Mandatory

Description

firewall_policy

Dict

Yes

Specifies the firewall policy. For details, see Table 2.

Request Example

POST /v2.0/fwaas/firewall_policies
{
"firewall_policy": {
"name": "test-policy",
"firewall_rules": [
"b8243448-cb3c-496e-851c-dadade4c161b"
]
}
}

Response Example

{
"firewall_policy": {
"description": "",
"firewall_rules": [
"b8243448-cb3c-496e-851c-dadade4c161b"
],
"tenant_id": "23c8a121505047b6869edf39f3062712",
"public": false,
"id": "2fb0e81f-9f63-44b2-9894-c13a3284594a",
"audited": false,
"name": "test-policy"
}
}

Error Code

See section Return Code Processing.