Deleting a Specified NetworkPolicy

Function

This API is used to delete a specified NetworkPolicy.

URL

DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}

Table 1 describes the parameters of the API.

Table 1 Parameter description

Parameter

Mandatory

Description

name

Yes

Name of the NetworkPolicy.

namespace

Yes

Object name and auth scope, such as for teams and projects.

pretty

No

If 'true', then the output is pretty printed.

body

Yes

-

Request

N/A

Response

Response parameters:

For the description about response parameters, see Table 2.

Example response:

{
    "apiVersion": "v1",
	"code": 200,	
	"details": {
	    "name": "aqws", 
	    "group": "networking.k8s.io", 
	    "kind": "networkpolicies",
            "uid" : "0eea113a-ebb6-11e8-889b-fa163ecbd381"
	},
    "kind": "Status",
    "metadata" : {},
    "status": "Success"	
}

Status Code

Table 2 describes the status code of this API.

Table 2 Status Code

Status Code

Description

200

OK