Skip to content

Create a network access policy

Request

Requires virtual-networks::modify permission.

Security
JWTAuthorizer
Path
networkNamestringrequired

Network name

domainNamestringrequired

Domain name

Bodyapplication/jsonrequired

Access policy configuration

uidstring

Unique identifier (UUID)

actionstring

Whether traffic matching this policy is allowed or denied

Enum:"allow""deny"
sourcestringrequired

Source CIDR

deststringrequired

Destination CIDR

notDestboolean

Invert the destination match

protocolstringrequired

Protocol

Enum:"any""tcp""udp""icmp"
portsstring

Port or port range (empty string means all ports)

descriptionstring
lineNumberinteger

Display order position of this policy rule

networkNamestring

Virtual network this policy belongs to

domainNamestring

Domain this policy belongs to

orgIdstring

Organization ID

typestring

Object type discriminator

Example:"AccessPolicy"
curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/v2/domain/{domainName}/network/{networkName}/access-policy' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "uid": "string",
    "action": "allow",
    "source": "string",
    "dest": "string",
    "notDest": true,
    "protocol": "any",
    "ports": "string",
    "description": "string",
    "lineNumber": 0,
    "networkName": "string",
    "domainName": "string",
    "orgId": "string",
    "type": "AccessPolicy"
  }'

Responses

OK

Response
No content