# Private Cloud › Managed VMware › Managed VMware vSphere › Users API

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

> 16 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/private-cloud/managed-vmware/managed-vmware-vsphere/users/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/private-cloud/managed-vmware/managed-vmware-vsphere/users.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/private-cloud/managed-vmware/managed-vmware-vsphere/users.json?format=openapi3

## Operations

- `GET /dedicatedCloud/{serviceName}/user` — List users
- `GET /dedicatedCloud/{serviceName}/user/{userId}` — Get a user
- `GET /dedicatedCloud/{serviceName}/user/{userId}/objectRight` — List user object rights
- `GET /dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}` — Get a user object right
- `GET /dedicatedCloud/{serviceName}/user/{userId}/right` — List user datacenter rights
- `GET /dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}` — Get a user datacenter right
- `POST /dedicatedCloud/{serviceName}/user` — Create a user
- `POST /dedicatedCloud/{serviceName}/user/{userId}/changePassword` — Change a user password
- `POST /dedicatedCloud/{serviceName}/user/{userId}/changeProperties` — Update a user
- `POST /dedicatedCloud/{serviceName}/user/{userId}/confirmPhoneNumber` — Confirm a user phone number
- `POST /dedicatedCloud/{serviceName}/user/{userId}/disable` — Disable a user
- `POST /dedicatedCloud/{serviceName}/user/{userId}/enable` — Enable a user
- `POST /dedicatedCloud/{serviceName}/user/{userId}/objectRight` — Create a user object right
- `DELETE /dedicatedCloud/{serviceName}/user/{userId}` — Delete a user
- `DELETE /dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}` — Delete a user object right
- `PUT /dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}` — Update a user datacenter right

## List users

`GET /v1/dedicatedCloud/{serviceName}/user`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | query | string |  | Filter the value of name property (like) |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user" \
  -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("/dedicatedCloud/{serviceName}/user")

# 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("/dedicatedCloud/{serviceName}/user");

print_r($result);
?>
```

## Get a user

`GET /v1/dedicatedCloud/{serviceName}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user-userid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/get`

Get a user. Returns the user: login, contact details, activation state, permissions and identity provider.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activationState` | dedicatedCloud.user.ActivationStateEnum | read-only | Activation state of the user account — one of `disabled`, `disabling`, `enabled`, `enabling`, `toDisable`, `toEnable` |
| `activeDirectoryId` | integer | read-only | Deprecated - Linked Federation Active Directory (if any) |
| `activeDirectoryType` | dedicatedCloud.user.TypeEnum | read-only | Deprecated - Federation Active Directory User type (if any) — one of `group`, `user` |
| `canManageIpFailOvers` | boolean | read-only | Defines if the user can manage ip failovers |
| `canManageNetwork` | boolean | read-only | Defines if the user can manage the network |
| `canManageRights` | boolean | read-only | Defines if the user can manage users rights |
| `email` | string | read-only | Email address of the user |
| `encryptionRight` | boolean | read-only | Defines if the user can manage encryption / KMS configuration |
| `firstName` | string | read-only | First name of the user |
| `fullAdminRo` | boolean | read-only | Defines if the user is a full admin in readonly |
| `identityProviderId` | integer | read-only | Linked Identity Provider (if any), can be Federation Active Directory or IAM |
| `identityProviderType` | dedicatedCloud.user.IdentityProviderTypeEnum | read-only | Linked Identity Provider type (if any), can be Federation Active Directory or IAM — one of `federation`, `iam` |
| `isEnableManageable` | boolean | read-only | Check if the given VMware on OVHcloud user can be enabled or disabled ? |
| `isTokenValidator` | boolean | read-only | Defines if the user can confirm security tokens (if a compatible option is enabled) |
| `lastName` | string | read-only | Last name of the user |
| `login` | string | read-only | Login of the user |
| `name` | string | read-only | Name of the user |
| `nsxRight` | boolean | read-only | Is this User able to access nsx interface (requires NSX option) |
| `phoneNumber` | string | read-only | Mobile phone number of the user |
| `receiveAlerts` | boolean | read-only | Defines if the user receives technical alerts |
| `state` | dedicatedCloud.user.StateEnum | read-only | State of the user account — one of `creating`, `deleting`, `delivered`, `error` |
| `type` | dedicatedCloud.user.TypeEnum | read-only | User type (if any) — one of `group`, `user` |
| `userId` | integer | read-only |  |

