Set network VPN peer grants
set_network_vpn_peer_grantsReplace a VPN peer's server-access grants to allow selected servers, grant all eligible current and future network servers, or revoke access; confirm scope and required route updates.
Instructions
Replace the peer's complete server-access choice using the gateway generation. Read the gateway and current grant_scope first. Omitted grant_scope means servers: supply the full 0-16 address list; this also disables a device's previous network-wide access to future servers, even if today's list is unchanged. Empty grants removes a device's server access; a site still needs at least one grant. grant_scope=network is device-only: omit grants or send [] to allow every eligible current and future server of the network, subject to network security policy. Confirm that scope and its effects. Check routes_update for required customer router/client changes. Requires explicit networking:read for reads or networking:manage for changes; full/read defaults do not grant networking. The backend enforces ownership, feature availability and service 2FA locks. Read current capabilities and owned resource state first; obtain approval for the exact change. An accepted operation is pending, not proof of connectivity. Poll the returned operation/resource on its in_progress flag, waiting next_check_seconds between reads: while in_progress is true its reason_code is what is awaited (reason_kind waiting, e.g. a queued or pending reason, or a control plane that has not answered yet), never an error; only in_progress false with reason_kind failure is a failure. Preserve reason_code. On transport uncertainty inspect state and reuse only the original key and unchanged request; never automatically retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grants | No | ||
| peer_id | Yes | Exact lowercase UUID returned by an owned networking resource | |
| gateway_id | Yes | Exact lowercase UUID returned by an owned networking resource | |
| grant_scope | No | servers (default) chooses individual grants; network grants a device every eligible current and future server of this network, subject to network security policy. Network scope requires empty grants and is unavailable for sites. | |
| idempotencyKey | Yes | Idempotency-Key for this exact change; preserve it and the unchanged body on uncertain recovery | |
| expected_generation | Yes |