# Public Cloud › Network › Private Endpoints API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/network/private-endpoints.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/network/private-endpoints.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/privateEndpoint` — List private endpoints
- `GET /publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}` — Get a private endpoint
- `POST /publicCloud/project/{projectId}/privateEndpoint` — Create a private endpoint
- `DELETE /publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}` — Delete a private endpoint
- `PUT /publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}` — Update a private endpoint

## List private endpoints

`GET /v2/publicCloud/project/{projectId}/privateEndpoint`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/#getPrivateEndpoints

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:privateEndpoint/get`

Returns the private endpoints of the project.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.privateEndpoint.PrivateEndpoint[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the private endpoint |
| `currentState` | publicCloud.privateEndpoint.PrivateEndpointCurrentState | read-only | Current state of the private endpoint |
| `currentState.description` | string | read-only | Private endpoint description |
| `currentState.endpointId` | string | read-only | Identifier of the endpoint on the service side, as pe-<id>. It is the value the service names the endpoint by. |
| `currentState.hostname` | string | read-only | Public DNS name of the endpoint. Null until the service publishes it. |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Private endpoint name |
| `currentState.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef | read-only | Network the endpoint port is attached to |
| `currentState.network.id` | string (uuid) | yes | Identifier of the network |
| `currentState.publicDnsEnabled` | boolean | read-only | Whether the endpoint hostname is registered in the public DNS zone |
| `currentState.service` | publicCloud.privateEndpoint.PrivateEndpointServiceDetail | read-only | Service exposed through the endpoint |
| `currentState.service.bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `currentState.service.name` | string | read-only | Name of the service |
| `currentState.service.port` | integer | read-only | Port the service listens on through the endpoint |
| `currentState.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier of the service — one of `L`, `M`, `S` |
| `currentState.service.transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |
| `currentState.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef | read-only | Subnet the endpoint port is attached to |
| `currentState.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `currentState.vipAddress` | ip | read-only | Private IP address of the endpoint in the customer network |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the private endpoint |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the private endpoint |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Private endpoint readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | read-only | Last target specification of the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the private endpoint |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "description": "string",
      "endpointId": "string",
      "hostname": "string",
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "network": {
        "id": "00000000-0000-0000-0000-000000000000"
      },
      "publicDnsEnabled": true,
      "service": {
        "bandwidth": 0,
        "name": "string",
        "port": 0,
        "tier": "L",
        "transport": "TCP"
      },
      "subnet": {
        "id": "00000000-0000-0000-0000-000000000000"
      },
      "vipAddress": "192.0.2.0"
    },
    "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": {
      "description": "string",
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "network": {
        "id": "00000000-0000-0000-0000-000000000000"
      },
      "publicDnsEnabled": true,
      "service": {
        "name": "string",
        "tier": "L"
      },
      "subnet": {
        "id": "00000000-0000-0000-0000-000000000000"
      },
      "vipAddress": "192.0.2.0"
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/privateEndpoint" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/privateEndpoint")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/privateEndpoint");

print_r($result);
?>
```

## Get a private endpoint

`GET /v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/#getPrivateEndpoint

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:privateEndpoint/get`

Returns the private endpoint, including its VIP address and public hostname.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `privateEndpointId` | path | string (uuid) | yes | Private endpoint ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.privateEndpoint.PrivateEndpoint | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the private endpoint |
| `currentState` | publicCloud.privateEndpoint.PrivateEndpointCurrentState | read-only | Current state of the private endpoint |
| `currentState.description` | string | read-only | Private endpoint description |
| `currentState.endpointId` | string | read-only | Identifier of the endpoint on the service side, as pe-<id>. It is the value the service names the endpoint by. |
| `currentState.hostname` | string | read-only | Public DNS name of the endpoint. Null until the service publishes it. |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Private endpoint name |
| `currentState.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef | read-only | Network the endpoint port is attached to |
| `currentState.network.id` | string (uuid) | yes | Identifier of the network |
| `currentState.publicDnsEnabled` | boolean | read-only | Whether the endpoint hostname is registered in the public DNS zone |
| `currentState.service` | publicCloud.privateEndpoint.PrivateEndpointServiceDetail | read-only | Service exposed through the endpoint |
| `currentState.service.bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `currentState.service.name` | string | read-only | Name of the service |
| `currentState.service.port` | integer | read-only | Port the service listens on through the endpoint |
| `currentState.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier of the service — one of `L`, `M`, `S` |
| `currentState.service.transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |
| `currentState.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef | read-only | Subnet the endpoint port is attached to |
| `currentState.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `currentState.vipAddress` | ip | read-only | Private IP address of the endpoint in the customer network |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the private endpoint |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the private endpoint |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Private endpoint readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | read-only | Last target specification of the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the private endpoint |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "endpointId": "string",
    "hostname": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "bandwidth": 0,
      "name": "string",
      "port": 0,
      "tier": "L",
      "transport": "TCP"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "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": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "name": "string",
      "tier": "L"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}");

