Projects
UpdateProject
Update a project
Partially updates a project. Only provided fields are modified.
Usage
result, err := client.Projects.UpdateProject(ctx, "prj_xxx", pgbeam.UpdateProjectRequest{
})Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ctx | context.Context | Yes | Request context |
| projectID | string | Yes | Unique project identifier (prefixed, e.g. prj_xxx). |
| req | pgbeam.UpdateProjectRequest | Yes | Request body |
| req.Name | *string | No | Updated project name. |
| req.Description | *string | No | Updated project description. |
| req.Tags | *[]string | No | Replacement set of user-defined project labels. |
| req.Status | *pgbeam.ProjectStatus | No | |
| req.AllowedCidrs | *[]pgbeam.CidrEntry | No | IP filtering rules as CIDR ranges with optional labels. Empty array means allow all. Both IPv4 and IPv6 CIDR notation are supported. |
| req.DefaultPolicyProfileID | *string | No | When set, passthrough/human connections are enforced against this policy profile. Send an empty string to clear. |
| req.AgentsDisabled | *bool | No | Project-level kill-switch. Set true to block ALL agent-credential connections to this project (live agent sessions are dropped within seconds); set false to re-enable them. Passthrough/human connections are unaffected. Engaging the kill-switch emits a kill_switch webhook event. |
Response
(*pgbeam.Project, error) — project updated.
Example
import pgbeam "go.pgbeam.com/sdk"
client := pgbeam.NewClient(&pgbeam.ClientOptions{
APIKey: "pgb_your_api_key",
})
result, err := client.Projects.UpdateProject(ctx, "prj_xxx", pgbeam.UpdateProjectRequest{
Name: "my-app",
Description: "Production database proxy",
Tags: production,us-east-1,
Status: pgbeam.ProjectStatus{ /* ... */ },
AllowedCidrs: [object Object],[object Object],
DefaultPolicyProfileID: "pol_01h455vb4pex5vsknk084sn02q",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 404 | Resource not found. |
| 429 | Rate limited. Try again later. |