# Spot.io

This integration is provided as an Open Authorization API (OAA) connector package. Contact our support team for more information.

## Veza Spot.io Connector

Veza Connector for Spot.io. Enables discover of Spot.io Users along with Organizations, Groups and their Roles.

#### Veza Application Mapping

| Spot.io      | OAA Application  | Notes |
| ------------ | ---------------- | ----- |
| Organization | Application      |       |
| Users        | Local User       |       |
| Accounts     | Custom Resources |       |
| UserGroups   | Local Group      |       |
| Policies     | Local Role       |       |

#### Discovered Properties

| Entity          | Property               | Description                                            |
| --------------- | ---------------------- | ------------------------------------------------------ |
| User            | `id`                   | User's ID provided by Spot.io                          |
| User            | `name`                 | User's name                                            |
| User            | `type`                 | User's type. It can be either personal or programmatic |
| User            | `email`                | User's email address.                                  |
| User            | `has_mfa`              | User has MFA                                           |
| Role            | `id`                   | Id of the Role.                                        |
| Role            | `name`                 | Name of the Role.                                      |
| Role            | `type`                 | Type of the Role. Example: `ACCOUNT` or `ORGANIZATION` |
| Role            | `created_at`           | Created at timestamp of the Role.                      |
| Role            | `updated_at`           | Updated at timestamp of the Role.                      |
| Group           | `id`                   | Id of the Group.                                       |
| Group           | `name`                 | Display Name of the Group.                             |
| Group           | `created_at`           | Created at timestamp of the Group.                     |
| Custom Resource | `id`                   | Id of the Account                                      |
| Custom Resource | `name`                 | Name of the Account                                    |
| Custom Resource | `cloud_provider`       | Name of the Cloud Provider                             |
| Custom Resource | `provider_external_id` | Id provided by the Cloud Provider                      |
| Custom Resource | `created_at`           | Created at timestamp of the Account.                   |

### Setup

#### Spot.io

1. One can generate [Bearer Token](https://console.spotinst.com/settings/v2/tokens/permanent) using the Spot.io Admin UI.
2. Note the Bearer Token is needed to run the Integration.

#### Veza

1. Generate an API key for your Veza user. API keys can be managed in the Veza interface under Administration -> API Keys. For detailed instructions consult the Veza User Guide.

### Running the Connector

#### Command Line

1. Install the requirements:

   ```
   pip3 install -r requirements.txt
   ```
2. Set the Secrets:

   ```
   export VEZA_API_KEY="ZXldTcj...JCWGU3Qlo1OHR3RTBfc00yN3lfSFk="
   export SPOTIO_TOKEN="6ed173a951f433d7c71214XXXXXXX"
   ```
3. Run the connector:

   ```
   ./veza_spotio.py --veza-url https://<your-org>.vezacloud.com
   ```

#### Parameters

| CLI Parameter     | Environment Variable | Description                                       |
| ----------------- | -------------------- | ------------------------------------------------- |
| `--veza-url`      | `VEZA_URL`           | URL of Veza system                                |
|                   | `VEZA_API_KEY`       | API key for Veza connection                       |
|                   | `SPOTIO_TOKEN`       | Spot.io Bearer Token                              |
| `--debug`         |                      | Enable verbose debug output                       |
| `--save-json`     |                      | Save OAA Payload as local JSON file before upload |
| `--create-report` |                      | This flag will create report and queries          |


---

# 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://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/spotio.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.
