Create WireguardPeer
Creates a new WireguardPeer.
The full WireguardPeer needs to be provided to create the object. Optional data will be filled with defaults or left empty.
The token can be generated using the Authentication API.
The ID (UUID) of the WireguardGateway.
85c79b4b-5b40-570a-b788-58dd46ea71e2Metadata
WireguardPeer successfully created.
The ID (UUID) of the WireguardPeer.
b62b3a40-adee-5b6c-b98d-be20bfcbdd91The type of the resource.
The URL of the WireguardPeer.
/wireguardgateways/{gatewayId}/peers/b62b3a40-adee-5b6c-b98d-be20bfcbdd91Bad Request
The request send to the API was malformed.
Unauthorized
The request is missing authorization information or the authorization information provided are expired.
Not Allowed
The user issuing the request does not have the needed permissions.
Unsupported Media Type
The request has an unsupported media type.
Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
Too Many Requests
The user has sent too many requests in a given amount of time.
Internal Server Error
An internal error occurred. We apologize for the inconvenience!
Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
Unexpected Internal Server Error
An unexpected internal error occurred. We apologize for the inconvenience!
POST /wireguardgateways/{gatewayId}/peers HTTP/1.1
Host: vpn.de-fra.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 264
{
"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?