> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/h/huawei-cloud-elastic-server.md).

# Huawei Cloud Elastic Server

Huawei Cloud Elastic Cloud Server (ECS) provides virtual servers. OctoXLabs reads the ECS servers of one or more projects in a region.

## Use cases

* List Huawei Cloud servers by operating system.

```
Adapters = huawei-cloud-elastic-server AND OS.Type = Linux
```

* Find Huawei Cloud servers that are not covered by your EDR.

```
Adapters = huawei-cloud-elastic-server AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination                      | Port | Protocol |
| ------------------- | -------------------------------- | ---- | -------- |
| OctoXLabs connector | `iam.<region>.myhuaweicloud.com` | 443  | HTTPS    |
| OctoXLabs connector | `ecs.<region>.myhuaweicloud.com` | 443  | HTTPS    |

### Required permissions

| Scope or role      | Permission | Needed for |
| ------------------ | ---------- | ---------- |
| ECS ReadOnlyAccess | Read       | Devices    |
| VPC ReadOnlyAccess | Read       | Devices    |
| IMS ReadOnlyAccess | Read       | Devices    |

## Create credentials in Huawei Cloud Elastic Server

{% stepper %}
{% step %}

### Open My Credentials

Log in to the Huawei Cloud management console with the account. Hover over the user name, click it and choose **My Credentials**.
{% endstep %}

{% step %}

### Copy the identity values

On this page find the IAM user name, the IAM domain name, the project name and the project IDs.
{% endstep %}

{% step %}

### Grant the permissions

Give the IAM user at least **ECS ReadOnlyAccess**, **VPC ReadOnlyAccess** and **IMS ReadOnlyAccess**.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter       | Required | Type    | Default    | Description                                                                                                                           |
| --------------- | -------- | ------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Region          | Yes      | Text    | None       | Huawei Cloud region, for example `cn-east-3` or `tr-west-1`.                                                                          |
| Username        | Yes      | Text    | None       | IAM user name.                                                                                                                        |
| Password        | Yes      | Text    | None       | Password of the IAM user.                                                                                                             |
| Https Proxy     | No       | Text    | None       | Proxy for HTTPS requests (optional).                                                                                                  |
| Iam Domain Name | Yes      | Text    | None       | IAM domain name (the root identity space of the account).                                                                             |
| Project Name    | No       | Text    | None       | Project the authentication token is scoped to.                                                                                        |
| Project Ids     | Yes      | List    | Empty list | Project IDs whose servers are read. A project ID is needed in the URL of some APIs. Example form: `2b31ed520xxxxxxebedb6e57xxxxxxxx`. |
| Timeout         | No       | Integer | `30`       | Seconds to wait for API responses.                                                                                                    |

## Troubleshooting

| Error message | Cause                                                          | Fix                                                  |
| ------------- | -------------------------------------------------------------- | ---------------------------------------------------- |
| Not verified  | The connector code defines no adapter specific error messages. | Run the connection test and check the connector log. |

## Change history