```json
{
  "activationState": "disabled",
  "activeDirectoryId": 0,
  "activeDirectoryType": "group",
  "canManageIpFailOvers": true,
  "canManageNetwork": true,
  "canManageRights": true,
  "email": "string",
  "encryptionRight": true,
  "firstName": "string",
  "fullAdminRo": true,
  "identityProviderId": 0,
  "identityProviderType": "federation",
  "isEnableManageable": true,
  "isTokenValidator": true,
  "lastName": "string",
  "login": "string",
  "name": "string",
  "nsxRight": true,
  "phoneNumber": "string",
  "receiveAlerts": true,
  "state": "creating",
  "type": "group",
  "userId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}")

# 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("/dedicatedCloud/{serviceName}/user/{userId}");

print_r($result);
?>
```

## List user object rights

`GET /v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user-userid-objectright

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/objectRight/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight")

# 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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight");

print_r($result);
?>
```

## Get a user object right

`GET /v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user-userid-objectright-objectrightid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/objectRight/get`

Get a user object right. Returns the right of the user on a VMware object: object type, MoRef, access level and propagation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `objectRightId` | path | integer | yes |  |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.ObjectRight | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | read-only | Name of the object |
| `objectRightId` | integer | read-only |  |
| `propagate` | boolean | read-only | Right propagation on children objects |
| `right` | dedicatedCloud.right.RightEnum | read-only | User access on the VMware object — one of `admin`, `disabled`, `readonly`, `readwrite` |
| `type` | dedicatedCloud.right.UserObjectRightTypeEnum | read-only | Type of the object — one of `cluster`, `datastore`, `dvportgroup`, `folder`, `pool`, `vm` |
| `vmwareObjectId` | string | read-only | The VMware MoRef of the object |

```json
{
  "name": "string",
  "objectRightId": 0,
  "propagate": true,
  "right": "admin",
  "type": "cluster",
  "vmwareObjectId": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}")

# 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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}");

print_r($result);
?>
```

## List user datacenter rights

`GET /v1/dedicatedCloud/{serviceName}/user/{userId}/right`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user-userid-right

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/right/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/right" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}/right")

# 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("/dedicatedCloud/{serviceName}/user/{userId}/right");

print_r($result);
?>
```

## Get a user datacenter right

`GET /v1/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#get-dedicatedcloud-servicename-user-userid-right-rightid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/right/get`

Get a user datacenter right. Returns the access of the user on a datacenter: access level, network and VM network roles, and right to add resources.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `rightId` | path | integer | yes |  |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Right | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAddRessource` | boolean |  | Determine if the user can add ressources in your VMware on OVHcloud |
| `datacenterId` | integer | read-only |  |
| `networkRole` | dedicatedCloud.right.NetworkRoleEnum |  | Determine how this user can interact with the VMware on OVHcloud V(x)Lans — one of `admin`, `manager`, `noAccess`, `readonly` |
| `right` | dedicatedCloud.right.RightEnum |  | Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud — one of `admin`, `disabled`, `readonly`, `readwrite` |
| `rightId` | integer | read-only |  |
| `vmNetworkRole` | dedicatedCloud.right.VmNetworkRoleEnum |  | Determine how this user can interact with the VMware on OVHcloud VM Network — one of `admin`, `noAccess`, `readonly` |

```json
{
  "canAddRessource": true,
  "datacenterId": 0,
  "networkRole": "admin",
  "right": "admin",
  "rightId": 0,
  "vmNetworkRole": "admin"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}")

# 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("/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}");

print_r($result);
?>
```

## Create a user

`POST /v1/dedicatedCloud/{serviceName}/user`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/create`

