---
title: "Machine pool CLI reference"
description: "Customer-hosted cloud features"
---

# Machine pool CLI reference

#### Customer-hosted cloud features

:::note
Some features are only available on customer-hosted clouds. Reach out to [support@anyscale.com](mailto:support@anyscale.com) for info.
:::

## Machine pool CLI

### `anyscale machine-pool create` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool create [OPTIONS]`

Create a machine pool in Anyscale.

**Options**

-   **`--name`**: Provide a machine pool name (must be unique within an organization).

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool create --name can-testing
Machine pool can-testing has been created successfully (ID mp_8ogdz85mdwxb8a92yo44nn84ox).
```
:::

::::

### `anyscale machine-pool update` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool update [OPTIONS]`

Update a machine pool in Anyscale.

**Options**

-   **`--name`**: Provide a machine pool name.
-   **`--spec-file`**: Provide a path to a specification file.

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool update --name can-testing --spec-file spec.yaml
Updated machine pool 'can-testing'.
```
:::

::::

### `anyscale machine-pool delete` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool delete [OPTIONS]`

Delete a machine pool in Anyscale.

**Options**

-   **`--name`**: Provide a machine pool name.

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool delete --name can-testing
Deleted machine pool 'can-testing'.
```
:::

::::

### `anyscale machine-pool attach` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool attach [OPTIONS]`

Attach a machine pool to a cloud or cloud resource.

**Options**

-   **`--name`**: Provide a machine pool name.
-   **`--cloud`**: Provide a cloud name.
-   **`--resource`**: For multi-resource clouds, the name of the cloud resource to attach to. If not provided, attaches to the primary cloud resource in the cloud.

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool attach --name can-testing --cloud my-cloud
Attached machine pool 'can-testing' to cloud 'my-cloud'.
```
:::

::::

### `anyscale machine-pool detach` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool detach [OPTIONS]`

Detach a machine pool from a cloud or cloud resource.

**Options**

-   **`--name`**: Provide a machine pool name.
-   **`--cloud`**: Provide a cloud name.
-   **`--resource`**: For multi-resource clouds, the name of the cloud resource to detach from. If not provided, detaches from the primary cloud resource in the cloud.

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool detach --name can-testing --cloud my-cloud
Detached machine pool 'can-testing' from cloud 'my-cloud'.
```
:::

::::

### `anyscale machine-pool list` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool list [OPTIONS]`

List machine pools in Anyscale.

**Options**

-   **`--format`**: Output format (table, yaml).

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool list
MACHINE POOL       ID                             Clouds
can-testing        mp_8ogdz85mdwxb8a92yo44nn84ox
```
:::

::::

### `anyscale machine-pool describe` Beta

:::warning
This command undergoes rapid iteration. Users must be tolerant of change.
:::

**Usage**

`anyscale machine-pool describe [OPTIONS]`

Describe a machine pool in Anyscale.

**Options**

-   **`--name`**: Provide a machine pool name.
-   **`--format`**: Output format (table, json).

#### Examples

::::tabs

:::tab[CLI]
```bash
$ anyscale machine-pool describe --name can-testing --mode machines
```
:::

::::

---

Previous: [Logs](/reference/cli/logs.md) | Next: [Organization invitation](/reference/cli/organization-invitation.md)