# UserManagementApi

All URIs are relative to *<https://api.ionos.com/cloudapi/v6>*

| Method                                                                | HTTP request                                        | Description                         |
| --------------------------------------------------------------------- | --------------------------------------------------- | ----------------------------------- |
| [**umGroupsDelete**](#umgroupsdelete)                                 | **DELETE** /um/groups/{groupId}                     | Delete groups                       |
| [**umGroupsFindById**](#umgroupsfindbyid)                             | **GET** /um/groups/{groupId}                        | Retrieve groups                     |
| [**umGroupsGet**](#umgroupsget)                                       | **GET** /um/groups                                  | List all groups                     |
| [**umGroupsPost**](#umgroupspost)                                     | **POST** /um/groups                                 | Create groups                       |
| [**umGroupsPut**](#umgroupsput)                                       | **PUT** /um/groups/{groupId}                        | Modify groups                       |
| [**umGroupsResourcesGet**](#umgroupsresourcesget)                     | **GET** /um/groups/{groupId}/resources              | Retrieve group resources            |
| [**umGroupsSharesDelete**](#umgroupssharesdelete)                     | **DELETE** /um/groups/{groupId}/shares/{resourceId} | Remove group shares                 |
| [**umGroupsSharesFindByResourceId**](#umgroupssharesfindbyresourceid) | **GET** /um/groups/{groupId}/shares/{resourceId}    | Retrieve group shares               |
| [**umGroupsSharesGet**](#umgroupssharesget)                           | **GET** /um/groups/{groupId}/shares                 | List group shares                   |
| [**umGroupsSharesPost**](#umgroupssharespost)                         | **POST** /um/groups/{groupId}/shares/{resourceId}   | Add group shares                    |
| [**umGroupsSharesPut**](#umgroupssharesput)                           | **PUT** /um/groups/{groupId}/shares/{resourceId}    | Modify group share privileges       |
| [**umGroupsUsersDelete**](#umgroupsusersdelete)                       | **DELETE** /um/groups/{groupId}/users/{userId}      | Remove users from groups            |
| [**umGroupsUsersGet**](#umgroupsusersget)                             | **GET** /um/groups/{groupId}/users                  | List group members                  |
| [**umGroupsUsersPost**](#umgroupsuserspost)                           | **POST** /um/groups/{groupId}/users                 | Add a Group Member                  |
| [**umResourcesFindByType**](#umresourcesfindbytype)                   | **GET** /um/resources/{resourceType}                | List resources by type              |
| [**umResourcesFindByTypeAndId**](#umresourcesfindbytypeandid)         | **GET** /um/resources/{resourceType}/{resourceId}   | Retrieve resources by type          |
| [**umResourcesGet**](#umresourcesget)                                 | **GET** /um/resources                               | List all resources                  |
| [**umUsersDelete**](#umusersdelete)                                   | **DELETE** /um/users/{userId}                       | Delete users                        |
| [**umUsersFindById**](#umusersfindbyid)                               | **GET** /um/users/{userId}                          | Retrieve users                      |
| [**umUsersGet**](#umusersget)                                         | **GET** /um/users                                   | List all users                      |
| [**umUsersGroupsGet**](#umusersgroupsget)                             | **GET** /um/users/{userId}/groups                   | Retrieve group resources by user ID |
| [**umUsersOwnsGet**](#umusersownsget)                                 | **GET** /um/users/{userId}/owns                     | Retrieve user resources by user ID  |
| [**umUsersPost**](#umuserspost)                                       | **POST** /um/users                                  | Create users                        |
| [**umUsersPut**](#umusersput)                                         | **PUT** /um/users/{userId}                          | Modify users                        |

## umGroupsDelete

> umGroupsDelete(groupId, opts)

Delete groups

Remove the specified group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Delete groups
api_instance
  .umGroupsDelete({
    groupId: groupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

nil (empty response body)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsFindById

> umGroupsFindById(groupId, opts)

Retrieve groups

Retrieve a group by the group ID. This value is in the response body when the group is created, and in the list of the groups, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Retrieve groups
api_instance
  .umGroupsFindById({
    groupId: groupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Group**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/group)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsGet

> umGroupsGet(opts)

List all groups

List all the available user groups.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List all groups
api_instance
  .umGroupsGet({
    pretty: true,
    depth: 56,
    xContractNumber: 56
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Groups**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groups)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsPost

> umGroupsPost(group, opts)

Create groups

Create a group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Create groups
api_instance
  .umGroupsPost({
    group: group_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **group**           | [**Group**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/group) | The group to create.                                                                                                                                                                                                                                                                                                                                                                                                                          |                                    |
| **pretty**          | **boolean**                                                                                    | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                     | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                     | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Group**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/group)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## umGroupsPut

> umGroupsPut(groupId, group, opts)

Modify groups

Modify the properties of the specified group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Modify groups
api_instance
  .umGroupsPut({
    groupId: groupId_example,
    group: group_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**                                                                                     | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **group**           | [**Group**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/group) | The modified group.                                                                                                                                                                                                                                                                                                                                                                                                                           |                                    |
| **pretty**          | **boolean**                                                                                    | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                     | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                     | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Group**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/group)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## umGroupsResourcesGet

> umGroupsResourcesGet(groupId, opts)

Retrieve group resources

List the resources assigned to the group, by group ID.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Retrieve group resources
api_instance
  .umGroupsResourcesGet({
    groupId: groupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**ResourceGroups**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resourcegroups)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsSharesDelete

> umGroupsSharesDelete(groupId, resourceId, opts)

Remove group shares

Remove the specified share from the group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Remove group shares
api_instance
  .umGroupsSharesDelete({
    groupId: groupId_example,
    resourceId: resourceId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **resourceId**      | **string**  | The unique ID of the resource.                                                                                                                                                                                                                                                                                                                                                                                                                | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

nil (empty response body)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsSharesFindByResourceId

> umGroupsSharesFindByResourceId(groupId, resourceId, opts)

Retrieve group shares

Retrieve the properties of the specified group share.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Retrieve group shares
api_instance
  .umGroupsSharesFindByResourceId({
    groupId: groupId_example,
    resourceId: resourceId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **resourceId**      | **string**  | The unique ID of the resource.                                                                                                                                                                                                                                                                                                                                                                                                                | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**GroupShare**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshare)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsSharesGet

> umGroupsSharesGet(groupId, opts)

List group shares

List all shares and share privileges for the specified group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List group shares 
api_instance
  .umGroupsSharesGet({
    groupId: groupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**GroupShares**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshares)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsSharesPost

> umGroupsSharesPost(groupId, resourceId, resource, opts)

Add group shares

Add the specified share to the group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Add group shares
api_instance
  .umGroupsSharesPost({
    groupId: groupId_example,
    resourceId: resourceId_example,
    resource: resource_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**                                                                                               | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **resourceId**      | **string**                                                                                               | The unique ID of the resource.                                                                                                                                                                                                                                                                                                                                                                                                                | \[default to undefined]            |
| **resource**        | [**GroupShare**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshare) | The resource to add.                                                                                                                                                                                                                                                                                                                                                                                                                          |                                    |
| **pretty**          | **boolean**                                                                                              | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                               | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                               | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**GroupShare**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshare)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsSharesPut

> umGroupsSharesPut(groupId, resourceId, resource, opts)

Modify group share privileges

Modify share permissions for the specified group. With an empty body, no updates are performed, and the current share permissions for the group are returned with response code 200.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Modify group share privileges
api_instance
  .umGroupsSharesPut({
    groupId: groupId_example,
    resourceId: resourceId_example,
    resource: resource_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**                                                                                               | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **resourceId**      | **string**                                                                                               | The unique ID of the resource.                                                                                                                                                                                                                                                                                                                                                                                                                | \[default to undefined]            |
| **resource**        | [**GroupShare**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshare) | The modified resource                                                                                                                                                                                                                                                                                                                                                                                                                         |                                    |
| **pretty**          | **boolean**                                                                                              | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                               | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                               | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**GroupShare**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupshare)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## umGroupsUsersDelete

> umGroupsUsersDelete(groupId, userId, opts)

Remove users from groups

Remove the specified user from the group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Remove users from groups
api_instance
  .umGroupsUsersDelete({
    groupId: groupId_example,
    userId: userId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **userId**          | **string**  | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

nil (empty response body)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsUsersGet

> umGroupsUsersGet(groupId, opts)

List group members

List all members of the specified user group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List group members
api_instance
  .umGroupsUsersGet({
    groupId: groupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**  | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**GroupMembers**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/groupmembers)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umGroupsUsersPost

> umGroupsUsersPost(groupId, user, opts)

Add a Group Member

Adds an existing user to the specified group.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Add a Group Member
api_instance
  .umGroupsUsersPost({
    groupId: groupId_example,
    user: user_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **groupId**         | **string**                                                                                   | The unique ID of the group.                                                                                                                                                                                                                                                                                                                                                                                                                   | \[default to undefined]            |
| **user**            | [**User**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/user) | The user to add.                                                                                                                                                                                                                                                                                                                                                                                                                              |                                    |
| **pretty**          | **boolean**                                                                                  | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                   | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                   | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**User**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/user)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## umResourcesFindByType

> umResourcesFindByType(resourceType, opts)

List resources by type

List all resources of the specified type. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// List resources by type
api_instance
  .umResourcesFindByType({
    resourceType: resourceType_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **resourceType**    | **string**  | The resource type                                                                                                                                                                                                                                                                                                                                                                                                                             | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Resources**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resources)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umResourcesFindByTypeAndId

> umResourcesFindByTypeAndId(resourceType, resourceId, opts)

Retrieve resources by type

Retrieve a resource by the resource type and resource ID. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Retrieve resources by type
api_instance
  .umResourcesFindByTypeAndId({
    resourceType: resourceType_example,
    resourceId: resourceId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **resourceType**    | **string**  | The resource type                                                                                                                                                                                                                                                                                                                                                                                                                             | \[default to undefined]            |
| **resourceId**      | **string**  | The resource ID                                                                                                                                                                                                                                                                                                                                                                                                                               | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Resource**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resource)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umResourcesGet

> umResourcesGet(opts)

List all resources

List all the available resources.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List all resources
api_instance
  .umResourcesGet({
    pretty: true,
    depth: 56,
    xContractNumber: 56
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**Resources**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resources)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersDelete

> umUsersDelete(userId, opts)

Delete users

Delete the specified user.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Delete users
api_instance
  .umUsersDelete({
    userId: userId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **userId**          | **string**  | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

nil (empty response body)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersFindById

> umUsersFindById(userId, opts)

Retrieve users

Retrieve user properties by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Retrieve users
api_instance
  .umUsersFindById({
    userId: userId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **userId**          | **string**  | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**User**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/user)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersGet

> umUsersGet(opts)

List all users

List all the users in your account.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List all users 
api_instance
  .umUsersGet({
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |
| **offset**          | **number**  | The first element (from the complete list of the elements) to include in the response (used together with \<b>\<i>limit\</i>\</b> for pagination).                                                                                                                                                                                                                                                                                            | \[optional]\[default to 0]         |
| **limit**           | **number**  | The maximum number of elements to return (use together with \<code>offset\</code> for pagination).                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to 100]       |

### Return type

[**Users**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/users)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersGroupsGet

> umUsersGroupsGet(userId, opts)

Retrieve group resources by user ID

Retrieve group resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Retrieve group resources by user ID
api_instance
  .umUsersGroupsGet({
    userId: userId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **userId**          | **string**  | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**ResourceGroups**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resourcegroups)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersOwnsGet

> umUsersOwnsGet(userId, opts)

Retrieve user resources by user ID

Retrieve own resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Retrieve user resources by user ID
api_instance
  .umUsersOwnsGet({
    userId: userId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **userId**          | **string**  | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **pretty**          | **boolean** | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**  | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**  | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**ResourcesUsers**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/resourcesusers)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## umUsersPost

> umUsersPost(user, opts)

Create users

Create a user.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Create users
api_instance
  .umUsersPost({
    user: user_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **user**            | [**UserPost**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/userpost) | The user to create.                                                                                                                                                                                                                                                                                                                                                                                                                           |                                    |
| **pretty**          | **boolean**                                                                                          | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                           | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                           | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**User**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/user)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## umUsersPut

> umUsersPut(userId, user, opts)

Modify users

Modify the properties of the specified user.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.UserManagementApi(config);
// Modify users
api_instance
  .umUsersPut({
    userId: userId_example,
    user: user_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   | Notes                              |
| ------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **userId**          | **string**                                                                                         | The unique ID of the user.                                                                                                                                                                                                                                                                                                                                                                                                                    | \[default to undefined]            |
| **user**            | [**UserPut**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/userput) | The modified user                                                                                                                                                                                                                                                                                                                                                                                                                             |                                    |
| **pretty**          | **boolean**                                                                                        | Controls whether the response is pretty-printed (with indentations and new lines).                                                                                                                                                                                                                                                                                                                                                            | \[optional]\[default to true]      |
| **depth**           | **number**                                                                                         | Controls the detail depth of the response objects. GET /datacenters/\[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children\&#39;s children are included. - depth=... and so on | \[optional]\[default to 0]         |
| **xContractNumber** | **number**                                                                                         | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.                                                                                                                                                                                                                                                                                                                                | \[optional]\[default to undefined] |

### Return type

[**User**](https://docs.ionos.com/sections-test/nodejs-sdk/cloud-api-nodejs-sdk/models/user)

### Authorization

Basic Authentication, Token Authentication

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json