Create a user. Creates a user. Its `right` applies to all datacenters and is disabled by default. Without a password, a random one is generated and sent by email.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAddRessource` | boolean |  | Is this User able to add ressources in the Datacenter he has access ? (default is no right to add ressource) |
| `canManageRights` | boolean |  | Is this user able to manage the users rights |
| `email` | string |  | The user email. If this field is empty, user informations will be sent to the dedicatedCloud administrator contact. |
| `encryptionRight` | boolean |  | Defines if the user can manage encryption / KMS configuration |
| `expirationDate` | string (date-time) |  | Date of removal of the user. |
| `firstName` | string |  | First name of the user |
| `lastName` | string |  | Last name of the user |
| `name` | string | yes | Name of the user (login) |
| `networkRole` | dedicatedCloud.right.NetworkRoleEnum |  | Determine how this user will be able to act on this VMware on OVHcloud v(x)Lans — one of `admin`, `manager`, `noAccess`, `readonly` |
| `nsxRight` | boolean |  | Is this User able to access nsx interface (requires NSX option) |
| `password` | string (password) |  | The user password. It must fits your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. |
| `phoneNumber` | string |  | Mobile phone number of the user |
| `receiveAlerts` | boolean |  | Defines if the user receives technical alerts |
| `right` | dedicatedCloud.right.RightEnum |  | Determine what kind of access the User will have in all Datacenters of your VMware on OVHcloud (default is disabled) — one of `admin`, `disabled`, `readonly`, `readwrite` |
| `tokenValidator` | boolean |  | Defines if the user can confirm security tokens (if a compatible option is enabled) |
| `vmNetworkRole` | dedicatedCloud.right.VmNetworkRoleEnum |  | Determine how this user will be able to act on this VMware on OVHcloud VM Network — one of `admin`, `noAccess`, `readonly` |

```json
{
  "canAddRessource": true,
  "canManageRights": true,
  "email": "string",
  "encryptionRight": true,
  "expirationDate": "2024-01-01T12:00:00Z",
  "firstName": "string",
  "lastName": "string",
  "name": "string",
  "networkRole": "admin",
  "nsxRight": true,
  "password": "string",
  "phoneNumber": "string",
  "receiveAlerts": true,
  "right": "admin",
  "tokenValidator": true,
  "vmNetworkRole": "admin"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user" \
  -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
)

result = client.post("/dedicatedCloud/{serviceName}/user",
	canAddRessource = None, # Is this User able to add ressources in the Datacenter he has access ? (default is no right to add ressource) (type: boolean, nullable)
	canManageRights = None, # Is this user able to manage the users rights (type: boolean, nullable)
	email = None, # The user email. If this field is empty, user informations will be sent to the dedicatedCloud administrator contact. (type: string, nullable)
	encryptionRight = None, # Defines if the user can manage encryption / KMS configuration (type: boolean, nullable)
	expirationDate = None, # Date of removal of the user. (type: datetime, nullable)
	firstName = None, # First name of the user (type: string, nullable)
	lastName = None, # Last name of the user (type: string, nullable)
	name = None, # Name of the user (login) (type: string)
	networkRole = None, # Determine how this user will be able to act on this VMware on OVHcloud v(x)Lans (type: dedicatedCloud.right.NetworkRoleEnum, nullable)
	nsxRight = None, # Is this User able to access nsx interface (requires NSX option) (type: boolean, nullable)
	password = None, # The user password. It must fits your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. (type: password, nullable)
	phoneNumber = None, # Mobile phone number of the user (type: string, nullable)
	receiveAlerts = None, # Defines if the user receives technical alerts (type: boolean, nullable)
	right = None, # Determine what kind of access the User will have in all Datacenters of your VMware on OVHcloud (default is disabled) (type: dedicatedCloud.right.RightEnum, nullable)
	tokenValidator = None, # Defines if the user can confirm security tokens (if a compatible option is enabled) (type: boolean, nullable)
	vmNetworkRole = None, # Determine how this user will be able to act on this VMware on OVHcloud VM Network (type: dedicatedCloud.right.VmNetworkRoleEnum, nullable)
)

