Updates an existing network policy.
Required permission
Account > Networking > NetworkPolicies > Update
Path parameters
networkPolicyId
string requiredID of the network policy
Request body
- {object}
name
stringThe name of the network policy.min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringThe description of the network policy.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$spec
{object}
API
CLI
JS Client
PATCH /v1/network-policies/{networkPolicyId}
PATCH /v1/teams/{teamId}/network-policies/{networkPolicyId}
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PATCH \
--data '{"name":"restrict-api-ingress","description":"Restrict ingress to the api service."}' \
https://api.northflank.com/v1/network-policies/{networkPolicyId}Example response
200 OK
success