SitesClient
armis_sdk.clients.sites_client.SitesClient
Bases: BaseEntityClient
A client for interacting with sites.
The primary entity for this client is Site.
Methods:
| Name | Description |
|---|---|
create |
Create a |
delete |
Delete a |
get |
Get a |
hierarchy |
Create a hierarchy of the tenant's sites, taking into account the parent-child relationships. |
list |
List all the tenant's sites. |
update |
Update a site's properties. |
create(site)
async
delete(site)
async
get(site_id)
async
Get a Site by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site_id
|
int
|
The ID of the site to get. |
required |
Returns:
| Type | Description |
|---|---|
Site
|
A |
hierarchy()
async
Create a hierarchy of the tenant's sites, taking into account the parent-child relationships.
Returns:
| Type | Description |
|---|---|
list[Site]
|
A list of |
list[Site]
|
Each site has a |
Example
list()
async
List all the tenant's sites. This method takes care of pagination, so you don't have to deal with it.
Returns:
| Type | Description |
|---|---|
AsyncIterator[Site]
|
An (async) iterator of |
update(site)
async
Update a site's properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site
|
Site
|
The site to update. |
required |
Raises:
| Type | Description |
|---|---|
ResponseError
|
If an error occurs while communicating with the API. |