print_r($result);
?>
```

## Create a private endpoint

`POST /v2/publicCloud/project/{projectId}/privateEndpoint`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/#createPrivateEndpoint

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:privateEndpoint/create`

Creates a private endpoint to a service in a network or subnet. A project can have only one private endpoint per service and subnet.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.privateEndpoint.PrivateEndpointCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | yes | Desired target specification for the private endpoint to create |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |

```json
{
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "name": "string",
      "tier": "L"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.privateEndpoint.PrivateEndpoint | successful operation |
| 400 | object | Error 400 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the private endpoint |
| `currentState` | publicCloud.privateEndpoint.PrivateEndpointCurrentState | read-only | Current state of the private endpoint |
| `currentState.description` | string | read-only | Private endpoint description |
| `currentState.endpointId` | string | read-only | Identifier of the endpoint on the service side, as pe-<id>. It is the value the service names the endpoint by. |
| `currentState.hostname` | string | read-only | Public DNS name of the endpoint. Null until the service publishes it. |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Private endpoint name |
| `currentState.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef | read-only | Network the endpoint port is attached to |
| `currentState.network.id` | string (uuid) | yes | Identifier of the network |
| `currentState.publicDnsEnabled` | boolean | read-only | Whether the endpoint hostname is registered in the public DNS zone |
| `currentState.service` | publicCloud.privateEndpoint.PrivateEndpointServiceDetail | read-only | Service exposed through the endpoint |
| `currentState.service.bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `currentState.service.name` | string | read-only | Name of the service |
| `currentState.service.port` | integer | read-only | Port the service listens on through the endpoint |
| `currentState.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier of the service — one of `L`, `M`, `S` |
| `currentState.service.transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |
| `currentState.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef | read-only | Subnet the endpoint port is attached to |
| `currentState.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `currentState.vipAddress` | ip | read-only | Private IP address of the endpoint in the customer network |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the private endpoint |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the private endpoint |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Private endpoint readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | read-only | Last target specification of the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the private endpoint |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "endpointId": "string",
    "hostname": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "bandwidth": 0,
      "name": "string",
      "port": 0,
      "tier": "L",
      "transport": "TCP"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "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": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "name": "string",
      "tier": "L"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/privateEndpoint" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.privateEndpoint.PrivateEndpointCreation
result = client.post("/v2/publicCloud/project/{projectId}/privateEndpoint",
	targetSpec = None, # Desired target specification for the private endpoint to create (type: publicCloud.privateEndpoint.PrivateEndpointTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.privateEndpoint.PrivateEndpointCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/privateEndpoint", array(
	targetSpec => null, // Desired target specification for the private endpoint to create (type: publicCloud.privateEndpoint.PrivateEndpointTargetSpec)
));

print_r($result);
?>
```

## Delete a private endpoint

`DELETE /v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/#deletePrivateEndpoint

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:privateEndpoint/delete`

Deletes the private endpoint.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `privateEndpointId` | path | string (uuid) | yes | Private endpoint ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.privateEndpoint.PrivateEndpoint | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the private endpoint |
| `currentState` | publicCloud.privateEndpoint.PrivateEndpointCurrentState | read-only | Current state of the private endpoint |
| `currentState.description` | string | read-only | Private endpoint description |
| `currentState.endpointId` | string | read-only | Identifier of the endpoint on the service side, as pe-<id>. It is the value the service names the endpoint by. |
| `currentState.hostname` | string | read-only | Public DNS name of the endpoint. Null until the service publishes it. |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Private endpoint name |
| `currentState.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef | read-only | Network the endpoint port is attached to |
| `currentState.network.id` | string (uuid) | yes | Identifier of the network |
| `currentState.publicDnsEnabled` | boolean | read-only | Whether the endpoint hostname is registered in the public DNS zone |
| `currentState.service` | publicCloud.privateEndpoint.PrivateEndpointServiceDetail | read-only | Service exposed through the endpoint |
| `currentState.service.bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `currentState.service.name` | string | read-only | Name of the service |
| `currentState.service.port` | integer | read-only | Port the service listens on through the endpoint |
| `currentState.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier of the service — one of `L`, `M`, `S` |
| `currentState.service.transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |
| `currentState.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef | read-only | Subnet the endpoint port is attached to |
| `currentState.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `currentState.vipAddress` | ip | read-only | Private IP address of the endpoint in the customer network |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the private endpoint |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the private endpoint |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Private endpoint readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | read-only | Last target specification of the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the private endpoint |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "endpointId": "string",
    "hostname": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "bandwidth": 0,
      "name": "string",
      "port": 0,
      "tier": "L",
      "transport": "TCP"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "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": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "name": "string",
      "tier": "L"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}");

