# add\_physical\_host

Add a physical host to the Rubrik cluster.

```python
def add_physical_host(hostname, timeout=60)
```

## Arguments

| Name     | Type        | Description                                                                            | Choices |
| -------- | ----------- | -------------------------------------------------------------------------------------- | ------- |
| hostname | str or list | The hostname or IP Address of the physical host you want to add to the Rubrik cluster. |         |

## Keyword Arguments

| Name    | Type | Description                                                                                                  | Choices | Default |
| ------- | ---- | ------------------------------------------------------------------------------------------------------------ | ------- | ------- |
| timeout | int  | The number of seconds to wait to establish a connection the Rubrik cluster before returning a timeout error. |         | 60      |

## Returns

| Type | Return Value                                                                         |
| ---- | ------------------------------------------------------------------------------------ |
| str  | No change requird. The host '`hostname`' is already connected to the Rubrik cluster. |
| dict | The full API response for `POST /v1/host`.                                           |

## Exceptions

| Type                      | Message                             |
| ------------------------- | ----------------------------------- |
| InvalidParameterException | The provided hostname list is empty |

## Example

### Single Host

```python
import rubrik_cdm

rubrik = rubrik_cdm.Connect()

hostname = "python-sdk-demo"

add_host = rubrik.add_physical_host(hostname)
```

### Bulk Hosts

```python
import rubrik_cdm

rubrik = rubrik_cdm.Connect()

hosts = ['host1.rubrik.com','host2.rubrik.com','host3.rubrik.com']
bulk_add = rubrik.add_physical_host(hosts)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rubrik.gitbook.io/rubrik-sdk-for-python/physical-host-functions/add_physical_host.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
