Insights Accounts
Pulumi Insights enables visibility into cloud resources and compliance monitoring. The Insights Accounts API allows you to create, list, and manage accounts for various cloud providers.
Insights Operations
The API provides endpoints for the following operations:
- Creating new Insights accounts
- Listing available Insights accounts
- Getting details for specific accounts
- Updating existing Insights accounts
Create Account
Creates a new account for use with Pulumi Insights.
POST /api/preview/insights/pulumi/accounts/{accountName}
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
provider | string | body | The cloud provider for the account (e.g., aws, azure, oci) |
environment | string | body | The environment reference for the account, such as insights/pulumi-staging@2 |
scanSchedule | string | body | The schedule for automated scans. Valid values: none, daily |
providerConfig | object | body | The configuration specific to the provider, such as regions for aws (e.g., ["us-east-1", "us-east-2"]) |
Example
curl \
-X POST \
-H "Accept: application/vnd.pulumi+6" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
-d '{
"provider": "aws",
"environment": "insights/pulumi-staging@2",
"scanSchedule": "daily",
"providerConfig": {
"regions": ["us-east-1", "us-east-2", "us-west-2"]
}
}' \
https://api.pulumi.com/api/preview/insights/pulumi/accounts/FizzBuzz%20AWS%20Staging
Default response
Status: 204 No Content
The operation returns an empty response body. Success is indicated by the 204 status code.
Update Account
Updates an existing Insights account.
PATCH /api/preview/insights/pulumi/accounts/{accountName}
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
accountName | string | path | The name of the account to update. |
environment | string | body | The environment reference for the account, such as insights/pulumi-staging@2 |
scanSchedule | string | body | The schedule for automated scans. Valid values: none, daily |
providerConfig | object | body | The configuration specific to the provider, such as regions for aws (e.g., ["us-east-1", "us-east-2"]) |
Example
curl \
-X PATCH \
-H "Accept: application/vnd.pulumi+6" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
-d '{
"environment": "insights/pulumi-staging@3",
"scanSchedule": "daily",
"providerConfig": {
"regions": ["us-east-1", "us-west-2"]
}
}' \
https://api.pulumi.com/api/preview/insights/pulumi/accounts/FizzBuzz%20AWS%20Staging
Default response
Status: 204 No Content
The operation returns an empty response body. Success is indicated by the 204 status code.
List Accounts
Lists Insight Accounts available to the authenticated user.
GET /api/preview/insights/pulumi/accounts
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
count | integer | query | Optional. the number of results to return (default is 100) |
continuationToken | string | query | Optional. the continuation token to use for retrieving the next set of results if results were truncated |
Example
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
https://api.pulumi.com/api/preview/insights/pulumi/accounts?count=1000
Default response
Status: 200 OK
{
"accounts": [
{
"name": "FizzBuzz Aws Prod",
"provider": "aws",
"providerEnvRef": "fizzbuzz/insights-pulumi-prod@4",
"scheduledScanEnabled": false,
"scanStatus": {
"id": "",
"orgId": "",
"userId": "",
"status": "",
"startedAt": "2025-01-01T00:00:00Z",
"finishedAt": null,
"lastUpdatedAt": "2025-01-01T00:00:00Z",
"jobTimeout": "2025-01-01T00:00:00Z"
}
},
{
"name": "FizzBuzz Aws Staging",
"provider": "aws",
"providerEnvRef": "fizzbuzz/insights-pulumi-staging@2",
"scheduledScanEnabled": true,
"scanStatus": {
"id": "",
"orgId": "",
"userId": "",
"status": "succeeded",
"startedAt": "2025-02-03T12:01:00.000Z",
"finishedAt": "2025-02-03T12:05:00.000Z",
"lastUpdatedAt": "2025-02-03T12:05:00.000Z",
"resourceCount": 250
}
}
]
}
Get Account
Gets Insight Account details for the specific account.
GET /api/preview/insights/pulumi/accounts/{accountName}
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
accountName | string | path | The name of the account to retrieve details for. |
Example
curl \
-H "Accept: application/vnd.pulumi+6" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
https://api.pulumi.com/api/preview/insights/pulumi/accounts/FizzBuzz%20AWS%20Staging
Default response
Status: 200 OK
{
"name": "FizzBuzz AWS Staging",
"provider": "aws",
"providerEnvRef": "insights/pulumi-staging@2",
"scheduledScanEnabled": true,
"providerConfig": {
"regions": [
"us-east-1",
"us-east-2",
"us-west-2"
]
},
"scanStatus": {
"id": "",
"orgId": "",
"userId": "",
"status": "",
"startedAt": "0001-01-01T00:00:00Z",
"finishedAt": "0001-01-01T00:00:00Z",
"lastUpdatedAt": "0001-01-01T00:00:00Z",
"jobTimeout": "0001-01-01T00:00:00Z"
}
}
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.