print_r($result);
?>
```

## Update a private endpoint

`PUT /v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/private-endpoints/#editPrivateEndpoint

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:privateEndpoint/edit`

Updates the private endpoint's name or description. Its network, subnet, service and public DNS setting are immutable after creation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `privateEndpointId` | path | string (uuid) | yes | Private endpoint ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.privateEndpoint.PrivateEndpointUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `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` | publicCloud.privateEndpoint.PrivateEndpointUpdateTargetSpec | yes | Desired target specification for the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |

```json
{
  "checksum": "string",
  "targetSpec": {
    "description": "string",
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.privateEndpoint.PrivateEndpoint | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the private endpoint |
| `currentState` | publicCloud.privateEndpoint.PrivateEndpointCurrentState | read-only | Current state of the private endpoint |
| `currentState.description` | string | read-only | Private endpoint description |
| `currentState.endpointId` | string | read-only | Identifier of the endpoint on the service side, as pe-<id>. It is the value the service names the endpoint by. |
| `currentState.hostname` | string | read-only | Public DNS name of the endpoint. Null until the service publishes it. |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Private endpoint name |
| `currentState.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef | read-only | Network the endpoint port is attached to |
| `currentState.network.id` | string (uuid) | yes | Identifier of the network |
| `currentState.publicDnsEnabled` | boolean | read-only | Whether the endpoint hostname is registered in the public DNS zone |
| `currentState.service` | publicCloud.privateEndpoint.PrivateEndpointServiceDetail | read-only | Service exposed through the endpoint |
| `currentState.service.bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `currentState.service.name` | string | read-only | Name of the service |
| `currentState.service.port` | integer | read-only | Port the service listens on through the endpoint |
| `currentState.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier of the service — one of `L`, `M`, `S` |
| `currentState.service.transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |
| `currentState.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef | read-only | Subnet the endpoint port is attached to |
| `currentState.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `currentState.vipAddress` | ip | read-only | Private IP address of the endpoint in the customer network |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the private endpoint |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the private endpoint |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Private endpoint readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.privateEndpoint.PrivateEndpointTargetSpec | read-only | Last target specification of the private endpoint |
| `targetSpec.description` | string |  | Private endpoint description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location. Only the region is used, availability zones are not supported. |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Private endpoint name, unique in the project for a given subnet (case-insensitive) |
| `targetSpec.network` | publicCloud.privateEndpoint.PrivateEndpointNetworkRef |  | Network to allocate the endpoint port in. Provide one of network or subnet. Whichever references are supplied must be mutually consistent (the given subnet must belong to this network) or the request is rejected, and any omitted reference is derived from those given. If network is the only reference, it must have exactly one IPv4 subnet. |
| `targetSpec.network.id` | string (uuid) | yes | Identifier of the network |
| `targetSpec.publicDnsEnabled` | boolean |  | Register the endpoint hostname in the public DNS zone. Immutable after creation. Defaults to false. |
| `targetSpec.service` | publicCloud.privateEndpoint.PrivateEndpointServiceRef | yes | Service to expose through the endpoint. A project can have only one private endpoint per service and subnet. |
| `targetSpec.service.name` | string | yes | Name of the service |
| `targetSpec.service.tier` | publicCloud.privateEndpoint.ServiceTierEnum | yes | Tier of the service, as listed in the service availability reference — one of `L`, `M`, `S` |
| `targetSpec.subnet` | publicCloud.privateEndpoint.PrivateEndpointSubnetRef |  | Subnet to allocate the endpoint port in. Provide one of network or subnet. The subnet must belong to the given network when both are supplied, otherwise the request is rejected. If subnet is the only reference, its parent network is used. Required when vipAddress is set. |
| `targetSpec.subnet.id` | string (uuid) | yes | Identifier of the subnet |
| `targetSpec.vipAddress` | ip |  | Optional private IP address to assign to the endpoint inside the subnet. It must belong to the subnet CIDR and to one of its allocation pools, must not be the subnet gateway address, and must not already be in use by another port. Setting it requires subnet to be set in the same request. When omitted, an address is picked automatically from the subnet allocation pool. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the private endpoint |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "endpointId": "string",
    "hostname": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "bandwidth": 0,
      "name": "string",
      "port": 0,
      "tier": "L",
      "transport": "TCP"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "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": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "publicDnsEnabled": true,
    "service": {
      "name": "string",
      "tier": "L"
    },
    "subnet": {
      "id": "00000000-0000-0000-0000-000000000000"
    },
    "vipAddress": "192.0.2.0"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.privateEndpoint.PrivateEndpointUpdate
result = client.put("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}",
	checksum = 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)
	targetSpec = None, # Desired target specification for the private endpoint (type: publicCloud.privateEndpoint.PrivateEndpointUpdateTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.privateEndpoint.PrivateEndpointUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/privateEndpoint/{privateEndpointId}", array(
	checksum => 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)
	targetSpec => null, // Desired target specification for the private endpoint (type: publicCloud.privateEndpoint.PrivateEndpointUpdateTargetSpec)
));

print_r($result);
?>
```