# 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->post("/dedicatedCloud/{serviceName}/user", array(
	canAddRessource => null, // Is this User able to add ressources in the Datacenter he has access ? (default is no right to add ressource) (type: boolean, nullable)
	canManageRights => null, // Is this user able to manage the users rights (type: boolean, nullable)
	email => null, // The user email. If this field is empty, user informations will be sent to the dedicatedCloud administrator contact. (type: string, nullable)
	encryptionRight => null, // Defines if the user can manage encryption / KMS configuration (type: boolean, nullable)
	expirationDate => null, // Date of removal of the user. (type: datetime, nullable)
	firstName => null, // First name of the user (type: string, nullable)
	lastName => null, // Last name of the user (type: string, nullable)
	name => null, // Name of the user (login) (type: string)
	networkRole => null, // Determine how this user will be able to act on this VMware on OVHcloud v(x)Lans (type: dedicatedCloud.right.NetworkRoleEnum, nullable)
	nsxRight => null, // Is this User able to access nsx interface (requires NSX option) (type: boolean, nullable)
	password => null, // The user password. It must fits your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. (type: password, nullable)
	phoneNumber => null, // Mobile phone number of the user (type: string, nullable)
	receiveAlerts => null, // Defines if the user receives technical alerts (type: boolean, nullable)
	right => null, // Determine what kind of access the User will have in all Datacenters of your VMware on OVHcloud (default is disabled) (type: dedicatedCloud.right.RightEnum, nullable)
	tokenValidator => null, // Defines if the user can confirm security tokens (if a compatible option is enabled) (type: boolean, nullable)
	vmNetworkRole => null, // Determine how this user will be able to act on this VMware on OVHcloud VM Network (type: dedicatedCloud.right.VmNetworkRoleEnum, nullable)
));

print_r($result);
?>
```

## Change a user password

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-changepassword

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/changePassword`

Change a user password. Sets a new password that follows the password policy. Without a password, a random one is generated and sent by email. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) |  | New password for this VMware on OVHcloud user. It must fit your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. |

```json
{
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/changePassword" \
  -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: password
result = client.post("/dedicatedCloud/{serviceName}/user/{userId}/changePassword",
	password = None, # New password for this VMware on OVHcloud user. It must fit your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. (type: password, nullable)
)

# 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: password
$result = $ovh->post("/dedicatedCloud/{serviceName}/user/{userId}/changePassword", array(
	password => null, // New password for this VMware on OVHcloud user. It must fit your VMware on OVHcloud password policy. If this field is empty, a random password will be generated and sent by email. (type: password, nullable)
));

print_r($result);
?>
```

## Update a user

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/changeProperties`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-changeproperties

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/changeProperties`

Update a user. Updates the name, email address, phone number and permissions of the user. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canManageIpFailOvers` | boolean |  | Defines if the user can manage ip failovers |
| `canManageNetwork` | boolean |  | Defines if the user can manage the network |
| `canManageRights` | boolean |  | Defines if the user can manage the users rights |
| `email` | string |  | Email address of the user |
| `encryptionRight` | boolean |  | Defines if the user can manage encryption / KMS configuration |
| `firstName` | string |  | First name of the user |
| `fullAdminRo` | boolean |  | Defines if the user is a full admin in readonly |
| `lastName` | string |  | Last name of the user |
| `nsxRight` | boolean |  | Is this User able to access nsx interface (requires NSX option) |
| `phoneNumber` | string |  | Mobile phone number of the user in international format (+prefix.number) |
| `receiveAlerts` | boolean |  | Defines if the user receives technical alerts |
| `tokenValidator` | boolean |  | Defines if the user can confirm security tokens (if a compatible option is enabled) |

```json
{
  "canManageIpFailOvers": true,
  "canManageNetwork": true,
  "canManageRights": true,
  "email": "string",
  "encryptionRight": true,
  "firstName": "string",
  "fullAdminRo": true,
  "lastName": "string",
  "nsxRight": true,
  "phoneNumber": "string",
  "receiveAlerts": true,
  "tokenValidator": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/changeProperties" \
  -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
)

