{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"common.CurrentTask":{"type":"object","description":"Asynchronous operation currently running","properties":{"errors":{"type":"array","description":"Errors that occurred on the task","nullable":true,"items":{"$ref":"#/components/schemas/common.TaskError"},"readOnly":true},"id":{"type":"string","description":"Identifier of the current task","format":"uuid","readOnly":true},"link":{"type":"string","description":"Link to the task details","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/common.CurrentTaskStatusEnum"}],"description":"Current global status of the current task","nullable":true,"readOnly":true},"type":{"type":"string","description":"Type of the current task","readOnly":true}}},"common.CurrentTaskStatusEnum":{"type":"string","description":"Current status of a task. A task in ERROR cannot be retried without your inputs. PENDING tasks will be executed as soon as possible. A RUNNING task is currently executing your original request. SCHEDULED is used for tasks that will be executed in the future.","enum":["ERROR","PENDING","RUNNING","SCHEDULED","WAITING_USER_INPUT"]},"common.ResourceStatusEnum":{"type":"string","description":"Current status of a resource","enum":["CREATING","CREATION_PLANNED","DELETING","ERROR","OUT_OF_SYNC","READY","SUSPENDED","UNKNOWN","UPDATING"]},"common.TaskError":{"type":"object","description":"Errors that occurred on the task","properties":{"message":{"type":"string","description":"Error description","readOnly":true}}},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"publicCloud.vpn.Connection":{"type":"object","description":"An IPsec connection, with its desired specification and its observed state","properties":{"checksum":{"type":"string","description":"Hash of the current target specification. Send it back in the update payload to detect concurrent changes.","readOnly":true},"createdAt":{"type":"string","description":"Date and time the IPsec connection was created","format":"date-time","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionCurrentState"}],"description":"Observed state of the IPsec connection. Null while the IPsec connection is being created.","nullable":true,"readOnly":true},"currentTasks":{"type":"array","description":"Asynchronous operations ongoing on the IPsec connection","nullable":true,"items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the IPsec connection","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Readiness of the IPsec connection: whether its observed state has converged to its target specification","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionTargetSpec"}],"description":"Last target specification requested for the IPsec connection","readOnly":true},"updatedAt":{"type":"string","description":"Date and time the IPsec connection was last updated","format":"date-time","readOnly":true}}},"publicCloud.vpn.ConnectionBgp":{"type":"object","description":"BGP settings of an IPsec connection","properties":{"ecmpInboundEnabled":{"type":"boolean","description":"Whether the local networks are advertised equally on both tunnels, for a peer able to balance its traffic over them (ECMP). False advertises them with a longer AS path on the standby tunnel. Defaults to false when null.","nullable":true},"localAsn":{"type":"integer","description":"Autonomous system number of the OVHcloud side, between 1 and 4294967295, 23456 excluded. It must differ from peerAsn: the sessions are eBGP."},"peerAsn":{"type":"integer","description":"Autonomous system number of the remote site, between 1 and 4294967295, 23456 excluded"}},"required":["localAsn","peerAsn"]},"publicCloud.vpn.ConnectionCreation":{"type":"object","description":"Payload to create an IPsec connection","properties":{"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionTargetSpec"}],"description":"Desired specification of the IPsec connection to create"}},"required":["targetSpec"]},"publicCloud.vpn.ConnectionCurrentState":{"type":"object","description":"Observed state of an IPsec connection","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionBgp"}],"description":"BGP settings applied to the IPsec connection. Null when routingMode is STATIC.","nullable":true,"readOnly":true},"description":{"type":"string","description":"Free-form description of the IPsec connection. Null when none was given. At most 255 characters.","nullable":true,"readOnly":true},"endpointGroup":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionEndpointGroup"}],"description":"Endpoint groups of the networks on both sides of the IPsec connection: local on the OVHcloud side, distant on the remote site. Both must be in the region of the VPN gateway. Immutable after creation.","readOnly":true},"name":{"type":"string","description":"Name of the IPsec connection. At most 255 characters.","readOnly":true},"routingMode":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.RoutingModeEnum"}],"description":"How the traffic toward the networks of endpointGroup.distant is routed into the tunnels. STATIC routes it into the active tunnel and fails over to the other one, without moving back when the first recovers. BGP runs an eBGP session inside each tunnel and follows its routes. Immutable after creation.","readOnly":true}}},"publicCloud.vpn.ConnectionEndpointGroup":{"type":"object","description":"Endpoint groups of an IPsec connection: the networks on both sides","properties":{"distant":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.EndpointGroupRef"}],"description":"Endpoint group of the networks of the remote site, routed into the tunnels. It must not hold a default route (0.0.0.0/0 or ::/0). With BGP, only the routes learned within its networks are accepted. When every tunnel is down their traffic is dropped, never sent unencrypted."},"local":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.EndpointGroupRef"}],"description":"Endpoint group of the networks on the OVHcloud side, behind the subnets of the VPN gateway. With BGP, they are advertised to the peer."}},"required":["distant","local"]},"publicCloud.vpn.ConnectionTargetSpec":{"type":"object","description":"Desired specification of an IPsec connection","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionBgp"}],"description":"BGP settings. Required when routingMode is BGP, null when it is STATIC. Immutable after creation.","nullable":true},"description":{"type":"string","description":"Free-form description of the IPsec connection. At most 255 characters.","nullable":true},"endpointGroup":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionEndpointGroup"}],"description":"Endpoint groups of the networks on both sides of the IPsec connection: local on the OVHcloud side, distant on the remote site. Both must be in the region of the VPN gateway. Immutable after creation."},"name":{"type":"string","description":"Name of the IPsec connection. At most 255 characters."},"routingMode":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.RoutingModeEnum"}],"description":"How the traffic toward the networks of endpointGroup.distant is routed into the tunnels. STATIC routes it into the active tunnel and fails over to the other one, without moving back when the first recovers. BGP runs an eBGP session inside each tunnel and follows its routes. Defaults to STATIC when null. Immutable after creation.","nullable":true}},"required":["endpointGroup","name"]},"publicCloud.vpn.ConnectionUpdate":{"type":"object","description":"Payload to update an IPsec connection","properties":{"checksum":{"type":"string","description":"Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).","nullable":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionUpdateTargetSpec"}],"description":"Desired specification of the IPsec connection. It replaces the previous one as a whole."}},"required":["targetSpec"]},"publicCloud.vpn.ConnectionUpdateTargetSpec":{"type":"object","description":"Desired specification of an IPsec connection on update: the fields that can change after creation","properties":{"description":{"type":"string","description":"Free-form description of the IPsec connection. Null or omitted removes the current description. At most 255 characters.","nullable":true},"name":{"type":"string","description":"Name of the IPsec connection. At most 255 characters."}},"required":["name"]},"publicCloud.vpn.Dpd":{"type":"object","description":"Dead peer detection settings of an IPsec tunnel","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.DpdActionEnum"}],"description":"Action taken when the peer is declared dead. RESTART brings the tunnel back on its own once the peer answers again. Defaults to RESTART when null.","nullable":true},"interval":{"type":"integer","description":"Idle time before the peer is probed in seconds. At least 1. Defaults to 30 when null.","nullable":true}}},"publicCloud.vpn.DpdActionEnum":{"type":"string","description":"Action taken when dead peer detection declares the peer dead","enum":["CLEAR","DISABLED","HOLD","RESTART","RESTART_BY_PEER"]},"publicCloud.vpn.DpdUpdate":{"type":"object","description":"Dead peer detection settings of an IPsec tunnel on update","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.DpdActionEnum"}],"description":"Action taken when the peer is declared dead. RESTART brings the tunnel back on its own once the peer answers again."},"interval":{"type":"integer","description":"Idle time before the peer is probed in seconds. At least 1."}},"required":["action","interval"]},"publicCloud.vpn.EndpointGroupRef":{"type":"object","description":"Reference to an endpoint group","properties":{"id":{"type":"string","description":"Unique identifier of the endpoint group, as returned by /publicCloud/project/{projectId}/vpn/endpointGroup","format":"uuid"}},"required":["id"]},"publicCloud.vpn.IkePolicyRef":{"type":"object","description":"Reference to an IKE policy","properties":{"id":{"type":"string","description":"Unique identifier of the IKE policy, as returned by /publicCloud/project/{projectId}/vpn/ikePolicy","format":"uuid"}},"required":["id"]},"publicCloud.vpn.InitiatorEnum":{"type":"string","description":"Which end of an IPsec tunnel may start the IKE negotiation","enum":["BI_DIRECTIONAL","RESPONSE_ONLY"]},"publicCloud.vpn.IpsecPolicyRef":{"type":"object","description":"Reference to an IPsec policy","properties":{"id":{"type":"string","description":"Unique identifier of the IPsec policy, as returned by /publicCloud/project/{projectId}/vpn/ipsecPolicy","format":"uuid"}},"required":["id"]},"publicCloud.vpn.OperatingStatusEnum":{"type":"string","description":"Operating status of a VPN resource, as observed on the platform","enum":["DISABLED","DOWN","UNKNOWN","UP"]},"publicCloud.vpn.ProvisioningStatusEnum":{"type":"string","description":"Provisioning status of the configuration of a VPN resource on the platform","enum":["ACTIVE","ERROR","PENDING_CREATE","PENDING_DELETE","PENDING_UPDATE"]},"publicCloud.vpn.RoutingModeEnum":{"type":"string","description":"How the traffic of an IPsec connection is routed into its tunnels","enum":["BGP","STATIC"]},"publicCloud.vpn.Tunnel":{"type":"object","description":"An IPsec tunnel, with its desired specification and its observed state","properties":{"checksum":{"type":"string","description":"Hash of the current target specification. Send it back in the update payload to detect concurrent changes.","readOnly":true},"createdAt":{"type":"string","description":"Date and time the IPsec tunnel was created","format":"date-time","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelCurrentState"}],"description":"Observed state of the IPsec tunnel. Null while the IPsec tunnel is being created.","nullable":true,"readOnly":true},"currentTasks":{"type":"array","description":"Asynchronous operations ongoing on the IPsec tunnel","nullable":true,"items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the IPsec tunnel","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Readiness of the IPsec tunnel: whether its observed state has converged to its target specification","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelReadTargetSpec"}],"description":"Last target specification requested for the IPsec tunnel","readOnly":true},"updatedAt":{"type":"string","description":"Date and time the IPsec tunnel was last updated","format":"date-time","readOnly":true}}},"publicCloud.vpn.TunnelActionRequest":{"type":"object","description":"Payload to run an action on an IPsec tunnel","properties":{"checksum":{"type":"string","description":"Checksum of the last GET. When given, the action is rejected with a checksum mismatch if the tunnel changed in between. When null or empty, the check is skipped.","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelActionTypeEnum"}],"description":"Action to run"}},"required":["type"]},"publicCloud.vpn.TunnelActionTypeEnum":{"type":"string","description":"Action to run on an IPsec tunnel. `REGENERATE_PRE_SHARED_KEY`: replaces the pre-shared key with a random one.","enum":["REGENERATE_PRE_SHARED_KEY"]},"publicCloud.vpn.TunnelBgp":{"type":"object","description":"BGP session of an IPsec tunnel","properties":{"peerIp":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Address of the remote side inside the tunnel, the BGP neighbor. It must be another host address of the network of `tunnelIp`."},"tunnelIp":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"description":"Address of the OVHcloud side inside the tunnel, with its prefix length, such as 169.254.10.1/30. Its network must be of the same IP family as the networks of the connection. It must not overlap those networks, nor the tunnel network of the other tunnel of the connection."}},"required":["peerIp","tunnelIp"]},"publicCloud.vpn.TunnelCreation":{"type":"object","description":"Payload to create an IPsec tunnel","properties":{"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelTargetSpec"}],"description":"Desired specification of the IPsec tunnel to create"}},"required":["targetSpec"]},"publicCloud.vpn.TunnelCurrentState":{"type":"object","description":"Observed state of an IPsec tunnel","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelBgp"}],"description":"BGP session inside the tunnel. Null when the connection routingMode is STATIC.","nullable":true,"readOnly":true},"description":{"type":"string","description":"Free-form description of the IPsec tunnel. At most 255 characters.","nullable":true,"readOnly":true},"dpd":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.Dpd"}],"description":"Dead peer detection settings. Null applies the defaults.","nullable":true,"readOnly":true},"enabled":{"type":"boolean","description":"Whether the IPsec tunnel is administratively enabled. Defaults to true when null.","nullable":true,"readOnly":true},"ike":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IkePolicyRef"}],"description":"IKE (phase 1) policy the IPsec tunnel is configured with","readOnly":true},"initiator":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.InitiatorEnum"}],"description":"Whether the OVHcloud side starts the IKE negotiation too (BI_DIRECTIONAL) or only answers the peer (RESPONSE_ONLY). Defaults to BI_DIRECTIONAL when null.","nullable":true,"readOnly":true},"ipsec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IpsecPolicyRef"}],"description":"IPsec (phase 2) policy the IPsec tunnel is configured with","readOnly":true},"localId":{"type":"string","description":"IKE identity of the OVHcloud side: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. Defaults to the public address of the VPN gateway in the IP family of `peer.ip`. At most 255 characters.","nullable":true,"readOnly":true},"mtu":{"type":"integer","description":"Maximum transmission unit of the tunnel in bytes. Defaults to 1400 when null, which leaves room for the IPsec overhead. At least 68.","nullable":true,"readOnly":true},"name":{"type":"string","description":"Name of the IPsec tunnel. At most 255 characters.","readOnly":true},"operatingStatus":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.OperatingStatusEnum"}],"description":"Operating status of the IPsec tunnel, as observed on the platform. `UP`: the tunnel is up. `DOWN`: the tunnel is down. `DISABLED`: `enabled` is false. `UNKNOWN`: not observed recently. Null until the IPsec tunnel is first observed, and while `provisioningStatus` is not `ACTIVE`.","nullable":true,"readOnly":true},"peer":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelPeer"}],"description":"Remote device of the IPsec tunnel","readOnly":true},"preSharedKey":{"type":"string","description":"Pre-shared key of the tunnel, to configure on the remote device. Null when the caller lacks the `vpn/gateway/connection/tunnel/preSharedKey/get` IAM action, and in every response other than the GET of one tunnel.","nullable":true,"format":"password","readOnly":true},"priority":{"type":"integer","description":"Preference of the tunnel within the connection, lower preferred","readOnly":true},"provisioningStatus":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.ProvisioningStatusEnum"}],"description":"Provisioning status of the IPsec tunnel configuration on the platform. `ACTIVE`: applied. `PENDING_CREATE`, `PENDING_UPDATE`, `PENDING_DELETE`: a change is being applied. `ERROR`: the last change failed. Null when the platform reports another status.","nullable":true,"readOnly":true}}},"publicCloud.vpn.TunnelPeer":{"type":"object","description":"Remote device of an IPsec tunnel","properties":{"id":{"type":"string","description":"IKE identity of the remote device: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. Defaults to `ip`. At most 255 characters.","nullable":true},"ip":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Public IPv4 or IPv6 address of the remote device. The VPN gateway must have a public address of the same family, and the address must not be inside the networks of the distant endpoint group of the connection."}},"required":["ip"]},"publicCloud.vpn.TunnelPeerUpdate":{"type":"object","description":"Remote device of an IPsec tunnel on update","properties":{"id":{"type":"string","description":"IKE identity of the remote device: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. Send the value of `ip` to keep the default. At most 255 characters."},"ip":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Public IPv4 or IPv6 address of the remote device. The VPN gateway must have a public address of the same family, and the address must not be inside the networks of the distant endpoint group of the connection."}},"required":["id","ip"]},"publicCloud.vpn.TunnelReadTargetSpec":{"type":"object","description":"Desired specification of an IPsec tunnel, as returned in responses: the pre-shared key is never returned","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelBgp"}],"description":"BGP session inside the tunnel. Required when the connection routingMode is BGP. Null when it is STATIC.","nullable":true,"readOnly":true},"description":{"type":"string","description":"Free-form description of the IPsec tunnel. At most 255 characters.","nullable":true,"readOnly":true},"dpd":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.Dpd"}],"description":"Dead peer detection settings. Null applies the defaults.","nullable":true,"readOnly":true},"enabled":{"type":"boolean","description":"Whether the IPsec tunnel is administratively enabled. Defaults to true when null.","nullable":true,"readOnly":true},"ike":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IkePolicyRef"}],"description":"IKE (phase 1) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only.","readOnly":true},"initiator":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.InitiatorEnum"}],"description":"Whether the OVHcloud side starts the IKE negotiation too (BI_DIRECTIONAL) or only answers the peer (RESPONSE_ONLY). Defaults to BI_DIRECTIONAL when null.","nullable":true,"readOnly":true},"ipsec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IpsecPolicyRef"}],"description":"IPsec (phase 2) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only.","readOnly":true},"localId":{"type":"string","description":"IKE identity of the OVHcloud side: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. Defaults to the public address of the VPN gateway in the IP family of `peer.ip`. At most 255 characters.","nullable":true,"readOnly":true},"mtu":{"type":"integer","description":"Maximum transmission unit of the tunnel in bytes. Defaults to 1400 when null, which leaves room for the IPsec overhead. At least 68.","nullable":true,"readOnly":true},"name":{"type":"string","description":"Name of the IPsec tunnel. At most 255 characters.","readOnly":true},"peer":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelPeer"}],"description":"Remote device of the IPsec tunnel","readOnly":true},"priority":{"type":"integer","description":"Preference of the tunnel within the connection, at least 1, lower preferred, unique within the connection. With STATIC routing it picks the tunnel active first. Null when none was given at creation: currentState.priority holds the priority applied.","nullable":true,"readOnly":true}}},"publicCloud.vpn.TunnelTargetSpec":{"type":"object","description":"Desired specification of an IPsec tunnel","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelBgp"}],"description":"BGP session inside the tunnel. Required when the connection routingMode is BGP, null when it is STATIC.","nullable":true},"description":{"type":"string","description":"Free-form description of the IPsec tunnel. At most 255 characters.","nullable":true},"dpd":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.Dpd"}],"description":"Dead peer detection settings. Null applies the defaults.","nullable":true},"enabled":{"type":"boolean","description":"Whether the IPsec tunnel is administratively enabled. Defaults to true when null.","nullable":true},"ike":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IkePolicyRef"}],"description":"IKE (phase 1) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only."},"initiator":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.InitiatorEnum"}],"description":"Whether the OVHcloud side starts the IKE negotiation too (BI_DIRECTIONAL) or only answers the peer (RESPONSE_ONLY). Defaults to BI_DIRECTIONAL when null.","nullable":true},"ipsec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IpsecPolicyRef"}],"description":"IPsec (phase 2) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only."},"localId":{"type":"string","description":"IKE identity of the OVHcloud side: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. Defaults to the public address of the VPN gateway in the IP family of `peer.ip`. At most 255 characters.","nullable":true},"mtu":{"type":"integer","description":"Maximum transmission unit of the tunnel in bytes. Defaults to 1400 when null, which leaves room for the IPsec overhead. At least 68.","nullable":true},"name":{"type":"string","description":"Name of the IPsec tunnel. At most 255 characters."},"peer":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelPeer"}],"description":"Remote device of the IPsec tunnel"},"preSharedKey":{"type":"string","description":"Pre-shared key authenticating both ends. Configure the same key on the remote device. When omitted, a random key is generated. Read it in `currentState.preSharedKey` of the tunnel GET, which needs the `vpn/gateway/connection/tunnel/preSharedKey/get` IAM action. Never returned in `targetSpec`. From 16 to 255 printable ASCII characters.","nullable":true,"format":"password"},"priority":{"type":"integer","description":"Preference of the tunnel within the connection, at least 1, lower preferred, unique within the connection. With STATIC routing it picks the tunnel active first. Null takes the priority after the one of the other tunnel of the connection at creation, and keeps the current one on update.","nullable":true}},"required":["ike","ipsec","name","peer"]},"publicCloud.vpn.TunnelUpdate":{"type":"object","description":"Payload to update an IPsec tunnel","properties":{"checksum":{"type":"string","description":"Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).","nullable":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelUpdateTargetSpec"}],"description":"Desired specification of the IPsec tunnel. It replaces the previous one as a whole."}},"required":["targetSpec"]},"publicCloud.vpn.TunnelUpdateTargetSpec":{"type":"object","description":"Desired specification of an IPsec tunnel on update: the fields that can change after creation","properties":{"bgp":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelBgp"}],"description":"BGP session inside the tunnel. Required when the connection routingMode is BGP, null when it is STATIC.","nullable":true},"description":{"type":"string","description":"Free-form description of the IPsec tunnel. At most 255 characters.","nullable":true},"dpd":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.DpdUpdate"}],"description":"Dead peer detection settings"},"enabled":{"type":"boolean","description":"Whether the IPsec tunnel is administratively enabled"},"ike":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IkePolicyRef"}],"description":"IKE (phase 1) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only."},"initiator":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.InitiatorEnum"}],"description":"Whether the OVHcloud side starts the IKE negotiation too (BI_DIRECTIONAL) or only answers the peer (RESPONSE_ONLY)"},"ipsec":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.IpsecPolicyRef"}],"description":"IPsec (phase 2) policy of the IPsec tunnel, in the region of the VPN gateway. Configure the same algorithms on the remote device. Changing it renegotiates this tunnel only."},"localId":{"type":"string","description":"IKE identity of the OVHcloud side: an IP address, a fully qualified domain name, user@fqdn or a distinguished name. When null, the public address of the VPN gateway in the IP family of `peer.ip` is used. At most 255 characters.","nullable":true},"mtu":{"type":"integer","description":"Maximum transmission unit of the tunnel in bytes. At least 68."},"name":{"type":"string","description":"Name of the IPsec tunnel. At most 255 characters."},"peer":{"allOf":[{"$ref":"#/components/schemas/publicCloud.vpn.TunnelPeerUpdate"}],"description":"Remote device of the IPsec tunnel"},"preSharedKey":{"type":"string","description":"Pre-shared key authenticating both ends. Configure the same key on the remote device. Never returned in `targetSpec`. When omitted, the current key is kept. From 16 to 255 printable ASCII characters.","nullable":true,"format":"password"},"priority":{"type":"integer","description":"Preference of the tunnel within the connection, at least 1, lower preferred, unique within the connection. With STATIC routing it picks the tunnel active first."}},"required":["dpd","enabled","ike","initiator","ipsec","mtu","name","peer","priority"]},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection":{"get":{"operationId":"getAllVpnConnections","summary":"List IPsec connections","description":"Returns the IPsec connections of the VPN gateway.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.vpn.Connection"}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@10"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/get","required":true}],"x-response-identifier":"id","x-expanded-response":"PublicCloudVpnConnection"},"post":{"operationId":"createVpnConnection","summary":"Create an IPsec connection","description":"Creates an IPsec connection on a VPN gateway: the endpoint groups of the networks on both sides, which must be in the region of the VPN gateway, and how their traffic is routed, shared by the one or two IPsec tunnels to the remote site. A VPN gateway holds several IPsec connections: the networks of their distant endpoint groups must not overlap, and its BGP connections share one local ASN. Creation applies immediately: the response already holds the result.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionCreation"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Connection"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}},"Client::BadRequest::QuotaExceeded":{"value":{"class":"Client::BadRequest::QuotaExceeded","message":"This request exceeds the project's quota in this region"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnEndpointGroupDoesNotExist":{"value":{"class":"Client::NotFound::VpnEndpointGroupDoesNotExist","message":"Endpoint group not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::RegionInMaintenance":{"value":{"class":"Client::Conflict::RegionInMaintenance","message":"This region is currently in maintenance"}},"Client::Conflict::VpnConnectionLocalAsnMismatch":{"value":{"class":"Client::Conflict::VpnConnectionLocalAsnMismatch","message":"Every BGP IPsec connection of a VPN gateway must use the same local ASN"}},"Client::Conflict::VpnConnectionNetworkOverlap":{"value":{"class":"Client::Conflict::VpnConnectionNetworkOverlap","message":"The distant networks overlap those of another IPsec connection of this VPN gateway"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@30"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.vpn.ConnectionCreation\nresult = client.post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection\",\n\ttargetSpec = None, # Desired specification of the IPsec connection to create (type: publicCloud.vpn.ConnectionTargetSpec)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.vpn.ConnectionCreation\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection\", array(\n\ttargetSpec => null, // Desired specification of the IPsec connection to create (type: publicCloud.vpn.ConnectionTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/create","required":true}]}},"/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}":{"delete":{"operationId":"deleteVpnConnection","summary":"Delete an IPsec connection","description":"Deletes the IPsec connection. It is refused while it has IPsec tunnels. Deletion applies immediately: the response already holds the result.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Connection"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::VpnConnectionInUse":{"value":{"class":"Client::Conflict::VpnConnectionInUse","message":"This IPsec connection still has IPsec tunnels: delete them first"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@40"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/delete","required":true}]},"get":{"operationId":"getVpnConnection","summary":"Get an IPsec connection","description":"Returns the IPsec connection and its observed state.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Connection"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@20"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/get","required":true}],"x-response-identifier":"id"},"put":{"operationId":"editVpnConnection","summary":"Update an IPsec connection","description":"The target specification replaces the previous one as a whole: a field left null goes back to its default. Send the checksum of the last GET to reject the update with a checksum mismatch when someone changed the resource in between. Only the name and the description can change: to change the networks or the routing, create another IPsec connection. The update applies immediately: the response already holds the result.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.ConnectionUpdate"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Connection"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::ChecksumMismatch":{"value":{"class":"Client::Conflict::ChecksumMismatch","message":"Checksum mismatch — a concurrent update was detected. Refresh the resource and retry"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@50"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.vpn.ConnectionUpdate\nresult = client.put(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\",\n\tchecksum = None, # Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)\n\ttargetSpec = None, # Desired specification of the IPsec connection. It replaces the previous one as a whole. (type: publicCloud.vpn.ConnectionUpdateTargetSpec)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.vpn.ConnectionUpdate\n$result = $ovh->put(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}\", array(\n\tchecksum => null, // Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)\n\ttargetSpec => null, // Desired specification of the IPsec connection. It replaces the previous one as a whole. (type: publicCloud.vpn.ConnectionUpdateTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/edit","required":true}]}},"/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel":{"get":{"operationId":"getAllVpnTunnels","summary":"List IPsec tunnels","description":"Returns the IPsec tunnels of the IPsec connection.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@60"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/get","required":true}],"x-response-identifier":"id","x-expanded-response":"PublicCloudVpnTunnel"},"post":{"operationId":"createVpnTunnel","summary":"Create an IPsec tunnel","description":"Creates an IPsec tunnel in the IPsec connection. A connection holds at most two tunnels, which fail over to each other. The VPN gateway of the connection must have a public address of the family of the peer. The IKE and IPsec policies must be in the region of the VPN gateway. Refused while the VPN gateway of the connection is being created, updated or deleted: retry once it is READY or ERROR. Creation is asynchronous: follow resourceStatus and currentTasks. READY means the tunnel is configured on the VPN gateway, not that it is up.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.TunnelCreation"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}},"Client::BadRequest::QuotaExceeded":{"value":{"class":"Client::BadRequest::QuotaExceeded","message":"This request exceeds the project's quota in this region"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}},"Client::NotFound::VpnIkePolicyDoesNotExist":{"value":{"class":"Client::NotFound::VpnIkePolicyDoesNotExist","message":"IKE policy not found"}},"Client::NotFound::VpnIpsecPolicyDoesNotExist":{"value":{"class":"Client::NotFound::VpnIpsecPolicyDoesNotExist","message":"IPsec policy not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::RegionInMaintenance":{"value":{"class":"Client::Conflict::RegionInMaintenance","message":"This region is currently in maintenance"}},"Client::Conflict::ResourceInInvalidState":{"value":{"class":"Client::Conflict::ResourceInInvalidState","message":"Resource cannot be modified in its current state"}},"Client::Conflict::VpnConnectionTunnelLimitReached":{"value":{"class":"Client::Conflict::VpnConnectionTunnelLimitReached","message":"This IPsec connection already has two IPsec tunnels"}},"Client::Conflict::VpnGatewayHasNoExternalAddress":{"value":{"class":"Client::Conflict::VpnGatewayHasNoExternalAddress","message":"The VPN gateway has no public address of the same IP version (IPv4 or IPv6) as the peer address"}},"Client::Conflict::VpnTunnelPriorityInUse":{"value":{"class":"Client::Conflict::VpnTunnelPriorityInUse","message":"Another IPsec tunnel of this IPsec connection already has this priority"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@80"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.vpn.TunnelCreation\nresult = client.post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel\",\n\ttargetSpec = None, # Desired specification of the IPsec tunnel to create (type: publicCloud.vpn.TunnelTargetSpec)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.vpn.TunnelCreation\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel\", array(\n\ttargetSpec => null, // Desired specification of the IPsec tunnel to create (type: publicCloud.vpn.TunnelTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/create","required":true}]}},"/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}":{"delete":{"operationId":"deleteVpnTunnel","summary":"Delete an IPsec tunnel","description":"Deletes the IPsec tunnel and tears it down. Refused while the VPN gateway of the connection is being created, updated or deleted: retry once it is READY or ERROR. Deletion is asynchronous: the tunnel stays listed with resourceStatus DELETING until it is gone.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"tunnelId","description":"Tunnel ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}},"Client::NotFound::VpnTunnelDoesNotExist":{"value":{"class":"Client::NotFound::VpnTunnelDoesNotExist","message":"IPsec tunnel not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::ResourceAlreadyBeingDeleted":{"value":{"class":"Client::Conflict::ResourceAlreadyBeingDeleted","message":"Resource is already being deleted"}},"Client::Conflict::ResourceInInvalidState":{"value":{"class":"Client::Conflict::ResourceInInvalidState","message":"Resource cannot be modified in its current state"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@90"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/delete","required":true}]},"get":{"operationId":"getVpnTunnel","summary":"Get an IPsec tunnel","description":"Returns the IPsec tunnel and its observed state. `currentState.preSharedKey` holds the key in clear text only for a caller with the optional `vpn/gateway/connection/tunnel/preSharedKey/get` IAM action. It is null otherwise.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"tunnelId","description":"Tunnel ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}},"Client::NotFound::VpnTunnelDoesNotExist":{"value":{"class":"Client::NotFound::VpnTunnelDoesNotExist","message":"IPsec tunnel not found"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@70"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/get","required":true},{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/preSharedKey/get","description":"Required to read `currentState.preSharedKey`. Without it, the key is null.","required":false}],"x-response-identifier":"id"},"put":{"operationId":"editVpnTunnel","summary":"Update an IPsec tunnel","description":"The target specification replaces the previous one as a whole: peer, priority, enabled, dpd, mtu and initiator must be sent, and bgp too when the connection routingMode is BGP. A description left null is removed, and a localId left null goes back to the public address of the VPN gateway. Send the checksum of the last GET to reject the update with a checksum mismatch when someone changed the resource in between. The pre-shared key is the exception: null keeps the current one. The tunnel is configured again with the new settings. Refused while the VPN gateway of the connection is being created, updated or deleted: retry once it is READY or ERROR. The update is asynchronous: follow resourceStatus and currentTasks.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"tunnelId","description":"Tunnel ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.TunnelUpdate"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}},"Client::NotFound::VpnIkePolicyDoesNotExist":{"value":{"class":"Client::NotFound::VpnIkePolicyDoesNotExist","message":"IKE policy not found"}},"Client::NotFound::VpnIpsecPolicyDoesNotExist":{"value":{"class":"Client::NotFound::VpnIpsecPolicyDoesNotExist","message":"IPsec policy not found"}},"Client::NotFound::VpnTunnelDoesNotExist":{"value":{"class":"Client::NotFound::VpnTunnelDoesNotExist","message":"IPsec tunnel not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::ChecksumMismatch":{"value":{"class":"Client::Conflict::ChecksumMismatch","message":"Checksum mismatch — a concurrent update was detected. Refresh the resource and retry"}},"Client::Conflict::ResourceInInvalidState":{"value":{"class":"Client::Conflict::ResourceInInvalidState","message":"Resource cannot be modified in its current state"}},"Client::Conflict::VpnGatewayHasNoExternalAddress":{"value":{"class":"Client::Conflict::VpnGatewayHasNoExternalAddress","message":"The VPN gateway has no public address of the same IP version (IPv4 or IPv6) as the peer address"}},"Client::Conflict::VpnTunnelPriorityInUse":{"value":{"class":"Client::Conflict::VpnTunnelPriorityInUse","message":"Another IPsec tunnel of this IPsec connection already has this priority"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections@@@100"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.vpn.TunnelUpdate\nresult = client.put(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\",\n\tchecksum = None, # Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)\n\ttargetSpec = None, # Desired specification of the IPsec tunnel. It replaces the previous one as a whole. (type: publicCloud.vpn.TunnelUpdateTargetSpec)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.vpn.TunnelUpdate\n$result = $ovh->put(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}\", array(\n\tchecksum => null, // Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)\n\ttargetSpec => null, // Desired specification of the IPsec tunnel. It replaces the previous one as a whole. (type: publicCloud.vpn.TunnelUpdateTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/edit","required":true}]}},"/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}/action":{"post":{"operationId":"postVpnTunnelAction","summary":"Run an action on an IPsec tunnel","description":"Runs an action on the IPsec tunnel. The only action is `REGENERATE_PRE_SHARED_KEY`. It gives the tunnel a new random pre-shared key. Read it in `currentState.preSharedKey` of the tunnel GET, and configure it on the remote device. The tunnel stays down until both ends use the new key. Refused while the VPN gateway of the connection or the tunnel is being created, updated or deleted. The action is asynchronous: follow `resourceStatus` and `currentTasks`.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"connectionId","description":"Connection ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"gatewayId","description":"Gateway ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"tunnelId","description":"Tunnel ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.TunnelActionRequest"},"examples":{"Regenerate the pre-shared key":{"value":{"checksum":"9f2c4e6a8b0d","type":"REGENERATE_PRE_SHARED_KEY"},"summary":"Replace the pre-shared key of the tunnel with a random one"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.vpn.Tunnel"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::VpnConnectionDoesNotExist":{"value":{"class":"Client::NotFound::VpnConnectionDoesNotExist","message":"IPsec connection not found"}},"Client::NotFound::VpnGatewayDoesNotExist":{"value":{"class":"Client::NotFound::VpnGatewayDoesNotExist","message":"VPN gateway not found"}},"Client::NotFound::VpnTunnelDoesNotExist":{"value":{"class":"Client::NotFound::VpnTunnelDoesNotExist","message":"IPsec tunnel not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::ChecksumMismatch":{"value":{"class":"Client::Conflict::ChecksumMismatch","message":"Checksum mismatch — a concurrent update was detected. Refresh the resource and retry"}},"Client::Conflict::RegionInMaintenance":{"value":{"class":"Client::Conflict::RegionInMaintenance","message":"This region is currently in maintenance"}},"Client::Conflict::ResourceInInvalidState":{"value":{"class":"Client::Conflict::ResourceInInvalidState","message":"Resource cannot be modified in its current state"}}}}}}},"tags":["Network"],"x-developer-hub-navigation":[["Public Cloud","Network","Site-to-Site VPN","IPsec connections"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.vpn.TunnelActionRequest\nresult = client.post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}/action\",\n\tchecksum = None, # Checksum of the last GET. When given, the action is rejected with a checksum mismatch if the tunnel changed in between. When null or empty, the check is skipped. (type: string, nullable)\n\ttype = None, # Action to run (type: publicCloud.vpn.TunnelActionTypeEnum)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.vpn.TunnelActionRequest\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/vpn/gateway/{gatewayId}/connection/{connectionId}/tunnel/{tunnelId}/action\", array(\n\tchecksum => null, // Checksum of the last GET. When given, the action is rejected with a checksum mismatch if the tunnel changed in between. When null or empty, the check is skipped. (type: string, nullable)\n\ttype => null, // Action to run (type: publicCloud.vpn.TunnelActionTypeEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:vpn/gateway/connection/tunnel/runAction","required":true}]}}},"tags":[{"name":"Network","x-tag-expanded":false,"description":"Missing description"}]}
