Skip to content

IPsec policies

All operations require authentication.

5 operationsv2/publicCloud/project
View as Markdown (opens in a new tab)
Agent setup

List IPsec policiesAlpha

GET
/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy

Returns the IPsec policies of the project, in every region.

Path parameters

projectId
required
string

Project ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200IpsecPolicy[]successful operation
checksum
read-only
string

Hash of the current target specification. Send it back in the update payload to detect concurrent changes.

createdAt
read-only
stringdate-time

Date and time the IPsec policy was created

currentState
read-only
IpsecPolicyCurrentState

Observed state of the IPsec policy. Null while the IPsec policy is being created.

currentTasks
read-only
CurrentTask[]

Asynchronous operations ongoing on the IPsec policy

id
read-only
stringuuid

Unique identifier of the IPsec policy

resourceStatus
read-only
ResourceStatusEnum

Readiness of the IPsec policy: whether its observed state has converged to its target specification

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
IpsecPolicyTargetSpec

Last target specification requested for the IPsec policy

updatedAt
read-only
stringdate-time

Date and time the IPsec policy was last updated

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "updatedAt": "2024-01-01T12:00:00Z" }]

Create an IPsec policyAlpha

POST
/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy

Creates an IPsec policy: a set of IPsec (phase 2) algorithms used by the IPsec tunnels that reference it in their targetSpec.ipsec. Several IPsec tunnels can share one policy, provided their VPN gateways are in the region of the policy. The policy uses ESP in tunnel mode. Creation applies immediately: the response already holds the result.

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
IpsecPolicyTargetSpec

Desired specification of the IPsec policy to create

Response

200IpsecPolicysuccessful operation
checksum
read-only
string

Hash of the current target specification. Send it back in the update payload to detect concurrent changes.

createdAt
read-only
stringdate-time

Date and time the IPsec policy was created

currentState
read-only
IpsecPolicyCurrentState

Observed state of the IPsec policy. Null while the IPsec policy is being created.

currentTasks
read-only
CurrentTask[]

Asynchronous operations ongoing on the IPsec policy

id
read-only
stringuuid

Unique identifier of the IPsec policy

resourceStatus
read-only
ResourceStatusEnum

Readiness of the IPsec policy: whether its observed state has converged to its target specification

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
IpsecPolicyTargetSpec

Last target specification requested for the IPsec policy

updatedAt
read-only
stringdate-time

Date and time the IPsec policy was last updated

400objectError 400 response
403objectError 403 response
409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "updatedAt": "2024-01-01T12:00:00Z"}

Get an IPsec policyAlpha

GET
/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId}

Returns the IPsec policy and its observed state.

Path parameters

ipsecPolicyId
required
stringuuid

Ipsec policy ID

projectId
required
string

Project ID

Response

200IpsecPolicysuccessful operation
checksum
read-only
string

Hash of the current target specification. Send it back in the update payload to detect concurrent changes.

createdAt
read-only
stringdate-time

Date and time the IPsec policy was created

currentState
read-only
IpsecPolicyCurrentState

Observed state of the IPsec policy. Null while the IPsec policy is being created.

currentTasks
read-only
CurrentTask[]

Asynchronous operations ongoing on the IPsec policy

id
read-only
stringuuid

Unique identifier of the IPsec policy

resourceStatus
read-only
ResourceStatusEnum

Readiness of the IPsec policy: whether its observed state has converged to its target specification

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
IpsecPolicyTargetSpec

Last target specification requested for the IPsec policy

updatedAt
read-only
stringdate-time

Date and time the IPsec policy was last updated

404objectError 404 response

Example uses ipsecPolicyId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "updatedAt": "2024-01-01T12:00:00Z"}

Update an IPsec policyAlpha

PUT
/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId}

The target specification replaces the previous one as a whole: every algorithm and the lifetime must be sent, and a description left null is removed. Send the checksum of the last GET to reject the update with a checksum mismatch when someone changed the resource in between. Changing the algorithms does not renegotiate the IPsec tunnels already using the policy: each one takes them the next time it is configured, for example on its next update. The update applies immediately: the response already holds the result.

Path parameters

ipsecPolicyId
required
stringuuid

Ipsec policy ID

projectId
required
string

Project ID

Request body (required)

checksum
string

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).

targetSpec
required
IpsecPolicyUpdateTargetSpec

Desired specification of the IPsec policy. It replaces the previous one as a whole.

Response

200IpsecPolicysuccessful operation
checksum
read-only
string

Hash of the current target specification. Send it back in the update payload to detect concurrent changes.

createdAt
read-only
stringdate-time

Date and time the IPsec policy was created

currentState
read-only
IpsecPolicyCurrentState

Observed state of the IPsec policy. Null while the IPsec policy is being created.

currentTasks
read-only
CurrentTask[]

Asynchronous operations ongoing on the IPsec policy

id
read-only
stringuuid

Unique identifier of the IPsec policy

resourceStatus
read-only
ResourceStatusEnum

Readiness of the IPsec policy: whether its observed state has converged to its target specification

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
IpsecPolicyTargetSpec

Last target specification requested for the IPsec policy

updatedAt
read-only
stringdate-time

Date and time the IPsec policy was last updated

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses ipsecPolicyId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete an IPsec policyAlpha

DELETE
/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId}

Deletes the IPsec policy. It is refused while an IPsec tunnel uses it. Deletion applies immediately: the response already holds the result.

Path parameters

ipsecPolicyId
required
stringuuid

Ipsec policy ID

projectId
required
string

Project ID

Response

200IpsecPolicysuccessful operation
checksum
read-only
string

Hash of the current target specification. Send it back in the update payload to detect concurrent changes.

createdAt
read-only
stringdate-time

Date and time the IPsec policy was created

currentState
read-only
IpsecPolicyCurrentState

Observed state of the IPsec policy. Null while the IPsec policy is being created.

currentTasks
read-only
CurrentTask[]

Asynchronous operations ongoing on the IPsec policy

id
read-only
stringuuid

Unique identifier of the IPsec policy

resourceStatus
read-only
ResourceStatusEnum

Readiness of the IPsec policy: whether its observed state has converged to its target specification

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
IpsecPolicyTargetSpec

Last target specification requested for the IPsec policy

updatedAt
read-only
stringdate-time

Date and time the IPsec policy was last updated

404objectError 404 response
409objectError 409 response

Example uses ipsecPolicyId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/ipsecPolicy/{ipsecPolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "authAlgorithm": "SHA256", "description": "string", "encryptionAlgorithm": "AES_128", "lifetime": 0, "location": { "region": "string" }, "name": "string", "pfs": "GROUP14" }, "updatedAt": "2024-01-01T12:00:00Z"}