result = client.post("/dedicatedCloud/{serviceName}/user/{userId}/changeProperties",
	canManageIpFailOvers = None, # Defines if the user can manage ip failovers (type: boolean, nullable)
	canManageNetwork = None, # Defines if the user can manage the network (type: boolean, nullable)
	canManageRights = None, # Defines if the user can manage the users rights (type: boolean, nullable)
	email = None, # Email address of the user (type: string, nullable)
	encryptionRight = None, # Defines if the user can manage encryption / KMS configuration (type: boolean, nullable)
	firstName = None, # First name of the user (type: string, nullable)
	fullAdminRo = None, # Defines if the user is a full admin in readonly (type: boolean, nullable)
	lastName = None, # Last name of the user (type: string, nullable)
	nsxRight = None, # Is this User able to access nsx interface (requires NSX option) (type: boolean, nullable)
	phoneNumber = None, # Mobile phone number of the user in international format (+prefix.number) (type: string, nullable)
	receiveAlerts = None, # Defines if the user receives technical alerts (type: boolean, nullable)
	tokenValidator = None, # Defines if the user can confirm security tokens (if a compatible option is enabled) (type: boolean, nullable)
)

# 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->post("/dedicatedCloud/{serviceName}/user/{userId}/changeProperties", array(
	canManageIpFailOvers => null, // Defines if the user can manage ip failovers (type: boolean, nullable)
	canManageNetwork => null, // Defines if the user can manage the network (type: boolean, nullable)
	canManageRights => null, // Defines if the user can manage the users rights (type: boolean, nullable)
	email => null, // Email address of the user (type: string, nullable)
	encryptionRight => null, // Defines if the user can manage encryption / KMS configuration (type: boolean, nullable)
	firstName => null, // First name of the user (type: string, nullable)
	fullAdminRo => null, // Defines if the user is a full admin in readonly (type: boolean, nullable)
	lastName => null, // Last name of the user (type: string, nullable)
	nsxRight => null, // Is this User able to access nsx interface (requires NSX option) (type: boolean, nullable)
	phoneNumber => null, // Mobile phone number of the user in international format (+prefix.number) (type: string, nullable)
	receiveAlerts => null, // Defines if the user receives technical alerts (type: boolean, nullable)
	tokenValidator => null, // Defines if the user can confirm security tokens (if a compatible option is enabled) (type: boolean, nullable)
));

print_r($result);
?>
```

## Confirm a user phone number

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/confirmPhoneNumber`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-confirmphonenumber

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/confirmPhoneNumber`

Confirm a user phone number. Confirms the phone number with the token sent by SMS. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string (password) | yes | Token sent by SMS |

```json
{
  "token": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/confirmPhoneNumber" \
  -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: password
result = client.post("/dedicatedCloud/{serviceName}/user/{userId}/confirmPhoneNumber",
	token = None, # Token sent by SMS (type: password)
)

# 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: password
$result = $ovh->post("/dedicatedCloud/{serviceName}/user/{userId}/confirmPhoneNumber", array(
	token => null, // Token sent by SMS (type: password)
));

print_r($result);
?>
```

## Disable a user

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/disable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-disable

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/disable`

Disable a user. Disables the user account. Check `isEnableManageable` on the user first. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/disable" \
  -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.post("/dedicatedCloud/{serviceName}/user/{userId}/disable")

# 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->post("/dedicatedCloud/{serviceName}/user/{userId}/disable");

print_r($result);
?>
```

## Enable a user

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/enable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-enable

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/enable`

Enable a user. Enables the user account. Check `isEnableManageable` on the user first. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/enable" \
  -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.post("/dedicatedCloud/{serviceName}/user/{userId}/enable")

# 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->post("/dedicatedCloud/{serviceName}/user/{userId}/enable");

print_r($result);
?>
```

## Create a user object right

`POST /v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#post-dedicatedcloud-servicename-user-userid-objectright

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/objectRight/create`

Create a user object right. Gives the user a right on a VMware object, given by its MoRef: cluster, datastore, portgroup, folder, pool or virtual machine. The right can propagate to child objects. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `propagate` | boolean |  | Right propagation on children objects |
| `right` | dedicatedCloud.right.RightEnum | yes | User access on the VMware object — one of `admin`, `disabled`, `readonly`, `readwrite` |
| `type` | dedicatedCloud.right.UserObjectRightTypeEnum | yes | Type of the object — one of `cluster`, `datastore`, `dvportgroup`, `folder`, `pool`, `vm` |
| `vmwareObjectId` | string | yes | The VMware MoRef of the object |

```json
{
  "propagate": true,
  "right": "admin",
  "type": "cluster",
  "vmwareObjectId": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight" \
  -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
)

result = client.post("/dedicatedCloud/{serviceName}/user/{userId}/objectRight",
	propagate = None, # Right propagation on children objects (type: boolean, nullable)
	right = None, # User access on the VMware object (type: dedicatedCloud.right.RightEnum)
	type = None, # Type of the object (type: dedicatedCloud.right.UserObjectRightTypeEnum)
	vmwareObjectId = None, # The VMware MoRef of the object (type: string)
)

# 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->post("/dedicatedCloud/{serviceName}/user/{userId}/objectRight", array(
	propagate => null, // Right propagation on children objects (type: boolean, nullable)
	right => null, // User access on the VMware object (type: dedicatedCloud.right.RightEnum)
	type => null, // Type of the object (type: dedicatedCloud.right.UserObjectRightTypeEnum)
	vmwareObjectId => null, // The VMware MoRef of the object (type: string)
));

