@@ -20,6 +20,7 @@ The API provides endpoints for the following operations:
2020- Creating new Insights accounts
2121- Listing available Insights accounts
2222- Getting details for specific accounts
23+ - Updating existing Insights accounts
2324
2425## Create Account
2526
@@ -35,7 +36,7 @@ POST /api/preview/insights/pulumi/accounts/{accountName}
3536| ------------------| --------| -------| -------------------------------------------------------------------------------------------------------|
3637| ` provider ` | string | body | The cloud provider for the account (e.g., ` aws ` , ` azure ` , ` oci ` ) |
3738| ` environment ` | string | body | The environment reference for the account, such as ` insights/pulumi-staging@2 ` |
38- | ` cron ` | string | body | The cron expression defining when the account scan is scheduled (e.g. , ` 0 0 * * * ` ) |
39+ | ` scanSchedule ` | string | body | The schedule for automated scans. Valid values: ` none ` , ` daily ` |
3940| ` providerConfig ` | object | body | The configuration specific to the provider, such as regions for ` aws ` (e.g., ` ["us-east-1", "us-east-2"] ` ) |
4041
4142### Example
4950 -d ' {
5051 "provider": "aws",
5152 "environment": "insights/pulumi-staging@2",
52- "cron ": "0 0 * * * ",
53+ "scanSchedule ": "daily ",
5354 "providerConfig": {
5455 "regions": ["us-east-1", "us-east-2", "us-west-2"]
5556 }
@@ -60,15 +61,54 @@ curl \
6061### Default response
6162
6263```
63- Status: 200 OK
64+ Status: 204 No Content
6465```
6566
67+ The operation returns an empty response body. Success is indicated by the ` 204 ` status code.
68+
69+ ## Update Account
70+
71+ Updates an existing Insights account.
72+
6673```
67- {
68- "message": "Account FizzBuzz AWS Staging created successfully."
69- }
74+ PATCH /api/preview/insights/pulumi/accounts/{accountName}
7075```
7176
77+ ### Parameters
78+
79+ | Parameter | Type | In | Description |
80+ | ------------------| --------| -------| -------------------------------------------------------------------------------------------------------|
81+ | ` accountName ` | string | path | The name of the account to update. |
82+ | ` environment ` | string | body | The environment reference for the account, such as ` insights/pulumi-staging@2 ` |
83+ | ` scanSchedule ` | string | body | The schedule for automated scans. Valid values: ` none ` , ` daily ` |
84+ | ` providerConfig ` | object | body | The configuration specific to the provider, such as regions for ` aws ` (e.g., ` ["us-east-1", "us-east-2"] ` ) |
85+
86+ ### Example
87+
88+ ``` bash
89+ curl \
90+ -X PATCH \
91+ -H " Accept: application/vnd.pulumi+6" \
92+ -H " Content-Type: application/json" \
93+ -H " Authorization: token $PULUMI_ACCESS_TOKEN " \
94+ -d ' {
95+ "environment": "insights/pulumi-staging@3",
96+ "scanSchedule": "daily",
97+ "providerConfig": {
98+ "regions": ["us-east-1", "us-west-2"]
99+ }
100+ }' \
101+ https://api.pulumi.com/api/preview/insights/pulumi/accounts/FizzBuzz%20AWS%20Staging
102+ ```
103+
104+ ### Default response
105+
106+ ```
107+ Status: 204 No Content
108+ ```
109+
110+ The operation returns an empty response body. Success is indicated by the ` 204 ` status code.
111+
72112## List Accounts
73113
74114Lists Insight Accounts available to the authenticated user.
0 commit comments