Skip to Content
Network Rules

Update an existing Network Rule

PUT
/network-rules/{network_rule_id}

Path Parameters

network_rule_id*integer

The ID of the network rule.

Range1 <= value

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
id*integer

The unique ID of the given Network Rule.

name*string

The rule's name/description/reminder. Must be at least 3 characters. Must not be greater than 60 characters.

direction*NetworkRuleDirection

The direction of network traffic a network rule is applied. Inbound applies to ingress/incoming traffic originating from outside into your network. Outbound applies to egress traffic, originating inside your network to external networks.

Value in"inbound""outbound"
protocol?NetworkRuleProtocol

The network protocol to which this rule is applied.

Value in"any""icmp""tcp""udp"
cidr_block*string

IP address range this rule applies for, defined using CIDR notation.

Response Body

No Content

Example Request
curl -X PUT 'https://api.devopness.com/network-rules/123' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "id": 1,  "name": "Open MySQL port for remote access",  "direction": "inbound",  "cidr_block": "10.0.0.0/24"}'
Example Response
Empty