Skip to content

Commit d8fed47

Browse files
author
GitHub Actions
committed
Auto commit from main repo: manual-sync
1 parent d412ab9 commit d8fed47

18 files changed

Lines changed: 302 additions & 690 deletions

README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ For full documentation, please visit our [dedicated](https://armis-python-sdk.re
1616

1717
## Usage
1818

19-
All interaction with the SDK happens through the `ArmisSdk` class. You'll need three things:
19+
All interaction with the SDK happens through the `ArmisSdk` class. You'll need five things:
2020

21-
1. **Tenant name**: The name of the tenant you want to interact with.
22-
2. **Secret key**: The secret key associated with the tenant, obtained from the tenant itself.
23-
3. **Client id**: A unique identifier for your application. Currently, this can be any string.
21+
1. **Audience**: The url of the tenant you want to interact with, including trailing slash (e.g. `https://acme.armis.com/`).
22+
2. **Client ID**: The email address of the user account within the tenant that was used to generate the Client Secret.
23+
3. **Client Secret**: The confidential credential generated by your customer within Armis, paired with the Client ID.
24+
4. **Vendor ID**: An identifier unique to your developer account or integration, obtained when you register on our developer portal.
25+
5. **Scopes**: The specific permissions required by your access token to interact with the desired API endpoints.
2426

25-
You can either provide these values using the environment variables `ARMIS_TENANT`, `ARMIS_SECRET_KEY`, and `ARMIS_CLIENT_ID`:
27+
You can either provide these values using the environment variables `ARMIS_AUDIENCE`, `ARMIS_CLIENT_ID`, `ARMIS_CLIENT_SECRET`, `ARMIS_VENDOR_ID`, and `ARMIS_CLIENT_ID`:
2628
```python
2729
from armis_sdk import ArmisSdk
2830

@@ -32,16 +34,30 @@ armis_sdk = ArmisSdk()
3234
or by passing them explicitly:
3335
```python
3436
from armis_sdk import ArmisSdk
35-
36-
armis_sdk = ArmisSdk(tenant="<tenant>", secret_key="<secret_key>", client_id="<client_id>")
37+
from armis_sdk import ClientCredentials
38+
39+
credentials = ClientCredentials(
40+
audience="<audience>",
41+
client_id="<client_id>",
42+
client_secret="<client_secret>",
43+
vendor_id="<vendor_id>",
44+
scopes=["scope1", "scope2"],
45+
)
46+
armis_sdk = ArmisSdk(credentials=credentials)
3747
```
3848

3949
> [!TIP]
40-
> If you're building an application that interacts with multiple tenants, you can populate only the `ARMIS_CLIENT_ID` environment variable and pass the `tenant` and `secret_key` explicitly:
50+
> If you're building an application that interacts with multiple tenants, you can populate only the `ARMIS_VENDOR_ID` and `ARMIS_SCOPES` environment variable and pass the `audience`, `client_id` and `client_secret` explicitly:
4151
> ```python
4252
> from armis_sdk import ArmisSdk
53+
> from armis_sdk import ClientCredentials
4354
>
44-
> armis_sdk = ArmisSdk(tenant="<tenant>", secret_key="<secret_key>")
55+
> credentials = ClientCredentials(
56+
> audience="<audience>",
57+
> client_id="<client_id>",
58+
> client_secret="<client_secret>",
59+
> )
60+
> armis_sdk = ArmisSdk(credentials=credentials)
4561
> ```
4662
4763
## Entity clients
@@ -63,7 +79,7 @@ from armis_sdk.entities.site import Site
6379
armis_sdk = ArmisSdk()
6480
6581
async def main():
66-
site = Site(id="1", location="new location")
82+
site = Site(id=1, location="new location")
6783
await armis_sdk.sites.update(site)
6884
6985
asyncio.run(main())

armis_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from armis_sdk.core.armis_sdk import ArmisSdk
2+
from armis_sdk.core.client_credentials import ClientCredentials

armis_sdk/clients/network_equipment_client.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

armis_sdk/clients/site_integrations_client.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)