Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions content/docs/reference/cloud-rest-api/insight-accounts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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

Expand All @@ -35,7 +36,7 @@ POST /api/preview/insights/pulumi/accounts/{accountName}
|------------------|--------|-------|-------------------------------------------------------------------------------------------------------|
| `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` |
| `cron` | string | body | The cron expression defining when the account scan is scheduled (e.g., `0 0 * * *`) |
| `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
Expand All @@ -49,7 +50,7 @@ curl \
-d '{
"provider": "aws",
"environment": "insights/pulumi-staging@2",
"cron": "0 0 * * *",
"scanSchedule": "daily",
"providerConfig": {
"regions": ["us-east-1", "us-east-2", "us-west-2"]
}
Expand All @@ -60,15 +61,54 @@ curl \
### Default response

```
Status: 200 OK
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.

```
{
"message": "Account FizzBuzz AWS Staging created successfully."
}
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

```bash
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.
Expand Down
Loading