• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Firewall
  6. Creating a Firewall Policy

Creating a Firewall Policy

Function

This interface is used to create a firewall policy.

URI

POST /v2.0/fwaas/firewall_policies

Request Message

Table 1 Request parameter

Parameter

Type

Mandatory

Description

firewall_policy

Dict

Yes

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

This parameter has no mandatory fields.

Response Message

Table 2 Response parameter

Parameter

Type

Description

firewall_policy

Dict

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

Example:

Example request

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

Example response

{
    "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",
        "project_id": "23c8a121505047b6869edf39f3062712"
    }
}

Status Codes

For details, see section Status Codes.