print_r($result);
?>
```

## Delete a user

`DELETE /v1/dedicatedCloud/{serviceName}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#delete-dedicatedcloud-servicename-user-userid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/delete`

Delete a user. Deletes the user. To block its access without deleting it, use `disable` instead. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}")

# 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("/dedicatedCloud/{serviceName}/user/{userId}");

print_r($result);
?>
```

## Delete a user object right

`DELETE /v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#delete-dedicatedcloud-servicename-user-userid-objectright-objectrightid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/objectRight/delete`

Delete a user object right. Removes the right of the user on the VMware object. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `objectRightId` | path | integer | yes |  |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}" \
  -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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}")

# 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("/dedicatedCloud/{serviceName}/user/{userId}/objectRight/{objectRightId}");

print_r($result);
?>
```

## Update a user datacenter right

`PUT /v1/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/users/#put-dedicatedcloud-servicename-user-userid-right-rightid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:user/right/edit`

Update a user datacenter right. Updates the access level, the network and VM network roles, and the right to add resources. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `rightId` | path | integer | yes |  |
| `serviceName` | path | string | yes | Domain of the service |
| `userId` | path | integer | yes |  |

### Request body (required)

Type: `dedicatedCloud.Right`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAddRessource` | boolean |  | Determine if the user can add ressources in your VMware on OVHcloud |
| `datacenterId` | integer | read-only |  |
| `networkRole` | dedicatedCloud.right.NetworkRoleEnum |  | Determine how this user can interact with the VMware on OVHcloud V(x)Lans — one of `admin`, `manager`, `noAccess`, `readonly` |
| `right` | dedicatedCloud.right.RightEnum |  | Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud — one of `admin`, `disabled`, `readonly`, `readwrite` |
| `rightId` | integer | read-only |  |
| `vmNetworkRole` | dedicatedCloud.right.VmNetworkRoleEnum |  | Determine how this user can interact with the VMware on OVHcloud VM Network — one of `admin`, `noAccess`, `readonly` |

```json
{
  "canAddRessource": true,
  "networkRole": "admin",
  "right": "admin",
  "vmNetworkRole": "admin"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v1/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}" \
  -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: dedicatedCloud.Right
result = client.put("/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}",
	canAddRessource = None, # Determine if the user can add ressources in your VMware on OVHcloud (type: boolean)
	networkRole = None, # Determine how this user can interact with the VMware on OVHcloud V(x)Lans (type: dedicatedCloud.right.NetworkRoleEnum)
	right = None, # Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud (type: dedicatedCloud.right.RightEnum)
	vmNetworkRole = None, # Determine how this user can interact with the VMware on OVHcloud VM Network (type: dedicatedCloud.right.VmNetworkRoleEnum)
)

# 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: dedicatedCloud.Right
$result = $ovh->put("/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}", array(
	canAddRessource => null, // Determine if the user can add ressources in your VMware on OVHcloud (type: boolean)
	networkRole => null, // Determine how this user can interact with the VMware on OVHcloud V(x)Lans (type: dedicatedCloud.right.NetworkRoleEnum)
	right => null, // Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud (type: dedicatedCloud.right.RightEnum)
	vmNetworkRole => null, // Determine how this user can interact with the VMware on OVHcloud VM Network (type: dedicatedCloud.right.VmNetworkRoleEnum)
));

print_r($result);
?>
```
