POST /networksecuritypolicy

POST /networksecuritypolicy

/networksecuritypolicy

Request
URI
POST
https://{api_host}/api/networksecuritypolicy
COPY
Header Parameters
string
X-Avi-Tenant
Optional

Avi Tenant Header

string
X-Avi-Tenant-UUID
Optional

Avi Tenant Header UUID

string
X-Avi-Version
Required

The caller is required to set Avi Version Header to the expected version of configuration. The response from the controller will provide and accept data according to the specified version. The controller will reject POST and PUT requests where the data is not compatible with the specified version.

string
X-CSRFToken
Optional

Avi Controller may send back CSRF token in the response cookies. The caller should update the request headers with this token else controller will reject requests.


Request Body

NetworkSecurityPolicy object creation

NetworkSecurityPolicy of type(s) application/json
Optional
{
    "_last_modified": "string",
    "cloud_config_cksum": "string",
    "configpb_attributes": {
        "version": 0
    },
    "created_by": "string",
    "description": "string",
    "geo_db_ref": "string",
    "internal": false,
    "ip_reputation_db_ref": "string",
    "markers": [
        {
            "key": "string",
            "values": [
                "string"
            ]
        }
    ],
    "name": "string",
    "rules": [
        {
            "action": "string",
            "age": 0,
            "created_by": "string",
            "enable": false,
            "index": 0,
            "log": false,
            "match": {
                "client_ip": {
                    "addrs": [
                        {
                            "addr": "string",
                            "type": "string"
                        }
                    ],
                    "group_refs": [
                        "string"
                    ],
                    "match_criteria": "string",
                    "prefixes": [
                        {
                            "ip_addr": {
                                "addr": "string",
                                "type": "string"
                            },
                            "mask": 0
                        }
                    ],
                    "ranges": [
                        {
                            "begin": {
                                "addr": "string",
                                "type": "string"
                            },
                            "end": {
                                "addr": "string",
                                "type": "string"
                            }
                        }
                    ]
                },
                "client_port": {
                    "match_criteria": "string",
                    "ports": [
                        0
                    ],
                    "ranges": [
                        {
                            "end": 0,
                            "start": 0
                        }
                    ]
                },
                "geo_matches": [
                    {
                        "attribute": "string",
                        "match_operation": "string",
                        "values": [
                            "string"
                        ]
                    }
                ],
                "ip_reputation_type": {
                    "match_operation": "string",
                    "reputation_types": [
                        "string"
                    ]
                },
                "microservice": {
                    "group_ref": "string",
                    "match_criteria": "string"
                },
                "vs_port": {
                    "match_criteria": "string",
                    "ports": [
                        0
                    ]
                }
            },
            "name": "string",
            "rl_param": {
                "burst_size": 0,
                "max_rate": 0
            }
        }
    ],
    "tenant_ref": "string",
    "url": "string",
    "uuid": "string"
}
Responses
200

OK

Returns NetworkSecurityPolicy of type(s) application/json
"NetworkSecurityPolicy Object"
string
_last_modified
Optional

UNIX time since epoch in microseconds. Units(MICROSECONDS).

string
cloud_config_cksum
Optional

Checksum of cloud configuration for Network Sec Policy. Internally set by cloud connector. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

object
configpb_attributes
Optional

configpb_attributes

string
created_by
Optional

Creator name. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

string
description
Optional

Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

string
geo_db_ref
Optional

Geo database. It is a reference to an object of type GeoDB. Field introduced in 21.1.1. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.

boolean
internal
Optional

Network Security Policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.

string
ip_reputation_db_ref
Optional

IP reputation database. It is a reference to an object of type IPReputationDB. Field introduced in 20.1.1. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.

array of object
markers
Optional

List of labels to be used for granular RBAC. Field introduced in 20.1.5. Allowed in Enterprise edition with any value, Essentials edition with any value, Basic edition with any value, Enterprise with Cloud Services edition.

string
name
Optional

Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

array of object
rules
Optional

Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

string
tenant_ref
Optional

It is a reference to an object of type Tenant. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

string
url
Optional

url

string
uuid
Optional

Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.


401

log in failed

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/networksecuritypolicy