For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ensure WireguardPeer

Ensures that the WireguardPeer with the provided ID is created or modified. The full WireguardPeer needs to be provided to ensure (either update or create) the WireguardPeer. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.

put
/wireguardgateways/{gatewayId}/peers/{peerId}
Authorizations
AuthorizationstringRequired

The token can be generated using the Authentication API.

Path parameters
gatewayIdstring · uuidRequired

The ID (UUID) of the WireguardGateway.

Example: 85c79b4b-5b40-570a-b788-58dd46ea71e2
peerIdstring · uuidRequired

The ID (UUID) of the WireguardPeer.

Example: b62b3a40-adee-5b6c-b98d-be20bfcbdd91
Body
idstring · uuidRequired

The ID (UUID) of the WireguardPeer.

Example: b62b3a40-adee-5b6c-b98d-be20bfcbdd91
metadataanyOptional

Metadata

Responses
200

WireguardPeer successfully updated.

application/json
idstring · uuidRequired

The ID (UUID) of the WireguardPeer.

Example: b62b3a40-adee-5b6c-b98d-be20bfcbdd91
typestring · enumRequired

The type of the resource.

Possible values:
hrefstringRequired

The URL of the WireguardPeer.

Example: /wireguardgateways/{gatewayId}/peers/b62b3a40-adee-5b6c-b98d-be20bfcbdd91
put/wireguardgateways/{gatewayId}/peers/{peerId}
PUT /wireguardgateways/{gatewayId}/peers/{peerId} HTTP/1.1
Host: vpn.de-fra.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 308

{
  "id": "b62b3a40-adee-5b6c-b98d-be20bfcbdd91",
  "metadata": {},
  "properties": {
    "name": "My Company Gateway Peer",
    "description": "Allows local machine A to connect to Datacenter LAN Y.",
    "endpoint": {
      "host": "1.2.3.4",
      "port": 51820
    },
    "allowedIPs": [
      "1.2.3.4/32"
    ],
    "publicKey": "no8iaSEoqfbI6PVYsdEiUU5efYdtKX8VAhKity19MWI="
  }
}
{
  "id": "b62b3a40-adee-5b6c-b98d-be20bfcbdd91",
  "type": "wireguardpeer",
  "href": "/wireguardgateways/{gatewayId}/peers/b62b3a40-adee-5b6c-b98d-be20bfcbdd91",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "status": "AVAILABLE",
    "statusMessage": null
  },
  "properties": {
    "name": "My Company Gateway Peer",
    "description": "Allows local machine A to connect to Datacenter LAN Y.",
    "endpoint": {
      "host": "1.2.3.4",
      "port": 51820
    },
    "allowedIPs": [
      "1.2.3.4/32"
    ],
    "publicKey": "no8iaSEoqfbI6PVYsdEiUU5efYdtKX8VAhKity19MWI="
  }
}

Last updated

Was this helpful?