infrawrench

package module
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 13 Imported by: 0

README

github.com/Infrawrench/infrawrench-go

Generated Go client for the Infrawrench API.

API version 0.32.0. A Go module takes its version from a VCS tag rather than from a manifest field, so the API version lives in this README and in the APIVersion constant — check that constant, not the module tag, when you need to know which API shape you have.

Do not edit this module by hand — it is regenerated from openapi.json and is not checked into the repository. Run pnpm --filter @infrawrench/web generate:sdk to rebuild it; the generator lives in app/packages/web/scripts/sdk.

Install

go get github.com/Infrawrench/infrawrench-go

Go 1.24 or newer. No dependencies: the module requires nothing but the standard library, and go.mod has no require block at all.

Usage

package main

import (
	"context"
	"errors"
	"fmt"
	"os"

	"github.com/Infrawrench/infrawrench-go"
)

func main() {
	ctx := context.Background()
	client := infrawrench.NewAPIV1Client(
		infrawrench.WithAPIKey(os.Getenv("INFRAWRENCH_API_KEY")),
		infrawrench.WithOrgID(os.Getenv("INFRAWRENCH_ORG_ID")),
	)

	accounts, err := client.Accounts.List(ctx, nil)
	if err != nil {
		var apiErr *infrawrench.APIError
		if errors.As(err, &apiErr) {
			fmt.Println(apiErr.StatusCode, apiErr.Code, string(apiErr.Body))
		}
		return
	}
	fmt.Println(len(accounts))
}

Conventions

  • Context first. Every call takes a context.Context as its first argument and a variadic ...RequestOption as its last. Timeouts and cancellation belong on the context, so there is no per-call timeout option.
  • Dotted namespaces. Calls mirror the URL structure, so POST /api/org/{orgId}/accounts/{id}/sync is client.Accounts.Sync(...).
  • Parameters. A call with at least one mandatory parameter takes its params struct by value; a call where everything is optional takes a pointer, so nil means "no arguments". A call with no parameters at all takes neither.
  • Organization id. Pass WithOrgID once when constructing the client and every scoped call can leave OrgID unset; set OrgID on an individual call to override it. With neither, the call returns an error wrapping ErrMissingPathParam rather than sending a malformed URL.
  • Optional fields are pointers. Go cannot tell an omitted false from a deliberate one, so anything the wire may omit or null is a *T. Slices and maps keep their own nil.
  • Errors are returned, never panicked. Any non-2xx response comes back as *APIError, carrying StatusCode, the raw Body, the decoded Data and the machine-readable Code when the API sends one. Use errors.As, or the AsAPIError shorthand.
  • Downloads stream. An endpoint that returns a file returns an io.ReadCloser; close it.

Scope

This module covers the published API surface only. Operations marked x-internal in the spec — the admin surface, webhook receivers, desktop sync, push registration, and the browser auth redirects — are not generated, so there is no namespace for them to be called through.

Topics: infrawrench, sdk, api-client, openapi, infrastructure, cloud, devops.

License

MIT — see LICENSE. Copyright (c) 2026 Infrawrench LLC.

Note that this client is more permissively licensed than the service it talks to: the Infrawrench source is BUSL-1.1, but the generated clients are MIT so you can link one into your own software without inheriting those terms.

Maintained by Infrawrench LLC astrid@infrawrench.com. Documentation: https://infrawrench.com/docs/team-and-billing/client-sdks. Issues: https://github.com/Infrawrench/Infrawrench/issues

Documentation

Overview

Package infrawrench is a client for the Infrawrench API.

Construct a client, then call through the namespaces that mirror the URL structure:

client := infrawrench.NewAPIV1Client(
	infrawrench.WithAPIKey(os.Getenv("INFRAWRENCH_API_KEY")),
	infrawrench.WithOrgID(os.Getenv("INFRAWRENCH_ORG_ID")),
)
accounts, err := client.Accounts.List(ctx, nil)

Every call takes a context.Context first and a variadic list of RequestOption last. Non-2xx responses come back as *APIError.

Index

Constants

View Source
const APIVersion = "0.32.0"

APIVersion is info.version from the spec this package was generated from.

A Go module takes its version from a VCS tag rather than from a manifest field, so there is nowhere else for the API version to live — this constant is what you compare against when you need to know which API shape you have.

View Source
const DefaultBaseURL = "https://app.infrawrench.com"

DefaultBaseURL is the deployment a client talks to unless WithBaseURL says otherwise. It is the first server the OpenAPI document advertises.

Variables

View Source
var ErrMissingPathParam = errors.New("infrawrench: missing path parameter")

ErrMissingPathParam is returned when a path parameter was supplied by neither the call nor the client configuration. Match it with errors.Is.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// StatusCode is the HTTP status code, for example 403.
	StatusCode int
	// Status is the full HTTP status line, for example "403 Forbidden".
	Status string
	// Code is the value of the body's "code" field, or "" when absent.
	Code string
	// Message is the body's "error" or "message" field, falling back to the
	// status line.
	Message string
	// Body is the raw response body. Always populated, even when it is not
	// JSON, so nothing is lost when an intermediary answers instead of the API.
	Body []byte
	// Data is Body decoded as JSON, or nil when the body was not valid JSON.
	Data any
	// Method is the HTTP method of the request that failed.
	Method string
	// URL is the fully resolved URL of the request that failed.
	URL string
}

APIError is returned for every non-2xx response.

Branch on Code, not on Message: Code is the machine-readable discriminator the API sends (for example "reauthentication_required" on a step-up 403), while Message is prose that may change.

func AsAPIError

func AsAPIError(err error) (*APIError, bool)

AsAPIError reports whether err is, or wraps, an *APIError. It is a shorthand for errors.As with the right variable already declared.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface.

type APIKey

type APIKey struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	Prefix     string       `json:"prefix"`
	Scopes     []Permission `json:"scopes"`
	LastUsedAt *string      `json:"lastUsedAt"`
	ExpiresAt  *string      `json:"expiresAt"`
	RevokedAt  *string      `json:"revokedAt"`
	// LegacyHashSunsetAt: Cutover date past which a key still on the legacy
	// SHA-256 hash will be refused. Null once rehashed to HMAC.
	LegacyHashSunsetAt *string `json:"legacyHashSunsetAt"`
	// NeedsRotation: True when this key is still hashed with the legacy SHA-256
	// scheme and should be rotated before `legacyHashSunsetAt`.
	NeedsRotation bool   `json:"needsRotation"`
	CreatedAt     string `json:"createdAt"`
}

APIKey is the `ApiKey` schema.

Spec schema: `ApiKey`.

type APIKeysCreateParams

type APIKeysCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateAPIKeyRequest
}

APIKeysCreateParams holds the parameters for `client.apiKeys.create`.

type APIKeysListParams

type APIKeysListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

APIKeysListParams holds the parameters for `client.apiKeys.list`.

Every field is optional; pass nil to take the defaults.

type APIKeysNamespace

type APIKeysNamespace struct {
	// contains filtered or unexported fields
}

APIKeysNamespace is `client.apiKeys`.

func (*APIKeysNamespace) Create

Create: Create an API key (plaintext returned once)

POST /api/org/{orgId}/api-keys

func (*APIKeysNamespace) List

func (n *APIKeysNamespace) List(ctx context.Context, params *APIKeysListParams, opts ...RequestOption) ([]APIKey, error)

List: List API keys (no plaintext)

GET /api/org/{orgId}/api-keys

func (*APIKeysNamespace) Revoke

func (n *APIKeysNamespace) Revoke(ctx context.Context, params APIKeysRevokeParams, opts ...RequestOption) (*OK, error)

Revoke: Revoke an API key

POST /api/org/{orgId}/api-keys/{id}/revoke

func (*APIKeysNamespace) Rotate

Rotate: Rotate an API key (revokes old, returns new)

POST /api/org/{orgId}/api-keys/{id}/rotate

Raises on 404: Not found

type APIKeysRevokeParams

type APIKeysRevokeParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

APIKeysRevokeParams holds the parameters for `client.apiKeys.revoke`.

type APIKeysRotateParams

type APIKeysRotateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

APIKeysRotateParams holds the parameters for `client.apiKeys.rotate`.

type APIV1Client

type APIV1Client struct {

	// Accounts: `client.accounts`.
	Accounts *AccountsNamespace
	// Agents: `client.agents`.
	Agents *AgentsNamespace
	// APIKeys: `client.apiKeys`.
	APIKeys *APIKeysNamespace
	// Artifacts: `client.artifacts`.
	Artifacts *ArtifactsNamespace
	// Associations: `client.associations`.
	Associations *AssociationsNamespace
	// AuditLogs: `client.auditLogs`.
	AuditLogs *AuditLogsNamespace
	// Auth: `client.auth`.
	Auth *AuthNamespace
	// Bastions: `client.bastions`.
	Bastions *BastionsNamespace
	// Billing: `client.billing`.
	Billing *BillingNamespace
	// Budgets: `client.budgets`.
	Budgets *BudgetsNamespace
	// ChangeFreezes: `client.changeFreezes`.
	ChangeFreezes *ChangeFreezesNamespace
	// Changes: `client.changes`.
	Changes *ChangesNamespace
	// Connect: `client.connect`.
	Connect *ConnectNamespace
	// CostCentres: `client.costCentres`.
	CostCentres *CostCentresNamespace
	// Costs: `client.costs`.
	Costs *CostsNamespace
	// CustomGraphs: `client.customGraphs`.
	CustomGraphs *CustomGraphsNamespace
	// Dashboards: `client.dashboards`.
	Dashboards *DashboardsNamespace
	// DependencyGraph: `client.dependencyGraph`.
	DependencyGraph *DependencyGraphNamespace
	// Deployments: `client.deployments`.
	Deployments *DeploymentsNamespace
	// Digest: `client.digest`.
	Digest *DigestNamespace
	// Docker: `client.docker`.
	Docker *DockerNamespace
	// Expiring: `client.expiring`.
	Expiring *ExpiringNamespace
	// Invitations: `client.invitations`.
	Invitations *InvitationsNamespace
	// KV: `client.kv`.
	KV *KVNamespace
	// LogWorkspaces: `client.logWorkspaces`.
	LogWorkspaces *LogWorkspacesNamespace
	// MetricAlerts: `client.metricAlerts`.
	MetricAlerts *MetricAlertsNamespace
	// Moment: `client.moment`.
	Moment *MomentNamespace
	// Msteams: `client.msteams`.
	Msteams *MsteamsNamespace
	// Orgs: `client.orgs`.
	Orgs *OrgsNamespace
	// Orphans: `client.orphans`.
	Orphans *OrphansNamespace
	// Pages: `client.pages`.
	Pages *PagesNamespace
	// Profile: `client.profile`.
	Profile *ProfileNamespace
	// Resources: `client.resources`.
	Resources *ResourcesNamespace
	// Rightsizing: `client.rightsizing`.
	Rightsizing *RightsizingNamespace
	// Schedules: `client.schedules`.
	Schedules *SchedulesNamespace
	// Search: `client.search`.
	Search *SearchNamespace
	// SFTP: `client.sftp`.
	SFTP *SFTPNamespace
	// Slack: `client.slack`.
	Slack *SlackNamespace
	// SQL: `client.sql`.
	SQL *SQLNamespace
	// SSHFanout: `client.sshFanout`.
	SSHFanout *SSHFanoutNamespace
	// SSHKeys: `client.sshKeys`.
	SSHKeys *SSHKeysNamespace
	// SSHTunnels: `client.sshTunnels`.
	SSHTunnels *SSHTunnelsNamespace
	// StatusIncidents: `client.statusIncidents`.
	StatusIncidents *StatusIncidentsNamespace
	// Storage: `client.storage`.
	Storage *StorageNamespace
	// TagPolicy: `client.tagPolicy`.
	TagPolicy *TagPolicyNamespace
	// Team: `client.team`.
	Team *TeamNamespace
	// WorkflowApprovals: `client.workflowApprovals`.
	WorkflowApprovals *WorkflowApprovalsNamespace
	// Workflows: `client.workflows`.
	Workflows *WorkflowsNamespace
	// contains filtered or unexported fields
}

APIV1Client is a client for the Infrawrench API.

Calls hang off the namespace fields below, which mirror the URL structure — `client.Accounts.Credentials.Get(ctx, …)`. The zero value is not usable; build one with NewAPIV1Client.

func NewAPIV1Client

func NewAPIV1Client(opts ...ClientOption) *APIV1Client

NewAPIV1Client builds a client. With no options it talks to https://app.infrawrench.com anonymously, which is rarely what you want: pass WithAPIKey, and WithOrgID if you would rather not repeat the organization id on every call.

func (*APIV1Client) BaseURL

func (c *APIV1Client) BaseURL() string

BaseURL reports the normalized base URL every call is sent to.

type AcceptInvitationRequest

type AcceptInvitationRequest struct {
	Token string `json:"token"`
}

AcceptInvitationRequest is the `AcceptInvitationRequest` schema.

type AcceptInvitationResponse

type AcceptInvitationResponse struct {
	Organization AcceptInvitationResponseOrganization `json:"organization"`
}

AcceptInvitationResponse is the `AcceptInvitationResponse` schema.

type AcceptInvitationResponseOrganization

type AcceptInvitationResponseOrganization struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
}

AcceptInvitationResponseOrganization is an object the spec declares inline.

type Account

type Account struct {
	ID          string `json:"id"`
	PluginID    string `json:"pluginId"`
	DisplayName string `json:"displayName"`
	// BastionID: Bastion this account's cloud-API egress is routed through.
	// `null` ⇒ direct egress.
	BastionID *string `json:"bastionId"`
	CreatedAt string  `json:"createdAt"`
}

Account is the `Account` schema.

type AccountDeleted added in v0.8.0

type AccountDeleted struct {
	OK                   bool  `json:"ok"`
	OrganizationsDeleted int64 `json:"organizationsDeleted"`
}

AccountDeleted is the `AccountDeleted` schema.

type AccountDeletionPreview added in v0.8.0

type AccountDeletionPreview struct {
	// OrganizationsToDelete: Deleted with the account — the caller is their only
	// member.
	OrganizationsToDelete []OrganizationRef `json:"organizationsToDelete"`
	// OrganizationsToLeave: Survive; the caller's membership is removed.
	OrganizationsToLeave []OrganizationRef `json:"organizationsToLeave"`
	// Blockers: Non-empty means DELETE /api/profile will refuse until another
	// owner is promoted.
	Blockers []OwnershipBlocker `json:"blockers"`
}

AccountDeletionPreview is the `AccountDeletionPreview` schema.

type AccountDetail

type AccountDetail struct {
	Account           AccountDetailAccount  `json:"account"`
	ResourceTypes     []ResourceTypeSummary `json:"resourceTypes"`
	PluginDisplayName string                `json:"pluginDisplayName"`
	PluginLogoSvg     string                `json:"pluginLogoSvg"`
}

AccountDetail is the `AccountDetail` schema.

type AccountDetailAccount

type AccountDetailAccount struct {
	ID          string `json:"id"`
	PluginID    string `json:"pluginId"`
	DisplayName string `json:"displayName"`
}

AccountDetailAccount is an object the spec declares inline.

type AccountTagCompliance added in v0.29.0

type AccountTagCompliance struct {
	AccountID      string `json:"accountId"`
	PluginID       string `json:"pluginId"`
	DisplayName    string `json:"displayName"`
	TotalResources int64  `json:"totalResources"`
	// Evaluated: Resources whose stored record exposes a tag map (the scoreable
	// set).
	Evaluated int64 `json:"evaluated"`
	Compliant int64 `json:"compliant"`
	// Score: Percent of evaluated resources carrying every required tag; null
	// when none.
	Score *int64 `json:"score"`
}

AccountTagCompliance is the `AccountTagCompliance` schema.

type AccountsCreateParams

type AccountsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body AccountsCreateRequest
}

AccountsCreateParams holds the parameters for `client.accounts.create`.

type AccountsCreateRequest

type AccountsCreateRequest struct {
	PluginID    *PluginID         `json:"pluginId,omitempty"`
	DisplayName string            `json:"displayName"`
	Credentials map[string]string `json:"credentials"`
	// BastionID: Optional bastion id to route this account's cloud API traffic
	// through.
	BastionID *string `json:"bastionId,omitempty"`
}

AccountsCreateRequest is an object the spec declares inline.

type AccountsCredentialsGetParams

type AccountsCredentialsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AccountsCredentialsGetParams holds the parameters for `client.accounts.credentials.get`.

type AccountsCredentialsNamespace

type AccountsCredentialsNamespace struct {
	// contains filtered or unexported fields
}

AccountsCredentialsNamespace is `client.accounts.credentials`.

func (*AccountsCredentialsNamespace) Get

Get: Fetch the decrypted credentials for an account

Returns the credentials map as it was originally submitted. Sensitive — gate access carefully.

_Requires permission: `secrets:read`._

GET /api/org/{orgId}/accounts/{id}/credentials

Raises on 404: Not found

func (*AccountsCredentialsNamespace) Update

Update: Rotate the credentials an account uses to talk to the upstream provider

Replaces the encrypted credentials blob in place. Used to swap a stale or narrowly-scoped token for a freshly-minted one without recreating the account (preserves existing resources, pins, dashboards, sync history).

_Requires permission: `secrets:write`._

PUT /api/org/{orgId}/accounts/{id}/credentials

Raises on 400: Bad request

Raises on 404: Not found

type AccountsCredentialsUpdateParams

type AccountsCredentialsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body AccountsCredentialsUpdateRequest
}

AccountsCredentialsUpdateParams holds the parameters for `client.accounts.credentials.update`.

type AccountsCredentialsUpdateRequest

type AccountsCredentialsUpdateRequest struct {
	// Credentials: Complete credentials map. Sensitive fields the caller doesn't
	// want to change should be re-sent with their previous value (the server
	// doesn't merge with the existing blob).
	Credentials map[string]string `json:"credentials"`
}

AccountsCredentialsUpdateRequest is an object the spec declares inline.

type AccountsCredentialsUpdateResponse

type AccountsCredentialsUpdateResponse struct {
	OK bool `json:"ok"`
}

AccountsCredentialsUpdateResponse is an object the spec declares inline.

type AccountsDeleteParams

type AccountsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AccountsDeleteParams holds the parameters for `client.accounts.delete`.

type AccountsDetailParams

type AccountsDetailParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AccountsDetailParams holds the parameters for `client.accounts.detail`.

type AccountsListParams

type AccountsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

AccountsListParams holds the parameters for `client.accounts.list`.

Every field is optional; pass nil to take the defaults.

type AccountsNamespace

type AccountsNamespace struct {

	// Credentials: `client.accounts.credentials`.
	Credentials *AccountsCredentialsNamespace
	// Plugins: `client.accounts.plugins`.
	Plugins *AccountsPluginsNamespace
	// Preflight: `client.accounts.preflight`.
	Preflight *AccountsPreflightNamespace
	// SyncType: `client.accounts.syncType`.
	SyncType *AccountsSyncTypeNamespace
	// contains filtered or unexported fields
}

AccountsNamespace is `client.accounts`.

func (*AccountsNamespace) Create

Create: Create an account

Stores encrypted credentials and triggers a first sync. `syncError` is set if the initial sync failed (the account row is still created).

_Requires permission: `accounts:write`._

POST /api/org/{orgId}/accounts

Raises on 400: Bad request

Raises on 402: Payment required — the organization's plan does not include this

func (*AccountsNamespace) Delete

func (n *AccountsNamespace) Delete(ctx context.Context, params AccountsDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete an account

_Requires permission: `accounts:delete`._

DELETE /api/org/{orgId}/accounts/{id}

func (*AccountsNamespace) Detail

Detail: Account metadata + resource type list

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/accounts/{id}/detail

Raises on 404: Not found

func (*AccountsNamespace) List

func (n *AccountsNamespace) List(ctx context.Context, params *AccountsListParams, opts ...RequestOption) ([]Account, error)

List: List accounts in this organization

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/accounts

func (*AccountsNamespace) Resources

func (n *AccountsNamespace) Resources(ctx context.Context, params AccountsResourcesParams, opts ...RequestOption) ([]Resource, error)

Resources: List cached resources for an account

_Requires permission: `resources:read`._

GET /api/org/{orgId}/accounts/{id}/resources

func (*AccountsNamespace) Sync

Sync: Sync all resource types for an account

_Requires permission: `resources:read`._

POST /api/org/{orgId}/accounts/{id}/sync

func (*AccountsNamespace) Update

Update: Update an account (rename and/or change bastion binding)

_Requires permission: `accounts:write`._

PATCH /api/org/{orgId}/accounts/{id}

Raises on 400: Bad request

Raises on 404: Not found

type AccountsPluginsListParams added in v0.30.0

type AccountsPluginsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

AccountsPluginsListParams holds the parameters for `client.accounts.plugins.list`.

Every field is optional; pass nil to take the defaults.

type AccountsPluginsNamespace added in v0.30.0

type AccountsPluginsNamespace struct {
	// contains filtered or unexported fields
}

AccountsPluginsNamespace is `client.accounts.plugins`.

func (*AccountsPluginsNamespace) List added in v0.30.0

List: List installed plugins and their credential fields

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/accounts/plugins

func (*AccountsPluginsNamespace) PolicyTemplate added in v0.30.0

PolicyTemplate: Generate a least-privilege credential template for a plugin

Returns the paste-ready credential document (IAM policy JSON, custom role YAML, token template…) scoped to the requested capability ids. Omitting `capabilities` (or sending it empty) selects every declared capability; any unknown capability id is rejected with 400. 400 also for plugins that don't provide a template.

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/accounts/plugins/{pluginId}/policy-template

Raises on 400: Bad request

Raises on 404: Not found

type AccountsPluginsPolicyTemplateParams added in v0.30.0

type AccountsPluginsPolicyTemplateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	// Capabilities: Comma-separated capability ids, e.g. `resources,costs`.
	Capabilities *string
}

AccountsPluginsPolicyTemplateParams holds the parameters for `client.accounts.plugins.policyTemplate`.

type AccountsPreflightCreateParams added in v0.30.0

type AccountsPreflightCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body PreflightRequest
}

AccountsPreflightCreateParams holds the parameters for `client.accounts.preflight.create`.

type AccountsPreflightNamespace added in v0.30.0

type AccountsPreflightNamespace struct {
	// contains filtered or unexported fields
}

AccountsPreflightNamespace is `client.accounts.preflight`.

func (*AccountsPreflightNamespace) Create added in v0.30.0

Create: Probe credentials before creating an account

Runs the plugin's per-capability permission checks against the submitted credentials. Nothing is stored — use it from the add-account flow before committing.

_Requires permission: `accounts:write`._

POST /api/org/{orgId}/accounts/preflight

Raises on 400: Bad request

Raises on 404: Not found

func (*AccountsPreflightNamespace) PostOrgOrgIDAccountsIDPreflight added in v0.30.0

PostOrgOrgIDAccountsIDPreflight: Re-run credential preflight on a stored account

_Requires permission: `accounts:write`._

POST /api/org/{orgId}/accounts/{id}/preflight

Raises on 400: Bad request

Raises on 404: Not found

type AccountsPreflightPostOrgOrgIDAccountsIDPreflightParams added in v0.30.0

type AccountsPreflightPostOrgOrgIDAccountsIDPreflightParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AccountsPreflightPostOrgOrgIDAccountsIDPreflightParams holds the parameters for `client.accounts.preflight.postOrgOrgIdAccountsIdPreflight`.

type AccountsResourcesParams

type AccountsResourcesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// TopLevelOnly: If `true`, only resources with no `parentResourceId` are
	// returned.
	//
	// One of "true", "false".
	TopLevelOnly *string
}

AccountsResourcesParams holds the parameters for `client.accounts.resources`.

type AccountsSyncParams

type AccountsSyncParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AccountsSyncParams holds the parameters for `client.accounts.sync`.

type AccountsSyncTypeCreateParams

type AccountsSyncTypeCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID  *string
	ID     string
	TypeID ResourceTypeID
}

AccountsSyncTypeCreateParams holds the parameters for `client.accounts.syncType.create`.

type AccountsSyncTypeNamespace

type AccountsSyncTypeNamespace struct {
	// contains filtered or unexported fields
}

AccountsSyncTypeNamespace is `client.accounts.syncType`.

func (*AccountsSyncTypeNamespace) Create

Create: Sync a single resource type and return its resources

_Requires permission: `resources:read`._

POST /api/org/{orgId}/accounts/{id}/sync-type/{typeId}

Raises on 404: Not found

Raises on 500: Server error

type AccountsUpdateParams

type AccountsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body UpdateAccountRequest
}

AccountsUpdateParams holds the parameters for `client.accounts.update`.

type ActiveTunnel

type ActiveTunnel struct {
	LocalPort  int64  `json:"localPort"`
	SSHHost    string `json:"sshHost"`
	RemotePort int64  `json:"remotePort"`
}

ActiveTunnel is the `ActiveTunnel` schema.

type AgentSession

type AgentSession struct {
	ID             string `json:"id"`
	Repo           string `json:"repo"`
	ProjectName    string `json:"projectName"`
	WorkspaceName  string `json:"workspaceName"`
	AccountID      string `json:"accountId"`
	PluginID       string `json:"pluginId"`
	ResourceTypeID string `json:"resourceTypeId"`
	// Tool: One of "codex", "claude-code".
	Tool       string `json:"tool"`
	BranchName string `json:"branchName"`
	// Status: One of "pending", "provisioning", "setting-up", "up", "failed",
	// "stopped".
	Status       string   `json:"status"`
	VMResourceID *string  `json:"vmResourceId"`
	Logs         []string `json:"logs"`
	CreatedAt    string   `json:"createdAt"`
	UpdatedAt    string   `json:"updatedAt"`
}

AgentSession is the `AgentSession` schema.

type AgentSettings

type AgentSettings struct {
	AccountID      string `json:"accountId"`
	PluginID       string `json:"pluginId"`
	ResourceTypeID string `json:"resourceTypeId"`
	// Tool: One of "codex", "claude-code".
	Tool   string            `json:"tool"`
	Fields map[string]string `json:"fields"`
}

AgentSettings is the `AgentSettings` schema.

The API may send null in its place.

type AgentVMAccount

type AgentVMAccount struct {
	AccountID          string            `json:"accountId"`
	AccountName        string            `json:"accountName"`
	PluginID           string            `json:"pluginId"`
	PluginName         string            `json:"pluginName"`
	PluginLogoSvg      *string           `json:"pluginLogoSvg,omitempty"`
	ResourceTypeID     string            `json:"resourceTypeId"`
	ResourceTypeName   string            `json:"resourceTypeName"`
	DefaultUsername    string            `json:"defaultUsername"`
	DefaultFields      map[string]string `json:"defaultFields"`
	DefaultFieldLabels map[string]string `json:"defaultFieldLabels,omitempty"`
	CreateFields       []JSONObject      `json:"createFields,omitempty"`
	HiddenFieldKeys    []string          `json:"hiddenFieldKeys"`
}

AgentVMAccount is the `AgentVmAccount` schema.

Spec schema: `AgentVmAccount`.

type AgentsAccountsParams

type AgentsAccountsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

AgentsAccountsParams holds the parameters for `client.agents.accounts`.

Every field is optional; pass nil to take the defaults.

type AgentsNamespace

type AgentsNamespace struct {

	// Sessions: `client.agents.sessions`.
	Sessions *AgentsSessionsNamespace
	// Settings: `client.agents.settings`.
	Settings *AgentsSettingsNamespace
	// contains filtered or unexported fields
}

AgentsNamespace is `client.agents`.

func (*AgentsNamespace) Accounts

func (n *AgentsNamespace) Accounts(ctx context.Context, params *AgentsAccountsParams, opts ...RequestOption) ([]AgentVMAccount, error)

Accounts: List accounts whose plugins can create agent VMs

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/agents/accounts

type AgentsSessionsCreateParams

type AgentsSessionsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateAgentSession
}

AgentsSessionsCreateParams holds the parameters for `client.agents.sessions.create`.

type AgentsSessionsDeleteParams

type AgentsSessionsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AgentsSessionsDeleteParams holds the parameters for `client.agents.sessions.delete`.

type AgentsSessionsDeleteResponse

type AgentsSessionsDeleteResponse struct {
	OK bool `json:"ok"`
}

AgentsSessionsDeleteResponse is an object the spec declares inline.

type AgentsSessionsListParams

type AgentsSessionsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

AgentsSessionsListParams holds the parameters for `client.agents.sessions.list`.

Every field is optional; pass nil to take the defaults.

type AgentsSessionsNamespace

type AgentsSessionsNamespace struct {
	// contains filtered or unexported fields
}

AgentsSessionsNamespace is `client.agents.sessions`.

func (*AgentsSessionsNamespace) Create

Create: Create an agent session

_Requires permission: `resources:write`._

POST /api/org/{orgId}/agents/sessions

Raises on 400: Bad request

func (*AgentsSessionsNamespace) Delete

Delete: Delete an agent session and destroy its VM

_Requires permission: `resources:delete`._

DELETE /api/org/{orgId}/agents/sessions/{id}

Raises on 404: Not found

Raises on 502: The provider refused to delete the VM

func (*AgentsSessionsNamespace) List

List: List agent sessions

_Requires permission: `resources:read`._

GET /api/org/{orgId}/agents/sessions

func (*AgentsSessionsNamespace) Open

Open: Return the command and working directory for an agent session

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/agents/sessions/{id}/open

Raises on 404: Not found

func (*AgentsSessionsNamespace) Reconcile

Reconcile: Return reconciliation branch metadata

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/agents/sessions/{id}/reconcile

Raises on 404: Not found

type AgentsSessionsOpenParams

type AgentsSessionsOpenParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AgentsSessionsOpenParams holds the parameters for `client.agents.sessions.open`.

type AgentsSessionsOpenResponse

type AgentsSessionsOpenResponse struct {
	Command    string  `json:"command"`
	Cwd        string  `json:"cwd"`
	SSHKeyID   *string `json:"sshKeyId,omitempty"`
	SSHKeyName *string `json:"sshKeyName,omitempty"`
}

AgentsSessionsOpenResponse is an object the spec declares inline.

type AgentsSessionsReconcileParams

type AgentsSessionsReconcileParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

AgentsSessionsReconcileParams holds the parameters for `client.agents.sessions.reconcile`.

type AgentsSessionsReconcileResponse

type AgentsSessionsReconcileResponse struct {
	BranchName string `json:"branchName"`
	Message    string `json:"message"`
}

AgentsSessionsReconcileResponse is an object the spec declares inline.

type AgentsSettingsGetParams

type AgentsSettingsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

AgentsSettingsGetParams holds the parameters for `client.agents.settings.get`.

Every field is optional; pass nil to take the defaults.

type AgentsSettingsNamespace

type AgentsSettingsNamespace struct {
	// contains filtered or unexported fields
}

AgentsSettingsNamespace is `client.agents.settings`.

func (*AgentsSettingsNamespace) Get

Get: Get saved Agents defaults

_Requires permission: `accounts:read`._

GET /api/org/{orgId}/agents/settings

func (*AgentsSettingsNamespace) Update

Update: Save Agents defaults

_Requires permission: `accounts:write`._

PUT /api/org/{orgId}/agents/settings

type AgentsSettingsUpdateParams

type AgentsSettingsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *AgentSettings
}

AgentsSettingsUpdateParams holds the parameters for `client.agents.settings.update`.

type AllocationRule added in v0.29.0

type AllocationRule struct {
	ID           string              `json:"id"`
	CostCentreID string              `json:"costCentreId"`
	Priority     int64               `json:"priority"`
	Match        AllocationRuleMatch `json:"match"`
	CreatedAt    string              `json:"createdAt"`
	UpdatedAt    string              `json:"updatedAt"`
}

AllocationRule is the `AllocationRule` schema.

type AllocationRuleInput added in v0.29.0

type AllocationRuleInput struct {
	CostCentreID string `json:"costCentreId"`
	// Priority: Lower fires first; the first matching rule wins.
	Priority int64               `json:"priority"`
	Match    AllocationRuleMatch `json:"match"`
}

AllocationRuleInput is the `AllocationRuleInput` schema.

type AllocationRuleMatch added in v0.29.0

type AllocationRuleMatch struct {
	TagKey *string `json:"tagKey,omitempty"`
	// TagValue: Only meaningful with tagKey; alone, tagKey matches rows carrying
	// the key.
	TagValue  *string `json:"tagValue,omitempty"`
	AccountID *string `json:"accountId,omitempty"`
	PluginID  *string `json:"pluginId,omitempty"`
	Service   *string `json:"service,omitempty"`
}

AllocationRuleMatch: All set fields must match (AND). A rule with no fields is a catch-all that claims everything reaching it.

type ApplyManifestRequest

type ApplyManifestRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	Manifest         string      `json:"manifest"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

ApplyManifestRequest is the `ApplyManifestRequest` schema.

type ArtifactsListParams

type ArtifactsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ArtifactsListRequest
}

ArtifactsListParams holds the parameters for `client.artifacts.list`.

type ArtifactsListRequest

type ArtifactsListRequest struct {
	AccountID      string     `json:"accountId"`
	ResourceID     ResourceID `json:"resourceId"`
	ResourceTypeID string     `json:"resourceTypeId"`
	PageToken      *string    `json:"pageToken,omitempty"`
	Prefix         *string    `json:"prefix,omitempty"`
}

ArtifactsListRequest is the `ArtifactsListRequest` schema.

type ArtifactsNamespace

type ArtifactsNamespace struct {
	// contains filtered or unexported fields
}

ArtifactsNamespace is `client.artifacts`.

func (*ArtifactsNamespace) List

List: List artifact-registry items for a resource

_Requires permission: `storage:read`._

POST /api/org/{orgId}/artifacts/list

Raises on 400: Bad request

Raises on 404: Not found

Raises on 500: Server error

type AssociationRequest

type AssociationRequest struct {
	ConsumerResourceID     ResourceID `json:"consumerResourceId"`
	ConsumerFieldKey       string     `json:"consumerFieldKey"`
	ProviderResourceID     ResourceID `json:"providerResourceId"`
	ProviderOutputKey      string     `json:"providerOutputKey"`
	ProviderPluginID       string     `json:"providerPluginId"`
	ProviderResourceTypeID string     `json:"providerResourceTypeId"`
	ProviderAccountID      string     `json:"providerAccountId"`
}

AssociationRequest is the `AssociationRequest` schema.

type AssociationsCreateParams

type AssociationsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body AssociationRequest
}

AssociationsCreateParams holds the parameters for `client.associations.create`.

type AssociationsLiteralParams

type AssociationsLiteralParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body LiteralAssociationRequest
}

AssociationsLiteralParams holds the parameters for `client.associations.literal`.

type AssociationsNamespace

type AssociationsNamespace struct {
	// contains filtered or unexported fields
}

AssociationsNamespace is `client.associations`.

func (*AssociationsNamespace) Create

Create: Wire one resource's output into another resource's secret field

_Requires permission: `secrets:write`._

POST /api/org/{orgId}/associations

Raises on 404: Not found

func (*AssociationsNamespace) Literal

Literal: Set a secret field to a literal plaintext value

_Requires permission: `secrets:write`._

POST /api/org/{orgId}/associations/literal

Raises on 404: Not found

type AttachRequest

type AttachRequest struct {
	PluginID         string     `json:"pluginId"`
	AccountID        string     `json:"accountId"`
	SourceTypeID     string     `json:"sourceTypeId"`
	SourceResourceID ResourceID `json:"sourceResourceId"`
	TargetTypeID     string     `json:"targetTypeId"`
	TargetResourceID ResourceID `json:"targetResourceId"`
}

AttachRequest is the `AttachRequest` schema.

type AuditEntry

type AuditEntry struct {
	ID         string     `json:"id"`
	UserID     *string    `json:"userId"`
	APIKeyID   *string    `json:"apiKeyId"`
	Action     string     `json:"action"`
	EntityType string     `json:"entityType"`
	EntityID   string     `json:"entityId"`
	Metadata   JSONObject `json:"metadata"`
	IPAddress  *string    `json:"ipAddress"`
	CreatedAt  string     `json:"createdAt"`
	UserName   *string    `json:"userName"`
	UserEmail  *string    `json:"userEmail"`
}

AuditEntry is the `AuditEntry` schema.

type AuditLogsGetParams

type AuditLogsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	Page       *int64
	PageSize   *int64
	Action     *string
	EntityType *string
	UserID     *string
	From       *string
	To         *string
}

AuditLogsGetParams holds the parameters for `client.auditLogs.get`.

Every field is optional; pass nil to take the defaults.

type AuditLogsNamespace

type AuditLogsNamespace struct {
	// contains filtered or unexported fields
}

AuditLogsNamespace is `client.auditLogs`.

func (*AuditLogsNamespace) Get

Get: List audit log entries (paginated, filterable)

_Requires permission: `audit:read`._

GET /api/org/{orgId}/audit-logs

type AuditResponse

type AuditResponse struct {
	Entries []AuditEntry `json:"entries"`
	Total   int64        `json:"total"`
}

AuditResponse is the `AuditResponse` schema.

type AuthFactor

type AuthFactor struct {
	ID string `json:"id"`
	// Type: One of "totp", "sms", "generic_otp".
	Type       string  `json:"type"`
	CreatedAt  string  `json:"createdAt"`
	UpdatedAt  string  `json:"updatedAt"`
	TOTPIssuer *string `json:"totpIssuer"`
	TOTPUser   *string `json:"totpUser"`
}

AuthFactor is the `AuthFactor` schema.

type AuthNamespace

type AuthNamespace struct {
	// contains filtered or unexported fields
}

AuthNamespace is `client.auth`.

func (*AuthNamespace) Me

func (n *AuthNamespace) Me(ctx context.Context, opts ...RequestOption) (*Session, error)

Me: Current session + onboarding status

GET /api/auth/me

Raises on 401: Unauthenticated

func (*AuthNamespace) Orgs

func (n *AuthNamespace) Orgs(ctx context.Context, opts ...RequestOption) ([]OrgMembership, error)

Orgs: Organizations the current user belongs to

GET /api/auth/orgs

Raises on 401: Unauthenticated

type Bastion

type Bastion struct {
	ID              string        `json:"id"`
	Name            string        `json:"name"`
	TokenPrefix     string        `json:"tokenPrefix"`
	AgentVersion    *string       `json:"agentVersion"`
	LastSeenAt      *string       `json:"lastSeenAt"`
	Status          BastionStatus `json:"status"`
	RevokedAt       *string       `json:"revokedAt"`
	CreatedAt       string        `json:"createdAt"`
	CreatedByUserID string        `json:"createdByUserId"`
	Connected       bool          `json:"connected"`
	AccountCount    int64         `json:"accountCount"`
}

Bastion is the `Bastion` schema.

type BastionStatus

type BastionStatus = string

BastionStatus is the `BastionStatus` schema.

const (
	BastionStatusPending BastionStatus = "pending"
	BastionStatusActive  BastionStatus = "active"
	BastionStatusRevoked BastionStatus = "revoked"
)

The values BastionStatus takes.

type BastionsCreateParams

type BastionsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateBastionRequest
}

BastionsCreateParams holds the parameters for `client.bastions.create`.

type BastionsDeleteParams

type BastionsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

BastionsDeleteParams holds the parameters for `client.bastions.delete`.

type BastionsListParams

type BastionsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

BastionsListParams holds the parameters for `client.bastions.list`.

Every field is optional; pass nil to take the defaults.

type BastionsNamespace

type BastionsNamespace struct {
	// contains filtered or unexported fields
}

BastionsNamespace is `client.bastions`.

func (*BastionsNamespace) Create

Create: Register a new bastion (returns the enrollment token once)

_Requires permission: `bastions:write`._

POST /api/org/{orgId}/bastions

Raises on 400: Bad request

func (*BastionsNamespace) Delete

func (n *BastionsNamespace) Delete(ctx context.Context, params BastionsDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Revoke a bastion — accounts referencing it have their bastion binding cleared

_Requires permission: `bastions:write`._

DELETE /api/org/{orgId}/bastions/{id}

Raises on 404: Not found

func (*BastionsNamespace) List

func (n *BastionsNamespace) List(ctx context.Context, params *BastionsListParams, opts ...RequestOption) ([]Bastion, error)

List: List bastion agents registered to this org

_Requires permission: `bastions:read`._

GET /api/org/{orgId}/bastions

type BillingCheckoutParams

type BillingCheckoutParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

BillingCheckoutParams holds the parameters for `client.billing.checkout`.

Every field is optional; pass nil to take the defaults.

type BillingNamespace

type BillingNamespace struct {
	// contains filtered or unexported fields
}

BillingNamespace is `client.billing`.

func (*BillingNamespace) Checkout

Checkout: Start a Stripe Checkout session

Rejected with 400 for complimentary organizations — they are never billed.

_Requires permission: `billing:write`._

POST /api/org/{orgId}/billing/checkout

Raises on 400: Bad request

Raises on 500: Server error

func (*BillingNamespace) Portal

Portal: Get a Stripe customer portal URL

_Requires permission: `billing:write`._

POST /api/org/{orgId}/billing/portal

Raises on 404: Not found

func (*BillingNamespace) Status

Status: Get the org's billing status (complimentary flag + subscription or `null`)

_Requires permission: `billing:read`._

GET /api/org/{orgId}/billing/status

type BillingPortalParams

type BillingPortalParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

BillingPortalParams holds the parameters for `client.billing.portal`.

Every field is optional; pass nil to take the defaults.

type BillingStatus

type BillingStatus struct {
	// Complimentary: Platform-granted complimentary access: all paid perks,
	// uncapped AI chat, never billed.
	Complimentary bool          `json:"complimentary"`
	Subscription  *Subscription `json:"subscription"`
}

BillingStatus is the `BillingStatus` schema.

type BillingStatusParams

type BillingStatusParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

BillingStatusParams holds the parameters for `client.billing.status`.

Every field is optional; pass nil to take the defaults.

type BudgetAlertEvent

type BudgetAlertEvent struct {
	ID    string `json:"id"`
	Month string `json:"month"`
	// ThresholdType: One of "actual", "forecast".
	ThresholdType       string `json:"thresholdType"`
	ThresholdPercent    int64  `json:"thresholdPercent"`
	ActualAmountCents   int64  `json:"actualAmountCents"`
	ForecastAmountCents *int64 `json:"forecastAmountCents"`
	TriggeredAt         string `json:"triggeredAt"`
}

BudgetAlertEvent is the `BudgetAlertEvent` schema.

type BudgetCostFilter

type BudgetCostFilter struct {
	// Dimension: One of "provider", "account", "service", "region", "resource",
	// "tag".
	Dimension string `json:"dimension"`
	// Op: One of "in", "not_in".
	Op     string   `json:"op"`
	Values []string `json:"values"`
	TagKey *string  `json:"tagKey,omitempty"`
}

BudgetCostFilter is the `BudgetCostFilter` schema.

type BudgetFull

type BudgetFull struct {
	ID              string             `json:"id"`
	OrganizationID  string             `json:"organizationId"`
	Name            string             `json:"name"`
	AmountCents     int64              `json:"amountCents"`
	Currency        string             `json:"currency"`
	Filters         []BudgetCostFilter `json:"filters"`
	Thresholds      []BudgetThreshold  `json:"thresholds"`
	CreatedByUserID *string            `json:"createdByUserId"`
	DeletedAt       *string            `json:"deletedAt"`
	CreatedAt       string             `json:"createdAt"`
	UpdatedAt       string             `json:"updatedAt"`
}

BudgetFull is the `BudgetFull` schema.

type BudgetInput

type BudgetInput struct {
	Name        string             `json:"name"`
	AmountCents int64              `json:"amountCents"`
	Currency    *string            `json:"currency,omitempty"`
	Filters     []BudgetCostFilter `json:"filters,omitempty"`
	Thresholds  []BudgetThreshold  `json:"thresholds"`
}

BudgetInput is the `BudgetInput` schema.

type BudgetThreshold

type BudgetThreshold struct {
	// Type: One of "actual", "forecast".
	Type    string `json:"type"`
	Percent int64  `json:"percent"`
}

BudgetThreshold is the `BudgetThreshold` schema.

type BudgetWithStatus

type BudgetWithStatus struct {
	ID                 string                               `json:"id"`
	Name               string                               `json:"name"`
	AmountCents        int64                                `json:"amountCents"`
	Currency           string                               `json:"currency"`
	Filters            []BudgetCostFilter                   `json:"filters"`
	Thresholds         []BudgetThreshold                    `json:"thresholds"`
	Month              string                               `json:"month"`
	ActualCents        int64                                `json:"actualCents"`
	ForecastCents      *int64                               `json:"forecastCents"`
	CurrentMonthEvents []BudgetWithStatusCurrentMonthEvents `json:"currentMonthEvents"`
	Placements         []BudgetWithStatusPlacements         `json:"placements"`
}

BudgetWithStatus is the `BudgetWithStatus` schema.

type BudgetWithStatusCurrentMonthEvents

type BudgetWithStatusCurrentMonthEvents struct {
	ID string `json:"id"`
	// ThresholdType: One of "actual", "forecast".
	ThresholdType    string `json:"thresholdType"`
	ThresholdPercent int64  `json:"thresholdPercent"`
	TriggeredAt      string `json:"triggeredAt"`
}

BudgetWithStatusCurrentMonthEvents is an object the spec declares inline.

type BudgetWithStatusPlacements added in v0.5.0

type BudgetWithStatusPlacements struct {
	WidgetID      string `json:"widgetId"`
	DashboardID   string `json:"dashboardId"`
	DashboardName string `json:"dashboardName"`
}

BudgetWithStatusPlacements is an object the spec declares inline.

type BudgetsCreateParams

type BudgetsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body BudgetInput
}

BudgetsCreateParams holds the parameters for `client.budgets.create`.

type BudgetsDeleteParams

type BudgetsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

BudgetsDeleteParams holds the parameters for `client.budgets.delete`.

type BudgetsEventsParams

type BudgetsEventsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

BudgetsEventsParams holds the parameters for `client.budgets.events`.

type BudgetsGetParams

type BudgetsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

BudgetsGetParams holds the parameters for `client.budgets.get`.

type BudgetsListParams

type BudgetsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

BudgetsListParams holds the parameters for `client.budgets.list`.

Every field is optional; pass nil to take the defaults.

type BudgetsNamespace

type BudgetsNamespace struct {
	// contains filtered or unexported fields
}

BudgetsNamespace is `client.budgets`.

func (*BudgetsNamespace) Create

Create: Create a budget

POST /api/org/{orgId}/budgets

Raises on 400: Bad request

func (*BudgetsNamespace) Delete

func (n *BudgetsNamespace) Delete(ctx context.Context, params BudgetsDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a budget

DELETE /api/org/{orgId}/budgets/{id}

Raises on 404: Not found

func (*BudgetsNamespace) Events

Events: Alert event history for a budget

GET /api/org/{orgId}/budgets/{id}/events

Raises on 404: Not found

func (*BudgetsNamespace) Get

Get: Get a budget with current-month status

GET /api/org/{orgId}/budgets/{id}

Raises on 404: Not found

func (*BudgetsNamespace) List

List: List budgets with current-month actuals and forecasts

GET /api/org/{orgId}/budgets

func (*BudgetsNamespace) Update

Update: Update a budget

PUT /api/org/{orgId}/budgets/{id}

Raises on 400: Bad request

Raises on 404: Not found

type BudgetsUpdateParams

type BudgetsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body BudgetInput
}

BudgetsUpdateParams holds the parameters for `client.budgets.update`.

type ChangeFreeze added in v0.23.0

type ChangeFreeze struct {
	ID              string  `json:"id"`
	Name            string  `json:"name"`
	Reason          *string `json:"reason"`
	StartsAt        string  `json:"startsAt"`
	EndsAt          *string `json:"endsAt"`
	Active          bool    `json:"active"`
	CreatedByUserID *string `json:"createdByUserId"`
	EndedByUserID   *string `json:"endedByUserId"`
	CreatedAt       string  `json:"createdAt"`
	UpdatedAt       string  `json:"updatedAt"`
}

ChangeFreeze is the `ChangeFreeze` schema.

type ChangeFreezeBlocked added in v0.23.0

type ChangeFreezeBlocked struct {
	Error string `json:"error"`
	// Code: One of "change_freeze_active".
	Code   string                    `json:"code"`
	Freeze ChangeFreezeBlockedFreeze `json:"freeze"`
}

ChangeFreezeBlocked is the `ChangeFreezeBlocked` schema.

type ChangeFreezeBlockedFreeze added in v0.23.0

type ChangeFreezeBlockedFreeze struct {
	ID       string  `json:"id"`
	Name     string  `json:"name"`
	Reason   *string `json:"reason"`
	StartsAt string  `json:"startsAt"`
	EndsAt   *string `json:"endsAt"`
}

ChangeFreezeBlockedFreeze is an object the spec declares inline.

type ChangeFreezeInput added in v0.23.0

type ChangeFreezeInput struct {
	Name     string  `json:"name"`
	Reason   *string `json:"reason,omitempty"`
	StartsAt *string `json:"startsAt,omitempty"`
	EndsAt   *string `json:"endsAt,omitempty"`
}

ChangeFreezeInput is the `ChangeFreezeInput` schema.

type ChangeFreezeStatus added in v0.23.0

type ChangeFreezeStatus struct {
	Freeze any `json:"freeze"`
}

ChangeFreezeStatus is the `ChangeFreezeStatus` schema.

type ChangeFreezesCreateParams added in v0.23.0

type ChangeFreezesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ChangeFreezeInput
}

ChangeFreezesCreateParams holds the parameters for `client.changeFreezes.create`.

type ChangeFreezesDeleteParams added in v0.23.0

type ChangeFreezesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

ChangeFreezesDeleteParams holds the parameters for `client.changeFreezes.delete`.

type ChangeFreezesEndParams added in v0.23.0

type ChangeFreezesEndParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

ChangeFreezesEndParams holds the parameters for `client.changeFreezes.end`.

type ChangeFreezesListParams added in v0.23.0

type ChangeFreezesListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

ChangeFreezesListParams holds the parameters for `client.changeFreezes.list`.

Every field is optional; pass nil to take the defaults.

type ChangeFreezesNamespace added in v0.23.0

type ChangeFreezesNamespace struct {
	// contains filtered or unexported fields
}

ChangeFreezesNamespace is `client.changeFreezes`.

func (*ChangeFreezesNamespace) Create added in v0.23.0

Create: Declare a change freeze window

While the freeze is in effect, destructive actions (resource deletion, destructive plugin actions, secret-version destroys, deployment rollbacks) return `423` unless explicitly overridden by a caller with `freezes:override`.

_Requires permission: `freezes:write`._

POST /api/org/{orgId}/change-freezes

Raises on 400: Bad request

func (*ChangeFreezesNamespace) Delete added in v0.23.0

Delete: Delete a change freeze window

_Requires permission: `freezes:write`._

DELETE /api/org/{orgId}/change-freezes/{id}

Raises on 404: Not found

func (*ChangeFreezesNamespace) End added in v0.23.0

End: End a change freeze now

_Requires permission: `freezes:write`._

POST /api/org/{orgId}/change-freezes/{id}/end

Raises on 404: Not found

func (*ChangeFreezesNamespace) List added in v0.23.0

List: List change freeze windows, newest first

_Requires permission: `freezes:read`._

GET /api/org/{orgId}/change-freezes

func (*ChangeFreezesNamespace) Status added in v0.23.0

Status: The freeze currently in effect, if any

Returns the active freeze window (active, started, not yet past its end time) or `freeze: null`. Clients poll this to show the freeze banner and pre-warn before destructive actions.

_Requires permission: `freezes:read`._

GET /api/org/{orgId}/change-freezes/status

func (*ChangeFreezesNamespace) Update added in v0.23.0

Update: Update a change freeze window

_Requires permission: `freezes:write`._

PUT /api/org/{orgId}/change-freezes/{id}

Raises on 400: Bad request

Raises on 404: Not found

type ChangeFreezesStatusParams added in v0.23.0

type ChangeFreezesStatusParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

ChangeFreezesStatusParams holds the parameters for `client.changeFreezes.status`.

Every field is optional; pass nil to take the defaults.

type ChangeFreezesUpdateParams added in v0.23.0

type ChangeFreezesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body ChangeFreezeInput
}

ChangeFreezesUpdateParams holds the parameters for `client.changeFreezes.update`.

type ChangesAlertSettingsGetParams added in v0.27.0

type ChangesAlertSettingsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

ChangesAlertSettingsGetParams holds the parameters for `client.changes.alertSettings.get`.

Every field is optional; pass nil to take the defaults.

type ChangesAlertSettingsNamespace added in v0.27.0

type ChangesAlertSettingsNamespace struct {
	// contains filtered or unexported fields
}

ChangesAlertSettingsNamespace is `client.changes.alertSettings`.

func (*ChangesAlertSettingsNamespace) Get added in v0.27.0

Get: Get the organization's resource-drift alert filter

Drift notifications are batched: at most one message per organization per `cooldownMinutes`, covering every change since the previous one. These settings decide which changes count and how often a message may go out. Who receives it is the `resourceDrift` opt-in on push preferences, Slack channels and Teams webhooks — off by default on all three.

GET /api/org/{orgId}/changes/alert-settings

func (*ChangesAlertSettingsNamespace) Update added in v0.27.0

Update: Update the organization's resource-drift alert filter

Every field is optional so a single toggle can be saved on its own. `cooldownMinutes` is floored at 5: below the poller's own cycle the notification rate would follow the sync rate again, which is what the batching exists to prevent.

PUT /api/org/{orgId}/changes/alert-settings

Raises on 400: Bad request

type ChangesAlertSettingsUpdateParams added in v0.27.0

type ChangesAlertSettingsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DriftAlertSettingsUpdate
}

ChangesAlertSettingsUpdateParams holds the parameters for `client.changes.alertSettings.update`.

Every field is optional; pass nil to take the defaults.

type ChangesGetParams added in v0.22.0

type ChangesGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	Page       *int64
	PageSize   *int64
	AccountID  *string
	ResourceID *string
	Kind       *ResourceChangeKind
	From       *string
	To         *string
}

ChangesGetParams holds the parameters for `client.changes.get`.

Every field is optional; pass nil to take the defaults.

type ChangesNamespace added in v0.22.0

type ChangesNamespace struct {

	// AlertSettings: `client.changes.alertSettings`.
	AlertSettings *ChangesAlertSettingsNamespace
	// contains filtered or unexported fields
}

ChangesNamespace is `client.changes`.

func (*ChangesNamespace) Get added in v0.22.0

Get: Org-wide change timeline (paginated, filterable)

Change events recorded by the resource poller: each poll cycle diffs the freshly fetched state against the stored snapshot and records resources that appeared, changed a stored field, or disappeared upstream. Cross-provider by construction — the diff runs on the generic stored record, so every plugin's resources show up here.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/changes

Raises on 400: Bad request

func (*ChangesNamespace) Resource added in v0.22.0

Resource: Change timeline for one resource

Recent change events for a single resource, newest first. The resource id travels as a query parameter because composite ids contain slashes and colons.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/changes/resource

Raises on 400: Bad request

type ChangesResourceParams added in v0.22.0

type ChangesResourceParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	ResourceID string
	Limit      *int64
}

ChangesResourceParams holds the parameters for `client.changes.resource`.

type ChildResourceRef

type ChildResourceRef struct {
	ID             ResourceID `json:"id"`
	DisplayName    string     `json:"displayName"`
	ResourceTypeID string     `json:"resourceTypeId"`
	PluginID       string     `json:"pluginId"`
	AccountID      string     `json:"accountId"`
	Status         *StatusDot `json:"status,omitempty"`
	Fields         JSONObject `json:"fields,omitempty"`
}

ChildResourceRef is the `ChildResourceRef` schema.

type ChildTypeRef

type ChildTypeRef struct {
	ID                string       `json:"id"`
	DisplayName       string       `json:"displayName"`
	PluralDisplayName *string      `json:"pluralDisplayName,omitempty"`
	SupportsCreate    bool         `json:"supportsCreate"`
	Fields            []JSONObject `json:"fields,omitempty"`
}

ChildTypeRef is the `ChildTypeRef` schema.

type ClientOption

type ClientOption func(*clientConfig)

ClientOption configures a client at construction time.

func WithAPIKey

func WithAPIKey(apiKey string) ClientOption

WithAPIKey sets the API key or access token sent as "Authorization: Bearer". Leave it unset only if you are supplying that header yourself with WithHeader.

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL points the client at a different deployment. Trailing slashes are trimmed, so both "https://host" and "https://host/" behave the same.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOption

WithHTTPClient swaps the *http.Client used for every request — for proxies, custom transports, or a client with a timeout. Defaults to http.DefaultClient.

func WithHeader

func WithHeader(name, value string) ClientOption

WithHeader sets a header on every request. Call it more than once for more than one header; a per-call WithRequestHeader wins over it.

func WithOrgID

func WithOrgID(orgID string) ClientOption

WithOrgID sets the orgId every scoped call falls back to, so it can be left out of the parameters. A call that passes its own wins; a call that has neither returns ErrMissingPathParam.

func WithUserAgent

func WithUserAgent(userAgent string) ClientOption

WithUserAgent overrides the default "infrawrench-go/<version>" User-Agent.

type ConnectEnvDeployParams

type ConnectEnvDeployParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ConnectEnvDeployRequest
}

ConnectEnvDeployParams holds the parameters for `client.connect.envDeploy`.

type ConnectEnvDeployRequest

type ConnectEnvDeployRequest struct {
	SourceAccountID      string            `json:"sourceAccountId"`
	SourceResourceID     ResourceID        `json:"sourceResourceId"`
	SourcePluginID       string            `json:"sourcePluginId"`
	SourceResourceTypeID string            `json:"sourceResourceTypeId"`
	SourceExternalID     *string           `json:"sourceExternalId,omitempty"`
	TargetSSHHost        string            `json:"targetSshHost"`
	SSHKeyID             string            `json:"sshKeyId"`
	SSHUsername          string            `json:"sshUsername"`
	TemplateID           string            `json:"templateId"`
	KeyOverrides         map[string]string `json:"keyOverrides"`
	// Format: One of "dotenv", "profile".
	Format   string `json:"format"`
	FilePath string `json:"filePath"`
	Append   bool   `json:"append"`
}

ConnectEnvDeployRequest is the `ConnectEnvDeployRequest` schema.

type ConnectNamespace

type ConnectNamespace struct {
	// contains filtered or unexported fields
}

ConnectNamespace is `client.connect`.

func (*ConnectNamespace) EnvDeploy

func (n *ConnectNamespace) EnvDeploy(ctx context.Context, params ConnectEnvDeployParams, opts ...RequestOption) (*OK, error)

EnvDeploy: Deploy env vars from a source resource to an SSH target

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/connect/env-deploy

Raises on 400: Bad request

Raises on 404: Not found

func (*ConnectNamespace) SecretExport

func (n *ConnectNamespace) SecretExport(ctx context.Context, params ConnectSecretExportParams, opts ...RequestOption) (*OK, error)

SecretExport: Materialize source outputs as a secret in the target (e.g. K8s)

_Requires permission: `resources:write`._

POST /api/org/{orgId}/connect/secret-export

Raises on 400: Bad request

Raises on 404: Not found

func (*ConnectNamespace) Templates

Templates: List secret-export templates and target capabilities

_Requires permission: `resources:read`._

POST /api/org/{orgId}/connect/templates

Raises on 404: Not found

type ConnectSecretExportParams

type ConnectSecretExportParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ConnectSecretExportRequest
}

ConnectSecretExportParams holds the parameters for `client.connect.secretExport`.

type ConnectSecretExportRequest

type ConnectSecretExportRequest struct {
	SourceAccountID      string            `json:"sourceAccountId"`
	SourceResourceID     ResourceID        `json:"sourceResourceId"`
	SourcePluginID       string            `json:"sourcePluginId"`
	SourceResourceTypeID string            `json:"sourceResourceTypeId"`
	SourceExternalID     *string           `json:"sourceExternalId,omitempty"`
	TargetAccountID      string            `json:"targetAccountId"`
	TargetPluginID       string            `json:"targetPluginId"`
	TemplateID           string            `json:"templateId"`
	Namespace            string            `json:"namespace"`
	SecretName           string            `json:"secretName"`
	KeyOverrides         map[string]string `json:"keyOverrides"`
}

ConnectSecretExportRequest is the `ConnectSecretExportRequest` schema.

type ConnectTemplatesParams

type ConnectTemplatesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ConnectTemplatesRequest
}

ConnectTemplatesParams holds the parameters for `client.connect.templates`.

type ConnectTemplatesRequest

type ConnectTemplatesRequest struct {
	SourcePluginID       string `json:"sourcePluginId"`
	SourceResourceTypeID string `json:"sourceResourceTypeId"`
	TargetAccountID      string `json:"targetAccountId"`
	TargetPluginID       string `json:"targetPluginId"`
}

ConnectTemplatesRequest is the `ConnectTemplatesRequest` schema.

type ConnectTemplatesResponse

type ConnectTemplatesResponse struct {
	Templates               []SecretExportTemplate `json:"templates"`
	EffectiveResourceTypeID string                 `json:"effectiveResourceTypeId"`
	SupportsSecretImport    bool                   `json:"supportsSecretImport"`
	Namespaces              []string               `json:"namespaces"`
}

ConnectTemplatesResponse is the `ConnectTemplatesResponse` schema.

type CostAccountStatus

type CostAccountStatus struct {
	AccountID            string   `json:"accountId"`
	PluginID             string   `json:"pluginId"`
	DisplayName          string   `json:"displayName"`
	SupportsCosts        bool     `json:"supportsCosts"`
	PeriodNative         bool     `json:"periodNative"`
	Dimensions           []string `json:"dimensions"`
	CostLastPolledAt     *string  `json:"costLastPolledAt"`
	CostBackfilledAt     *string  `json:"costBackfilledAt"`
	CostPollFailureCount int64    `json:"costPollFailureCount"`
	// CostPollError: Last cost-collection failure for this account, cleared on
	// the next success. `helpLink` points at the provider page that fixes a
	// setup problem when the plugin can identify one (e.g. GCP's billing export
	// console).
	CostPollError *CostAccountStatusCostPollError `json:"costPollError"`
	Coverage      *CostAccountStatusCoverage      `json:"coverage"`
}

CostAccountStatus is the `CostAccountStatus` schema.

type CostAccountStatusCostPollError

type CostAccountStatusCostPollError struct {
	Message  string                                  `json:"message"`
	HelpLink *CostAccountStatusCostPollErrorHelpLink `json:"helpLink"`
}

CostAccountStatusCostPollError is an object the spec declares inline.

type CostAccountStatusCostPollErrorHelpLink struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

CostAccountStatusCostPollErrorHelpLink is an object the spec declares inline.

type CostAccountStatusCoverage

type CostAccountStatusCoverage struct {
	FirstDay string `json:"firstDay"`
	LastDay  string `json:"lastDay"`
}

CostAccountStatusCoverage is an object the spec declares inline.

type CostAnomaly added in v0.24.0

type CostAnomaly struct {
	ID string `json:"id"`
	// Day: The anomalous UTC day.
	Day string `json:"day"`
	// Kind: Which detection produced the row. `spike` is spend far above the
	// key's own trailing baseline; `new_source` is a provider or service with no
	// spend at all across the trailing window that suddenly has material spend —
	// it can never be a `spike`, since a zero baseline has no mean or deviation
	// to exceed. Rows written before new-source detection existed read as
	// `spike`.
	//
	// One of "spike", "new_source".
	Kind string `json:"kind"`
	// Dimension: One of "provider", "service".
	Dimension string `json:"dimension"`
	// DimensionKey: The dimension's value — a plugin id or a service name.
	DimensionKey string `json:"dimensionKey"`
	Currency     string `json:"currency"`
	ActualCents  int64  `json:"actualCents"`
	// BaselineCents: Mean daily spend over the trailing 28-day baseline, in
	// cents. Zero, or near it, for a `new_source` — clients must not compute a
	// percentage change from it.
	BaselineCents int64 `json:"baselineCents"`
	// ThresholdCents: The detection bar the day cleared, in cents: baseline mean + N·stddev for a `spike`, the new-source floor for a `new_source`.
	ThresholdCents int64  `json:"thresholdCents"`
	DetectedAt     string `json:"detectedAt"`
	// NotifiedAt: When the anomaly was delivered to a notification channel; null
	// when delivery failed or a recent anomaly for the same key suppressed it.
	NotifiedAt *string `json:"notifiedAt"`
	// Hints: Root-cause hints computed when the anomaly fired: human-readable
	// facts from the change timeline and audit log for the anomalous day and the
	// day before (e.g. "12 gce-instance resources appeared", a workflow run, a
	// lifted change freeze), ranked by likely relevance and capped at three.
	// Empty when nothing notable happened in the window or the anomaly predates
	// hint collection.
	Hints []string `json:"hints"`
}

CostAnomaly is the `CostAnomaly` schema.

type CostAnomalySettings added in v0.27.0

type CostAnomalySettings struct {
	// Sigmas: Standard deviations above a key's own trailing mean that count as
	// a spike. Lower is more sensitive. Bounded at 1 — below that roughly a
	// third of ordinary days clear the bar — and at 10, above which nothing
	// short of a 10x jump fires. Defaults to 3.
	Sigmas float64 `json:"sigmas"`
	// MinDeltaCents: Minimum rise over the baseline mean before a spike alerts,
	// in USD cents (converted per series, so it means the same real amount in
	// every currency). Defaults to 1000 ($10).
	MinDeltaCents int64 `json:"minDeltaCents"`
	// NewSourceMinCents: Minimum first-day spend before a new spend source
	// alerts, in USD cents. A key with no prior spend has no statistical bar to
	// clear, so this absolute floor is the only thing keeping a new $0.02/day
	// service quiet. Defaults to 2500 ($25).
	NewSourceMinCents int64 `json:"newSourceMinCents"`
	// SmsAlerts: Which anomalies also text the organization's Twilio recipients.
	// Defaults to `off` — an organization with Twilio configured for budgets
	// does not start receiving anomaly texts until it asks to. `new_source`
	// texts only about spend appearing from nothing, which is what a leaked key
	// looks like on a bill; `all` adds spikes on existing lines. Delivery is
	// batched — one SMS per detection pass summarizing what it alerted on, at
	// most one every six hours per organization — and never places a voice call.
	// Push, Slack and Teams delivery is unaffected by this setting.
	//
	// One of "off", "new_source", "all".
	SmsAlerts string `json:"smsAlerts"`
}

CostAnomalySettings is the `CostAnomalySettings` schema.

type CostAnomalySettingsView added in v0.27.0

type CostAnomalySettingsView struct {
	// Sigmas: Standard deviations above a key's own trailing mean that count as
	// a spike. Lower is more sensitive. Bounded at 1 — below that roughly a
	// third of ordinary days clear the bar — and at 10, above which nothing
	// short of a 10x jump fires. Defaults to 3.
	Sigmas float64 `json:"sigmas"`
	// MinDeltaCents: Minimum rise over the baseline mean before a spike alerts,
	// in USD cents (converted per series, so it means the same real amount in
	// every currency). Defaults to 1000 ($10).
	MinDeltaCents int64 `json:"minDeltaCents"`
	// NewSourceMinCents: Minimum first-day spend before a new spend source
	// alerts, in USD cents. A key with no prior spend has no statistical bar to
	// clear, so this absolute floor is the only thing keeping a new $0.02/day
	// service quiet. Defaults to 2500 ($25).
	NewSourceMinCents int64 `json:"newSourceMinCents"`
	// SmsAlerts: Which anomalies also text the organization's Twilio recipients.
	// Defaults to `off` — an organization with Twilio configured for budgets
	// does not start receiving anomaly texts until it asks to. `new_source`
	// texts only about spend appearing from nothing, which is what a leaked key
	// looks like on a bill; `all` adds spikes on existing lines. Delivery is
	// batched — one SMS per detection pass summarizing what it alerted on, at
	// most one every six hours per organization — and never places a voice call.
	// Push, Slack and Teams delivery is unaffected by this setting.
	//
	// One of "off", "new_source", "all".
	SmsAlerts string `json:"smsAlerts"`
	// SmsConfigured: Whether an SMS raised right now could be delivered: paging
	// enabled for the organization, Twilio credentials and a from-number stored,
	// and at least one recipient opted into SMS. Read-only and derived — it is
	// not accepted on PUT.
	SmsConfigured bool `json:"smsConfigured"`
}

CostAnomalySettingsView is the `CostAnomalySettingsView` schema.

type CostCentre added in v0.29.0

type CostCentre struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
	CreatedAt   string  `json:"createdAt"`
	UpdatedAt   string  `json:"updatedAt"`
}

CostCentre is the `CostCentre` schema.

type CostCentreInput added in v0.29.0

type CostCentreInput struct {
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
}

CostCentreInput is the `CostCentreInput` schema.

type CostCentresCreateParams added in v0.29.0

type CostCentresCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CostCentreInput
}

CostCentresCreateParams holds the parameters for `client.costCentres.create`.

type CostCentresDeleteParams added in v0.29.0

type CostCentresDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

CostCentresDeleteParams holds the parameters for `client.costCentres.delete`.

type CostCentresListParams added in v0.29.0

type CostCentresListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CostCentresListParams holds the parameters for `client.costCentres.list`.

Every field is optional; pass nil to take the defaults.

type CostCentresNamespace added in v0.29.0

type CostCentresNamespace struct {

	// Rules: `client.costCentres.rules`.
	Rules *CostCentresRulesNamespace
	// contains filtered or unexported fields
}

CostCentresNamespace is `client.costCentres`.

func (*CostCentresNamespace) Create added in v0.29.0

Create: Create a cost centre

_Requires permission: `costs:write`._

POST /api/org/{orgId}/cost-centres

Raises on 400: Bad request

func (*CostCentresNamespace) Delete added in v0.29.0

Delete: Delete a cost centre (its allocation rules go with it)

_Requires permission: `costs:write`._

DELETE /api/org/{orgId}/cost-centres/{id}

Raises on 404: Not found

func (*CostCentresNamespace) List added in v0.29.0

List: List cost centres

_Requires permission: `costs:read`._

GET /api/org/{orgId}/cost-centres

func (*CostCentresNamespace) Update added in v0.29.0

Update: Update a cost centre

_Requires permission: `costs:write`._

PUT /api/org/{orgId}/cost-centres/{id}

Raises on 400: Bad request

Raises on 404: Not found

type CostCentresRulesCreateParams added in v0.29.0

type CostCentresRulesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body AllocationRuleInput
}

CostCentresRulesCreateParams holds the parameters for `client.costCentres.rules.create`.

type CostCentresRulesDeleteParams added in v0.29.0

type CostCentresRulesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

CostCentresRulesDeleteParams holds the parameters for `client.costCentres.rules.delete`.

type CostCentresRulesListParams added in v0.29.0

type CostCentresRulesListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CostCentresRulesListParams holds the parameters for `client.costCentres.rules.list`.

Every field is optional; pass nil to take the defaults.

type CostCentresRulesNamespace added in v0.29.0

type CostCentresRulesNamespace struct {
	// contains filtered or unexported fields
}

CostCentresRulesNamespace is `client.costCentres.rules`.

func (*CostCentresRulesNamespace) Create added in v0.29.0

Create: Create an allocation rule

Maps spend onto a cost centre. Rules evaluate first-match-wins by ascending priority against each cost row's tags, account, provider, and service.

_Requires permission: `costs:write`._

POST /api/org/{orgId}/cost-centres/rules

Raises on 400: Bad request

Raises on 404: Not found

func (*CostCentresRulesNamespace) Delete added in v0.29.0

Delete: Delete an allocation rule

_Requires permission: `costs:write`._

DELETE /api/org/{orgId}/cost-centres/rules/{id}

Raises on 404: Not found

func (*CostCentresRulesNamespace) List added in v0.29.0

List: List allocation rules in evaluation order

_Requires permission: `costs:read`._

GET /api/org/{orgId}/cost-centres/rules

func (*CostCentresRulesNamespace) Swap added in v0.29.0

Swap: Swap the priorities of two allocation rules

Atomically swaps priorities so first-match-wins order can be edited without a half-applied pair of independent updates.

_Requires permission: `costs:write`._

POST /api/org/{orgId}/cost-centres/rules/swap

Raises on 400: Bad request

Raises on 404: Not found

func (*CostCentresRulesNamespace) Update added in v0.29.0

Update: Update an allocation rule

_Requires permission: `costs:write`._

PUT /api/org/{orgId}/cost-centres/rules/{id}

Raises on 400: Bad request

Raises on 404: Not found

type CostCentresRulesSwapParams added in v0.29.0

type CostCentresRulesSwapParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SwapAllocationRulesBody
}

CostCentresRulesSwapParams holds the parameters for `client.costCentres.rules.swap`.

type CostCentresRulesUpdateParams added in v0.29.0

type CostCentresRulesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body AllocationRuleInput
}

CostCentresRulesUpdateParams holds the parameters for `client.costCentres.rules.update`.

type CostCentresUpdateParams added in v0.29.0

type CostCentresUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body CostCentreInput
}

CostCentresUpdateParams holds the parameters for `client.costCentres.update`.

type CostDimension

type CostDimension = string

CostDimension is the `CostDimension` schema.

const (
	CostDimensionProvider CostDimension = "provider"
	CostDimensionAccount  CostDimension = "account"
	CostDimensionService  CostDimension = "service"
	CostDimensionRegion   CostDimension = "region"
	CostDimensionResource CostDimension = "resource"
	CostDimensionTag      CostDimension = "tag"
)

The values CostDimension takes.

type CostDimensionValues

type CostDimensionValues struct {
	Values []any `json:"values"`
}

CostDimensionValues is the `CostDimensionValues` schema.

type CostFilter

type CostFilter struct {
	Dimension CostDimension `json:"dimension"`
	// Op: One of "in", "not_in".
	Op     string   `json:"op"`
	Values []string `json:"values"`
	TagKey *string  `json:"tagKey,omitempty"`
}

CostFilter is the `CostFilter` schema.

type CostPushRequest added in v0.6.0

type CostPushRequest struct {
	// Source: Stable slug naming the system that owns these rows: letters,
	// digits, `.`, `_` and `-`. It groups the rows under an `External` provider
	// and an `external:<source>` account, and re-pushing the same source over
	// the same days restates only its own rows.
	Source string          `json:"source"`
	Rows   []PushedCostRow `json:"rows"`
}

CostPushRequest is the `CostPushRequest` schema.

type CostPushResponse added in v0.6.0

type CostPushResponse struct {
	Written int64 `json:"written"`
}

CostPushResponse is the `CostPushResponse` schema.

type CostQueryRequest

type CostQueryRequest struct {
	From string `json:"from"`
	To   string `json:"to"`
	// Binning: One of "daily", "weekly", "monthly", "cumulative".
	Binning string `json:"binning"`
	// GroupBy: One of "none", "provider", "account", "service", "region",
	// "resource", "tag".
	GroupBy               string       `json:"groupBy"`
	GroupByTagKey         *string      `json:"groupByTagKey,omitempty"`
	Filters               []CostFilter `json:"filters,omitempty"`
	TopN                  *int64       `json:"topN,omitempty"`
	ComparePreviousPeriod *bool        `json:"comparePreviousPeriod,omitempty"`
	Forecast              *bool        `json:"forecast,omitempty"`
}

CostQueryRequest is the `CostQueryRequest` schema.

type CostQueryResponse

type CostQueryResponse struct {
	Series         []CostQuerySeries  `json:"series"`
	Comparison     []CostQuerySeries  `json:"comparison,omitempty"`
	Forecast       []CostSeriesPoint  `json:"forecast,omitempty"`
	Currencies     []string           `json:"currencies"`
	Totals         map[string]float64 `json:"totals"`
	PreviousTotals map[string]float64 `json:"previousTotals,omitempty"`
}

CostQueryResponse is the `CostQueryResponse` schema.

type CostQuerySeries

type CostQuerySeries struct {
	Key      string            `json:"key"`
	Label    string            `json:"label"`
	Currency string            `json:"currency"`
	Points   []CostSeriesPoint `json:"points"`
}

CostQuerySeries is the `CostQuerySeries` schema.

type CostSeriesPoint

type CostSeriesPoint struct {
	Bucket string  `json:"bucket"`
	Amount float64 `json:"amount"`
}

CostSeriesPoint is the `CostSeriesPoint` schema.

type CostsAnomaliesParams added in v0.24.0

type CostsAnomaliesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Days: Window in days over anomalous days, 1-90. Defaults to 30.
	Days *string
}

CostsAnomaliesParams holds the parameters for `client.costs.anomalies`.

Every field is optional; pass nil to take the defaults.

type CostsAnomaliesResponse added in v0.24.0

type CostsAnomaliesResponse struct {
	Anomalies []CostAnomaly `json:"anomalies"`
}

CostsAnomaliesResponse is an object the spec declares inline.

type CostsAnomalySettingsGetParams added in v0.27.0

type CostsAnomalySettingsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CostsAnomalySettingsGetParams holds the parameters for `client.costs.anomalySettings.get`.

Every field is optional; pass nil to take the defaults.

type CostsAnomalySettingsNamespace added in v0.27.0

type CostsAnomalySettingsNamespace struct {
	// contains filtered or unexported fields
}

CostsAnomalySettingsNamespace is `client.costs.anomalySettings`.

func (*CostsAnomalySettingsNamespace) Get added in v0.27.0

Get: Get the organization's anomaly detection thresholds

The tunable part of cost anomaly detection. Everything else about the model — the 28-day baseline, the 7-day notification cooldown, the minimum history a baseline needs — is fixed. An organization that has never changed a threshold reads back the defaults. The response also carries the derived, read-only `smsConfigured`.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/anomaly-settings

func (*CostsAnomalySettingsNamespace) Update added in v0.27.0

Update: Update the organization's anomaly detection thresholds

Takes effect on the next detection pass (which runs after each cost collection). Anomalies already stored are not re-judged. All four fields are required — this is a PUT of the whole settings object, not a patch — and `smsAlerts` deliberately has no server-side default, so a client that omits it is rejected rather than silently switching an organization's SMS paging back off. `smsConfigured` is derived and is not accepted here.

_Requires permission: `costs:write`._

PUT /api/org/{orgId}/costs/anomaly-settings

Raises on 400: Bad request

type CostsAnomalySettingsUpdateParams added in v0.27.0

type CostsAnomalySettingsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CostAnomalySettings
}

CostsAnomalySettingsUpdateParams holds the parameters for `client.costs.anomalySettings.update`.

type CostsDimensionsParams

type CostsDimensionsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Dimension: One of "provider", "account", "service", "region", "resource",
	// "tag", "tag-keys".
	Dimension string
	TagKey    *string
}

CostsDimensionsParams holds the parameters for `client.costs.dimensions`.

type CostsNamespace

type CostsNamespace struct {

	// AnomalySettings: `client.costs.anomalySettings`.
	AnomalySettings *CostsAnomalySettingsNamespace
	// contains filtered or unexported fields
}

CostsNamespace is `client.costs`.

func (*CostsNamespace) Anomalies added in v0.24.0

Anomalies: List recently detected cost anomalies

Spend anomalies detected by the daily background pass. Two kinds share the list: a `spike`, where a provider's or service's spend exceeded its trailing 28-day baseline by a statistical threshold (mean + N·stddev, with an absolute floor to ignore penny-scale noise), and a `new_source`, where a provider or service with no spend at all across that window suddenly billed a material amount. Thresholds are per organization — see GET /costs/anomaly-settings. Newest day first, capped at 200 rows.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/anomalies

Raises on 400: Bad request

func (*CostsNamespace) Dimensions

Dimensions: List distinct values for a cost dimension

Feeds the filter and group-by pickers. Pass dimension=tag-keys for tag keys; dimension=tag requires tagKey.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/dimensions

Raises on 400: Bad request

func (*CostsNamespace) Query

Query: Query aggregated cost series

Aggregates collected provider spend into per-bucket, per-group series for cost graphs. Currencies are never merged; mixed-currency orgs get one series per currency. Optionally returns a previous-period comparison and a trend forecast.

_Requires permission: `costs:read`._

POST /api/org/{orgId}/costs/query

Raises on 400: Bad request

func (*CostsNamespace) Rows added in v0.6.0

Rows: Push cost rows from your own systems

Reports spend Infrawrench has no provider plugin for — a parsed SaaS invoice, an internal chargeback, a colo bill — into the same store the provider collectors write to, so it appears in cost graphs, dimension filters, and budgets alongside everything else.

Rows are grouped under a caller-chosen `source`. Writes are idempotent per `(source, day, service, region, resourceId, tags, currency)`: pushing the same day again restates that day rather than adding to it, so a nightly job can safely re-push a trailing window. Rows pushed under a source can never overwrite rows a provider collector wrote.

The whole batch is validated before anything is stored, so a 400 means nothing was written.

_Requires permission: `costs:write`._

POST /api/org/{orgId}/costs/rows

Raises on 400: Bad request

func (*CostsNamespace) Showback added in v0.29.0

func (n *CostsNamespace) Showback(ctx context.Context, params *CostsShowbackParams, opts ...RequestOption) (*ShowbackReport, error)

Showback: Spend grouped by cost centre (showback)

Runs the org's allocation rules over collected spend and sums per cost centre and currency. Spend no rule claims comes back as the "Unallocated" bucket; every defined centre appears even with zero spend.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/showback

Raises on 400: Bad request

func (*CostsNamespace) Status

Status: Per-account cost collection status

Which accounts support cost collection, whether their history backfill has completed, and the ingested date coverage.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/status

func (*CostsNamespace) Untagged added in v0.29.0

Untagged: Untagged spend over the required tag keys

Spend on cost rows missing at least one of the org's required tag keys, overall and per key, plus the largest untagged (account, service) buckets. Empty when no tag policy is configured — untagged is only meaningful against a policy.

_Requires permission: `costs:read`._

GET /api/org/{orgId}/costs/untagged

Raises on 400: Bad request

type CostsQueryParams

type CostsQueryParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CostQueryRequest
}

CostsQueryParams holds the parameters for `client.costs.query`.

type CostsRowsParams added in v0.6.0

type CostsRowsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CostPushRequest
}

CostsRowsParams holds the parameters for `client.costs.rows`.

type CostsShowbackParams added in v0.29.0

type CostsShowbackParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// From: Defaults to 30 days ago.
	From *string
	// To: Defaults to today.
	To *string
}

CostsShowbackParams holds the parameters for `client.costs.showback`.

Every field is optional; pass nil to take the defaults.

type CostsStatusParams

type CostsStatusParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CostsStatusParams holds the parameters for `client.costs.status`.

Every field is optional; pass nil to take the defaults.

type CostsStatusResponse

type CostsStatusResponse struct {
	Accounts []CostAccountStatus `json:"accounts"`
}

CostsStatusResponse is an object the spec declares inline.

type CostsUntaggedParams added in v0.29.0

type CostsUntaggedParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// From: Defaults to 30 days ago.
	From *string
	// To: Defaults to today.
	To *string
}

CostsUntaggedParams holds the parameters for `client.costs.untagged`.

Every field is optional; pass nil to take the defaults.

type CreateAPIKeyRequest

type CreateAPIKeyRequest struct {
	Name      string       `json:"name"`
	Scopes    []Permission `json:"scopes"`
	ExpiresAt *string      `json:"expiresAt,omitempty"`
}

CreateAPIKeyRequest is the `CreateApiKeyRequest` schema.

Spec schema: `CreateApiKeyRequest`.

type CreateAccountRequest

type CreateAccountRequest struct {
	PluginID    string            `json:"pluginId"`
	DisplayName string            `json:"displayName"`
	Credentials map[string]string `json:"credentials"`
	// BastionID: Optional bastion id to route this account's cloud API traffic
	// through.
	BastionID *string `json:"bastionId,omitempty"`
}

CreateAccountRequest is the `CreateAccountRequest` schema.

type CreateAccountResponse

type CreateAccountResponse struct {
	ID        string                          `json:"id"`
	SyncError *CreateAccountResponseSyncError `json:"syncError,omitempty"`
}

CreateAccountResponse is the `CreateAccountResponse` schema.

type CreateAccountResponseSyncError

type CreateAccountResponseSyncError struct {
	Message string `json:"message"`
}

CreateAccountResponseSyncError is an object the spec declares inline.

type CreateAgentSession

type CreateAgentSession struct {
	Repo          string         `json:"repo"`
	ProjectName   *string        `json:"projectName,omitempty"`
	WorkspaceName *string        `json:"workspaceName,omitempty"`
	Settings      *AgentSettings `json:"settings"`
}

CreateAgentSession is the `CreateAgentSession` schema.

type CreateBastionRequest

type CreateBastionRequest struct {
	Name string `json:"name"`
}

CreateBastionRequest is the `CreateBastionRequest` schema.

type CreateBastionResponse

type CreateBastionResponse struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	TokenPrefix string `json:"tokenPrefix"`
	// Token: Enrollment token in the form `iwb_<random>`. Pass to the agent
	// container as `BASTION_TOKEN`. Returned once — not recoverable later.
	Token string `json:"token"`
}

CreateBastionResponse is the `CreateBastionResponse` schema.

type CreateConfigRequest

type CreateConfigRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceTypeID   string      `json:"resourceTypeId"`
	PluginID         *string     `json:"pluginId,omitempty"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

CreateConfigRequest is the `CreateConfigRequest` schema.

type CreateCostEstimateRequest

type CreateCostEstimateRequest struct {
	AccountID        string            `json:"accountId"`
	ResourceTypeID   string            `json:"resourceTypeId"`
	Fields           map[string]string `json:"fields"`
	PluginID         *string           `json:"pluginId,omitempty"`
	ParentResourceID *ResourceID       `json:"parentResourceId,omitempty"`
}

CreateCostEstimateRequest is the `CreateCostEstimateRequest` schema.

type CreateOrgRequest

type CreateOrgRequest struct {
	DisplayName string `json:"displayName"`
}

CreateOrgRequest is the `CreateOrgRequest` schema.

type CreatePricingRequest

type CreatePricingRequest struct {
	AccountID        string                      `json:"accountId"`
	ResourceTypeID   string                      `json:"resourceTypeId"`
	RegionID         *string                     `json:"regionId,omitempty"`
	Sizes            []CreatePricingRequestSizes `json:"sizes"`
	PluginID         *string                     `json:"pluginId,omitempty"`
	ParentResourceID *ResourceID                 `json:"parentResourceId,omitempty"`
}

CreatePricingRequest is the `CreatePricingRequest` schema.

type CreatePricingRequestSizes

type CreatePricingRequestSizes struct {
	ID       string  `json:"id"`
	Vcpus    float64 `json:"vcpus"`
	MemoryMb float64 `json:"memoryMb"`
}

CreatePricingRequestSizes is an object the spec declares inline.

type CreateResourceRequest

type CreateResourceRequest struct {
	AccountID        string            `json:"accountId"`
	PluginID         string            `json:"pluginId"`
	ResourceTypeID   string            `json:"resourceTypeId"`
	Fields           map[string]string `json:"fields"`
	ParentResourceID *ResourceID       `json:"parentResourceId,omitempty"`
}

CreateResourceRequest is the `CreateResourceRequest` schema.

type CreateResourceResponse

type CreateResourceResponse struct {
	ID          ResourceID `json:"id"`
	DisplayName string     `json:"displayName"`
	Warnings    []string   `json:"warnings,omitempty"`
}

CreateResourceResponse is the `CreateResourceResponse` schema.

type CreateWidgetRequest

type CreateWidgetRequest struct {
	DashboardID string              `json:"dashboardId"`
	Kind        DashboardWidgetKind `json:"kind"`
	Title       *string             `json:"title,omitempty"`
	Config      JSONObject          `json:"config"`
}

CreateWidgetRequest is the `CreateWidgetRequest` schema.

type CreatedAPIKey

type CreatedAPIKey struct {
	ID string `json:"id"`
	// Key: Plaintext key. Returned once. Format: `iwk_<base64url>`.
	Key string `json:"key"`
}

CreatedAPIKey is the `CreatedApiKey` schema.

Spec schema: `CreatedApiKey`.

type CredentialExport

type CredentialExport struct {
	Content  string                   `json:"content"`
	Filename string                   `json:"filename"`
	MimeType string                   `json:"mimeType"`
	Fields   []CredentialExportFields `json:"fields,omitempty"`
	Warning  *string                  `json:"warning,omitempty"`
}

CredentialExport is the `CredentialExport` schema.

type CredentialExportFields added in v0.7.0

type CredentialExportFields struct {
	Label     string  `json:"label"`
	Value     string  `json:"value"`
	Sensitive *bool   `json:"sensitive,omitempty"`
	Hint      *string `json:"hint,omitempty"`
}

CredentialExportFields is an object the spec declares inline.

type CredentialField

type CredentialField struct {
	Key          string                   `json:"key"`
	Label        string                   `json:"label"`
	Description  *string                  `json:"description,omitempty"`
	Placeholder  *string                  `json:"placeholder,omitempty"`
	Sensitive    *bool                    `json:"sensitive,omitempty"`
	Multiline    *bool                    `json:"multiline,omitempty"`
	DefaultValue *string                  `json:"defaultValue,omitempty"`
	Regions      []CredentialFieldRegion  `json:"regions,omitempty"`
	HelpLink     *CredentialFieldHelpLink `json:"helpLink,omitempty"`
}

CredentialField is the `CredentialField` schema.

type CredentialFieldHelpLink struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

CredentialFieldHelpLink is an object the spec declares inline.

type CredentialFieldRegion

type CredentialFieldRegion struct {
	ID       string  `json:"id"`
	Label    string  `json:"label"`
	Location *string `json:"location,omitempty"`
	Flag     *string `json:"flag,omitempty"`
}

CredentialFieldRegion is the `CredentialFieldRegion` schema.

type CredentialFormat

type CredentialFormat struct {
	// ID: Passed back as `formatId` on export.
	ID          string  `json:"id"`
	Label       string  `json:"label"`
	Description *string `json:"description,omitempty"`
	// MediaType: How the credential body should be presented. `binary-base64`
	// means `content` is base64.
	//
	// One of "json", "text", "ini", "binary-base64".
	MediaType string `json:"mediaType"`
	// FilenameTemplate: Suggested filename; `{resource}` is replaced with the
	// resource's external id.
	FilenameTemplate *string `json:"filenameTemplate,omitempty"`
}

CredentialFormat is the `CredentialFormat` schema.

type CustomGraphCheckRequest added in v0.16.0

type CustomGraphCheckRequest struct {
	Source string `json:"source"`
}

CustomGraphCheckRequest is the `CustomGraphCheckRequest` schema.

type CustomGraphCheckResult added in v0.16.0

type CustomGraphCheckResult struct {
	Diagnostics []CustomGraphCheckResultDiagnostics `json:"diagnostics"`
	HasErrors   bool                                `json:"hasErrors"`
	Degraded    bool                                `json:"degraded"`
}

CustomGraphCheckResult is the `CustomGraphCheckResult` schema.

type CustomGraphCheckResultDiagnostics added in v0.16.0

type CustomGraphCheckResultDiagnostics struct {
	Line     int64  `json:"line"`
	Column   int64  `json:"column"`
	Code     int64  `json:"code"`
	Category string `json:"category"`
	Message  string `json:"message"`
}

CustomGraphCheckResultDiagnostics is an object the spec declares inline.

type CustomGraphFull added in v0.16.0

type CustomGraphFull struct {
	ID                 string  `json:"id"`
	OrganizationID     string  `json:"organizationId"`
	Name               string  `json:"name"`
	Description        *string `json:"description"`
	Source             string  `json:"source"`
	CreatedByUserID    *string `json:"createdByUserId"`
	SourceAuthorUserID *string `json:"sourceAuthorUserId"`
	DeletedAt          *string `json:"deletedAt"`
	CreatedAt          string  `json:"createdAt"`
	UpdatedAt          string  `json:"updatedAt"`
}

CustomGraphFull is the `CustomGraphFull` schema.

type CustomGraphInput added in v0.16.0

type CustomGraphInput struct {
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	Source      *string `json:"source,omitempty"`
}

CustomGraphInput is the `CustomGraphInput` schema.

type CustomGraphRenderRequest added in v0.16.0

type CustomGraphRenderRequest struct {
	Controls map[string]any `json:"controls,omitempty"`
	Button   *string        `json:"button,omitempty"`
	// Trigger: One of "manual", "refresh", "interaction".
	Trigger *string `json:"trigger,omitempty"`
}

CustomGraphRenderRequest is the `CustomGraphRenderRequest` schema.

type CustomGraphRenderResult added in v0.16.0

type CustomGraphRenderResult struct {
	OK         bool                          `json:"ok"`
	Spec       JSONObject                    `json:"spec"`
	Error      *string                       `json:"error"`
	Logs       []CustomGraphRenderResultLogs `json:"logs"`
	RenderedAt string                        `json:"renderedAt"`
	DurationMs int64                         `json:"durationMs"`
}

CustomGraphRenderResult is the `CustomGraphRenderResult` schema.

type CustomGraphRenderResultLogs added in v0.16.0

type CustomGraphRenderResultLogs struct {
	// Level: One of "info", "warn", "error".
	Level   string `json:"level"`
	Message string `json:"message"`
}

CustomGraphRenderResultLogs is an object the spec declares inline.

type CustomGraphSummary added in v0.16.0

type CustomGraphSummary struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
	CreatedAt   string  `json:"createdAt"`
	UpdatedAt   string  `json:"updatedAt"`
}

CustomGraphSummary is the `CustomGraphSummary` schema.

type CustomGraphUpdate added in v0.16.0

type CustomGraphUpdate struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	Source      *string `json:"source,omitempty"`
}

CustomGraphUpdate is the `CustomGraphUpdate` schema.

type CustomGraphsCheckParams added in v0.16.0

type CustomGraphsCheckParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CustomGraphCheckRequest
}

CustomGraphsCheckParams holds the parameters for `client.customGraphs.check`.

type CustomGraphsCreateParams added in v0.16.0

type CustomGraphsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CustomGraphInput
}

CustomGraphsCreateParams holds the parameters for `client.customGraphs.create`.

type CustomGraphsDeleteParams added in v0.16.0

type CustomGraphsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

CustomGraphsDeleteParams holds the parameters for `client.customGraphs.delete`.

type CustomGraphsGetParams added in v0.16.0

type CustomGraphsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

CustomGraphsGetParams holds the parameters for `client.customGraphs.get`.

type CustomGraphsListParams added in v0.16.0

type CustomGraphsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CustomGraphsListParams holds the parameters for `client.customGraphs.list`.

Every field is optional; pass nil to take the defaults.

type CustomGraphsNamespace added in v0.16.0

type CustomGraphsNamespace struct {
	// contains filtered or unexported fields
}

CustomGraphsNamespace is `client.customGraphs`.

func (*CustomGraphsNamespace) Check added in v0.16.0

Check: Type-check custom-graph source without saving it

_Requires permission: `dashboards:read`._

POST /api/org/{orgId}/custom-graphs/check

Raises on 400: Bad request

func (*CustomGraphsNamespace) Create added in v0.16.0

Create: Create a custom graph (paid plan required)

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/custom-graphs

Raises on 400: Bad request

Raises on 402: Payment required — the organization's plan does not include this

func (*CustomGraphsNamespace) Delete added in v0.16.0

Delete: Delete a custom graph (and its dashboard cards)

_Requires permission: `dashboards:write`._

DELETE /api/org/{orgId}/custom-graphs/{id}

Raises on 404: Not found

func (*CustomGraphsNamespace) Get added in v0.16.0

Get: Get a custom graph (including source)

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/custom-graphs/{id}

Raises on 404: Not found

func (*CustomGraphsNamespace) List added in v0.16.0

List: List custom graphs

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/custom-graphs

func (*CustomGraphsNamespace) Render added in v0.16.0

Render: Run the graph's script and return its render spec (paid plan required)

_Requires permission: `dashboards:read`._

POST /api/org/{orgId}/custom-graphs/{id}/render

Raises on 400: Bad request

Raises on 402: Payment required — the organization's plan does not include this

Raises on 404: Not found

func (*CustomGraphsNamespace) Typings added in v0.16.0

Typings: The ambient graph.d.ts for custom-graph source

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/custom-graphs/typings

func (*CustomGraphsNamespace) Update added in v0.16.0

Update: Update a custom graph (paid plan required)

_Requires permission: `dashboards:write`._

PUT /api/org/{orgId}/custom-graphs/{id}

Raises on 400: Bad request

Raises on 402: Payment required — the organization's plan does not include this

Raises on 404: Not found

type CustomGraphsRenderParams added in v0.16.0

type CustomGraphsRenderParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body *CustomGraphRenderRequest
}

CustomGraphsRenderParams holds the parameters for `client.customGraphs.render`.

type CustomGraphsTypingsParams added in v0.16.0

type CustomGraphsTypingsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

CustomGraphsTypingsParams holds the parameters for `client.customGraphs.typings`.

Every field is optional; pass nil to take the defaults.

type CustomGraphsUpdateParams added in v0.16.0

type CustomGraphsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body CustomGraphUpdate
}

CustomGraphsUpdateParams holds the parameters for `client.customGraphs.update`.

type Dashboard

type Dashboard struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	IsDefault bool   `json:"isDefault"`
}

Dashboard is the `Dashboard` schema.

type DashboardFull

type DashboardFull struct {
	ID             string  `json:"id"`
	OrganizationID string  `json:"organizationId"`
	Name           string  `json:"name"`
	IsDefault      bool    `json:"isDefault"`
	CreatedAt      string  `json:"createdAt"`
	UpdatedAt      string  `json:"updatedAt"`
	DeletedAt      *string `json:"deletedAt"`
	SyncVersion    int64   `json:"syncVersion"`
}

DashboardFull is the `DashboardFull` schema.

type DashboardPin

type DashboardPin struct {
	PinID      string     `json:"pinId"`
	ResourceID ResourceID `json:"resourceId"`
	GridX      int64      `json:"gridX"`
	GridY      int64      `json:"gridY"`
	GridW      int64      `json:"gridW"`
	GridH      int64      `json:"gridH"`
}

DashboardPin is the `DashboardPin` schema.

type DashboardWidget

type DashboardWidget struct {
	ID          string              `json:"id"`
	DashboardID string              `json:"dashboardId"`
	Kind        DashboardWidgetKind `json:"kind"`
	Title       string              `json:"title"`
	Config      JSONObject          `json:"config"`
	GridX       int64               `json:"gridX"`
	GridY       int64               `json:"gridY"`
	GridW       int64               `json:"gridW"`
	GridH       int64               `json:"gridH"`
}

DashboardWidget is the `DashboardWidget` schema.

type DashboardWidgetFull

type DashboardWidgetFull struct {
	ID             string              `json:"id"`
	OrganizationID string              `json:"organizationId"`
	DashboardID    string              `json:"dashboardId"`
	Kind           DashboardWidgetKind `json:"kind"`
	Title          string              `json:"title"`
	Config         JSONObject          `json:"config"`
	GridX          int64               `json:"gridX"`
	GridY          int64               `json:"gridY"`
	GridW          int64               `json:"gridW"`
	GridH          int64               `json:"gridH"`
	SyncVersion    int64               `json:"syncVersion"`
	DeletedAt      *string             `json:"deletedAt"`
	CreatedAt      string              `json:"createdAt"`
	UpdatedAt      string              `json:"updatedAt"`
}

DashboardWidgetFull is the `DashboardWidgetFull` schema.

type DashboardWidgetKind

type DashboardWidgetKind = string

DashboardWidgetKind is the `DashboardWidgetKind` schema.

const (
	DashboardWidgetKindCostGraph   DashboardWidgetKind = "cost_graph"
	DashboardWidgetKindBudget      DashboardWidgetKind = "budget"
	DashboardWidgetKindCustomGraph DashboardWidgetKind = "custom_graph"
)

The values DashboardWidgetKind takes.

type DashboardWithPins

type DashboardWithPins struct {
	Dashboard    DashboardFull          `json:"dashboard"`
	Pins         []DashboardPin         `json:"pins"`
	WorkflowPins []DashboardWorkflowPin `json:"workflowPins"`
	Widgets      []DashboardWidget      `json:"widgets"`
}

DashboardWithPins is the `DashboardWithPins` schema.

type DashboardWorkflowPin

type DashboardWorkflowPin struct {
	PinID      string                        `json:"pinId"`
	WorkflowID string                        `json:"workflowId"`
	GridX      int64                         `json:"gridX"`
	Name       string                        `json:"name"`
	LastRunAt  *string                       `json:"lastRunAt"`
	LastStatus *string                       `json:"lastStatus"`
	Metrics    []DashboardWorkflowPinMetrics `json:"metrics"`
}

DashboardWorkflowPin is the `DashboardWorkflowPin` schema.

type DashboardWorkflowPinMetrics

type DashboardWorkflowPinMetrics struct {
	Key   string  `json:"key"`
	Label string  `json:"label"`
	Unit  *string `json:"unit"`
	Value any     `json:"value,omitempty"`
}

DashboardWorkflowPinMetrics is an object the spec declares inline.

type DashboardsCreateParams

type DashboardsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body DashboardsCreateRequest
}

DashboardsCreateParams holds the parameters for `client.dashboards.create`.

type DashboardsCreateRequest

type DashboardsCreateRequest struct {
	Name string `json:"name"`
}

DashboardsCreateRequest is an object the spec declares inline.

type DashboardsDefaultFullParams

type DashboardsDefaultFullParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DashboardsDefaultFullParams holds the parameters for `client.dashboards.default.full`.

Every field is optional; pass nil to take the defaults.

type DashboardsDefaultNamespace

type DashboardsDefaultNamespace struct {
	// contains filtered or unexported fields
}

DashboardsDefaultNamespace is `client.dashboards.default`.

func (*DashboardsDefaultNamespace) Full

Full: Get-or-create the default dashboard with its pins

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/dashboards/default/full

type DashboardsDeleteParams

type DashboardsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

DashboardsDeleteParams holds the parameters for `client.dashboards.delete`.

type DashboardsGetParams

type DashboardsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

DashboardsGetParams holds the parameters for `client.dashboards.get`.

type DashboardsListParams

type DashboardsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DashboardsListParams holds the parameters for `client.dashboards.list`.

Every field is optional; pass nil to take the defaults.

type DashboardsNamespace

type DashboardsNamespace struct {

	// Default: `client.dashboards.default`.
	Default *DashboardsDefaultNamespace
	// Pin: `client.dashboards.pin`.
	Pin *DashboardsPinNamespace
	// Widgets: `client.dashboards.widgets`.
	Widgets *DashboardsWidgetsNamespace
	// contains filtered or unexported fields
}

DashboardsNamespace is `client.dashboards`.

func (*DashboardsNamespace) Create

Create: Create a dashboard

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/dashboards

func (*DashboardsNamespace) Delete

func (n *DashboardsNamespace) Delete(ctx context.Context, params DashboardsDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a dashboard

Cannot delete the default dashboard.

_Requires permission: `dashboards:write`._

DELETE /api/org/{orgId}/dashboards/{id}

Raises on 400: Bad request

Raises on 404: Not found

func (*DashboardsNamespace) Get

Get: Get a dashboard with its pins

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/dashboards/{id}

Raises on 404: Not found

func (*DashboardsNamespace) List

List: List dashboards

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/dashboards

func (*DashboardsNamespace) Probe

Probe: Read cached stats/metrics for dashboard cards

_Requires permission: `dashboards:read`._

POST /api/org/{orgId}/dashboards/probe

func (*DashboardsNamespace) Rename

func (n *DashboardsNamespace) Rename(ctx context.Context, params DashboardsRenameParams, opts ...RequestOption) (*OK, error)

Rename: Rename a dashboard

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/dashboards/{id}/rename

func (*DashboardsNamespace) Reorder

func (n *DashboardsNamespace) Reorder(ctx context.Context, params DashboardsReorderParams, opts ...RequestOption) (*OK, error)

Reorder: Reorder dashboard cards

Persists the order of a dashboard's grid. Pass `cards` to order resource pins, workflow pins, and widgets as one sequence; `resourceIds` orders resource pins alone.

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/dashboards/{id}/reorder

Raises on 404: Not found

func (*DashboardsNamespace) Unpin

func (n *DashboardsNamespace) Unpin(ctx context.Context, params DashboardsUnpinParams, opts ...RequestOption) (*OK, error)

Unpin: Unpin a resource

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/dashboards/unpin

Raises on 404: Not found

func (*DashboardsNamespace) ValidateTabs

ValidateTabs: Validate workspace tab targets still exist

_Requires permission: `dashboards:read`._

POST /api/org/{orgId}/dashboards/validate-tabs

func (*DashboardsNamespace) WorkflowPin

func (n *DashboardsNamespace) WorkflowPin(ctx context.Context, params DashboardsWorkflowPinParams, opts ...RequestOption) (*OK, error)

WorkflowPin: Pin a workflow's metrics to a dashboard

POST /api/org/{orgId}/dashboards/workflow-pin

Raises on 404: Not found

func (*DashboardsNamespace) WorkflowUnpin

func (n *DashboardsNamespace) WorkflowUnpin(ctx context.Context, params DashboardsWorkflowUnpinParams, opts ...RequestOption) (*OK, error)

WorkflowUnpin: Unpin a workflow from a dashboard

POST /api/org/{orgId}/dashboards/workflow-unpin

Raises on 404: Not found

type DashboardsPinCreateParams

type DashboardsPinCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body PinRequest
}

DashboardsPinCreateParams holds the parameters for `client.dashboards.pin.create`.

type DashboardsPinGetParams

type DashboardsPinGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	PinID string
}

DashboardsPinGetParams holds the parameters for `client.dashboards.pin.get`.

type DashboardsPinNamespace

type DashboardsPinNamespace struct {
	// contains filtered or unexported fields
}

DashboardsPinNamespace is `client.dashboards.pin`.

func (*DashboardsPinNamespace) Create

Create: Pin a resource to a dashboard

_Requires permission: `dashboards:write`._

POST /api/org/{orgId}/dashboards/pin

Raises on 404: Not found

func (*DashboardsPinNamespace) Get

Get: Full enriched pin data + cached probe status

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/dashboards/pin/{pinId}

Raises on 404: Not found

func (*DashboardsPinNamespace) Range

Range: Historical metric series for a pinned resource

Returns per-series metric points between fromMs and toMs. The backend auto-routes between raw, 1-minute, and 1-hour rollups based on span: ≤2h raw, ≤7d 1m, >7d 1h.

GET /api/org/{orgId}/dashboards/pin/{pinId}/range

Raises on 400: Bad request

Raises on 404: Not found

type DashboardsPinRangeParams

type DashboardsPinRangeParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID  *string
	PinID  string
	FromMs *int64
	ToMs   *int64
}

DashboardsPinRangeParams holds the parameters for `client.dashboards.pin.range`.

type DashboardsProbeParams

type DashboardsProbeParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ProbeRequest
}

DashboardsProbeParams holds the parameters for `client.dashboards.probe`.

type DashboardsRenameParams

type DashboardsRenameParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body DashboardsRenameRequest
}

DashboardsRenameParams holds the parameters for `client.dashboards.rename`.

type DashboardsRenameRequest

type DashboardsRenameRequest struct {
	Name string `json:"name"`
}

DashboardsRenameRequest is an object the spec declares inline.

type DashboardsReorderParams

type DashboardsReorderParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body ReorderRequest
}

DashboardsReorderParams holds the parameters for `client.dashboards.reorder`.

type DashboardsUnpinParams

type DashboardsUnpinParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body UnpinRequest
}

DashboardsUnpinParams holds the parameters for `client.dashboards.unpin`.

type DashboardsValidateTabsParams

type DashboardsValidateTabsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ValidateTabsRequest
}

DashboardsValidateTabsParams holds the parameters for `client.dashboards.validateTabs`.

type DashboardsWidgetsCreateParams

type DashboardsWidgetsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateWidgetRequest
}

DashboardsWidgetsCreateParams holds the parameters for `client.dashboards.widgets.create`.

type DashboardsWidgetsDeleteParams

type DashboardsWidgetsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	WidgetID string
}

DashboardsWidgetsDeleteParams holds the parameters for `client.dashboards.widgets.delete`.

type DashboardsWidgetsNamespace

type DashboardsWidgetsNamespace struct {
	// contains filtered or unexported fields
}

DashboardsWidgetsNamespace is `client.dashboards.widgets`.

func (*DashboardsWidgetsNamespace) Create

Create: Add a cost-graph or budget widget to a dashboard

POST /api/org/{orgId}/dashboards/widgets

Raises on 400: Bad request

Raises on 404: Not found

func (*DashboardsWidgetsNamespace) Delete

Delete: Remove a widget from a dashboard

DELETE /api/org/{orgId}/dashboards/widgets/{widgetId}

Raises on 404: Not found

func (*DashboardsWidgetsNamespace) Update

Update: Update a widget's title, config, or layout

PATCH /api/org/{orgId}/dashboards/widgets/{widgetId}

Raises on 400: Bad request

Raises on 404: Not found

type DashboardsWidgetsUpdateParams

type DashboardsWidgetsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	WidgetID string
	// Body: the JSON request body.
	Body UpdateWidgetRequest
}

DashboardsWidgetsUpdateParams holds the parameters for `client.dashboards.widgets.update`.

type DashboardsWorkflowPinParams

type DashboardsWorkflowPinParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body WorkflowPinRequest
}

DashboardsWorkflowPinParams holds the parameters for `client.dashboards.workflowPin`.

type DashboardsWorkflowUnpinParams

type DashboardsWorkflowUnpinParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body WorkflowPinRequest
}

DashboardsWorkflowUnpinParams holds the parameters for `client.dashboards.workflowUnpin`.

type DependencyGraphEdge added in v0.25.0

type DependencyGraphEdge struct {
	ConsumerResourceID ResourceID `json:"consumerResourceId"`
	// ConsumerFieldKey: The consumer field the reference fills. "parent" for
	// containment edges, where the link is the resource hierarchy itself rather
	// than a field.
	ConsumerFieldKey   string     `json:"consumerFieldKey"`
	ProviderResourceID ResourceID `json:"providerResourceId"`
	// ProviderOutputKey: The provider output or identity the reference reads —
	// an output key for output references, the matched identity ("externalId",
	// "name", "endpoint"…) for inferred edges.
	ProviderOutputKey string `json:"providerOutputKey"`
	// Kind: Where the edge came from: `output-ref` is wired by hand, `declared`
	// from the plugin's own `dependsOn` rule for the resource type,
	// `containment` from the synced parent/child link, `field-match` from a
	// field value that exactly matches another resource's identity. Absent means
	// `output-ref`.
	//
	// One of "output-ref", "declared", "containment", "field-match".
	Kind *string `json:"kind,omitempty"`
	// Label: How the plugin words the relationship ("in VPC", "guarded by"),
	// when it declared one.
	Label *string `json:"label,omitempty"`
}

DependencyGraphEdge is the `DependencyGraphEdge` schema.

type DependencyGraphGetParams added in v0.25.0

type DependencyGraphGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	ResourceID *ResourceID
}

DependencyGraphGetParams holds the parameters for `client.dependencyGraph.get`.

Every field is optional; pass nil to take the defaults.

type DependencyGraphNamespace added in v0.25.0

type DependencyGraphNamespace struct {
	// contains filtered or unexported fields
}

DependencyGraphNamespace is `client.dependencyGraph`.

func (*DependencyGraphNamespace) Get added in v0.25.0

Get: The org's resource dependency graph, from synced cloud data and output references

_Requires permission: `resources:read`._

GET /api/org/{orgId}/dependency-graph

type DependencyGraphNode added in v0.25.0

type DependencyGraphNode struct {
	ID                ResourceID `json:"id"`
	DisplayName       string     `json:"displayName"`
	PluginID          string     `json:"pluginId"`
	PluginDisplayName string     `json:"pluginDisplayName"`
	// PluginLogoSvg: Inline SVG markup; may be empty.
	PluginLogoSvg     string `json:"pluginLogoSvg"`
	ResourceTypeID    string `json:"resourceTypeId"`
	ResourceTypeLabel string `json:"resourceTypeLabel"`
	AccountID         string `json:"accountId"`
	AccountName       string `json:"accountName"`
}

DependencyGraphNode is the `DependencyGraphNode` schema.

type DependencyGraphResponse added in v0.25.0

type DependencyGraphResponse struct {
	// Nodes: Org resources that participate in at least one edge.
	Nodes []DependencyGraphNode `json:"nodes"`
	// Edges: Directed depends-on edges (consumer → provider), deduped per
	// consumer field and provider.
	Edges []DependencyGraphEdge `json:"edges"`
	// Truncated: True when inference hit its edge cap and the returned graph is
	// a partial view of the org.
	Truncated bool `json:"truncated"`
}

DependencyGraphResponse is the `DependencyGraphResponse` schema.

type DeployCreatedResource added in v0.15.0

type DeployCreatedResource struct {
	PluginID       string                        `json:"pluginId"`
	AccountID      string                        `json:"accountId"`
	ResourceTypeID string                        `json:"resourceTypeId"`
	ResourceID     string                        `json:"resourceId"`
	ExternalID     *string                       `json:"externalId,omitempty"`
	DisplayName    string                        `json:"displayName"`
	Sidecar        *DeployCreatedResourceSidecar `json:"sidecar,omitempty"`
}

DeployCreatedResource is the `DeployCreatedResource` schema.

type DeployCreatedResourceSidecar added in v0.15.0

type DeployCreatedResourceSidecar struct {
	PluginID         string `json:"pluginId"`
	ParentResourceID string `json:"parentResourceId"`
}

DeployCreatedResourceSidecar is an object the spec declares inline.

type DeployEnvs added in v0.11.0

type DeployEnvs struct {
	Envs   []string `json:"envs"`
	Sha    string   `json:"sha"`
	Repo   string   `json:"repo"`
	Branch string   `json:"branch"`
}

DeployEnvs is the `DeployEnvs` schema.

type DeployEnvsInput added in v0.11.0

type DeployEnvsInput struct {
	Repo   string  `json:"repo"`
	Branch *string `json:"branch,omitempty"`
}

DeployEnvsInput is the `DeployEnvsInput` schema.

type DeployPlanInput added in v0.11.0

type DeployPlanInput struct {
	Repo    string            `json:"repo"`
	Branch  *string           `json:"branch,omitempty"`
	Env     *string           `json:"env,omitempty"`
	Answers map[string]string `json:"answers,omitempty"`
}

DeployPlanInput is the `DeployPlanInput` schema.

type DeployPlanResult added in v0.11.0

type DeployPlanResult struct {
	RunID  string                 `json:"runId"`
	Result DeployPlanResultResult `json:"result"`
}

DeployPlanResult is the `DeployPlanResult` schema.

type DeployPlanResultResult added in v0.11.0

type DeployPlanResultResult struct {
	Status           DeployStatus                 `json:"status"`
	Env              string                       `json:"env"`
	Plan             any                          `json:"plan,omitempty"`
	Dockerfile       *string                      `json:"dockerfile,omitempty"`
	Image            *string                      `json:"image,omitempty"`
	Notes            []string                     `json:"notes"`
	CreatedResources []DeployCreatedResource      `json:"createdResources"`
	PlannedChanges   []DeployPlannedChange        `json:"plannedChanges"`
	Logs             []DeployRunLog               `json:"logs"`
	ReachedStage     *DeployStage                 `json:"reachedStage,omitempty"`
	Error            *DeployPlanResultResultError `json:"error,omitempty"`
	DurationMs       int64                        `json:"durationMs"`
}

DeployPlanResultResult is an object the spec declares inline.

type DeployPlanResultResultError added in v0.11.0

type DeployPlanResultResultError struct {
	Message string  `json:"message"`
	Stack   *string `json:"stack,omitempty"`
}

DeployPlanResultResultError is an object the spec declares inline.

type DeployPlannedChange added in v0.15.0

type DeployPlannedChange struct {
	// Action: One of "create", "update", "delete".
	Action         string                      `json:"action"`
	AccountID      string                      `json:"accountId"`
	ResourceTypeID string                      `json:"resourceTypeId"`
	ResourceID     *string                     `json:"resourceId,omitempty"`
	DisplayName    string                      `json:"displayName"`
	Fields         map[string]string           `json:"fields,omitempty"`
	Sidecar        *DeployPlannedChangeSidecar `json:"sidecar,omitempty"`
}

DeployPlannedChange is the `DeployPlannedChange` schema.

type DeployPlannedChangeSidecar added in v0.15.0

type DeployPlannedChangeSidecar struct {
	PluginID         string `json:"pluginId"`
	ParentResourceID string `json:"parentResourceId"`
}

DeployPlannedChangeSidecar is an object the spec declares inline.

type DeployRepo added in v0.11.0

type DeployRepo struct {
	FullName      string `json:"fullName"`
	DefaultBranch string `json:"defaultBranch"`
}

DeployRepo is the `DeployRepo` schema.

type DeployRollbackInput added in v0.15.0

type DeployRollbackInput struct {
	DeleteCreated *bool `json:"deleteCreated,omitempty"`
}

DeployRollbackInput is the `DeployRollbackInput` schema.

type DeployRunLog added in v0.11.0

type DeployRunLog struct {
	At int64 `json:"at"`
	// Level: One of "debug", "info", "warn", "error".
	Level   string `json:"level"`
	Message string `json:"message"`
}

DeployRunLog is the `DeployRunLog` schema.

type DeployStage added in v0.11.0

type DeployStage = string

DeployStage is the `DeployStage` schema.

const (
	DeployStagePlan       DeployStage = "plan"
	DeployStageDockerfile DeployStage = "dockerfile"
	DeployStageBuild      DeployStage = "build"
	DeployStageDeploy     DeployStage = "deploy"
	DeployStageDestroy    DeployStage = "destroy"
)

The values DeployStage takes.

type DeployStatus added in v0.11.0

type DeployStatus = string

DeployStatus is the `DeployStatus` schema.

const (
	DeployStatusPending  DeployStatus = "pending"
	DeployStatusRunning  DeployStatus = "running"
	DeployStatusSuccess  DeployStatus = "success"
	DeployStatusFailure  DeployStatus = "failure"
	DeployStatusCanceled DeployStatus = "canceled"
)

The values DeployStatus takes.

type DeployTrigger added in v0.11.0

type DeployTrigger struct {
	ID        string  `json:"id"`
	Repo      string  `json:"repo"`
	Branch    string  `json:"branch"`
	Env       string  `json:"env"`
	Enabled   bool    `json:"enabled"`
	LastSha   *string `json:"lastSha"`
	LastRunAt *string `json:"lastRunAt"`
}

DeployTrigger is the `DeployTrigger` schema.

type DeployTriggerInput added in v0.11.0

type DeployTriggerInput struct {
	Repo    string            `json:"repo"`
	Branch  string            `json:"branch"`
	Env     string            `json:"env"`
	Answers map[string]string `json:"answers,omitempty"`
}

DeployTriggerInput is the `DeployTriggerInput` schema.

type DeploymentRun added in v0.11.0

type DeploymentRun struct {
	ID     string       `json:"id"`
	Env    string       `json:"env"`
	Repo   *string      `json:"repo"`
	Branch *string      `json:"branch"`
	GitSha *string      `json:"gitSha"`
	Image  *string      `json:"image"`
	Status DeployStatus `json:"status"`
	// Origin: One of "web", "cli", "trigger".
	Origin       string       `json:"origin"`
	Stage        *DeployStage `json:"stage"`
	DurationMs   *int64       `json:"durationMs"`
	BuildSeconds *int64       `json:"buildSeconds"`
	// BuildRunner: One of "cloud-build", "ssh".
	BuildRunner *string `json:"buildRunner"`
	StartedAt   string  `json:"startedAt"`
}

DeploymentRun is the `DeploymentRun` schema.

type DeploymentRunInput added in v0.11.0

type DeploymentRunInput struct {
	Env              string                   `json:"env"`
	Status           DeployStatus             `json:"status"`
	Repo             *string                  `json:"repo,omitempty"`
	Branch           *string                  `json:"branch,omitempty"`
	GitSha           *string                  `json:"gitSha,omitempty"`
	Image            *string                  `json:"image,omitempty"`
	Stage            *DeployStage             `json:"stage,omitempty"`
	Notes            []string                 `json:"notes,omitempty"`
	Output           any                      `json:"output,omitempty"`
	Plan             any                      `json:"plan,omitempty"`
	CreatedResources []DeployCreatedResource  `json:"createdResources,omitempty"`
	DurationMs       *int64                   `json:"durationMs,omitempty"`
	Error            *DeploymentRunInputError `json:"error,omitempty"`
}

DeploymentRunInput is the `DeploymentRunInput` schema.

type DeploymentRunInputError added in v0.11.0

type DeploymentRunInputError struct {
	Message string `json:"message"`
}

DeploymentRunInputError is an object the spec declares inline.

type DeploymentsEnvsParams added in v0.11.0

type DeploymentsEnvsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DeployEnvsInput
}

DeploymentsEnvsParams holds the parameters for `client.deployments.envs`.

Every field is optional; pass nil to take the defaults.

type DeploymentsNamespace added in v0.11.0

type DeploymentsNamespace struct {

	// Runs: `client.deployments.runs`.
	Runs *DeploymentsRunsNamespace
	// Triggers: `client.deployments.triggers`.
	Triggers *DeploymentsTriggersNamespace
	// contains filtered or unexported fields
}

DeploymentsNamespace is `client.deployments`.

func (*DeploymentsNamespace) Envs added in v0.11.0

Envs: List the environments a repository's Infrafile declares

Reads `Infrafile` at the branch head and returns its declared environments. The file is parsed, not executed.

_Requires permission: `deployments:read`._

POST /api/org/{orgId}/deployments/envs

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Forbidden

Raises on 404: Not found

func (*DeploymentsNamespace) Plan added in v0.11.0

Plan: Preview a deploy without building

Runs the Infrafile's `plan()` and renders its Dockerfile, then stops. Nothing is built or deployed.

_Requires permission: `deployments:plan`._

POST /api/org/{orgId}/deployments/plan

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Forbidden

Raises on 404: Not found

func (*DeploymentsNamespace) Repos added in v0.11.0

Repos: List repositories this organization can deploy from

Repositories visible to the organization's GitHub App installations. Empty when the app is not configured.

_Requires permission: `deployments:read`._

GET /api/org/{orgId}/deployments/repos

Raises on 401: Unauthenticated

Raises on 403: Forbidden

type DeploymentsPlanParams added in v0.11.0

type DeploymentsPlanParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DeployPlanInput
}

DeploymentsPlanParams holds the parameters for `client.deployments.plan`.

Every field is optional; pass nil to take the defaults.

type DeploymentsReposParams added in v0.11.0

type DeploymentsReposParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DeploymentsReposParams holds the parameters for `client.deployments.repos`.

Every field is optional; pass nil to take the defaults.

type DeploymentsRunsCreateParams added in v0.11.0

type DeploymentsRunsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DeploymentRunInput
}

DeploymentsRunsCreateParams holds the parameters for `client.deployments.runs.create`.

Every field is optional; pass nil to take the defaults.

type DeploymentsRunsCreateResponse added in v0.11.0

type DeploymentsRunsCreateResponse struct {
	ID string `json:"id"`
}

DeploymentsRunsCreateResponse is an object the spec declares inline.

type DeploymentsRunsGetParams added in v0.11.0

type DeploymentsRunsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

DeploymentsRunsGetParams holds the parameters for `client.deployments.runs.get`.

type DeploymentsRunsListParams added in v0.11.0

type DeploymentsRunsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	Env   *string
	Limit *int64
}

DeploymentsRunsListParams holds the parameters for `client.deployments.runs.list`.

Every field is optional; pass nil to take the defaults.

type DeploymentsRunsNamespace added in v0.11.0

type DeploymentsRunsNamespace struct {
	// contains filtered or unexported fields
}

DeploymentsRunsNamespace is `client.deployments.runs`.

func (*DeploymentsRunsNamespace) Create added in v0.11.0

Create: Record a deployment that ran elsewhere

The CLI builds on the operator's own machine, so the server never sees that run. Reporting it here keeps one history across both origins.

_Requires permission: `deployments:write`._

POST /api/org/{orgId}/deployments/runs

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Forbidden

func (*DeploymentsRunsNamespace) Get added in v0.11.0

Get: Get one deployment run, with its logs and rendered Dockerfile

_Requires permission: `deployments:read`._

GET /api/org/{orgId}/deployments/runs/{id}

Raises on 401: Unauthenticated

Raises on 403: Forbidden

Raises on 404: Not found

func (*DeploymentsRunsNamespace) List added in v0.11.0

List: List deployment runs

_Requires permission: `deployments:read`._

GET /api/org/{orgId}/deployments/runs

Raises on 401: Unauthenticated

Raises on 403: Forbidden

func (*DeploymentsRunsNamespace) Rollback added in v0.11.0

Rollback: Roll back to a previous deployment

Re-runs that run's `deploy()` with the image and plan it recorded, building nothing — the exact artifact that was known good ships again. The Infrafile is read at the commit that run deployed, not at the branch head. Only a successful run that produced an image can be rolled back to. With `deleteCreated`, resources that runs after the target created through `infra.accounts` are deleted once the rollback has succeeded — undoing the provisioning, not just the shipping. Deletions are best-effort and reported in the result's notes.

_Requires permission: `deployments:write`._

POST /api/org/{orgId}/deployments/runs/{id}/rollback

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 402: Payment required — the organization's plan does not include this

Raises on 403: Forbidden

Raises on 404: Not found

Raises on 409: Conflict

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

type DeploymentsRunsRollbackParams added in v0.11.0

type DeploymentsRunsRollbackParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body *DeployRollbackInput
}

DeploymentsRunsRollbackParams holds the parameters for `client.deployments.runs.rollback`.

type DeploymentsTriggersCreateParams added in v0.11.0

type DeploymentsTriggersCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DeployTriggerInput
}

DeploymentsTriggersCreateParams holds the parameters for `client.deployments.triggers.create`.

Every field is optional; pass nil to take the defaults.

type DeploymentsTriggersDeleteParams added in v0.11.0

type DeploymentsTriggersDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

DeploymentsTriggersDeleteParams holds the parameters for `client.deployments.triggers.delete`.

type DeploymentsTriggersListParams added in v0.11.0

type DeploymentsTriggersListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DeploymentsTriggersListParams holds the parameters for `client.deployments.triggers.list`.

Every field is optional; pass nil to take the defaults.

type DeploymentsTriggersNamespace added in v0.11.0

type DeploymentsTriggersNamespace struct {
	// contains filtered or unexported fields
}

DeploymentsTriggersNamespace is `client.deployments.triggers`.

func (*DeploymentsTriggersNamespace) Create added in v0.11.0

Create: Deploy an environment whenever a branch moves

Arming a trigger records the branch's current commit WITHOUT deploying it — the trigger fires on the next push, not on the state at the moment it was created. The environment is validated against the Infrafile at that branch head, so a typo fails here rather than silently never firing.

_Requires permission: `deployments:write`._

POST /api/org/{orgId}/deployments/triggers

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Forbidden

Raises on 404: Not found

func (*DeploymentsTriggersNamespace) Delete added in v0.11.0

Delete: Delete a deploy trigger

_Requires permission: `deployments:write`._

DELETE /api/org/{orgId}/deployments/triggers/{id}

Raises on 401: Unauthenticated

Raises on 403: Forbidden

func (*DeploymentsTriggersNamespace) List added in v0.11.0

List: List deploy-on-push triggers

_Requires permission: `deployments:read`._

GET /api/org/{orgId}/deployments/triggers

Raises on 401: Unauthenticated

Raises on 403: Forbidden

func (*DeploymentsTriggersNamespace) Update added in v0.11.0

Update: Enable or disable a deploy trigger

_Requires permission: `deployments:write`._

PATCH /api/org/{orgId}/deployments/triggers/{id}

Raises on 401: Unauthenticated

Raises on 403: Forbidden

Raises on 404: Not found

type DeploymentsTriggersUpdateParams added in v0.11.0

type DeploymentsTriggersUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body *DeploymentsTriggersUpdateRequest
}

DeploymentsTriggersUpdateParams holds the parameters for `client.deployments.triggers.update`.

type DeploymentsTriggersUpdateRequest added in v0.11.0

type DeploymentsTriggersUpdateRequest struct {
	Enabled bool `json:"enabled"`
}

DeploymentsTriggersUpdateRequest is an object the spec declares inline.

type DescribeRequest

type DescribeRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

DescribeRequest is the `DescribeRequest` schema.

type DescribeResponse

type DescribeResponse struct {
	Text string `json:"text"`
}

DescribeResponse is the `DescribeResponse` schema.

type DigestEmailRecipient added in v0.27.0

type DigestEmailRecipient struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

DigestEmailRecipient is the `DigestEmailRecipient` schema.

type DigestEmailRecipientCreate added in v0.27.0

type DigestEmailRecipientCreate struct {
	Email string `json:"email"`
}

DigestEmailRecipientCreate is the `DigestEmailRecipientCreate` schema.

type DigestEmailRecipientList added in v0.27.0

type DigestEmailRecipientList struct {
	Recipients []DigestEmailRecipient `json:"recipients"`
}

DigestEmailRecipientList is the `DigestEmailRecipientList` schema.

type DigestGetParams added in v0.20.0

type DigestGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DigestGetParams holds the parameters for `client.digest.get`.

Every field is optional; pass nil to take the defaults.

type DigestNamespace added in v0.20.0

type DigestNamespace struct {

	// Recipients: `client.digest.recipients`.
	Recipients *DigestRecipientsNamespace
	// contains filtered or unexported fields
}

DigestNamespace is `client.digest`.

func (*DigestNamespace) Get added in v0.20.0

Get: Get the organization's weekly digest settings

The weekly digest is a summary of the last complete Monday-to-Sunday week's spend (with week-over-week movers), sync incidents, and resource churn, delivered to the Slack channels and Teams webhooks opted into the weeklyDigest trigger and to the organization's digest email recipients. The response also carries the outcome of the most recent delivery attempt so a silently failing digest is visible.

GET /api/org/{orgId}/digest

func (*DigestNamespace) Send added in v0.20.0

Send: Compose and send last week's digest now

Ignores the schedule and the enabled flag — composes the digest for the last complete week and sends it to every opted-in channel and email recipient. This is also the manual recovery for a partial delivery, which is never retried automatically. Fails when nothing is routed to receive the digest, or when every destination rejected it.

POST /api/org/{orgId}/digest/send

Raises on 400: Bad request

func (*DigestNamespace) Update added in v0.20.0

Update: Update the weekly digest settings

Every field is optional. Enabling schedules the first digest for the next configured send time rather than sending immediately — use POST /digest/send for an immediate one. The week boundary follows `timezone`, so the reported window is always the organization's own local Monday-to-Sunday week. Changing the schedule clears any parked failure state but never replays a week that already went out.

PUT /api/org/{orgId}/digest

Raises on 400: Bad request

type DigestRecipientsCreateParams added in v0.27.0

type DigestRecipientsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DigestEmailRecipientCreate
}

DigestRecipientsCreateParams holds the parameters for `client.digest.recipients.create`.

Every field is optional; pass nil to take the defaults.

type DigestRecipientsDeleteParams added in v0.27.0

type DigestRecipientsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// RecipientID: Recipient id
	RecipientID string
}

DigestRecipientsDeleteParams holds the parameters for `client.digest.recipients.delete`.

type DigestRecipientsDeleteResponse added in v0.27.0

type DigestRecipientsDeleteResponse struct {
	OK bool `json:"ok"`
}

DigestRecipientsDeleteResponse is an object the spec declares inline.

type DigestRecipientsGetParams added in v0.27.0

type DigestRecipientsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DigestRecipientsGetParams holds the parameters for `client.digest.recipients.get`.

Every field is optional; pass nil to take the defaults.

type DigestRecipientsNamespace added in v0.27.0

type DigestRecipientsNamespace struct {
	// contains filtered or unexported fields
}

DigestRecipientsNamespace is `client.digest.recipients`.

func (*DigestRecipientsNamespace) Create added in v0.27.0

Create: Add a digest email recipient

Adding an address the organization already has is a no-op that returns the existing entry, so a double submit cannot double-deliver.

POST /api/org/{orgId}/digest/recipients

Raises on 400: Bad request

func (*DigestRecipientsNamespace) Delete added in v0.27.0

Delete: Remove a digest email recipient

DELETE /api/org/{orgId}/digest/recipients/{recipientId}

Raises on 404: Not found

func (*DigestRecipientsNamespace) Get added in v0.27.0

Get: List the organization's digest email recipients

Email is a digest-only transport, so its destinations are an organization-level address list rather than a per-channel trigger. Addresses need not belong to Infrawrench users — a finance alias is a valid recipient.

GET /api/org/{orgId}/digest/recipients

type DigestSendParams added in v0.20.0

type DigestSendParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

DigestSendParams holds the parameters for `client.digest.send`.

Every field is optional; pass nil to take the defaults.

type DigestSendResult added in v0.20.0

type DigestSendResult struct {
	OK bool `json:"ok"`
	// Attempted: Deliveries attempted across Slack channels, Teams webhooks and
	// email recipients.
	Attempted int64                 `json:"attempted"`
	Succeeded int64                 `json:"succeeded"`
	Slack     DigestTransportResult `json:"slack"`
	Teams     DigestTransportResult `json:"teams"`
	Email     DigestTransportResult `json:"email"`
}

DigestSendResult is the `DigestSendResult` schema.

type DigestSettings added in v0.20.0

type DigestSettings struct {
	// Enabled: Whether the weekly digest is enabled for this organization.
	// Delivery targets are the Slack channels and Teams webhooks whose
	// weeklyDigest trigger is on, plus the organization's digest email
	// recipients.
	Enabled bool `json:"enabled"`
	// LastSentWeekStart: Monday (ISO date, in the organization's timezone) of
	// the last week a digest covered, or null when none has been sent.
	LastSentWeekStart *string `json:"lastSentWeekStart"`
	// LastSentAt: When a digest last actually reached a destination, or null if
	// none ever has.
	LastSentAt *string `json:"lastSentAt"`
	// Timezone: IANA time zone the schedule and the Monday-to-Sunday week
	// boundary are expressed in. Defaults to UTC.
	Timezone string `json:"timezone"`
	// SendDay: ISO day of week the digest is sent on: 1 = Monday … 7 = Sunday.
	SendDay int64 `json:"sendDay"`
	// SendHour: Local hour (0–23) in `timezone` the digest is sent at.
	SendHour int64 `json:"sendHour"`
	// NarrativeEnabled: Whether an AI-written summary paragraph is placed above
	// the deterministic content. Opt-in, default off. Failures are non-fatal:
	// the digest still sends without the paragraph.
	NarrativeEnabled bool `json:"narrativeEnabled"`
	// NarrativeAvailable: Whether this deployment has an LLM API key configured.
	// False means enabling the narrative has no effect.
	NarrativeAvailable bool `json:"narrativeAvailable"`
	// EmailAvailable: Whether this deployment has a mail provider configured.
	// False means email recipients are never delivered to.
	EmailAvailable bool `json:"emailAvailable"`
	// AttemptCount: Delivery attempts made for lastSentWeekStart's window,
	// including the first.
	AttemptCount  int64   `json:"attemptCount"`
	LastAttemptAt *string `json:"lastAttemptAt"`
	// LastStatus: Outcome of the most recent delivery attempt. `partial` (some
	// destinations took it, some failed) is deliberately never retried
	// automatically — a retry would post the digest twice where it already
	// landed. `failed` (nothing landed) is retried a bounded number of times
	// with backoff, then parked until the next week.
	//
	// One of "pending", "succeeded", "partial", "failed", "no_targets".
	LastStatus *string `json:"lastStatus"`
	// LastError: Why the last attempt was not a clean success, for display in
	// the settings UI.
	LastError *string `json:"lastError"`
	// NextAttemptAt: When the next automatic retry is due, or null when none is
	// scheduled.
	NextAttemptAt *string `json:"nextAttemptAt"`
}

DigestSettings is the `DigestSettings` schema.

type DigestSettingsUpdate added in v0.20.0

type DigestSettingsUpdate struct {
	Enabled *bool `json:"enabled,omitempty"`
	// Timezone: IANA time zone name. Rejected with 400 if the server does not
	// know the zone.
	Timezone         *string `json:"timezone,omitempty"`
	SendDay          *int64  `json:"sendDay,omitempty"`
	SendHour         *int64  `json:"sendHour,omitempty"`
	NarrativeEnabled *bool   `json:"narrativeEnabled,omitempty"`
}

DigestSettingsUpdate is the `DigestSettingsUpdate` schema.

type DigestTransportResult added in v0.27.0

type DigestTransportResult struct {
	Attempted int64 `json:"attempted"`
	Succeeded int64 `json:"succeeded"`
}

DigestTransportResult is the `DigestTransportResult` schema.

type DigestUpdateParams added in v0.20.0

type DigestUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *DigestSettingsUpdate
}

DigestUpdateParams holds the parameters for `client.digest.update`.

Every field is optional; pass nil to take the defaults.

type DockerCommandParams

type DockerCommandParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body DockerCommandRequest
}

DockerCommandParams holds the parameters for `client.docker.command`.

type DockerCommandRequest

type DockerCommandRequest struct {
	AccountID string     `json:"accountId"`
	Op        string     `json:"op"`
	Params    JSONObject `json:"params,omitempty"`
}

DockerCommandRequest is the `DockerCommandRequest` schema.

type DockerCommandResponse

type DockerCommandResponse struct {
	Result any `json:"result,omitempty"`
}

DockerCommandResponse is the `DockerCommandResponse` schema.

type DockerNamespace

type DockerNamespace struct {
	// contains filtered or unexported fields
}

DockerNamespace is `client.docker`.

func (*DockerNamespace) Command

Command: Run a Docker daemon operation

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/docker/command

Raises on 400: Bad request

Raises on 404: Not found

type DriftAlertSettings added in v0.27.0

type DriftAlertSettings struct {
	// NotifyCreated: Alert on resources that appeared.
	NotifyCreated bool `json:"notifyCreated"`
	// NotifyUpdated: Alert on field-level updates. Defaults to false — updates
	// are the bulk of the volume and are usually a provider restating a value.
	NotifyUpdated bool `json:"notifyUpdated"`
	// NotifyDeleted: Alert on resources that disappeared.
	NotifyDeleted bool `json:"notifyDeleted"`
	// CooldownMinutes: Least time between drift notifications for this
	// organization. One notification per window, no matter how many changes or
	// accounts it covers.
	CooldownMinutes int64 `json:"cooldownMinutes"`
	// MinChanges: Fewest matching changes in a window worth notifying about.
	MinChanges int64 `json:"minChanges"`
	// AccountIDs: Accounts to alert on. An empty array means every account.
	AccountIDs []string `json:"accountIds"`
	// LastNotifiedAt: When this organization last had a drift digest delivered.
	LastNotifiedAt *string `json:"lastNotifiedAt"`
}

DriftAlertSettings is the `DriftAlertSettings` schema.

type DriftAlertSettingsUpdate added in v0.27.0

type DriftAlertSettingsUpdate struct {
	NotifyCreated   *bool    `json:"notifyCreated,omitempty"`
	NotifyUpdated   *bool    `json:"notifyUpdated,omitempty"`
	NotifyDeleted   *bool    `json:"notifyDeleted,omitempty"`
	CooldownMinutes *int64   `json:"cooldownMinutes,omitempty"`
	MinChanges      *int64   `json:"minChanges,omitempty"`
	AccountIDs      []string `json:"accountIds,omitempty"`
}

DriftAlertSettingsUpdate is the `DriftAlertSettingsUpdate` schema.

type EditableField

type EditableField struct {
	Key   string `json:"key"`
	Label string `json:"label"`
	// Kind: One of "string", "number", "boolean", "enum", "secret",
	// "association", "password".
	Kind        string   `json:"kind"`
	Required    bool     `json:"required"`
	Description *string  `json:"description,omitempty"`
	EnumValues  []string `json:"enumValues,omitempty"`
}

EditableField is the `EditableField` schema.

type Error

type Error struct {
	// Error: Human-readable error message
	Error string `json:"error"`
}

Error is the `Error` schema.

type ExpiringGetParams added in v0.29.0

type ExpiringGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

ExpiringGetParams holds the parameters for `client.expiring.get`.

Every field is optional; pass nil to take the defaults.

type ExpiringNamespace added in v0.29.0

type ExpiringNamespace struct {

	// Settings: `client.expiring.settings`.
	Settings *ExpiringSettingsNamespace
	// contains filtered or unexported fields
}

ExpiringNamespace is `client.expiring`.

func (*ExpiringNamespace) Get added in v0.29.0

Get: List approaching deadlines on synced resources

One cross-provider countdown of everything with a clock on it: TLS certificate expiries, domain registrations, API token expirations, access keys past their rotation budget, Kubernetes/SSH credential ages. Plugins declare which synced fields carry deadlines; the feed is computed over already-stored state, so no provider API calls are made and results reflect the last sync. Items are sorted soonest first and bucketed by severity against the organization's lead time.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/expiring

type ExpiringSettingsGetParams added in v0.29.0

type ExpiringSettingsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

ExpiringSettingsGetParams holds the parameters for `client.expiring.settings.get`.

Every field is optional; pass nil to take the defaults.

type ExpiringSettingsNamespace added in v0.29.0

type ExpiringSettingsNamespace struct {
	// contains filtered or unexported fields
}

ExpiringSettingsNamespace is `client.expiring.settings`.

func (*ExpiringSettingsNamespace) Get added in v0.29.0

Get: Get the organization's expiry alert settings

The lead time feeds both the feed's `upcoming` bucket and the poller's daily alert scan. An organization that never saved reads the shipped defaults (enabled, 60 days).

_Requires permission: `org:settings:write`._

GET /api/org/{orgId}/expiring/settings

func (*ExpiringSettingsNamespace) Update added in v0.29.0

Update: Update the expiry alert settings

Every field is optional so a single toggle can be saved on its own. `leadDays` must be a whole number from 1 to 365. Saving never resets the alert cooldown.

_Requires permission: `org:settings:write`._

PUT /api/org/{orgId}/expiring/settings

Raises on 400: Bad request

type ExpiringSettingsUpdateParams added in v0.29.0

type ExpiringSettingsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *ExpiryAlertSettingsUpdate
}

ExpiringSettingsUpdateParams holds the parameters for `client.expiring.settings.update`.

Every field is optional; pass nil to take the defaults.

type ExpiryAlertSettings added in v0.29.0

type ExpiryAlertSettings struct {
	// Enabled: Whether the poller sends expiry alerts for this organization at
	// all.
	Enabled bool `json:"enabled"`
	// LeadDays: Days of lead time before a deadline counts as `upcoming` and
	// alertable. Default 60.
	LeadDays int64 `json:"leadDays"`
	// LastNotifiedAt: When the organization's expiry alert scan last completed,
	// or null before the first. Owned by the poller's cooldown claim; not
	// writable through this API.
	LastNotifiedAt *string `json:"lastNotifiedAt"`
}

ExpiryAlertSettings is the `ExpiryAlertSettings` schema.

type ExpiryAlertSettingsUpdate added in v0.29.0

type ExpiryAlertSettingsUpdate struct {
	Enabled  *bool  `json:"enabled,omitempty"`
	LeadDays *int64 `json:"leadDays,omitempty"`
}

ExpiryAlertSettingsUpdate is the `ExpiryAlertSettingsUpdate` schema.

type ExpiryItem added in v0.29.0

type ExpiryItem struct {
	// ResourceID: Infrawrench resource id.
	ResourceID       string   `json:"resourceId"`
	PluginID         PluginID `json:"pluginId"`
	PluginName       string   `json:"pluginName"`
	ResourceTypeID   string   `json:"resourceTypeId"`
	ResourceTypeName string   `json:"resourceTypeName"`
	AccountID        string   `json:"accountId"`
	AccountName      string   `json:"accountName"`
	DisplayName      string   `json:"displayName"`
	// ExternalID: Provider-native id, when known.
	ExternalID *string `json:"externalId"`
	// FieldKey: The declared field the deadline came from.
	FieldKey string `json:"fieldKey"`
	// Kind: Grouping bucket for the kind of deadline.
	//
	// One of "tls-cert", "domain", "api-token", "access-key", "k8s-cert",
	// "ssh-key", "secret-version", "other".
	Kind string `json:"kind"`
	// Label: Plugin-authored caption for the deadline.
	Label string `json:"label"`
	// Basis: `expiry` — the field held the deadline itself; `age` — the deadline
	// was derived from a creation/rotation date plus an age budget.
	//
	// One of "expiry", "age".
	Basis string `json:"basis"`
	// DueAt: The deadline.
	DueAt string `json:"dueAt"`
	// DaysRemaining: Whole days until dueAt (floor); negative once expired.
	DaysRemaining int64 `json:"daysRemaining"`
	// Severity: How close the deadline is: `expired` (in the past), `critical`
	// (due within 7 days), `warning` (within 30 days), `upcoming` (within the
	// organization's lead time), or `ok` (tracked, but further out than the lead
	// time).
	//
	// One of "expired", "critical", "warning", "upcoming", "ok".
	Severity string `json:"severity"`
}

ExpiryItem is the `ExpiryItem` schema.

type ExpiryListResponse added in v0.29.0

type ExpiryListResponse struct {
	// Items: All tracked deadlines, soonest first (`ok` items included).
	Items      []ExpiryItem         `json:"items"`
	TotalCount int64                `json:"totalCount"`
	Counts     ExpirySeverityCounts `json:"counts"`
	// LeadDays: The lead time the `upcoming` bucket was computed against.
	LeadDays    int64  `json:"leadDays"`
	GeneratedAt string `json:"generatedAt"`
}

ExpiryListResponse is the `ExpiryListResponse` schema.

type ExpirySeverityCounts added in v0.29.0

type ExpirySeverityCounts struct {
	Expired  int64 `json:"expired"`
	Critical int64 `json:"critical"`
	Warning  int64 `json:"warning"`
	Upcoming int64 `json:"upcoming"`
	OK       int64 `json:"ok"`
}

ExpirySeverityCounts: Item count per severity; every bucket present, zeros included.

type ExportCredentialRequest

type ExportCredentialRequest struct {
	ResourceID       ResourceID  `json:"resourceId"`
	AccountID        string      `json:"accountId"`
	FormatID         string      `json:"formatId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

ExportCredentialRequest is the `ExportCredentialRequest` schema.

type FieldActionRequest

type FieldActionRequest struct {
	AccountID        string            `json:"accountId"`
	ResourceTypeID   string            `json:"resourceTypeId"`
	FieldKey         string            `json:"fieldKey"`
	ActionID         string            `json:"actionId"`
	Fields           map[string]string `json:"fields"`
	ActionFields     map[string]string `json:"actionFields,omitempty"`
	PluginID         *string           `json:"pluginId,omitempty"`
	ParentResourceID *ResourceID       `json:"parentResourceId,omitempty"`
}

FieldActionRequest is the `FieldActionRequest` schema.

type FieldActionResponse

type FieldActionResponse struct {
	Value  string                     `json:"value"`
	Option *FieldActionResponseOption `json:"option,omitempty"`
}

FieldActionResponse is the `FieldActionResponse` schema.

type FieldActionResponseOption

type FieldActionResponseOption struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

FieldActionResponseOption is an object the spec declares inline.

type GenerateSSHKeyRequest

type GenerateSSHKeyRequest struct {
	Name string `json:"name"`
}

GenerateSSHKeyRequest is the `GenerateSshKeyRequest` schema.

Spec schema: `GenerateSshKeyRequest`.

type GeneratedSSHKey

type GeneratedSSHKey struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	KeyType     SSHKeyType `json:"keyType"`
	Fingerprint string     `json:"fingerprint"`
	PublicKey   string     `json:"publicKey"`
	// PrivateKey: Returned once. Not persisted in plaintext.
	PrivateKey string `json:"privateKey"`
}

GeneratedSSHKey is the `GeneratedSshKey` schema.

Spec schema: `GeneratedSshKey`.

type ImportSSHKeyRequest

type ImportSSHKeyRequest struct {
	Name      string `json:"name"`
	PublicKey string `json:"publicKey"`
}

ImportSSHKeyRequest is the `ImportSshKeyRequest` schema.

Spec schema: `ImportSshKeyRequest`.

type ImportYAMLRequest

type ImportYAMLRequest struct {
	AccountID        string      `json:"accountId"`
	YAML             string      `json:"yaml"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

ImportYAMLRequest is the `ImportYamlRequest` schema.

Spec schema: `ImportYamlRequest`.

type ImportedSSHKey

type ImportedSSHKey struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	KeyType     SSHKeyType `json:"keyType"`
	Fingerprint string     `json:"fingerprint"`
	PublicKey   string     `json:"publicKey"`
	IsImported  bool       `json:"isImported"`
}

ImportedSSHKey is the `ImportedSshKey` schema.

Spec schema: `ImportedSshKey`.

type Invitation

type Invitation struct {
	ID         string           `json:"id"`
	Email      string           `json:"email"`
	Role       OrganizationRole `json:"role"`
	RoleID     *string          `json:"roleId"`
	RoleName   *string          `json:"roleName"`
	AcceptedAt *string          `json:"acceptedAt"`
	ExpiresAt  string           `json:"expiresAt"`
	CreatedAt  string           `json:"createdAt"`
}

Invitation is the `Invitation` schema.

type InvitationDetail

type InvitationDetail struct {
	ID               string           `json:"id"`
	Email            string           `json:"email"`
	Role             OrganizationRole `json:"role"`
	ExpiresAt        string           `json:"expiresAt"`
	AcceptedAt       *string          `json:"acceptedAt"`
	OrganizationID   string           `json:"organizationId"`
	OrganizationName string           `json:"organizationName"`
}

InvitationDetail is the `InvitationDetail` schema.

type InvitationsAcceptParams

type InvitationsAcceptParams struct {
	// Body: the JSON request body.
	Body AcceptInvitationRequest
}

InvitationsAcceptParams holds the parameters for `client.invitations.accept`.

type InvitationsByTokenGetParams

type InvitationsByTokenGetParams struct {
	Token string
}

InvitationsByTokenGetParams holds the parameters for `client.invitations.byToken.get`.

type InvitationsByTokenNamespace

type InvitationsByTokenNamespace struct {
	// contains filtered or unexported fields
}

InvitationsByTokenNamespace is `client.invitations.byToken`.

func (*InvitationsByTokenNamespace) Get

Get: Get invitation details by token

GET /api/invitations/by-token/{token}

Raises on 404: Not found

type InvitationsNamespace

type InvitationsNamespace struct {

	// ByToken: `client.invitations.byToken`.
	ByToken *InvitationsByTokenNamespace
	// contains filtered or unexported fields
}

InvitationsNamespace is `client.invitations`.

func (*InvitationsNamespace) Accept

Accept: Accept an invitation

POST /api/invitations/accept

Raises on 400: Bad request

Raises on 403: Forbidden

type InviteRequest

type InviteRequest struct {
	Email  string            `json:"email"`
	Role   *OrganizationRole `json:"role,omitempty"`
	RoleID *string           `json:"roleId,omitempty"`
	// AddSeat: When the paid plan is full (409 seat_limit_reached), retry with
	// this set to buy one more seat and send the invitation. Requires
	// billing:write.
	AddSeat *bool `json:"addSeat,omitempty"`
}

InviteRequest is the `InviteRequest` schema.

type InviteResponse

type InviteResponse struct {
	ID    string `json:"id"`
	Token string `json:"token"`
}

InviteResponse is the `InviteResponse` schema.

type InvokeActionRequest

type InvokeActionRequest struct {
	PluginID         string      `json:"pluginId"`
	AccountID        string      `json:"accountId"`
	ResourceTypeID   string      `json:"resourceTypeId"`
	ResourceID       ResourceID  `json:"resourceId"`
	ActionID         string      `json:"actionId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

InvokeActionRequest is the `InvokeActionRequest` schema.

type JSONObject

type JSONObject = map[string]any

JSONObject: Free-form JSON object whose shape depends on the plugin.

Spec schema: `JsonObject`.

type KVCommandParams

type KVCommandParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body KVCommandRequest
}

KVCommandParams holds the parameters for `client.kv.command`.

type KVCommandRequest

type KVCommandRequest struct {
	AccountID        string      `json:"accountId"`
	Command          string      `json:"command"`
	Args             []any       `json:"args"`
	PluginID         *string     `json:"pluginId,omitempty"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

KVCommandRequest is the `KvCommandRequest` schema.

Spec schema: `KvCommandRequest`.

type KVCommandResponse

type KVCommandResponse struct {
	Result any `json:"result,omitempty"`
}

KVCommandResponse is the `KvCommandResponse` schema.

Spec schema: `KvCommandResponse`.

type KVNamespace

type KVNamespace struct {
	// contains filtered or unexported fields
}

KVNamespace is `client.kv`.

func (*KVNamespace) Command

func (n *KVNamespace) Command(ctx context.Context, params KVCommandParams, opts ...RequestOption) (*KVCommandResponse, error)

Command: Run a Redis-style KV command

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/kv/command

Raises on 400: Bad request

Raises on 404: Not found

type LiteralAssociationRequest

type LiteralAssociationRequest struct {
	ResourceID     ResourceID `json:"resourceId"`
	FieldKey       string     `json:"fieldKey"`
	PlaintextValue string     `json:"plaintextValue"`
}

LiteralAssociationRequest is the `LiteralAssociationRequest` schema.

type LogCapableResource added in v0.30.0

type LogCapableResource struct {
	ResourceID     string   `json:"resourceId"`
	AccountID      string   `json:"accountId"`
	AccountName    string   `json:"accountName"`
	PluginID       PluginID `json:"pluginId"`
	ResourceTypeID string   `json:"resourceTypeId"`
	DisplayName    string   `json:"displayName"`
	// ParentResourceID: Set for sidecar streams: the stored parent resource the
	// peer client is built through.
	ParentResourceID  *string `json:"parentResourceId,omitempty"`
	ParentDisplayName *string `json:"parentDisplayName,omitempty"`
}

LogCapableResource is the `LogCapableResource` schema.

type LogCapableResourceList added in v0.30.0

type LogCapableResourceList struct {
	Resources []LogCapableResource `json:"resources"`
}

LogCapableResourceList is the `LogCapableResourceList` schema.

type LogStreamSelector added in v0.30.0

type LogStreamSelector struct {
	// ResourceID: Infrawrench resource id of the stream to tail — or, for a
	// sidecar stream, the peer plugin's own resource id (not a stored row).
	ResourceID     string   `json:"resourceId"`
	AccountID      string   `json:"accountId"`
	PluginID       PluginID `json:"pluginId"`
	ResourceTypeID string   `json:"resourceTypeId"`
	// ParentResourceID: Set for sidecar streams (e.g. a pod inside a managed
	// cluster): the stored parent resource whose outputs mint the peer plugin's
	// credentials. The logs endpoint routes through the peer client when
	// present.
	ParentResourceID *string `json:"parentResourceId,omitempty"`
	// Container: Container to fetch when the resource has more than one; omit
	// for the default.
	Container *string `json:"container,omitempty"`
}

LogStreamSelector is the `LogStreamSelector` schema.

type LogWorkspaceQuery added in v0.30.0

type LogWorkspaceQuery struct {
	ID        string              `json:"id"`
	Name      string              `json:"name"`
	Resources []LogStreamSelector `json:"resources"`
	// Search: The search expression. Empty matches every line; `/pattern/`
	// (optionally `/pattern/i`) is a regular expression; otherwise
	// whitespace-separated terms that must ALL appear in a line
	// (case-insensitive), with `"quoted phrases"` and `-term` negation.
	Search string `json:"search"`
	// AlertEnabled: When true the poller periodically evaluates the query and
	// alerts on match.
	AlertEnabled bool `json:"alertEnabled"`
	// LastEvalAt: Last time the alert pass evaluated this query; null until it
	// has run.
	LastEvalAt *string `json:"lastEvalAt"`
	// LastMatchAt: Last evaluation that found at least one matching line.
	LastMatchAt *string `json:"lastMatchAt"`
	// LastAlertedAt: Last dispatched notification — the cooldown anchor.
	LastAlertedAt *string `json:"lastAlertedAt"`
	// LastEvalError: Failure detail from the last evaluation.
	LastEvalError *string `json:"lastEvalError"`
	// LastMatchSample: Truncated sample of the most recent matching line.
	LastMatchSample *string `json:"lastMatchSample"`
	CreatedAt       string  `json:"createdAt"`
	UpdatedAt       string  `json:"updatedAt"`
}

LogWorkspaceQuery is the `LogWorkspaceQuery` schema.

type LogWorkspaceQueryConflict added in v0.30.0

type LogWorkspaceQueryConflict struct {
	Error string `json:"error"`
}

LogWorkspaceQueryConflict is the `LogWorkspaceQueryConflict` schema.

type LogWorkspaceQueryCreate added in v0.30.0

type LogWorkspaceQueryCreate struct {
	Name      string              `json:"name"`
	Resources []LogStreamSelector `json:"resources"`
	// Search: The search expression. Empty matches every line; `/pattern/`
	// (optionally `/pattern/i`) is a regular expression; otherwise
	// whitespace-separated terms that must ALL appear in a line
	// (case-insensitive), with `"quoted phrases"` and `-term` negation.
	Search       string `json:"search"`
	AlertEnabled *bool  `json:"alertEnabled,omitempty"`
}

LogWorkspaceQueryCreate is the `LogWorkspaceQueryCreate` schema.

type LogWorkspaceQueryList added in v0.30.0

type LogWorkspaceQueryList struct {
	Queries []LogWorkspaceQuery `json:"queries"`
}

LogWorkspaceQueryList is the `LogWorkspaceQueryList` schema.

type LogWorkspaceQueryUpdate added in v0.30.0

type LogWorkspaceQueryUpdate struct {
	Name      *string             `json:"name,omitempty"`
	Resources []LogStreamSelector `json:"resources,omitempty"`
	// Search: The search expression. Empty matches every line; `/pattern/`
	// (optionally `/pattern/i`) is a regular expression; otherwise
	// whitespace-separated terms that must ALL appear in a line
	// (case-insensitive), with `"quoted phrases"` and `-term` negation.
	Search       *string `json:"search,omitempty"`
	AlertEnabled *bool   `json:"alertEnabled,omitempty"`
}

LogWorkspaceQueryUpdate is the `LogWorkspaceQueryUpdate` schema.

type LogWorkspaceQueryUpdateConflict added in v0.30.0

type LogWorkspaceQueryUpdateConflict struct {
	Error string `json:"error"`
}

LogWorkspaceQueryUpdateConflict is the `LogWorkspaceQueryUpdateConflict` schema.

type LogWorkspacesCreateParams added in v0.30.0

type LogWorkspacesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body LogWorkspaceQueryCreate
}

LogWorkspacesCreateParams holds the parameters for `client.logWorkspaces.create`.

type LogWorkspacesDeleteParams added in v0.30.0

type LogWorkspacesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID   *string
	QueryID string
}

LogWorkspacesDeleteParams holds the parameters for `client.logWorkspaces.delete`.

type LogWorkspacesGetParams added in v0.30.0

type LogWorkspacesGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

LogWorkspacesGetParams holds the parameters for `client.logWorkspaces.get`.

Every field is optional; pass nil to take the defaults.

type LogWorkspacesNamespace added in v0.30.0

type LogWorkspacesNamespace struct {
	// contains filtered or unexported fields
}

LogWorkspacesNamespace is `client.logWorkspaces`.

func (*LogWorkspacesNamespace) Create added in v0.30.0

Create: Save a log workspace query

Save a named multi-resource tail: up to 8 log streams plus a search expression, so the workspace can be reopened. With `alertEnabled` the poller evaluates the query every few minutes over a bounded tail window and notifies (push/Slack/Teams, `logMatchAlerts` trigger) when a line matches, with a cooldown between alerts. Alerting requires a non-empty search expression. Audit-logged.

_Requires permission: `resources:write`._

POST /api/org/{orgId}/log-workspaces

Raises on 400: Bad request

Raises on 404: Not found

Raises on 409: A saved query with this name already exists

func (*LogWorkspacesNamespace) Delete added in v0.30.0

Delete: Delete a saved log query

Remove the saved query and stop any alerting it carried. Audit-logged.

_Requires permission: `resources:write`._

DELETE /api/org/{orgId}/log-workspaces/{queryId}

Raises on 404: Not found

func (*LogWorkspacesNamespace) Get added in v0.30.0

Get: List saved log queries

Every saved log-workspace query in the organization: its name, the set of log streams it tails, the search expression, the alert flag and the alert pass's last evaluation state. Log text itself is fetched per resource via `POST /api/org/{orgId}/resources/{pluginId}/{typeId}/logs`.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/log-workspaces

func (*LogWorkspacesNamespace) Resources added in v0.30.0

Resources: List log-capable resources

Synced resources whose rendered detail declares the logs capability — the candidates a log workspace can tail — plus sidecar streams reached through a peer integration (pods and workloads inside a managed cluster, listed live from the provider and marked with `parentResourceId`). Discovered from the plugin contract (never a hardcoded provider list), capped at 500 results.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/log-workspaces/resources

func (*LogWorkspacesNamespace) Update added in v0.30.0

Update: Update a saved log query

Edit the name, resource set, search expression and/or the alert toggle. Changing the search or the resources resets the alert pass's evaluation state; turning the alert on makes the query due for evaluation immediately. Audit-logged.

_Requires permission: `resources:write`._

PUT /api/org/{orgId}/log-workspaces/{queryId}

Raises on 400: Bad request

Raises on 404: Not found

Raises on 409: A saved query with this name already exists

type LogWorkspacesResourcesParams added in v0.30.0

type LogWorkspacesResourcesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

LogWorkspacesResourcesParams holds the parameters for `client.logWorkspaces.resources`.

Every field is optional; pass nil to take the defaults.

type LogWorkspacesUpdateParams added in v0.30.0

type LogWorkspacesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID   *string
	QueryID string
	// Body: the JSON request body.
	Body LogWorkspaceQueryUpdate
}

LogWorkspacesUpdateParams holds the parameters for `client.logWorkspaces.update`.

type LogsRequest

type LogsRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
	TailLines        *int64      `json:"tailLines,omitempty"`
	Container        *string     `json:"container,omitempty"`
	Previous         *bool       `json:"previous,omitempty"`
}

LogsRequest is the `LogsRequest` schema.

type LogsResponse

type LogsResponse struct {
	// Text: Raw log text; each entry keeps its trailing newline.
	Text string `json:"text"`
	// Containers: Container names available for this resource — drives the
	// container picker.
	Containers []string `json:"containers"`
	// ActiveContainer: Container `text` was read from.
	ActiveContainer string `json:"activeContainer"`
}

LogsResponse is the `LogsResponse` schema.

type Manifest

type Manifest struct {
	Manifest string `json:"manifest"`
}

Manifest is the `Manifest` schema.

type MeResponse

type MeResponse struct {
	UserID      string       `json:"userId"`
	Email       string       `json:"email"`
	Role        *RoleSummary `json:"role"`
	Permissions []Permission `json:"permissions"`
}

MeResponse is the `MeResponse` schema.

type MetricAlertEvent added in v0.30.0

type MetricAlertEvent struct {
	ID           string `json:"id"`
	RuleID       string `json:"ruleId"`
	RuleName     string `json:"ruleName"`
	ResourceID   string `json:"resourceId"`
	ResourceName string `json:"resourceName"`
	// Status: One of "firing", "resolved".
	Status string `json:"status"`
	// ObservedValue: Worst sample observed in the breaching window, in the
	// metric's unit.
	ObservedValue float64 `json:"observedValue"`
	FiredAt       string  `json:"firedAt"`
	ResolvedAt    *string `json:"resolvedAt"`
}

MetricAlertEvent is the `MetricAlertEvent` schema.

type MetricAlertRule added in v0.30.0

type MetricAlertRule struct {
	Name string `json:"name"`
	// PluginID: Selector: plugin the resource must belong to. Null matches any
	// plugin.
	PluginID *string `json:"pluginId"`
	// ResourceTypeID: Selector: resource type within the plugin. Null matches
	// any type.
	ResourceTypeID *string `json:"resourceTypeId"`
	// TagKey: Selector: tag key the resource must carry (matched
	// case-insensitively). Null applies no tag filter. Resources are always
	// selected by this query, never by id, so rules cover resources created
	// later.
	TagKey *string `json:"tagKey"`
	// TagValue: Selector: exact value tagKey must have. Null matches any value.
	TagValue *string `json:"tagValue"`
	// MetricKey: The metric series label as the resource's charts report it (see
	// /metric-alerts/metric-keys).
	MetricKey string `json:"metricKey"`
	// Comparator: One of ">", ">=", "<", "<=".
	Comparator string  `json:"comparator"`
	Threshold  float64 `json:"threshold"`
	// ForMinutes: Trailing window (minutes) the condition must hold for before
	// firing.
	ForMinutes int64 `json:"forMinutes"`
	// CooldownMinutes: Least minutes between notified firings for one (rule,
	// resource).
	CooldownMinutes int64   `json:"cooldownMinutes"`
	Enabled         bool    `json:"enabled"`
	ID              string  `json:"id"`
	LastEvalAt      *string `json:"lastEvalAt"`
	CreatedAt       string  `json:"createdAt"`
	UpdatedAt       string  `json:"updatedAt"`
}

MetricAlertRule is the `MetricAlertRule` schema.

type MetricAlertRuleInput added in v0.30.0

type MetricAlertRuleInput struct {
	Name string `json:"name"`
	// PluginID: Selector: plugin the resource must belong to. Null matches any
	// plugin.
	PluginID *string `json:"pluginId"`
	// ResourceTypeID: Selector: resource type within the plugin. Null matches
	// any type.
	ResourceTypeID *string `json:"resourceTypeId"`
	// TagKey: Selector: tag key the resource must carry (matched
	// case-insensitively). Null applies no tag filter. Resources are always
	// selected by this query, never by id, so rules cover resources created
	// later.
	TagKey *string `json:"tagKey"`
	// TagValue: Selector: exact value tagKey must have. Null matches any value.
	TagValue *string `json:"tagValue"`
	// MetricKey: The metric series label as the resource's charts report it (see
	// /metric-alerts/metric-keys).
	MetricKey string `json:"metricKey"`
	// Comparator: One of ">", ">=", "<", "<=".
	Comparator string  `json:"comparator"`
	Threshold  float64 `json:"threshold"`
	// ForMinutes: Trailing window (minutes) the condition must hold for before
	// firing.
	ForMinutes int64 `json:"forMinutes"`
	// CooldownMinutes: Least minutes between notified firings for one (rule,
	// resource).
	CooldownMinutes int64 `json:"cooldownMinutes"`
	Enabled         bool  `json:"enabled"`
}

MetricAlertRuleInput is the `MetricAlertRuleInput` schema.

type MetricAlertRuleWithStatus added in v0.30.0

type MetricAlertRuleWithStatus struct {
	Name string `json:"name"`
	// PluginID: Selector: plugin the resource must belong to. Null matches any
	// plugin.
	PluginID *string `json:"pluginId"`
	// ResourceTypeID: Selector: resource type within the plugin. Null matches
	// any type.
	ResourceTypeID *string `json:"resourceTypeId"`
	// TagKey: Selector: tag key the resource must carry (matched
	// case-insensitively). Null applies no tag filter. Resources are always
	// selected by this query, never by id, so rules cover resources created
	// later.
	TagKey *string `json:"tagKey"`
	// TagValue: Selector: exact value tagKey must have. Null matches any value.
	TagValue *string `json:"tagValue"`
	// MetricKey: The metric series label as the resource's charts report it (see
	// /metric-alerts/metric-keys).
	MetricKey string `json:"metricKey"`
	// Comparator: One of ">", ">=", "<", "<=".
	Comparator string  `json:"comparator"`
	Threshold  float64 `json:"threshold"`
	// ForMinutes: Trailing window (minutes) the condition must hold for before
	// firing.
	ForMinutes int64 `json:"forMinutes"`
	// CooldownMinutes: Least minutes between notified firings for one (rule,
	// resource).
	CooldownMinutes int64   `json:"cooldownMinutes"`
	Enabled         bool    `json:"enabled"`
	ID              string  `json:"id"`
	LastEvalAt      *string `json:"lastEvalAt"`
	CreatedAt       string  `json:"createdAt"`
	UpdatedAt       string  `json:"updatedAt"`
	// FiringCount: Resources currently in breach of this rule.
	FiringCount int64 `json:"firingCount"`
	// MatchingResourceCount: Resources the selector matches right now.
	MatchingResourceCount int64 `json:"matchingResourceCount"`
}

MetricAlertRuleWithStatus is the `MetricAlertRuleWithStatus` schema.

type MetricAlertSelectorOptions added in v0.30.0

type MetricAlertSelectorOptions struct {
	Plugins []MetricAlertSelectorOptionsPlugins `json:"plugins"`
	TagKeys []string                            `json:"tagKeys"`
}

MetricAlertSelectorOptions is the `MetricAlertSelectorOptions` schema.

type MetricAlertSelectorOptionsPlugins added in v0.30.0

type MetricAlertSelectorOptionsPlugins struct {
	PluginID        string   `json:"pluginId"`
	ResourceTypeIDs []string `json:"resourceTypeIds"`
}

MetricAlertSelectorOptionsPlugins is an object the spec declares inline.

type MetricAlertSelectorPreview added in v0.30.0

type MetricAlertSelectorPreview struct {
	MatchingResourceCount int64 `json:"matchingResourceCount"`
	// SampleResourceNames: Up to 10 matching display names, for a live form
	// preview.
	SampleResourceNames []string `json:"sampleResourceNames"`
}

MetricAlertSelectorPreview is the `MetricAlertSelectorPreview` schema.

type MetricAlertsCreateParams added in v0.30.0

type MetricAlertsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body MetricAlertRuleInput
}

MetricAlertsCreateParams holds the parameters for `client.metricAlerts.create`.

type MetricAlertsDeleteParams added in v0.30.0

type MetricAlertsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

MetricAlertsDeleteParams holds the parameters for `client.metricAlerts.delete`.

type MetricAlertsEventsParams added in v0.30.0

type MetricAlertsEventsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID  *string
	RuleID *string
	Limit  *int64
}

MetricAlertsEventsParams holds the parameters for `client.metricAlerts.events`.

Every field is optional; pass nil to take the defaults.

type MetricAlertsGetParams added in v0.30.0

type MetricAlertsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

MetricAlertsGetParams holds the parameters for `client.metricAlerts.get`.

type MetricAlertsListParams added in v0.30.0

type MetricAlertsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

MetricAlertsListParams holds the parameters for `client.metricAlerts.list`.

Every field is optional; pass nil to take the defaults.

type MetricAlertsMetricKeysParams added in v0.30.0

type MetricAlertsMetricKeysParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID          *string
	PluginID       *string
	ResourceTypeID *string
}

MetricAlertsMetricKeysParams holds the parameters for `client.metricAlerts.metricKeys`.

Every field is optional; pass nil to take the defaults.

type MetricAlertsNamespace added in v0.30.0

type MetricAlertsNamespace struct {
	// contains filtered or unexported fields
}

MetricAlertsNamespace is `client.metricAlerts`.

func (*MetricAlertsNamespace) Create added in v0.30.0

Create: Create a metric alert rule

Rules select resources by query (plugin + resource type + tag), never by id list, so a rule automatically covers resources created after it was written. The poller evaluates enabled rules about once a minute and alerts when the condition held for the whole trailing window.

POST /api/org/{orgId}/metric-alerts

Raises on 400: Bad request

func (*MetricAlertsNamespace) Delete added in v0.30.0

Delete: Delete a metric alert rule

Soft delete. The rule's firing history stays readable via /metric-alerts/events.

DELETE /api/org/{orgId}/metric-alerts/{id}

Raises on 404: Not found

func (*MetricAlertsNamespace) Events added in v0.30.0

Events: Recent metric alert firings

GET /api/org/{orgId}/metric-alerts/events

func (*MetricAlertsNamespace) Get added in v0.30.0

Get: Get a metric alert rule

GET /api/org/{orgId}/metric-alerts/{id}

Raises on 404: Not found

func (*MetricAlertsNamespace) List added in v0.30.0

List: List metric alert rules with live firing status

GET /api/org/{orgId}/metric-alerts

func (*MetricAlertsNamespace) MetricKeys added in v0.30.0

MetricKeys: List metric series that actually exist

The series labels resources reported in the last 7 days, optionally narrowed to one plugin and resource type — what the rule builder's metric picker is fed from.

GET /api/org/{orgId}/metric-alerts/metric-keys

func (*MetricAlertsNamespace) SelectorOptions added in v0.30.0

SelectorOptions: List what the organization's resources offer to select on

GET /api/org/{orgId}/metric-alerts/selector-options

func (*MetricAlertsNamespace) SelectorPreview added in v0.30.0

SelectorPreview: Preview which resources a selector matches right now

GET /api/org/{orgId}/metric-alerts/selector-preview

Raises on 400: Bad request

func (*MetricAlertsNamespace) Update added in v0.30.0

Update: Update a metric alert rule

PUT /api/org/{orgId}/metric-alerts/{id}

Raises on 400: Bad request

Raises on 404: Not found

type MetricAlertsSelectorOptionsParams added in v0.30.0

type MetricAlertsSelectorOptionsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

MetricAlertsSelectorOptionsParams holds the parameters for `client.metricAlerts.selectorOptions`.

Every field is optional; pass nil to take the defaults.

type MetricAlertsSelectorPreviewParams added in v0.30.0

type MetricAlertsSelectorPreviewParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID          *string
	PluginID       *string
	ResourceTypeID *string
	TagKey         *string
	TagValue       *string
}

MetricAlertsSelectorPreviewParams holds the parameters for `client.metricAlerts.selectorPreview`.

Every field is optional; pass nil to take the defaults.

type MetricAlertsUpdateParams added in v0.30.0

type MetricAlertsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body MetricAlertRuleInput
}

MetricAlertsUpdateParams holds the parameters for `client.metricAlerts.update`.

type MetricSeries

type MetricSeries struct {
	Label  string               `json:"label"`
	Unit   *string              `json:"unit,omitempty"`
	Points []MetricSeriesPoints `json:"points"`
}

MetricSeries is the `MetricSeries` schema.

type MetricSeriesKey added in v0.30.0

type MetricSeriesKey struct {
	Label string `json:"label"`
	Unit  string `json:"unit"`
	// ResourceCount: Distinct resources that reported this series in the last 7
	// days.
	ResourceCount int64 `json:"resourceCount"`
}

MetricSeriesKey is the `MetricSeriesKey` schema.

type MetricSeriesPoints

type MetricSeriesPoints struct {
	// Timestamp: Unix epoch milliseconds.
	Timestamp float64 `json:"timestamp"`
	Value     float64 `json:"value"`
}

MetricSeriesPoints is an object the spec declares inline.

type MetricsRequest

type MetricsRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	StartMs          *int64      `json:"startMs,omitempty"`
	EndMs            *int64      `json:"endMs,omitempty"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

MetricsRequest is the `MetricsRequest` schema.

type MetricsResponse

type MetricsResponse struct {
	Series []MetricSeries `json:"series"`
}

MetricsResponse is the `MetricsResponse` schema.

type MomentEvent added in v0.29.0

type MomentEvent struct {
	// ID: Stable synthetic id, unique within a response (`feed:rowId[:phase]`).
	ID   string       `json:"id"`
	Feed MomentFeedID `json:"feed"`
	// Kind: Fine-grained `<noun>.<verb>` kind, e.g. `change.created`,
	// `incident.started`, `workflow-run.failed`, `deployment.finished`,
	// `freeze.started`, `drift-alert.sent`. Open set — render unknown kinds
	// generically.
	Kind      string `json:"kind"`
	Timestamp string `json:"timestamp"`
	// Title: One-line headline.
	Title string `json:"title"`
	// Detail: Optional second line — diff summary, actor, error text.
	Detail         *string          `json:"detail,omitempty"`
	Severity       MomentSeverity   `json:"severity"`
	PluginID       *string          `json:"pluginId,omitempty"`
	AccountID      *string          `json:"accountId,omitempty"`
	AccountName    *string          `json:"accountName,omitempty"`
	ResourceID     *string          `json:"resourceId,omitempty"`
	ResourceTypeID *string          `json:"resourceTypeId,omitempty"`
	ResourceName   *string          `json:"resourceName,omitempty"`
	Link           *MomentEventLink `json:"link,omitempty"`
}

MomentEvent is the `MomentEvent` schema.

type MomentEventLink struct {
	// Kind: Which native screen the event deep-links to.
	//
	// One of "resource", "changes", "incident", "costs", "workflow-run",
	// "deployment", "audit", "freeze", "expiring".
	Kind string `json:"kind"`
	// ID: Target id where the kind needs one (resource id, run id, freeze id…).
	ID *string `json:"id,omitempty"`
	// ParentID: Parent id where the target needs one (workflow id for a run).
	ParentID *string `json:"parentId,omitempty"`
	// URL: Absolute external URL — a provider's incident page. Wins when
	// present.
	URL *string `json:"url,omitempty"`
}

MomentEventLink is the `MomentEventLink` schema.

The API may send null in its place.

type MomentFeedID added in v0.29.0

type MomentFeedID = string

MomentFeedID: One of the indexed feeds the moment union draws from.

Spec schema: `MomentFeedId`.

const (
	MomentFeedIDChanges         MomentFeedID = "changes"
	MomentFeedIDStatusIncidents MomentFeedID = "statusIncidents"
	MomentFeedIDCostAnomalies   MomentFeedID = "costAnomalies"
	MomentFeedIDWorkflowRuns    MomentFeedID = "workflowRuns"
	MomentFeedIDDeployments     MomentFeedID = "deployments"
	MomentFeedIDAudit           MomentFeedID = "audit"
	MomentFeedIDFreezes         MomentFeedID = "freezes"
	MomentFeedIDDriftAlerts     MomentFeedID = "driftAlerts"
	MomentFeedIDExpiryAlerts    MomentFeedID = "expiryAlerts"
)

The values MomentFeedID takes.

type MomentFeedStatus added in v0.29.0

type MomentFeedStatus struct {
	Feed MomentFeedID `json:"feed"`
	// Status: `omitted` = the caller lacks the feed's read permission; `error` =
	// the feed's query failed but the rest of the response is still valid
	// (partial-failure tolerance).
	//
	// One of "ok", "omitted", "error".
	Status string `json:"status"`
	// Error: Short failure reason when `status` is `error`.
	Error *string `json:"error,omitempty"`
	// Truncated: True when the feed hit its row cap and events were dropped.
	Truncated *bool `json:"truncated,omitempty"`
}

MomentFeedStatus is the `MomentFeedStatus` schema.

type MomentGetParams added in v0.29.0

type MomentGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// At: Centre of the window. Defaults to now.
	At *string
	// Window: Half-window in minutes (the ± around `at`). Default 60, max 4320
	// (±3 days).
	Window *int64
}

MomentGetParams holds the parameters for `client.moment.get`.

Every field is optional; pass nil to take the defaults.

type MomentIncidentSpan added in v0.29.0

type MomentIncidentSpan struct {
	ID         string `json:"id"`
	PluginID   string `json:"pluginId"`
	PluginName string `json:"pluginName"`
	Title      string `json:"title"`
	// Impact: One of "maintenance", "minor", "major", "critical".
	Impact     string  `json:"impact"`
	StartedAt  string  `json:"startedAt"`
	ResolvedAt *string `json:"resolvedAt,omitempty"`
	URL        *string `json:"url,omitempty"`
}

MomentIncidentSpan: A provider incident whose span overlaps the window — returned alongside the events so clients can badge events that fall inside it ("during DigitalOcean incident").

type MomentNamespace added in v0.29.0

type MomentNamespace struct {
	// contains filtered or unexported fields
}

MomentNamespace is `client.moment`.

func (*MomentNamespace) Get added in v0.29.0

Get: Everything that happened around a timestamp

"What changed around 03:14?" — one merged, chronological narrative of everything the platform knows happened in a window: resource changes (including sleep/wake schedule attribution), provider status incidents that started/resolved in or overlap the window, cost anomalies, workflow runs, deployments, audit-log entries, change freezes, and the drift/expiry alert deliveries. Each feed is gated on the same permission its own endpoint requires; feeds the caller cannot read are reported as `omitted`, and a feed whose query fails is reported as `error` without blanking the rest of the response.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/moment

Raises on 400: Bad request

type MomentResponse added in v0.29.0

type MomentResponse struct {
	// At: The centre timestamp, normalized to ISO.
	At   string `json:"at"`
	From string `json:"from"`
	To   string `json:"to"`
	// WindowMinutes: The half-window actually applied, after clamping to 1–4320
	// minutes.
	WindowMinutes int64  `json:"windowMinutes"`
	GeneratedAt   string `json:"generatedAt"`
	// Feeds: One entry per feed, in canonical order — including omitted and
	// errored feeds.
	Feeds []MomentFeedStatus `json:"feeds"`
	// Events: Chronological, oldest first.
	Events    []MomentEvent        `json:"events"`
	Incidents []MomentIncidentSpan `json:"incidents"`
}

MomentResponse is the `MomentResponse` schema.

type MomentSeverity added in v0.29.0

type MomentSeverity = string

MomentSeverity is the `MomentSeverity` schema.

const (
	MomentSeverityInfo     MomentSeverity = "info"
	MomentSeverityWarning  MomentSeverity = "warning"
	MomentSeverityCritical MomentSeverity = "critical"
)

The values MomentSeverity takes.

type MsTeamsStatus added in v0.4.0

type MsTeamsStatus struct {
	Webhooks []MsTeamsWebhook `json:"webhooks"`
}

MsTeamsStatus is the `MsTeamsStatus` schema.

type MsTeamsWebhook added in v0.4.0

type MsTeamsWebhook struct {
	ID string `json:"id"`
	// Label: Display name for the channel, e.g. #alerts
	Label string `json:"label"`
	// URLHint: Non-secret hint at the stored webhook URL (host and last four
	// characters). The URL itself is never returned.
	URLHint       string `json:"urlHint"`
	SyncIncidents bool   `json:"syncIncidents"`
	BudgetAlerts  bool   `json:"budgetAlerts"`
	// AnomalyAlerts: Statistical spend-spike (cost anomaly) alerts
	AnomalyAlerts bool `json:"anomalyAlerts"`
	// MetricAlerts: Metric threshold rule firings and recoveries
	MetricAlerts bool `json:"metricAlerts"`
	// ResourceDrift: Batched resource-drift digests from the change timeline.
	// Defaults to false when a channel is added — drift is continuous where the
	// other triggers are exceptional.
	ResourceDrift bool `json:"resourceDrift"`
	// WorkflowPages: Pages and approval requests raised by a workflow
	// (infra.page / infra.waitForApproval) or by POST /pages
	WorkflowPages bool `json:"workflowPages"`
	// ProviderIncidents: A provider status-page incident overlaps resources you
	// hold.
	ProviderIncidents bool `json:"providerIncidents"`
	// ExpiryAlerts: Daily digests of approaching resource deadlines — expiring
	// certificates, domains, tokens and keys past their rotation budget.
	ExpiryAlerts bool `json:"expiryAlerts"`
	// LogMatchAlerts: A saved log-workspace query with alerting enabled found
	// matching log lines.
	LogMatchAlerts bool `json:"logMatchAlerts"`
	// WeeklyDigest: The Monday-morning weekly digest. Only sends when the
	// organization has enabled the digest (see /digest).
	WeeklyDigest bool `json:"weeklyDigest"`
}

MsTeamsWebhook is the `MsTeamsWebhook` schema.

type MsTeamsWebhookCreate added in v0.4.0

type MsTeamsWebhookCreate struct {
	Label string `json:"label"`
	// URL: The webhook URL from a Teams 'Workflows' automation. Must be https
	// and on a Microsoft-operated host (*.api.powerautomate.com,
	// *.api.powerplatform.com, *.logic.azure.com, *.flow.microsoft.com, or a
	// legacy *.webhook.office.com connector).
	URL               string `json:"url"`
	SyncIncidents     *bool  `json:"syncIncidents,omitempty"`
	BudgetAlerts      *bool  `json:"budgetAlerts,omitempty"`
	AnomalyAlerts     *bool  `json:"anomalyAlerts,omitempty"`
	MetricAlerts      *bool  `json:"metricAlerts,omitempty"`
	ResourceDrift     *bool  `json:"resourceDrift,omitempty"`
	WorkflowPages     *bool  `json:"workflowPages,omitempty"`
	ProviderIncidents *bool  `json:"providerIncidents,omitempty"`
	ExpiryAlerts      *bool  `json:"expiryAlerts,omitempty"`
	LogMatchAlerts    *bool  `json:"logMatchAlerts,omitempty"`
	WeeklyDigest      *bool  `json:"weeklyDigest,omitempty"`
}

MsTeamsWebhookCreate is the `MsTeamsWebhookCreate` schema.

type MsTeamsWebhookUpdate added in v0.4.0

type MsTeamsWebhookUpdate struct {
	Label             *string `json:"label,omitempty"`
	SyncIncidents     *bool   `json:"syncIncidents,omitempty"`
	BudgetAlerts      *bool   `json:"budgetAlerts,omitempty"`
	AnomalyAlerts     *bool   `json:"anomalyAlerts,omitempty"`
	MetricAlerts      *bool   `json:"metricAlerts,omitempty"`
	ResourceDrift     *bool   `json:"resourceDrift,omitempty"`
	WorkflowPages     *bool   `json:"workflowPages,omitempty"`
	ProviderIncidents *bool   `json:"providerIncidents,omitempty"`
	ExpiryAlerts      *bool   `json:"expiryAlerts,omitempty"`
	LogMatchAlerts    *bool   `json:"logMatchAlerts,omitempty"`
	WeeklyDigest      *bool   `json:"weeklyDigest,omitempty"`
}

MsTeamsWebhookUpdate is the `MsTeamsWebhookUpdate` schema.

type MsteamsNamespace added in v0.4.0

type MsteamsNamespace struct {

	// Webhooks: `client.msteams.webhooks`.
	Webhooks *MsteamsWebhooksNamespace
	// contains filtered or unexported fields
}

MsteamsNamespace is `client.msteams`.

func (*MsteamsNamespace) Status added in v0.4.0

Status: List the organization's Teams channels

Returns the Teams channels alerts are routed to and which triggers each takes. Webhook URLs are never included.

GET /api/org/{orgId}/msteams/status

func (*MsteamsNamespace) Test added in v0.4.0

Test: Post a test card to every configured Teams channel

Ignores trigger opt-ins — every channel gets the test. Fails with the error Microsoft returned when nothing could be delivered (HTTP 404 usually means the Workflow was deleted or turned off).

POST /api/org/{orgId}/msteams/test

Raises on 400: Bad request

type MsteamsStatusParams added in v0.4.0

type MsteamsStatusParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

MsteamsStatusParams holds the parameters for `client.msteams.status`.

Every field is optional; pass nil to take the defaults.

type MsteamsTestParams added in v0.4.0

type MsteamsTestParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

MsteamsTestParams holds the parameters for `client.msteams.test`.

Every field is optional; pass nil to take the defaults.

type MsteamsTestResponse added in v0.4.0

type MsteamsTestResponse struct {
	OK           bool  `json:"ok"`
	WebhookCount int64 `json:"webhookCount"`
	Attempted    int64 `json:"attempted"`
	Succeeded    int64 `json:"succeeded"`
}

MsteamsTestResponse is an object the spec declares inline.

type MsteamsWebhooksCreateParams added in v0.4.0

type MsteamsWebhooksCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *MsTeamsWebhookCreate
}

MsteamsWebhooksCreateParams holds the parameters for `client.msteams.webhooks.create`.

Every field is optional; pass nil to take the defaults.

type MsteamsWebhooksDeleteParams added in v0.4.0

type MsteamsWebhooksDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

MsteamsWebhooksDeleteParams holds the parameters for `client.msteams.webhooks.delete`.

type MsteamsWebhooksNamespace added in v0.4.0

type MsteamsWebhooksNamespace struct {
	// contains filtered or unexported fields
}

MsteamsWebhooksNamespace is `client.msteams.webhooks`.

func (*MsteamsWebhooksNamespace) Create added in v0.4.0

Create: Route alerts to a Teams channel

Adds a channel by webhook URL, or updates the one already holding that URL. Each trigger defaults to enabled. Responds 400 when the URL is not https or its host is not Microsoft-operated.

POST /api/org/{orgId}/msteams/webhooks

Raises on 400: Bad request

func (*MsteamsWebhooksNamespace) Delete added in v0.4.0

Delete: Stop routing alerts to a Teams channel

DELETE /api/org/{orgId}/msteams/webhooks/{id}

Raises on 404: Not found

func (*MsteamsWebhooksNamespace) Update added in v0.4.0

Update: Rename a Teams channel or change which alerts it receives

The webhook URL is immutable — remove the channel and re-add it to change it.

PATCH /api/org/{orgId}/msteams/webhooks/{id}

Raises on 400: Bad request

Raises on 404: Not found

type MsteamsWebhooksUpdateParams added in v0.4.0

type MsteamsWebhooksUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body *MsTeamsWebhookUpdate
}

MsteamsWebhooksUpdateParams holds the parameters for `client.msteams.webhooks.update`.

type NoSQLCommandRequest

type NoSQLCommandRequest struct {
	PluginID         string      `json:"pluginId"`
	AccountID        string      `json:"accountId"`
	ResourceTypeID   string      `json:"resourceTypeId"`
	ResourceID       ResourceID  `json:"resourceId"`
	Command          string      `json:"command"`
	Args             []any       `json:"args"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

NoSQLCommandRequest is the `NoSqlCommandRequest` schema.

Spec schema: `NoSqlCommandRequest`.

type OK

type OK struct {
	OK bool `json:"ok"`
}

OK is the `Ok` schema.

Spec schema: `Ok`.

type OrgMember

type OrgMember struct {
	ID            string           `json:"id"`
	Email         string           `json:"email"`
	DisplayName   *string          `json:"displayName"`
	Role          OrganizationRole `json:"role"`
	RoleID        *string          `json:"roleId"`
	RoleName      *string          `json:"roleName"`
	RoleSystemKey *string          `json:"roleSystemKey"`
	CreatedAt     string           `json:"createdAt"`
}

OrgMember is the `OrgMember` schema.

type OrgMembership

type OrgMembership struct {
	ID          string           `json:"id"`
	DisplayName string           `json:"displayName"`
	Role        OrganizationRole `json:"role"`
}

OrgMembership is the `OrgMembership` schema.

type OrgStatusIncident added in v0.29.0

type OrgStatusIncident struct {
	// ID: Cached incident row id.
	ID       string `json:"id"`
	PluginID string `json:"pluginId"`
	// PluginName: Provider display name, e.g. "DigitalOcean".
	PluginName string                 `json:"pluginName"`
	Title      string                 `json:"title"`
	State      ProviderIncidentState  `json:"state"`
	Impact     ProviderIncidentImpact `json:"impact"`
	// URL: Deep link to the provider's incident page or status page.
	URL          *string `json:"url"`
	StartedAt    string  `json:"startedAt"`
	ResolvedAt   *string `json:"resolvedAt"`
	LastUpdateAt *string `json:"lastUpdateAt"`
	// LastUpdateText: Plain-text body of the provider's most recent update.
	LastUpdateText *string `json:"lastUpdateText"`
	// Regions: Plugin-native region ids the provider reports as affected.
	Regions []string `json:"regions"`
	// Services: Human-readable affected provider services/products.
	Services []string `json:"services"`
	// ProviderWide: True when the incident affects the provider as a whole.
	ProviderWide bool `json:"providerWide"`
	// AffectedResourceCount: How many of the organization's resources the
	// incident overlaps.
	AffectedResourceCount int64 `json:"affectedResourceCount"`
	// AffectedRegions: The subset of `regions` where the organization actually
	// holds resources.
	AffectedRegions []string `json:"affectedRegions"`
	// SampleResources: Up to five of the overlapped resources, for display.
	SampleResources []ProviderIncidentResourceSample `json:"sampleResources"`
	// OverlappingChangeCount: Change-timeline events recorded on this provider
	// during the incident window — "these N changes happened during an
	// incident".
	OverlappingChangeCount int64 `json:"overlappingChangeCount"`
}

OrgStatusIncident is the `OrgStatusIncident` schema.

type OrgStatusIncidentsResponse added in v0.29.0

type OrgStatusIncidentsResponse struct {
	Incidents []OrgStatusIncident `json:"incidents"`
}

OrgStatusIncidentsResponse is the `OrgStatusIncidentsResponse` schema.

type Organization

type Organization struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
}

Organization is the `Organization` schema.

type OrganizationRef added in v0.8.0

type OrganizationRef struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

OrganizationRef is the `OrganizationRef` schema.

type OrganizationRole

type OrganizationRole = string

OrganizationRole is the `OrganizationRole` schema.

const (
	OrganizationRoleOwner  OrganizationRole = "owner"
	OrganizationRoleAdmin  OrganizationRole = "admin"
	OrganizationRoleMember OrganizationRole = "member"
)

The values OrganizationRole takes.

type OrgsCreateParams

type OrgsCreateParams struct {
	// Body: the JSON request body.
	Body CreateOrgRequest
}

OrgsCreateParams holds the parameters for `client.orgs.create`.

type OrgsNamespace

type OrgsNamespace struct {
	// contains filtered or unexported fields
}

OrgsNamespace is `client.orgs`.

func (*OrgsNamespace) Create

func (n *OrgsNamespace) Create(ctx context.Context, params OrgsCreateParams, opts ...RequestOption) (*Organization, error)

Create: Create a new organization

The caller becomes the `owner` of the new organization.

POST /api/orgs

Raises on 400: Bad request

Raises on 401: Unauthenticated

type OrphanAccountGroup added in v0.19.0

type OrphanAccountGroup struct {
	AccountID   string             `json:"accountId"`
	AccountName string             `json:"accountName"`
	PluginID    PluginID           `json:"pluginId"`
	PluginName  string             `json:"pluginName"`
	Resources   []OrphanedResource `json:"resources"`
}

OrphanAccountGroup is the `OrphanAccountGroup` schema.

type OrphanCostAnnotation added in v0.19.0

type OrphanCostAnnotation struct {
	// Amount: Spend over the trailing cost window.
	Amount   float64 `json:"amount"`
	Currency string  `json:"currency"`
}

OrphanCostAnnotation: Best-effort trailing spend matched from collected per-resource cost rows; null when the provider reports no per-resource cost. The flag itself never depends on billing data.

The API may send null in its place.

type OrphanListResponse added in v0.19.0

type OrphanListResponse struct {
	// Accounts: Groups sorted by account name.
	Accounts   []OrphanAccountGroup `json:"accounts"`
	TotalCount int64                `json:"totalCount"`
	// CostWindowDays: Days of trailing spend the annotations cover.
	CostWindowDays int64  `json:"costWindowDays"`
	GeneratedAt    string `json:"generatedAt"`
}

OrphanListResponse is the `OrphanListResponse` schema.

type OrphanedResource added in v0.19.0

type OrphanedResource struct {
	// ID: Infrawrench resource id.
	ID               string   `json:"id"`
	PluginID         PluginID `json:"pluginId"`
	ResourceTypeID   string   `json:"resourceTypeId"`
	ResourceTypeName string   `json:"resourceTypeName"`
	DisplayName      string   `json:"displayName"`
	// ExternalID: Provider-native id, when known.
	ExternalID *string `json:"externalId"`
	// Reason: Plugin-authored explanation of why this resource looks wasted.
	Reason       string                `json:"reason"`
	Cost         *OrphanCostAnnotation `json:"cost"`
	LastSyncedAt *string               `json:"lastSyncedAt"`
}

OrphanedResource is the `OrphanedResource` schema.

type OrphansGetParams added in v0.19.0

type OrphansGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

OrphansGetParams holds the parameters for `client.orphans.get`.

Every field is optional; pass nil to take the defaults.

type OrphansNamespace added in v0.19.0

type OrphansNamespace struct {
	// contains filtered or unexported fields
}

OrphansNamespace is `client.orphans`.

func (*OrphansNamespace) Get added in v0.19.0

Get: List likely-orphaned and idle resources

Scans the organization's already-synced resources against each plugin's declarative orphan heuristics — unattached volumes, unassigned floating/elastic IPs, reserved-but-unused static IPs — and returns the matches grouped by account, each with the plugin's reason. Purely a read over stored state: no provider API calls are made, so results reflect the last sync. Where the org's collected cost data has per-resource rows, matches are annotated with trailing spend.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/orphans

type OversizedAccountGroup added in v0.29.0

type OversizedAccountGroup struct {
	AccountID   string              `json:"accountId"`
	AccountName string              `json:"accountName"`
	PluginID    PluginID            `json:"pluginId"`
	PluginName  string              `json:"pluginName"`
	Resources   []OversizedResource `json:"resources"`
}

OversizedAccountGroup is the `OversizedAccountGroup` schema.

type OversizedResource added in v0.29.0

type OversizedResource struct {
	// ID: Infrawrench resource id.
	ID               string   `json:"id"`
	PluginID         PluginID `json:"pluginId"`
	ResourceTypeID   string   `json:"resourceTypeId"`
	ResourceTypeName string   `json:"resourceTypeName"`
	DisplayName      string   `json:"displayName"`
	// ExternalID: Provider-native id, when known.
	ExternalID *string `json:"externalId"`
	// SizeFieldKey: Field to submit through the resource-update endpoint to
	// apply the recommended size.
	SizeFieldKey string `json:"sizeFieldKey"`
	// Region: Provider region/zone/location the resource lives in.
	Region          *string              `json:"region"`
	CurrentSize     OversizedSizeSummary `json:"currentSize"`
	RecommendedSize OversizedSizeSummary `json:"recommendedSize"`
	// CPUP95: p95 CPU utilisation over the window, percent of the current size.
	CPUP95 float64 `json:"cpuP95"`
	// MemoryP95: p95 memory utilisation, percent of the current size; null when
	// unmeasured.
	MemoryP95 *float64 `json:"memoryP95"`
	// MemoryMeasured: False when the provider stores no memory series for this
	// resource.
	MemoryMeasured bool `json:"memoryMeasured"`
	// ProjectedCPUP95: Projected p95 CPU on the recommended size, for the
	// confirm dialog.
	ProjectedCPUP95 float64 `json:"projectedCpuP95"`
	// Currency: ISO 4217 code the size prices are quoted in.
	Currency string `json:"currency"`
	// MonthlySaving: Current minus recommended monthly price; null when either
	// side is unpriced.
	MonthlySaving *float64 `json:"monthlySaving"`
	// ResizeNote: Plugin-authored caveat (e.g. the provider requires the machine
	// stopped).
	ResizeNote   *string `json:"resizeNote"`
	LastSyncedAt *string `json:"lastSyncedAt"`
}

OversizedResource is the `OversizedResource` schema.

type OversizedSizeSummary added in v0.29.0

type OversizedSizeSummary struct {
	ID       string `json:"id"`
	Label    string `json:"label"`
	Vcpus    int64  `json:"vcpus"`
	MemoryMb int64  `json:"memoryMb"`
	// PriceMonthly: Monthly catalog price in `currency`; null when unpriced.
	PriceMonthly *float64 `json:"priceMonthly"`
}

OversizedSizeSummary is the `OversizedSizeSummary` schema.

type OwnershipBlocker added in v0.8.0

type OwnershipBlocker struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	// MemberCount: People in the organization
	MemberCount int64 `json:"memberCount"`
}

OwnershipBlocker is the `OwnershipBlocker` schema.

type OwnershipTransferRequired added in v0.8.0

type OwnershipTransferRequired struct {
	Error string `json:"error"`
	// Code: One of "transfer_ownership_required".
	Code          string             `json:"code"`
	Organizations []OwnershipBlocker `json:"organizations"`
}

OwnershipTransferRequired is the `OwnershipTransferRequired` schema.

type PageClearResponse added in v0.6.0

type PageClearResponse struct {
	// Cleared: False when the key had no cooldown to clear.
	Cleared bool `json:"cleared"`
}

PageClearResponse is the `PageClearResponse` schema.

type PageRequest added in v0.6.0

type PageRequest struct {
	// Source: Stable name for the system raising the page: letters, digits, `.`,
	// `_` and `-`. It is the notification's sender, and it scopes the cooldown —
	// two services paging under the same key never throttle each other.
	Source string `json:"source"`
	// Message: The alert text. Becomes the SMS and notification body.
	Message string `json:"message"`
	// Title: Short headline for the notification. Defaults to `source`.
	Title *string `json:"title,omitempty"`
	// Key: Throttle key, `default` when unset. Pages sharing a key are
	// suppressed while that key is in cooldown, so a per-object key (a host, a
	// cluster id) alerts per object while the default key alerts once for the
	// whole source.
	Key *string `json:"key,omitempty"`
	// CooldownMinutes: Minutes to suppress repeat pages under the same key.
	// Defaults to 60; `0` sends every time.
	CooldownMinutes *int64 `json:"cooldownMinutes,omitempty"`
	// Voice: Also place a voice call to recipients who opted into voice. Off by
	// default — reserve it for things worth waking someone up for.
	Voice *bool `json:"voice,omitempty"`
}

PageRequest is the `PageRequest` schema.

type PageResponse added in v0.6.0

type PageResponse struct {
	// Delivered: True when at least one recipient was reached on any transport.
	Delivered bool `json:"delivered"`
	// Suppressed: True when the key was still in cooldown, so nothing was sent.
	Suppressed bool `json:"suppressed"`
	// Sms: Twilio deliveries (SMS + voice) that Twilio accepted.
	Sms int64 `json:"sms"`
	// Push: Push notifications accepted by Expo.
	Push int64 `json:"push"`
	// Slack: Slack channel posts Slack accepted.
	Slack int64 `json:"slack"`
	// MsTeams: Microsoft Teams webhook posts Teams accepted.
	MsTeams int64 `json:"msTeams"`
	// RetryAt: When suppressed, the time at which this key can page again.
	RetryAt *string `json:"retryAt,omitempty"`
}

PageResponse is the `PageResponse` schema.

type PagesCreateParams added in v0.6.0

type PagesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body PageRequest
}

PagesCreateParams holds the parameters for `client.pages.create`.

type PagesDeleteParams added in v0.6.0

type PagesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Source: Stable name for the system raising the page: letters, digits, `.`,
	// `_` and `-`. It is the notification's sender, and it scopes the cooldown —
	// two services paging under the same key never throttle each other.
	Source string
	// Key: Defaults to `default`.
	Key *string
}

PagesDeleteParams holds the parameters for `client.pages.delete`.

type PagesNamespace added in v0.6.0

type PagesNamespace struct {
	// contains filtered or unexported fields
}

PagesNamespace is `client.pages`.

func (*PagesNamespace) Create added in v0.6.0

func (n *PagesNamespace) Create(ctx context.Context, params PagesCreateParams, opts ...RequestOption) (*PageResponse, error)

Create: Raise an alert to the organization's on-call transports

Fans an alert out over whatever the org has configured — Twilio SMS (and voice on request), mobile push, Slack channels, and Microsoft Teams webhooks — honouring each recipient's opt-ins. This is the same alert a workflow raises with `infra.page(...)`, for code that runs somewhere Infrawrench does not: a health check, a deploy script, a cron on a box.

Repeat pages under the same `(source, key)` are **suppressed, not rejected**: a monitor that fires every minute pages once and then gets `200` with `suppressed: true` and the `retryAt` at which the key can page again. A page that reached nobody does not start a cooldown, so the next call tries again.

Recipients opt in per channel under the same setting that covers workflow pages.

_Requires permission: `pages:write`._

POST /api/org/{orgId}/pages

Raises on 400: Bad request

func (*PagesNamespace) Delete added in v0.6.0

Delete: Clear a page key's cooldown

Drops the cooldown for one `(source, key)` so the next page under it delivers immediately. Call it when the condition you alerted on recovers — the workflow equivalent is `infra.page.clear(key)`. Clearing a key that was never paged is not an error.

_Requires permission: `pages:write`._

DELETE /api/org/{orgId}/pages

Raises on 400: Bad request

type PeerPane

type PeerPane struct {
	TabLabel      string     `json:"tabLabel"`
	PluginLogoSvg string     `json:"pluginLogoSvg"`
	PeerPluginID  string     `json:"peerPluginId"`
	Schema        JSONObject `json:"schema"`
}

PeerPane is the `PeerPane` schema.

type PeerPaneStub

type PeerPaneStub struct {
	TabLabel      string `json:"tabLabel"`
	PluginLogoSvg string `json:"pluginLogoSvg"`
	PeerPluginID  string `json:"peerPluginId"`
}

PeerPaneStub is the `PeerPaneStub` schema.

type PeerPanesRequest

type PeerPanesRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

PeerPanesRequest is the `PeerPanesRequest` schema.

type Permission

type Permission = string

Permission: A permission string. Roles may grant exact permissions like the entries in this enum, or wildcards (e.g. `resources:*:read`, `*`).

const (
	PermissionAccountsRead      Permission = "accounts:read"
	PermissionAccountsWrite     Permission = "accounts:write"
	PermissionAccountsDelete    Permission = "accounts:delete"
	PermissionResourcesRead     Permission = "resources:read"
	PermissionResourcesWrite    Permission = "resources:write"
	PermissionResourcesDelete   Permission = "resources:delete"
	PermissionResourcesExecute  Permission = "resources:execute"
	PermissionSecretsRead       Permission = "secrets:read"
	PermissionSecretsWrite      Permission = "secrets:write"
	PermissionStorageRead       Permission = "storage:read"
	PermissionStorageWrite      Permission = "storage:write"
	PermissionDashboardsRead    Permission = "dashboards:read"
	PermissionDashboardsWrite   Permission = "dashboards:write"
	PermissionWorkflowsRead     Permission = "workflows:read"
	PermissionWorkflowsWrite    Permission = "workflows:write"
	PermissionWorkflowsApprove  Permission = "workflows:approve"
	PermissionDeploymentsRead   Permission = "deployments:read"
	PermissionDeploymentsPlan   Permission = "deployments:plan"
	PermissionDeploymentsWrite  Permission = "deployments:write"
	PermissionCostsRead         Permission = "costs:read"
	PermissionCostsWrite        Permission = "costs:write"
	PermissionBudgetsRead       Permission = "budgets:read"
	PermissionBudgetsWrite      Permission = "budgets:write"
	PermissionMetricAlertsRead  Permission = "metric-alerts:read"
	PermissionMetricAlertsWrite Permission = "metric-alerts:write"
	PermissionFreezesRead       Permission = "freezes:read"
	PermissionFreezesWrite      Permission = "freezes:write"
	PermissionFreezesOverride   Permission = "freezes:override"
	PermissionTagPolicyOverride Permission = "tag-policy:override"
	PermissionAuditRead         Permission = "audit:read"
	PermissionTeamRead          Permission = "team:read"
	PermissionTeamInvite        Permission = "team:invite"
	PermissionTeamRoleWrite     Permission = "team:role:write"
	PermissionTeamRemove        Permission = "team:remove"
	PermissionApikeysRead       Permission = "apikeys:read"
	PermissionApikeysWrite      Permission = "apikeys:write"
	PermissionBillingRead       Permission = "billing:read"
	PermissionBillingWrite      Permission = "billing:write"
	PermissionSSHKeysRead       Permission = "ssh-keys:read"
	PermissionSSHKeysWrite      Permission = "ssh-keys:write"
	PermissionBastionsRead      Permission = "bastions:read"
	PermissionBastionsWrite     Permission = "bastions:write"
	PermissionChatRead          Permission = "chat:read"
	PermissionChatWrite         Permission = "chat:write"
	PermissionPagesWrite        Permission = "pages:write"
	PermissionOrgSettingsWrite  Permission = "org:settings:write"
)

The values Permission takes.

type PermissionCatalog

type PermissionCatalog struct {
	Permissions []Permission `json:"permissions"`
}

PermissionCatalog is the `PermissionCatalog` schema.

type PickerResource

type PickerResource struct {
	ID             ResourceID `json:"id"`
	Label          string     `json:"label"`
	PluginID       string     `json:"pluginId"`
	ResourceTypeID string     `json:"resourceTypeId"`
	AccountID      string     `json:"accountId"`
	OutputKey      string     `json:"outputKey"`
	OutputValue    string     `json:"outputValue"`
}

PickerResource is the `PickerResource` schema.

type PickerResourcesRequest

type PickerResourcesRequest struct {
	Sources      []PickerResourcesRequestSources `json:"sources"`
	AccountID    string                          `json:"accountId"`
	RegionHint   *string                         `json:"regionHint,omitempty"`
	CrossAccount *bool                           `json:"crossAccount,omitempty"`
}

PickerResourcesRequest is the `PickerResourcesRequest` schema.

type PickerResourcesRequestSources

type PickerResourcesRequestSources struct {
	PluginID       string `json:"pluginId"`
	ResourceTypeID string `json:"resourceTypeId"`
	OutputKey      string `json:"outputKey"`
}

PickerResourcesRequestSources is an object the spec declares inline.

type PinFull

type PinFull struct {
	PinID             string      `json:"pinId"`
	ResourceID        ResourceID  `json:"resourceId"`
	GridX             int64       `json:"gridX"`
	GridY             int64       `json:"gridY"`
	GridW             int64       `json:"gridW"`
	GridH             int64       `json:"gridH"`
	DisplayName       string      `json:"displayName"`
	PluginID          string      `json:"pluginId"`
	ResourceTypeID    string      `json:"resourceTypeId"`
	AccountID         string      `json:"accountId"`
	FieldsJSON        JSONObject  `json:"fieldsJson"`
	OutputsJSON       JSONObject  `json:"outputsJson"`
	PluginLogoSvg     string      `json:"pluginLogoSvg"`
	PluginDisplayName string      `json:"pluginDisplayName"`
	Status            ProbeStatus `json:"status"`
}

PinFull is the `PinFull` schema.

type PinRangeMetricSeries

type PinRangeMetricSeries struct {
	Label  string                       `json:"label"`
	Unit   *string                      `json:"unit,omitempty"`
	Points []PinRangeMetricSeriesPoints `json:"points"`
}

PinRangeMetricSeries is the `PinRangeMetricSeries` schema.

type PinRangeMetricSeriesPoints

type PinRangeMetricSeriesPoints struct {
	Timestamp float64 `json:"timestamp"`
	Value     float64 `json:"value"`
}

PinRangeMetricSeriesPoints is an object the spec declares inline.

type PinRangeResponse

type PinRangeResponse struct {
	Series []PinRangeMetricSeries `json:"series"`
}

PinRangeResponse is the `PinRangeResponse` schema.

type PinRequest

type PinRequest struct {
	DashboardID string     `json:"dashboardId"`
	ResourceID  ResourceID `json:"resourceId"`
	GridX       *int64     `json:"gridX,omitempty"`
	GridY       *int64     `json:"gridY,omitempty"`
}

PinRequest is the `PinRequest` schema.

type PluginID

type PluginID = string

PluginID: Manifest id of an installed plugin.

Spec schema: `PluginId`.

const (
	PluginIDAnthropic    PluginID = "anthropic"
	PluginIDAssemblyai   PluginID = "assemblyai"
	PluginIDAWS          PluginID = "aws"
	PluginIDAzure        PluginID = "azure"
	PluginIDCartesia     PluginID = "cartesia"
	PluginIDClickhouse   PluginID = "clickhouse"
	PluginIDCloudflare   PluginID = "cloudflare"
	PluginIDCloudinary   PluginID = "cloudinary"
	PluginIDCohere       PluginID = "cohere"
	PluginIDDatabricks   PluginID = "databricks"
	PluginIDDeepgram     PluginID = "deepgram"
	PluginIDDeepseek     PluginID = "deepseek"
	PluginIDDigitalocean PluginID = "digitalocean"
	PluginIDDocker       PluginID = "docker"
	PluginIDElevenlabs   PluginID = "elevenlabs"
	PluginIDFireworks    PluginID = "fireworks"
	PluginIDFly          PluginID = "fly"
	PluginIDGCP          PluginID = "gcp"
	PluginIDGemini       PluginID = "gemini"
	PluginIDGladia       PluginID = "gladia"
	PluginIDGroq         PluginID = "groq"
	PluginIDHetzner      PluginID = "hetzner"
	PluginIDKafka        PluginID = "kafka"
	PluginIDKubernetes   PluginID = "kubernetes"
	PluginIDMemcached    PluginID = "memcached"
	PluginIDMistral      PluginID = "mistral"
	PluginIDMongodb      PluginID = "mongodb"
	PluginIDMssql        PluginID = "mssql"
	PluginIDMysql        PluginID = "mysql"
	PluginIDNeon         PluginID = "neon"
	PluginIDNetlify      PluginID = "netlify"
	PluginIDOpenai       PluginID = "openai"
	PluginIDOpenrouter   PluginID = "openrouter"
	PluginIDOpensearch   PluginID = "opensearch"
	PluginIDOVH          PluginID = "ovh"
	PluginIDPlanetscale  PluginID = "planetscale"
	PluginIDPostgres     PluginID = "postgres"
	PluginIDRedis        PluginID = "redis"
	PluginIDReplicate    PluginID = "replicate"
	PluginIDRevai        PluginID = "revai"
	PluginIDScaleway     PluginID = "scaleway"
	PluginIDSpeechmatics PluginID = "speechmatics"
	PluginIDSSH          PluginID = "ssh"
	PluginIDTogether     PluginID = "together"
	PluginIDTurso        PluginID = "turso"
	PluginIDVercel       PluginID = "vercel"
	PluginIDXai          PluginID = "xai"
)

The values PluginID takes.

type PluginSummary

type PluginSummary struct {
	ID               string                `json:"id"`
	DisplayName      string                `json:"displayName"`
	LogoSvg          string                `json:"logoSvg"`
	CredentialFields []CredentialField     `json:"credentialFields"`
	Preflight        *PreflightDeclaration `json:"preflight"`
}

PluginSummary is the `PluginSummary` schema.

type PolicyTemplate added in v0.30.0

type PolicyTemplate struct {
	FormatLabel string `json:"formatLabel"`
	// Language: One of "json", "yaml", "text".
	Language     string                  `json:"language"`
	Document     string                  `json:"document"`
	Instructions *string                 `json:"instructions,omitempty"`
	HelpLink     *PolicyTemplateHelpLink `json:"helpLink,omitempty"`
}

PolicyTemplate is the `PolicyTemplate` schema.

type PolicyTemplateHelpLink struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

PolicyTemplateHelpLink is an object the spec declares inline.

type PolicyTemplateResponse added in v0.30.0

type PolicyTemplateResponse struct {
	Template PolicyTemplate `json:"template"`
}

PolicyTemplateResponse is the `PolicyTemplateResponse` schema.

type PreflightCapability added in v0.30.0

type PreflightCapability struct {
	ID                  string                `json:"id"`
	Label               string                `json:"label"`
	Description         *string               `json:"description,omitempty"`
	RequiredPermissions []PreflightPermission `json:"requiredPermissions"`
	Essential           *bool                 `json:"essential,omitempty"`
}

PreflightCapability is the `PreflightCapability` schema.

type PreflightCheck added in v0.30.0

type PreflightCheck struct {
	CapabilityID string `json:"capabilityId"`
	// Status: One of "ok", "missing", "unknown".
	Status             string                  `json:"status"`
	MissingPermissions []PreflightPermission   `json:"missingPermissions"`
	Message            *string                 `json:"message"`
	HelpLink           *PreflightCheckHelpLink `json:"helpLink"`
}

PreflightCheck is the `PreflightCheck` schema.

type PreflightCheckHelpLink struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

PreflightCheckHelpLink is an object the spec declares inline.

type PreflightDeclaration added in v0.30.0

type PreflightDeclaration struct {
	Capabilities   []PreflightCapability               `json:"capabilities"`
	TemplateFormat *PreflightDeclarationTemplateFormat `json:"templateFormat,omitempty"`
}

PreflightDeclaration: Declared when the plugin supports credential preflight (per-capability permission checks). `null` for plugins without it.

The API may send null in its place.

type PreflightDeclarationTemplateFormat added in v0.30.0

type PreflightDeclarationTemplateFormat struct {
	Label string `json:"label"`
	// Language: One of "json", "yaml", "text".
	Language string `json:"language"`
}

PreflightDeclarationTemplateFormat is an object the spec declares inline.

type PreflightPermission added in v0.30.0

type PreflightPermission struct {
	// ID: Provider-native permission string, e.g. `ce:GetCostAndUsage`.
	ID    string `json:"id"`
	Label string `json:"label"`
}

PreflightPermission is the `PreflightPermission` schema.

type PreflightReport added in v0.30.0

type PreflightReport struct {
	PluginID  string `json:"pluginId"`
	Supported bool   `json:"supported"`
	// Identity: Provider-side identity the credential resolved to (ARN, service
	// account…).
	Identity *string          `json:"identity"`
	Checks   []PreflightCheck `json:"checks"`
}

PreflightReport is the `PreflightReport` schema.

type PreflightRequest added in v0.30.0

type PreflightRequest struct {
	PluginID    string            `json:"pluginId"`
	Credentials map[string]string `json:"credentials"`
	// BastionID: Probe through this bastion, matching how the account will
	// egress once created.
	BastionID *string `json:"bastionId,omitempty"`
}

PreflightRequest is the `PreflightRequest` schema.

type ProbeRequest

type ProbeRequest struct {
	Items []ProbeRequestItems `json:"items"`
}

ProbeRequest is the `ProbeRequest` schema.

type ProbeRequestItems

type ProbeRequestItems struct {
	ResourceID     ResourceID `json:"resourceId"`
	AccountID      string     `json:"accountId"`
	PluginID       string     `json:"pluginId"`
	ResourceTypeID string     `json:"resourceTypeId"`
}

ProbeRequestItems is an object the spec declares inline.

type ProbeStatus

type ProbeStatus struct {
	// Phase: One of "ok", "error".
	Phase          string                      `json:"phase"`
	Error          *string                     `json:"error,omitempty"`
	Stats          []JSONObject                `json:"stats,omitempty"`
	Sparkline      []ProbeStatusSparkline      `json:"sparkline,omitempty"`
	SparklineLabel *string                     `json:"sparklineLabel,omitempty"`
	ResourceCounts []ProbeStatusResourceCounts `json:"resourceCounts,omitempty"`
}

ProbeStatus is the `ProbeStatus` schema.

type ProbeStatusResourceCounts

type ProbeStatusResourceCounts struct {
	TypeLabel string `json:"typeLabel"`
	Count     int64  `json:"count"`
}

ProbeStatusResourceCounts is an object the spec declares inline.

type ProbeStatusSparkline

type ProbeStatusSparkline struct {
	// Timestamp: Unix epoch milliseconds.
	Timestamp float64 `json:"timestamp"`
	Value     float64 `json:"value"`
}

ProbeStatusSparkline is an object the spec declares inline.

type Profile

type Profile struct {
	ID                string  `json:"id"`
	Email             string  `json:"email"`
	EmailVerified     bool    `json:"emailVerified"`
	FirstName         *string `json:"firstName"`
	LastName          *string `json:"lastName"`
	ProfilePictureURL *string `json:"profilePictureUrl"`
	LastSignInAt      *string `json:"lastSignInAt"`
	CreatedAt         string  `json:"createdAt"`
	// Identities: Connected OAuth accounts, if any
	Identities []ProfileIdentities `json:"identities"`
}

Profile is the `Profile` schema.

type ProfileEmailChangeConfirmParams

type ProfileEmailChangeConfirmParams struct {
	// Body: the JSON request body.
	Body *ProfileEmailChangeConfirmRequest
}

ProfileEmailChangeConfirmParams holds the parameters for `client.profile.emailChange.confirm`.

Every field is optional; pass nil to take the defaults.

type ProfileEmailChangeConfirmRequest

type ProfileEmailChangeConfirmRequest struct {
	Code string `json:"code"`
}

ProfileEmailChangeConfirmRequest is an object the spec declares inline.

type ProfileEmailChangeConfirmResponse

type ProfileEmailChangeConfirmResponse struct {
	Email string `json:"email"`
}

ProfileEmailChangeConfirmResponse is an object the spec declares inline.

type ProfileEmailChangeCreateParams

type ProfileEmailChangeCreateParams struct {
	// Body: the JSON request body.
	Body *ProfileEmailChangeCreateRequest
}

ProfileEmailChangeCreateParams holds the parameters for `client.profile.emailChange.create`.

Every field is optional; pass nil to take the defaults.

type ProfileEmailChangeCreateRequest

type ProfileEmailChangeCreateRequest struct {
	NewEmail string `json:"newEmail"`
}

ProfileEmailChangeCreateRequest is an object the spec declares inline.

type ProfileEmailChangeCreateResponse

type ProfileEmailChangeCreateResponse struct {
	NewEmail  string `json:"newEmail"`
	ExpiresAt string `json:"expiresAt"`
}

ProfileEmailChangeCreateResponse is an object the spec declares inline.

type ProfileEmailChangeNamespace

type ProfileEmailChangeNamespace struct {
	// contains filtered or unexported fields
}

ProfileEmailChangeNamespace is `client.profile.emailChange`.

func (*ProfileEmailChangeNamespace) Confirm

Confirm: Redeem an email change code

On success the account's email is the new address and it is marked verified.

POST /api/profile/email-change/confirm

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

func (*ProfileEmailChangeNamespace) Create

Create: Send a confirmation code to a new email address

Starts an email change. The code goes to the new address and the account keeps its current address until `/api/profile/email-change/confirm` redeems it, so an abandoned or mistyped change is harmless.

POST /api/profile/email-change

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

type ProfileIdentities

type ProfileIdentities struct {
	// Provider: WorkOS OAuth provider id
	Provider string `json:"provider"`
}

ProfileIdentities is an object the spec declares inline.

type ProfileMFAChallengeParams

type ProfileMFAChallengeParams struct {
	FactorID string
}

ProfileMFAChallengeParams holds the parameters for `client.profile.mfa.challenge`.

type ProfileMFADeleteParams

type ProfileMFADeleteParams struct {
	FactorID string
}

ProfileMFADeleteParams holds the parameters for `client.profile.mfa.delete`.

type ProfileMFANamespace

type ProfileMFANamespace struct {
	// contains filtered or unexported fields
}

ProfileMFANamespace is `client.profile.mfa`.

func (*ProfileMFANamespace) Challenge

Challenge: Issue a fresh challenge for a factor

POST /api/profile/mfa/{factorId}/challenge

Raises on 401: Unauthenticated

Raises on 404: Not found

func (*ProfileMFANamespace) Create

Create: Begin TOTP enrolment

Creates the factor and a first challenge. The factor only becomes usable once a code is verified; abandon the flow by DELETEing the returned `factorId`.

POST /api/profile/mfa

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

func (*ProfileMFANamespace) Delete

func (n *ProfileMFANamespace) Delete(ctx context.Context, params ProfileMFADeleteParams, opts ...RequestOption) (*OK, error)

Delete: Remove an authentication factor

DELETE /api/profile/mfa/{factorId}

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

Raises on 404: Not found

func (*ProfileMFANamespace) List

func (n *ProfileMFANamespace) List(ctx context.Context, opts ...RequestOption) ([]AuthFactor, error)

List: List enrolled authentication factors

Includes factors whose enrolment was never confirmed — WorkOS does not expose a verified flag.

GET /api/profile/mfa

Raises on 401: Unauthenticated

func (*ProfileMFANamespace) Verify

Verify: Verify a code against a challenge

POST /api/profile/mfa/{factorId}/verify

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 404: Not found

type ProfileMFAVerifyParams

type ProfileMFAVerifyParams struct {
	FactorID string
	// Body: the JSON request body.
	Body *ProfileMfaverifyRequest
}

ProfileMFAVerifyParams holds the parameters for `client.profile.mfa.verify`.

type ProfileMfachallengeResponse

type ProfileMfachallengeResponse struct {
	ChallengeID string `json:"challengeId"`
}

ProfileMfachallengeResponse is an object the spec declares inline.

type ProfileMfaverifyRequest

type ProfileMfaverifyRequest struct {
	ChallengeID string `json:"challengeId"`
	Code        string `json:"code"`
}

ProfileMfaverifyRequest is an object the spec declares inline.

type ProfileMfaverifyResponse

type ProfileMfaverifyResponse struct {
	Verified bool `json:"verified"`
}

ProfileMfaverifyResponse is an object the spec declares inline.

type ProfileNamespace

type ProfileNamespace struct {

	// EmailChange: `client.profile.emailChange`.
	EmailChange *ProfileEmailChangeNamespace
	// MFA: `client.profile.mfa`.
	MFA *ProfileMFANamespace
	// Sessions: `client.profile.sessions`.
	Sessions *ProfileSessionsNamespace
	// contains filtered or unexported fields
}

ProfileNamespace is `client.profile`.

func (*ProfileNamespace) Delete added in v0.8.0

func (n *ProfileNamespace) Delete(ctx context.Context, opts ...RequestOption) (*AccountDeleted, error)

Delete: Delete the signed-in user's account

Irreversible. Organizations where the caller is the only member are deleted and their subscriptions cancelled; other memberships are simply removed. Refuses with `transfer_ownership_required` while the caller is the only owner of an organization other people belong to.

DELETE /api/profile

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

Raises on 409: The caller still solely owns a shared organization; nothing was deleted.

Raises on 502: A subscription could not be cancelled; nothing was deleted.

func (*ProfileNamespace) DeletionPreview added in v0.8.0

func (n *ProfileNamespace) DeletionPreview(ctx context.Context, opts ...RequestOption) (*AccountDeletionPreview, error)

DeletionPreview: What deleting this account would do

Read-only. Lets a confirmation screen name the organizations that go with the account, and the ones that must be handed over first.

GET /api/profile/deletion-preview

Raises on 401: Unauthenticated

func (*ProfileNamespace) Get

func (n *ProfileNamespace) Get(ctx context.Context, opts ...RequestOption) (*Profile, error)

Get: The signed-in user's account profile

User-scoped, not organization-scoped: one WorkOS identity is shared across every organization the user belongs to.

GET /api/profile

Raises on 401: Unauthenticated

func (*ProfileNamespace) PasswordReset

PasswordReset: Mint a password reset link for the signed-in user

Returns a one-time AuthKit-hosted reset URL rather than emailing it — the caller already holds a valid session for the account. Also the way to set a first password on an SSO or OAuth-only account.

POST /api/profile/password-reset

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

func (*ProfileNamespace) SendVerificationEmail

func (n *ProfileNamespace) SendVerificationEmail(ctx context.Context, opts ...RequestOption) (*OK, error)

SendVerificationEmail: Re-send the email verification message

POST /api/profile/send-verification-email

Raises on 400: Bad request

Raises on 401: Unauthenticated

func (*ProfileNamespace) Update

Update: Update the signed-in user's name

PATCH /api/profile

Raises on 400: Bad request

Raises on 401: Unauthenticated

type ProfilePasswordResetResponse

type ProfilePasswordResetResponse struct {
	PasswordResetURL string `json:"passwordResetUrl"`
	ExpiresAt        string `json:"expiresAt"`
}

ProfilePasswordResetResponse is an object the spec declares inline.

type ProfileSessionsDeleteParams

type ProfileSessionsDeleteParams struct {
	SessionID string
}

ProfileSessionsDeleteParams holds the parameters for `client.profile.sessions.delete`.

type ProfileSessionsNamespace

type ProfileSessionsNamespace struct {
	// contains filtered or unexported fields
}

ProfileSessionsNamespace is `client.profile.sessions`.

func (*ProfileSessionsNamespace) Delete

Delete: Revoke one session

Refuses the session making the request — use sign-out for that.

DELETE /api/profile/sessions/{sessionId}

Raises on 400: Bad request

Raises on 401: Unauthenticated

Raises on 404: Not found

func (*ProfileSessionsNamespace) List

List: List the signed-in user's active sessions

GET /api/profile/sessions

Raises on 401: Unauthenticated

func (*ProfileSessionsNamespace) RevokeOthers

RevokeOthers: Revoke every session except the current one

POST /api/profile/sessions/revoke-others

Raises on 401: Unauthenticated

Raises on 403: Recent sign-in required. Send the user through sign-in again and retry; the request itself was well-formed.

type ProfileSessionsRevokeOthersResponse

type ProfileSessionsRevokeOthersResponse struct {
	Revoked int64 `json:"revoked"`
}

ProfileSessionsRevokeOthersResponse is an object the spec declares inline.

type ProfileSummary

type ProfileSummary struct {
	ID                string  `json:"id"`
	Email             string  `json:"email"`
	EmailVerified     bool    `json:"emailVerified"`
	FirstName         *string `json:"firstName"`
	LastName          *string `json:"lastName"`
	ProfilePictureURL *string `json:"profilePictureUrl"`
	LastSignInAt      *string `json:"lastSignInAt"`
	CreatedAt         string  `json:"createdAt"`
}

ProfileSummary is the `ProfileSummary` schema.

type ProfileUpdateParams

type ProfileUpdateParams struct {
	// Body: the JSON request body.
	Body *ProfileUpdateRequest
}

ProfileUpdateParams holds the parameters for `client.profile.update`.

Every field is optional; pass nil to take the defaults.

type ProfileUpdateRequest

type ProfileUpdateRequest struct {
	FirstName *string `json:"firstName,omitempty"`
	LastName  *string `json:"lastName,omitempty"`
}

ProfileUpdateRequest is an object the spec declares inline.

type ProviderIncidentImpact added in v0.29.0

type ProviderIncidentImpact = string

ProviderIncidentImpact: Normalized incident severity, least to most severe.

const (
	ProviderIncidentImpactMaintenance ProviderIncidentImpact = "maintenance"
	ProviderIncidentImpactMinor       ProviderIncidentImpact = "minor"
	ProviderIncidentImpactMajor       ProviderIncidentImpact = "major"
	ProviderIncidentImpactCritical    ProviderIncidentImpact = "critical"
)

The values ProviderIncidentImpact takes.

type ProviderIncidentResourceSample added in v0.29.0

type ProviderIncidentResourceSample struct {
	// ID: Resource id.
	ID             string `json:"id"`
	DisplayName    string `json:"displayName"`
	ResourceTypeID string `json:"resourceTypeId"`
	// Region: The resource's region field, when it has one.
	Region *string `json:"region,omitempty"`
}

ProviderIncidentResourceSample is the `ProviderIncidentResourceSample` schema.

type ProviderIncidentState added in v0.29.0

type ProviderIncidentState = string

ProviderIncidentState: Normalized incident lifecycle state as the provider reports it.

const (
	ProviderIncidentStateInvestigating ProviderIncidentState = "investigating"
	ProviderIncidentStateIdentified    ProviderIncidentState = "identified"
	ProviderIncidentStateMonitoring    ProviderIncidentState = "monitoring"
	ProviderIncidentStateResolved      ProviderIncidentState = "resolved"
)

The values ProviderIncidentState takes.

type PushedCostRow added in v0.6.0

type PushedCostRow struct {
	// Date: UTC day the spend belongs to.
	Date     string `json:"date"`
	Currency string `json:"currency"`
	// Amount: Money for this day/dimension combination. Negative for credits.
	Amount float64 `json:"amount"`
	// Service: Becomes a group/filter value.
	Service *string `json:"service,omitempty"`
	Region  *string `json:"region,omitempty"`
	// ResourceID: Opaque id of the thing being billed; groups the `resource`
	// dimension.
	ResourceID *string `json:"resourceId,omitempty"`
	// Tags: Cost-allocation tags, at most 32. Keys starting with `infrawrench:`
	// are reserved and rejected.
	Tags        map[string]string `json:"tags,omitempty"`
	UsageAmount *float64          `json:"usageAmount,omitempty"`
	UsageUnit   *string           `json:"usageUnit,omitempty"`
	// AccountID: Attribute this row to a connected account. Must belong to the
	// calling organization. Omit to attribute it to the source itself.
	AccountID *string `json:"accountId,omitempty"`
}

PushedCostRow is the `PushedCostRow` schema.

type ReauthenticationRequired

type ReauthenticationRequired struct {
	// Error: Human-readable error message
	Error string `json:"error"`
	// Code: One of "reauthentication_required".
	Code string `json:"code"`
}

ReauthenticationRequired is the `ReauthenticationRequired` schema.

type ReorderRequest

type ReorderRequest struct {
	Cards       []ReorderRequestCards `json:"cards,omitempty"`
	ResourceIDs []ResourceID          `json:"resourceIds,omitempty"`
}

ReorderRequest is the `ReorderRequest` schema.

type ReorderRequestCards

type ReorderRequestCards struct {
	// Kind: One of "resource", "workflow", "widget".
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

ReorderRequestCards is an object the spec declares inline.

type RequestOption

type RequestOption func(*requestConfig)

RequestOption overrides configuration for a single call. Cancellation and deadlines are not here on purpose: that is what the context.Context every method takes is for.

func WithQueryParam

func WithQueryParam(name, value string) RequestOption

WithQueryParam appends a query parameter this call's signature does not describe — an escape hatch for a server that has grown a parameter the generated code has not caught up with.

func WithRequestHeader

func WithRequestHeader(name, value string) RequestOption

WithRequestHeader sets a header on this call only, overriding any header of the same name set on the client.

type RequiredTag added in v0.29.0

type RequiredTag struct {
	Key string `json:"key"`
	// AllowedValues: When set, the tag's value must be one of these (compared
	// exactly).
	AllowedValues []string `json:"allowedValues,omitempty"`
}

RequiredTag is the `RequiredTag` schema.

type Resource

type Resource struct {
	ID               ResourceID  `json:"id"`
	PluginID         string      `json:"pluginId"`
	ResourceTypeID   string      `json:"resourceTypeId"`
	AccountID        string      `json:"accountId"`
	DisplayName      string      `json:"displayName"`
	ExternalID       *string     `json:"externalId"`
	FieldsJSON       JSONObject  `json:"fieldsJson"`
	OutputsJSON      JSONObject  `json:"outputsJson"`
	ParentResourceID *ResourceID `json:"parentResourceId"`
}

Resource is the `Resource` schema.

type ResourceChangeEntry added in v0.22.0

type ResourceChangeEntry struct {
	ID             string     `json:"id"`
	ResourceID     ResourceID `json:"resourceId"`
	AccountID      string     `json:"accountId"`
	PluginID       string     `json:"pluginId"`
	ResourceTypeID string     `json:"resourceTypeId"`
	// DisplayName: Resource display name at the time of the change — survives
	// deletion.
	DisplayName string             `json:"displayName"`
	ChangeKind  ResourceChangeKind `json:"changeKind"`
	// Diff: Changed fields for `updated` events; empty for `created` and
	// `deleted`.
	Diff []ResourceFieldChange `json:"diff"`
	// Origin: Who caused the change when a non-sync writer knows: `schedule` for
	// sleep/wake schedule transitions. Absent/null = observed by sync.
	//
	// One of "schedule".
	Origin    *string `json:"origin,omitempty"`
	CreatedAt string  `json:"createdAt"`
}

ResourceChangeEntry is the `ResourceChangeEntry` schema.

type ResourceChangeFeedEntry added in v0.22.0

type ResourceChangeFeedEntry struct {
	ID             string     `json:"id"`
	ResourceID     ResourceID `json:"resourceId"`
	AccountID      string     `json:"accountId"`
	PluginID       string     `json:"pluginId"`
	ResourceTypeID string     `json:"resourceTypeId"`
	// DisplayName: Resource display name at the time of the change — survives
	// deletion.
	DisplayName string             `json:"displayName"`
	ChangeKind  ResourceChangeKind `json:"changeKind"`
	// Diff: Changed fields for `updated` events; empty for `created` and
	// `deleted`.
	Diff []ResourceFieldChange `json:"diff"`
	// Origin: Who caused the change when a non-sync writer knows: `schedule` for
	// sleep/wake schedule transitions. Absent/null = observed by sync.
	//
	// One of "schedule".
	Origin      *string `json:"origin,omitempty"`
	CreatedAt   string  `json:"createdAt"`
	AccountName *string `json:"accountName"`
}

ResourceChangeFeedEntry is the `ResourceChangeFeedEntry` schema.

type ResourceChangeFeedResponse added in v0.22.0

type ResourceChangeFeedResponse struct {
	Entries []ResourceChangeFeedEntry `json:"entries"`
	Total   int64                     `json:"total"`
}

ResourceChangeFeedResponse is the `ResourceChangeFeedResponse` schema.

type ResourceChangeKind added in v0.22.0

type ResourceChangeKind = string

ResourceChangeKind: What happened between two consecutive syncs: the resource appeared, a stored field changed, or the resource disappeared upstream.

const (
	ResourceChangeKindCreated ResourceChangeKind = "created"
	ResourceChangeKindUpdated ResourceChangeKind = "updated"
	ResourceChangeKindDeleted ResourceChangeKind = "deleted"
)

The values ResourceChangeKind takes.

type ResourceChangeListResponse added in v0.22.0

type ResourceChangeListResponse struct {
	Entries []ResourceChangeEntry `json:"entries"`
}

ResourceChangeListResponse is the `ResourceChangeListResponse` schema.

type ResourceDetail

type ResourceDetail struct {
	DetailSchema         JSONObject         `json:"detailSchema"`
	ChildResources       []ChildResourceRef `json:"childResources"`
	ChildTypes           []ChildTypeRef     `json:"childTypes"`
	PluginID             string             `json:"pluginId"`
	PluginLogoSvg        string             `json:"pluginLogoSvg"`
	ResourceID           ResourceID         `json:"resourceId"`
	AccountID            string             `json:"accountId"`
	ResourceTypeID       string             `json:"resourceTypeId"`
	PeerPanes            []PeerPane         `json:"peerPanes"`
	PeerIntegrationStubs []PeerPaneStub     `json:"peerIntegrationStubs"`
	CanDelete            bool               `json:"canDelete"`
	CanEdit              bool               `json:"canEdit"`
	EditableFields       []EditableField    `json:"editableFields"`
	CredentialFormats    []CredentialFormat `json:"credentialFormats"`
	HasManifestEditor    bool               `json:"hasManifestEditor"`
	HasSecretVersions    bool               `json:"hasSecretVersions"`
	ResourceDisplayName  string             `json:"resourceDisplayName"`
	ResourceTypeLabel    string             `json:"resourceTypeLabel"`
	ResourceFields       JSONObject         `json:"resourceFields"`
	HasSQLEditor         bool               `json:"hasSqlEditor"`
	HasStorageBrowser    bool               `json:"hasStorageBrowser"`
	HasArtifactRegistry  bool               `json:"hasArtifactRegistry"`
	HasKVBrowser         bool               `json:"hasKvBrowser"`
	HasKVConsole         bool               `json:"hasKvConsole"`
	KVDriverName         *string            `json:"kvDriverName,omitempty"`
	IsMongoDB            bool               `json:"isMongoDb"`
	HasDockerActions     bool               `json:"hasDockerActions"`
	HasSSHTerminal       bool               `json:"hasSshTerminal"`
	HasSFTPBrowser       bool               `json:"hasSftpBrowser"`
	SSHHost              *string            `json:"sshHost"`
	SSHPrivateHost       *string            `json:"sshPrivateHost,omitempty"`
	DefaultSSHUsername   *string            `json:"defaultSshUsername"`
	ContainerID          string             `json:"containerId"`
	DatabaseName         string             `json:"databaseName"`
	StorageBucketName    string             `json:"storageBucketName"`
	SupportsMetrics      bool               `json:"supportsMetrics"`
	// Schedulable: The type declares lifecycle start/stop actions, so this
	// resource can carry a sleep/wake schedule.
	Schedulable bool `json:"schedulable"`
}

ResourceDetail is the `ResourceDetail` schema.

type ResourceFieldChange added in v0.22.0

type ResourceFieldChange struct {
	// Field: Top-level field key that changed. Resolved-output keys are prefixed
	// `outputs.`.
	Field string `json:"field"`
	// From: Previous value (null when the field was absent).
	From any `json:"from,omitempty"`
	// To: New value.
	To any `json:"to,omitempty"`
}

ResourceFieldChange is the `ResourceFieldChange` schema.

type ResourceID

type ResourceID = string

ResourceID: Composite id `pluginId:accountId:externalId`.

Spec schema: `ResourceId`.

type ResourceStatus

type ResourceStatus = string

ResourceStatus: Normalized status reported by a plugin's renderSidebarItem/renderDetail.

const (
	ResourceStatusHealthy      ResourceStatus = "healthy"
	ResourceStatusDegraded     ResourceStatus = "degraded"
	ResourceStatusError        ResourceStatus = "error"
	ResourceStatusUnknown      ResourceStatus = "unknown"
	ResourceStatusProvisioning ResourceStatus = "provisioning"
	ResourceStatusInfo         ResourceStatus = "info"
)

The values ResourceStatus takes.

type ResourceTypeID

type ResourceTypeID = string

ResourceTypeID: Resource type id. Note: not every plugin exposes every type — see the plugin's `resourceTypes` for the valid (pluginId, typeId) pairs.

Spec schema: `ResourceTypeId`.

const (
	ResourceTypeIDAccessApplication              ResourceTypeID = "access-application"
	ResourceTypeIDAccessPolicy                   ResourceTypeID = "access-policy"
	ResourceTypeIDAccount                        ResourceTypeID = "account"
	ResourceTypeIDAcmCertificate                 ResourceTypeID = "acm-certificate"
	ResourceTypeIDAgentAPIKey                    ResourceTypeID = "agent-api-key"
	ResourceTypeIDAiGateway                      ResourceTypeID = "ai-gateway"
	ResourceTypeIDAiSearch                       ResourceTypeID = "ai-search"
	ResourceTypeIDAlb                            ResourceTypeID = "alb"
	ResourceTypeIDAlertPolicy                    ResourceTypeID = "alert-policy"
	ResourceTypeIDAlloydbCluster                 ResourceTypeID = "alloydb-cluster"
	ResourceTypeIDAlloydbInstance                ResourceTypeID = "alloydb-instance"
	ResourceTypeIDAPIGateway                     ResourceTypeID = "api-gateway"
	ResourceTypeIDAPIKey                         ResourceTypeID = "api-key"
	ResourceTypeIDApp                            ResourceTypeID = "app"
	ResourceTypeIDAppEngineService               ResourceTypeID = "app-engine-service"
	ResourceTypeIDApprunnerService               ResourceTypeID = "apprunner-service"
	ResourceTypeIDArtifactRegistryRepo           ResourceTypeID = "artifact-registry-repo"
	ResourceTypeIDAuditEvent                     ResourceTypeID = "audit-event"
	ResourceTypeIDAutoScalingGroup               ResourceTypeID = "auto-scaling-group"
	ResourceTypeIDAzureAksCluster                ResourceTypeID = "azure-aks-cluster"
	ResourceTypeIDAzureAppGateway                ResourceTypeID = "azure-app-gateway"
	ResourceTypeIDAzureAppRegistration           ResourceTypeID = "azure-app-registration"
	ResourceTypeIDAzureAppService                ResourceTypeID = "azure-app-service"
	ResourceTypeIDAzureAppServicePlan            ResourceTypeID = "azure-app-service-plan"
	ResourceTypeIDAzureContainerInstance         ResourceTypeID = "azure-container-instance"
	ResourceTypeIDAzureContainerRegistry         ResourceTypeID = "azure-container-registry"
	ResourceTypeIDAzureCosmosDB                  ResourceTypeID = "azure-cosmos-db"
	ResourceTypeIDAzureDisk                      ResourceTypeID = "azure-disk"
	ResourceTypeIDAzureDNSZone                   ResourceTypeID = "azure-dns-zone"
	ResourceTypeIDAzureEventHub                  ResourceTypeID = "azure-event-hub"
	ResourceTypeIDAzureFirewall                  ResourceTypeID = "azure-firewall"
	ResourceTypeIDAzureFunctionApp               ResourceTypeID = "azure-function-app"
	ResourceTypeIDAzureKeyVault                  ResourceTypeID = "azure-key-vault"
	ResourceTypeIDAzureLoadBalancer              ResourceTypeID = "azure-load-balancer"
	ResourceTypeIDAzureLogAnalytics              ResourceTypeID = "azure-log-analytics"
	ResourceTypeIDAzureManagedIdentity           ResourceTypeID = "azure-managed-identity"
	ResourceTypeIDAzureMysqlFlexible             ResourceTypeID = "azure-mysql-flexible"
	ResourceTypeIDAzureNatGateway                ResourceTypeID = "azure-nat-gateway"
	ResourceTypeIDAzureNsg                       ResourceTypeID = "azure-nsg"
	ResourceTypeIDAzurePostgresFlexible          ResourceTypeID = "azure-postgres-flexible"
	ResourceTypeIDAzurePrivateDNSZone            ResourceTypeID = "azure-private-dns-zone"
	ResourceTypeIDAzurePublicIP                  ResourceTypeID = "azure-public-ip"
	ResourceTypeIDAzureRedisCache                ResourceTypeID = "azure-redis-cache"
	ResourceTypeIDAzureResourceGroup             ResourceTypeID = "azure-resource-group"
	ResourceTypeIDAzureRouteTable                ResourceTypeID = "azure-route-table"
	ResourceTypeIDAzureServiceBus                ResourceTypeID = "azure-service-bus"
	ResourceTypeIDAzureSQLDatabase               ResourceTypeID = "azure-sql-database"
	ResourceTypeIDAzureStorageAccount            ResourceTypeID = "azure-storage-account"
	ResourceTypeIDAzureSubnet                    ResourceTypeID = "azure-subnet"
	ResourceTypeIDAzureVM                        ResourceTypeID = "azure-vm"
	ResourceTypeIDAzureVnet                      ResourceTypeID = "azure-vnet"
	ResourceTypeIDBackendService                 ResourceTypeID = "backend-service"
	ResourceTypeIDBackupVault                    ResourceTypeID = "backup-vault"
	ResourceTypeIDBalance                        ResourceTypeID = "balance"
	ResourceTypeIDBatch                          ResourceTypeID = "batch"
	ResourceTypeIDBatchInferenceJob              ResourceTypeID = "batch-inference-job"
	ResourceTypeIDBatchJobQueue                  ResourceTypeID = "batch-job-queue"
	ResourceTypeIDBedrockModel                   ResourceTypeID = "bedrock-model"
	ResourceTypeIDBigqueryDataset                ResourceTypeID = "bigquery-dataset"
	ResourceTypeIDBigqueryTable                  ResourceTypeID = "bigquery-table"
	ResourceTypeIDBigtableInstance               ResourceTypeID = "bigtable-instance"
	ResourceTypeIDBlockVolume                    ResourceTypeID = "block-volume"
	ResourceTypeIDCacheRule                      ResourceTypeID = "cache-rule"
	ResourceTypeIDCachedContent                  ResourceTypeID = "cached-content"
	ResourceTypeIDCertificate                    ResourceTypeID = "certificate"
	ResourceTypeIDChDatabase                     ResourceTypeID = "ch-database"
	ResourceTypeIDChService                      ResourceTypeID = "ch-service"
	ResourceTypeIDCloudArmorPolicy               ResourceTypeID = "cloud-armor-policy"
	ResourceTypeIDCloudBuildTrigger              ResourceTypeID = "cloud-build-trigger"
	ResourceTypeIDCloudDeployPipeline            ResourceTypeID = "cloud-deploy-pipeline"
	ResourceTypeIDCloudDNSRecordSet              ResourceTypeID = "cloud-dns-record-set"
	ResourceTypeIDCloudDNSZone                   ResourceTypeID = "cloud-dns-zone"
	ResourceTypeIDCloudFunction                  ResourceTypeID = "cloud-function"
	ResourceTypeIDCloudNat                       ResourceTypeID = "cloud-nat"
	ResourceTypeIDCloudRouter                    ResourceTypeID = "cloud-router"
	ResourceTypeIDCloudRunService                ResourceTypeID = "cloud-run-service"
	ResourceTypeIDCloudSchedulerJob              ResourceTypeID = "cloud-scheduler-job"
	ResourceTypeIDCloudTasksQueue                ResourceTypeID = "cloud-tasks-queue"
	ResourceTypeIDCloudformationStack            ResourceTypeID = "cloudformation-stack"
	ResourceTypeIDCloudfrontDistribution         ResourceTypeID = "cloudfront-distribution"
	ResourceTypeIDCloudsqlInstance               ResourceTypeID = "cloudsql-instance"
	ResourceTypeIDCloudtrailTrail                ResourceTypeID = "cloudtrail-trail"
	ResourceTypeIDCloudwatchAlarm                ResourceTypeID = "cloudwatch-alarm"
	ResourceTypeIDCloudwatchLogGroup             ResourceTypeID = "cloudwatch-log-group"
	ResourceTypeIDCodebuildProject               ResourceTypeID = "codebuild-project"
	ResourceTypeIDCodepipelinePipeline           ResourceTypeID = "codepipeline-pipeline"
	ResourceTypeIDCognitoUserPool                ResourceTypeID = "cognito-user-pool"
	ResourceTypeIDCollection                     ResourceTypeID = "collection"
	ResourceTypeIDComposerEnvironment            ResourceTypeID = "composer-environment"
	ResourceTypeIDContainer                      ResourceTypeID = "container"
	ResourceTypeIDContainerRegistry              ResourceTypeID = "container-registry"
	ResourceTypeIDCustomHostname                 ResourceTypeID = "custom-hostname"
	ResourceTypeIDCustomVoice                    ResourceTypeID = "custom-voice"
	ResourceTypeIDD1Database                     ResourceTypeID = "d1-database"
	ResourceTypeIDDatabricksApp                  ResourceTypeID = "databricks-app"
	ResourceTypeIDDatabricksCatalog              ResourceTypeID = "databricks-catalog"
	ResourceTypeIDDatabricksCluster              ResourceTypeID = "databricks-cluster"
	ResourceTypeIDDatabricksClusterPolicy        ResourceTypeID = "databricks-cluster-policy"
	ResourceTypeIDDatabricksDashboard            ResourceTypeID = "databricks-dashboard"
	ResourceTypeIDDatabricksFunction             ResourceTypeID = "databricks-function"
	ResourceTypeIDDatabricksJob                  ResourceTypeID = "databricks-job"
	ResourceTypeIDDatabricksModelVersion         ResourceTypeID = "databricks-model-version"
	ResourceTypeIDDatabricksNodeType             ResourceTypeID = "databricks-node-type"
	ResourceTypeIDDatabricksPipeline             ResourceTypeID = "databricks-pipeline"
	ResourceTypeIDDatabricksRegisteredModel      ResourceTypeID = "databricks-registered-model"
	ResourceTypeIDDatabricksRepo                 ResourceTypeID = "databricks-repo"
	ResourceTypeIDDatabricksSchema               ResourceTypeID = "databricks-schema"
	ResourceTypeIDDatabricksSecretScope          ResourceTypeID = "databricks-secret-scope"
	ResourceTypeIDDatabricksServingEndpoint      ResourceTypeID = "databricks-serving-endpoint"
	ResourceTypeIDDatabricksSQLQuery             ResourceTypeID = "databricks-sql-query"
	ResourceTypeIDDatabricksSQLWarehouse         ResourceTypeID = "databricks-sql-warehouse"
	ResourceTypeIDDatabricksTable                ResourceTypeID = "databricks-table"
	ResourceTypeIDDatabricksVectorSearchEndpoint ResourceTypeID = "databricks-vector-search-endpoint"
	ResourceTypeIDDatabricksVectorSearchIndex    ResourceTypeID = "databricks-vector-search-index"
	ResourceTypeIDDatabricksVolume               ResourceTypeID = "databricks-volume"
	ResourceTypeIDDatabricksWorkspaceObject      ResourceTypeID = "databricks-workspace-object"
	ResourceTypeIDDataflowJob                    ResourceTypeID = "dataflow-job"
	ResourceTypeIDDataset                        ResourceTypeID = "dataset"
	ResourceTypeIDDBSubnetGroup                  ResourceTypeID = "db-subnet-group"
	ResourceTypeIDDBUser                         ResourceTypeID = "db-user"
	ResourceTypeIDDedicatedInference             ResourceTypeID = "dedicated-inference"
	ResourceTypeIDDeployedModel                  ResourceTypeID = "deployed-model"
	ResourceTypeIDDeployment                     ResourceTypeID = "deployment"
	ResourceTypeIDDNSRecord                      ResourceTypeID = "dns-record"
	ResourceTypeIDDockerContainer                ResourceTypeID = "docker-container"
	ResourceTypeIDDockerImage                    ResourceTypeID = "docker-image"
	ResourceTypeIDDockerNetwork                  ResourceTypeID = "docker-network"
	ResourceTypeIDDockerVolume                   ResourceTypeID = "docker-volume"
	ResourceTypeIDDocumentdbCluster              ResourceTypeID = "documentdb-cluster"
	ResourceTypeIDDoksCluster                    ResourceTypeID = "doks-cluster"
	ResourceTypeIDDomain                         ResourceTypeID = "domain"
	ResourceTypeIDDroplet                        ResourceTypeID = "droplet"
	ResourceTypeIDDurableObjectNamespace         ResourceTypeID = "durable-object-namespace"
	ResourceTypeIDDynamodbTable                  ResourceTypeID = "dynamodb-table"
	ResourceTypeIDEbsVolume                      ResourceTypeID = "ebs-volume"
	ResourceTypeIDEc2Instance                    ResourceTypeID = "ec2-instance"
	ResourceTypeIDEcrRepository                  ResourceTypeID = "ecr-repository"
	ResourceTypeIDEcsService                     ResourceTypeID = "ecs-service"
	ResourceTypeIDEfsFileSystem                  ResourceTypeID = "efs-file-system"
	ResourceTypeIDEksCluster                     ResourceTypeID = "eks-cluster"
	ResourceTypeIDElasticIP                      ResourceTypeID = "elastic-ip"
	ResourceTypeIDElasticacheCluster             ResourceTypeID = "elasticache-cluster"
	ResourceTypeIDEmailRoutingRule               ResourceTypeID = "email-routing-rule"
	ResourceTypeIDEmbedJob                       ResourceTypeID = "embed-job"
	ResourceTypeIDEndpoint                       ResourceTypeID = "endpoint"
	ResourceTypeIDEval                           ResourceTypeID = "eval"
	ResourceTypeIDEvaluation                     ResourceTypeID = "evaluation"
	ResourceTypeIDEventbridgeRule                ResourceTypeID = "eventbridge-rule"
	ResourceTypeIDFile                           ResourceTypeID = "file"
	ResourceTypeIDFileSearchDocument             ResourceTypeID = "file-search-document"
	ResourceTypeIDFileSearchStore                ResourceTypeID = "file-search-store"
	ResourceTypeIDFineTune                       ResourceTypeID = "fine-tune"
	ResourceTypeIDFineTuningJob                  ResourceTypeID = "fine-tuning-job"
	ResourceTypeIDFinetunedModel                 ResourceTypeID = "finetuned-model"
	ResourceTypeIDFirestoreDatabase              ResourceTypeID = "firestore-database"
	ResourceTypeIDFirewall                       ResourceTypeID = "firewall"
	ResourceTypeIDFirewallRule                   ResourceTypeID = "firewall-rule"
	ResourceTypeIDFloatingIP                     ResourceTypeID = "floating-ip"
	ResourceTypeIDFolder                         ResourceTypeID = "folder"
	ResourceTypeIDForwardingRule                 ResourceTypeID = "forwarding-rule"
	ResourceTypeIDGateway                        ResourceTypeID = "gateway"
	ResourceTypeIDGceDisk                        ResourceTypeID = "gce-disk"
	ResourceTypeIDGceInstance                    ResourceTypeID = "gce-instance"
	ResourceTypeIDGCPProject                     ResourceTypeID = "gcp-project"
	ResourceTypeIDGCPServiceAccount              ResourceTypeID = "gcp-service-account"
	ResourceTypeIDGcsBucket                      ResourceTypeID = "gcs-bucket"
	ResourceTypeIDGenAiAgent                     ResourceTypeID = "gen-ai-agent"
	ResourceTypeIDGenAiKnowledgeBase             ResourceTypeID = "gen-ai-knowledge-base"
	ResourceTypeIDGenAiModelRouter               ResourceTypeID = "gen-ai-model-router"
	ResourceTypeIDGkeCluster                     ResourceTypeID = "gke-cluster"
	ResourceTypeIDGlueDatabase                   ResourceTypeID = "glue-database"
	ResourceTypeIDGroqBatch                      ResourceTypeID = "groq-batch"
	ResourceTypeIDGroqFile                       ResourceTypeID = "groq-file"
	ResourceTypeIDGroqFineTuning                 ResourceTypeID = "groq-fine-tuning"
	ResourceTypeIDGroqModel                      ResourceTypeID = "groq-model"
	ResourceTypeIDHardware                       ResourceTypeID = "hardware"
	ResourceTypeIDHealthCheck                    ResourceTypeID = "health-check"
	ResourceTypeIDHealthcheck                    ResourceTypeID = "healthcheck"
	ResourceTypeIDHistoryItem                    ResourceTypeID = "history-item"
	ResourceTypeIDHyperdrive                     ResourceTypeID = "hyperdrive"
	ResourceTypeIDIamRole                        ResourceTypeID = "iam-role"
	ResourceTypeIDIamUser                        ResourceTypeID = "iam-user"
	ResourceTypeIDImage                          ResourceTypeID = "image"
	ResourceTypeIDInferenceBatch                 ResourceTypeID = "inference-batch"
	ResourceTypeIDInstance                       ResourceTypeID = "instance"
	ResourceTypeIDInstanceGroup                  ResourceTypeID = "instance-group"
	ResourceTypeIDInstanceTemplate               ResourceTypeID = "instance-template"
	ResourceTypeIDInternetGateway                ResourceTypeID = "internet-gateway"
	ResourceTypeIDInvite                         ResourceTypeID = "invite"
	ResourceTypeIDIPAccessRule                   ResourceTypeID = "ip-access-rule"
	ResourceTypeIDIPAllocation                   ResourceTypeID = "ip-allocation"
	ResourceTypeIDJob                            ResourceTypeID = "job"
	ResourceTypeIDK8sCluster                     ResourceTypeID = "k8s-cluster"
	ResourceTypeIDK8sConfigmap                   ResourceTypeID = "k8s-configmap"
	ResourceTypeIDK8sCronjob                     ResourceTypeID = "k8s-cronjob"
	ResourceTypeIDK8sDaemonset                   ResourceTypeID = "k8s-daemonset"
	ResourceTypeIDK8sDeployment                  ResourceTypeID = "k8s-deployment"
	ResourceTypeIDK8sIngress                     ResourceTypeID = "k8s-ingress"
	ResourceTypeIDK8sJob                         ResourceTypeID = "k8s-job"
	ResourceTypeIDK8sNamespace                   ResourceTypeID = "k8s-namespace"
	ResourceTypeIDK8sNode                        ResourceTypeID = "k8s-node"
	ResourceTypeIDK8sPod                         ResourceTypeID = "k8s-pod"
	ResourceTypeIDK8sSecret                      ResourceTypeID = "k8s-secret"
	ResourceTypeIDK8sService                     ResourceTypeID = "k8s-service"
	ResourceTypeIDK8sStatefulset                 ResourceTypeID = "k8s-statefulset"
	ResourceTypeIDKafkaCluster                   ResourceTypeID = "kafka-cluster"
	ResourceTypeIDKafkaConsumerGroup             ResourceTypeID = "kafka-consumer-group"
	ResourceTypeIDKafkaTopic                     ResourceTypeID = "kafka-topic"
	ResourceTypeIDKapsuleCluster                 ResourceTypeID = "kapsule-cluster"
	ResourceTypeIDKinesisStream                  ResourceTypeID = "kinesis-stream"
	ResourceTypeIDKmsKey                         ResourceTypeID = "kms-key"
	ResourceTypeIDKmsKeyRing                     ResourceTypeID = "kms-key-ring"
	ResourceTypeIDKVNamespace                    ResourceTypeID = "kv-namespace"
	ResourceTypeIDLambdaFunction                 ResourceTypeID = "lambda-function"
	ResourceTypeIDLoadBalancer                   ResourceTypeID = "load-balancer"
	ResourceTypeIDLogSink                        ResourceTypeID = "log-sink"
	ResourceTypeIDLogpushJob                     ResourceTypeID = "logpush-job"
	ResourceTypeIDMachine                        ResourceTypeID = "machine"
	ResourceTypeIDManagedDatabase                ResourceTypeID = "managed-database"
	ResourceTypeIDManagedDB                      ResourceTypeID = "managed-db"
	ResourceTypeIDManagedEndpoint                ResourceTypeID = "managed-endpoint"
	ResourceTypeIDManagedKube                    ResourceTypeID = "managed-kube"
	ResourceTypeIDMediaAsset                     ResourceTypeID = "media-asset"
	ResourceTypeIDMember                         ResourceTypeID = "member"
	ResourceTypeIDMemcachedInstance              ResourceTypeID = "memcached-instance"
	ResourceTypeIDMemorystoreMemcached           ResourceTypeID = "memorystore-memcached"
	ResourceTypeIDMemorystoreRedis               ResourceTypeID = "memorystore-redis"
	ResourceTypeIDMessageBatch                   ResourceTypeID = "message-batch"
	ResourceTypeIDMistralAPIKey                  ResourceTypeID = "mistral-api-key"
	ResourceTypeIDMistralBatchJob                ResourceTypeID = "mistral-batch-job"
	ResourceTypeIDMistralFile                    ResourceTypeID = "mistral-file"
	ResourceTypeIDMistralFineTuningJob           ResourceTypeID = "mistral-fine-tuning-job"
	ResourceTypeIDMistralModel                   ResourceTypeID = "mistral-model"
	ResourceTypeIDMistralVoice                   ResourceTypeID = "mistral-voice"
	ResourceTypeIDModel                          ResourceTypeID = "model"
	ResourceTypeIDModelAPIKey                    ResourceTypeID = "model-api-key"
	ResourceTypeIDModelEndpoint                  ResourceTypeID = "model-endpoint"
	ResourceTypeIDMongodbDatabase                ResourceTypeID = "mongodb-database"
	ResourceTypeIDMqBroker                       ResourceTypeID = "mq-broker"
	ResourceTypeIDMskCluster                     ResourceTypeID = "msk-cluster"
	ResourceTypeIDMssqlDatabase                  ResourceTypeID = "mssql-database"
	ResourceTypeIDMysqlDatabase                  ResourceTypeID = "mysql-database"
	ResourceTypeIDNatGateway                     ResourceTypeID = "nat-gateway"
	ResourceTypeIDNeonAiGateway                  ResourceTypeID = "neon-ai-gateway"
	ResourceTypeIDNeonAuth                       ResourceTypeID = "neon-auth"
	ResourceTypeIDNeonAuthDomain                 ResourceTypeID = "neon-auth-domain"
	ResourceTypeIDNeonAuthOAuthProvider          ResourceTypeID = "neon-auth-oauth-provider"
	ResourceTypeIDNeonBranch                     ResourceTypeID = "neon-branch"
	ResourceTypeIDNeonBucket                     ResourceTypeID = "neon-bucket"
	ResourceTypeIDNeonCredential                 ResourceTypeID = "neon-credential"
	ResourceTypeIDNeonDataAPI                    ResourceTypeID = "neon-data-api"
	ResourceTypeIDNeonDatabase                   ResourceTypeID = "neon-database"
	ResourceTypeIDNeonEndpoint                   ResourceTypeID = "neon-endpoint"
	ResourceTypeIDNeonFunction                   ResourceTypeID = "neon-function"
	ResourceTypeIDNeonProject                    ResourceTypeID = "neon-project"
	ResourceTypeIDNeonRole                       ResourceTypeID = "neon-role"
	ResourceTypeIDNeonSnapshot                   ResourceTypeID = "neon-snapshot"
	ResourceTypeIDNeptuneCluster                 ResourceTypeID = "neptune-cluster"
	ResourceTypeIDNetlifyBuildHook               ResourceTypeID = "netlify-build-hook"
	ResourceTypeIDNetlifyDeploy                  ResourceTypeID = "netlify-deploy"
	ResourceTypeIDNetlifyDNSRecord               ResourceTypeID = "netlify-dns-record"
	ResourceTypeIDNetlifyDNSZone                 ResourceTypeID = "netlify-dns-zone"
	ResourceTypeIDNetlifyEnvVar                  ResourceTypeID = "netlify-env-var"
	ResourceTypeIDNetlifyForm                    ResourceTypeID = "netlify-form"
	ResourceTypeIDNetlifySite                    ResourceTypeID = "netlify-site"
	ResourceTypeIDNetwork                        ResourceTypeID = "network"
	ResourceTypeIDNfsShare                       ResourceTypeID = "nfs-share"
	ResourceTypeIDNotificationPolicy             ResourceTypeID = "notification-policy"
	ResourceTypeIDObjectStorageBucket            ResourceTypeID = "object-storage-bucket"
	ResourceTypeIDOpensearchCluster              ResourceTypeID = "opensearch-cluster"
	ResourceTypeIDOpensearchDomain               ResourceTypeID = "opensearch-domain"
	ResourceTypeIDOrganizationUser               ResourceTypeID = "organization-user"
	ResourceTypeIDPageRule                       ResourceTypeID = "page-rule"
	ResourceTypeIDPgDatabase                     ResourceTypeID = "pg-database"
	ResourceTypeIDPgSchema                       ResourceTypeID = "pg-schema"
	ResourceTypeIDPlacementGroup                 ResourceTypeID = "placement-group"
	ResourceTypeIDPrediction                     ResourceTypeID = "prediction"
	ResourceTypeIDPrimaryIP                      ResourceTypeID = "primary-ip"
	ResourceTypeIDPrivateNetwork                 ResourceTypeID = "private-network"
	ResourceTypeIDProject                        ResourceTypeID = "project"
	ResourceTypeIDProjectAPIKey                  ResourceTypeID = "project-api-key"
	ResourceTypeIDPronunciationDict              ResourceTypeID = "pronunciation-dict"
	ResourceTypeIDPronunciationDictionary        ResourceTypeID = "pronunciation-dictionary"
	ResourceTypeIDProvider                       ResourceTypeID = "provider"
	ResourceTypeIDPsBackup                       ResourceTypeID = "ps-backup"
	ResourceTypeIDPsBranch                       ResourceTypeID = "ps-branch"
	ResourceTypeIDPsDatabase                     ResourceTypeID = "ps-database"
	ResourceTypeIDPsDeployRequest                ResourceTypeID = "ps-deploy-request"
	ResourceTypeIDPsPassword                     ResourceTypeID = "ps-password"
	ResourceTypeIDPubsubSubscription             ResourceTypeID = "pubsub-subscription"
	ResourceTypeIDPubsubTopic                    ResourceTypeID = "pubsub-topic"
	ResourceTypeIDQueue                          ResourceTypeID = "queue"
	ResourceTypeIDQuota                          ResourceTypeID = "quota"
	ResourceTypeIDR2Bucket                       ResourceTypeID = "r2-bucket"
	ResourceTypeIDRateLimitRule                  ResourceTypeID = "rate-limit-rule"
	ResourceTypeIDRdbInstance                    ResourceTypeID = "rdb-instance"
	ResourceTypeIDRdsCluster                     ResourceTypeID = "rds-cluster"
	ResourceTypeIDRdsInstance                    ResourceTypeID = "rds-instance"
	ResourceTypeIDRedirectRule                   ResourceTypeID = "redirect-rule"
	ResourceTypeIDRedisInstance                  ResourceTypeID = "redis-instance"
	ResourceTypeIDRedshiftCluster                ResourceTypeID = "redshift-cluster"
	ResourceTypeIDReservedIP                     ResourceTypeID = "reserved-ip"
	ResourceTypeIDRouteTable                     ResourceTypeID = "route-table"
	ResourceTypeIDRoute53HealthCheck             ResourceTypeID = "route53-health-check"
	ResourceTypeIDRoute53HostedZone              ResourceTypeID = "route53-hosted-zone"
	ResourceTypeIDRoute53RecordSet               ResourceTypeID = "route53-record-set"
	ResourceTypeIDS3Bucket                       ResourceTypeID = "s3-bucket"
	ResourceTypeIDSagemakerEndpoint              ResourceTypeID = "sagemaker-endpoint"
	ResourceTypeIDSecret                         ResourceTypeID = "secret"
	ResourceTypeIDSecretManagerSecret            ResourceTypeID = "secret-manager-secret"
	ResourceTypeIDSecretsManagerSecret           ResourceTypeID = "secrets-manager-secret"
	ResourceTypeIDSecurityGroup                  ResourceTypeID = "security-group"
	ResourceTypeIDServer                         ResourceTypeID = "server"
	ResourceTypeIDSnapshot                       ResourceTypeID = "snapshot"
	ResourceTypeIDSnsTopic                       ResourceTypeID = "sns-topic"
	ResourceTypeIDSpacesBucket                   ResourceTypeID = "spaces-bucket"
	ResourceTypeIDSpannerBackup                  ResourceTypeID = "spanner-backup"
	ResourceTypeIDSpannerDatabase                ResourceTypeID = "spanner-database"
	ResourceTypeIDSpannerInstance                ResourceTypeID = "spanner-instance"
	ResourceTypeIDSpectrumApplication            ResourceTypeID = "spectrum-application"
	ResourceTypeIDSqsQueue                       ResourceTypeID = "sqs-queue"
	ResourceTypeIDSSHKey                         ResourceTypeID = "ssh-key"
	ResourceTypeIDSSHTarget                      ResourceTypeID = "ssh-target"
	ResourceTypeIDSSLCertificate                 ResourceTypeID = "ssl-certificate"
	ResourceTypeIDSsmParameter                   ResourceTypeID = "ssm-parameter"
	ResourceTypeIDStaticIP                       ResourceTypeID = "static-ip"
	ResourceTypeIDStepFunction                   ResourceTypeID = "step-function"
	ResourceTypeIDSubnet                         ResourceTypeID = "subnet"
	ResourceTypeIDSupervisedFineTuningJob        ResourceTypeID = "supervised-fine-tuning-job"
	ResourceTypeIDTargetGroup                    ResourceTypeID = "target-group"
	ResourceTypeIDTraining                       ResourceTypeID = "training"
	ResourceTypeIDTranscript                     ResourceTypeID = "transcript"
	ResourceTypeIDTranscription                  ResourceTypeID = "transcription"
	ResourceTypeIDTransformation                 ResourceTypeID = "transformation"
	ResourceTypeIDTunedModel                     ResourceTypeID = "tuned-model"
	ResourceTypeIDTunnel                         ResourceTypeID = "tunnel"
	ResourceTypeIDTurnstileWidget                ResourceTypeID = "turnstile-widget"
	ResourceTypeIDTursoAPIToken                  ResourceTypeID = "turso-api-token"
	ResourceTypeIDTursoDatabase                  ResourceTypeID = "turso-database"
	ResourceTypeIDTursoDatabaseInstance          ResourceTypeID = "turso-database-instance"
	ResourceTypeIDTursoGroup                     ResourceTypeID = "turso-group"
	ResourceTypeIDTursoLocation                  ResourceTypeID = "turso-location"
	ResourceTypeIDTursoOrganizationInvite        ResourceTypeID = "turso-organization-invite"
	ResourceTypeIDTursoOrganizationMember        ResourceTypeID = "turso-organization-member"
	ResourceTypeIDUploadPreset                   ResourceTypeID = "upload-preset"
	ResourceTypeIDVectorStore                    ResourceTypeID = "vector-store"
	ResourceTypeIDVectorizeIndex                 ResourceTypeID = "vectorize-index"
	ResourceTypeIDVercelDeployment               ResourceTypeID = "vercel-deployment"
	ResourceTypeIDVercelDomain                   ResourceTypeID = "vercel-domain"
	ResourceTypeIDVercelEnvVar                   ResourceTypeID = "vercel-env-var"
	ResourceTypeIDVercelProject                  ResourceTypeID = "vercel-project"
	ResourceTypeIDVercelTeam                     ResourceTypeID = "vercel-team"
	ResourceTypeIDVertexAiEndpoint               ResourceTypeID = "vertex-ai-endpoint"
	ResourceTypeIDVertexGeminiModel              ResourceTypeID = "vertex-gemini-model"
	ResourceTypeIDVocabulary                     ResourceTypeID = "vocabulary"
	ResourceTypeIDVoice                          ResourceTypeID = "voice"
	ResourceTypeIDVolume                         ResourceTypeID = "volume"
	ResourceTypeIDVpc                            ResourceTypeID = "vpc"
	ResourceTypeIDVpcNetwork                     ResourceTypeID = "vpc-network"
	ResourceTypeIDWafWebACL                      ResourceTypeID = "waf-web-acl"
	ResourceTypeIDWaitingRoom                    ResourceTypeID = "waiting-room"
	ResourceTypeIDWorker                         ResourceTypeID = "worker"
	ResourceTypeIDWorkerRoute                    ResourceTypeID = "worker-route"
	ResourceTypeIDWorkersAiModel                 ResourceTypeID = "workers-ai-model"
	ResourceTypeIDWorkflow                       ResourceTypeID = "workflow"
	ResourceTypeIDWorkspace                      ResourceTypeID = "workspace"
	ResourceTypeIDZone                           ResourceTypeID = "zone"
)

The values ResourceTypeID takes.

type ResourceTypeSummary

type ResourceTypeSummary struct {
	ID                    string                             `json:"id"`
	DisplayName           string                             `json:"displayName"`
	PluralDisplayName     *string                            `json:"pluralDisplayName,omitempty"`
	ParentTypeID          *string                            `json:"parentTypeId,omitempty"`
	SupportsCreate        bool                               `json:"supportsCreate"`
	AttachTargets         []ResourceTypeSummaryAttachTargets `json:"attachTargets,omitempty"`
	IsSSHHost             *bool                              `json:"isSshHost,omitempty"`
	SSHTunnelAttachSource *bool                              `json:"sshTunnelAttachSource,omitempty"`
	// Schedulable: The type declares lifecycle start/stop actions, so its
	// resources can carry a sleep/wake schedule.
	Schedulable *bool `json:"schedulable,omitempty"`
}

ResourceTypeSummary is the `ResourceTypeSummary` schema.

type ResourceTypeSummaryAttachTargets

type ResourceTypeSummaryAttachTargets struct {
	PluginID       string  `json:"pluginId"`
	ResourceTypeID string  `json:"resourceTypeId"`
	MatchField     *string `json:"matchField,omitempty"`
	Verb           *string `json:"verb,omitempty"`
}

ResourceTypeSummaryAttachTargets is an object the spec declares inline.

type ResourcesAttachParams

type ResourcesAttachParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body AttachRequest
}

ResourcesAttachParams holds the parameters for `client.resources.attach`.

type ResourcesCreateConfigParams

type ResourcesCreateConfigParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateConfigRequest
}

ResourcesCreateConfigParams holds the parameters for `client.resources.createConfig`.

type ResourcesCreateCostEstimateParams

type ResourcesCreateCostEstimateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateCostEstimateRequest
}

ResourcesCreateCostEstimateParams holds the parameters for `client.resources.createCostEstimate`.

type ResourcesCreateCostEstimateResponse

type ResourcesCreateCostEstimateResponse struct {
	Estimate JSONObject `json:"estimate"`
}

ResourcesCreateCostEstimateResponse is an object the spec declares inline.

type ResourcesCreateParams

type ResourcesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreateResourceRequest
}

ResourcesCreateParams holds the parameters for `client.resources.create`.

type ResourcesCreatePricingParams

type ResourcesCreatePricingParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body CreatePricingRequest
}

ResourcesCreatePricingParams holds the parameters for `client.resources.createPricing`.

type ResourcesDeleteParams

type ResourcesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID            *string
	PluginID         PluginID
	TypeID           ResourceTypeID
	ResourceID       ResourceID
	AccountID        string
	ParentResourceID *ResourceID
}

ResourcesDeleteParams holds the parameters for `client.resources.delete`.

type ResourcesDescribeParams

type ResourcesDescribeParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body DescribeRequest
}

ResourcesDescribeParams holds the parameters for `client.resources.describe`.

type ResourcesDetailParams

type ResourcesDetailParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID            *string
	PluginID         PluginID
	TypeID           ResourceTypeID
	ResourceID       ResourceID
	AccountID        *string
	ParentResourceID *ResourceID
	// IncludePeerPanes: Default true. If false, peer panes are returned as
	// stubs.
	//
	// One of "true", "false".
	IncludePeerPanes *string
}

ResourcesDetailParams holds the parameters for `client.resources.detail`.

type ResourcesExportCredentialParams

type ResourcesExportCredentialParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body ExportCredentialRequest
}

ResourcesExportCredentialParams holds the parameters for `client.resources.exportCredential`.

type ResourcesFieldActionParams

type ResourcesFieldActionParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body FieldActionRequest
}

ResourcesFieldActionParams holds the parameters for `client.resources.fieldAction`.

type ResourcesImportYAMLParams

type ResourcesImportYAMLParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	// Body: the JSON request body.
	Body ImportYAMLRequest
}

ResourcesImportYAMLParams holds the parameters for `client.resources.importYaml`.

type ResourcesInvokeActionParams

type ResourcesInvokeActionParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body InvokeActionRequest
}

ResourcesInvokeActionParams holds the parameters for `client.resources.invokeAction`.

type ResourcesLogsParams

type ResourcesLogsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body LogsRequest
}

ResourcesLogsParams holds the parameters for `client.resources.logs`.

type ResourcesManifestCreateParams

type ResourcesManifestCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body ApplyManifestRequest
}

ResourcesManifestCreateParams holds the parameters for `client.resources.manifest.create`.

type ResourcesManifestGetParams

type ResourcesManifestGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID            *string
	PluginID         PluginID
	TypeID           ResourceTypeID
	ResourceID       ResourceID
	AccountID        string
	ParentResourceID *ResourceID
}

ResourcesManifestGetParams holds the parameters for `client.resources.manifest.get`.

type ResourcesManifestNamespace

type ResourcesManifestNamespace struct {
	// contains filtered or unexported fields
}

ResourcesManifestNamespace is `client.resources.manifest`.

func (*ResourcesManifestNamespace) Create

Create: Apply an edited manifest to a resource

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/manifest

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesManifestNamespace) Get

Get: Fetch the raw manifest (YAML/JSON) for a resource

_Requires permission: `resources:read`._

GET /api/org/{orgId}/resources/{pluginId}/{typeId}/manifest

Raises on 400: Bad request

Raises on 404: Not found

type ResourcesMetricsParams

type ResourcesMetricsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body MetricsRequest
}

ResourcesMetricsParams holds the parameters for `client.resources.metrics`.

type ResourcesNamespace

type ResourcesNamespace struct {

	// Manifest: `client.resources.manifest`.
	Manifest *ResourcesManifestNamespace
	// SecretVersions: `client.resources.secretVersions`.
	SecretVersions *ResourcesSecretVersionsNamespace
	// contains filtered or unexported fields
}

ResourcesNamespace is `client.resources`.

func (*ResourcesNamespace) Attach

func (n *ResourcesNamespace) Attach(ctx context.Context, params ResourcesAttachParams, opts ...RequestOption) (*OK, error)

Attach: Attach a resource onto another (e.g. disk → VM)

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/attach

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) Create

Create: Create a new resource via its plugin

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/create

Raises on 400: Bad request

Raises on 404: Not found

Raises on 422: Blocked by the organization's tag policy: the submitted fields are missing a required tag (or carry a disallowed value). Retry with the `x-tag-policy-override: true` header if you hold `tag-policy:override`; both blocks and overrides are audit-logged.

func (*ResourcesNamespace) CreateConfig

CreateConfig: Get the dynamic create form for a resource type

Calls the plugin's `getCreateConfig`. The returned `CreateResourceConfig` is plugin-shaped — see `JsonObject`.

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/create-config

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) CreateCostEstimate

CreateCostEstimate: Cost estimate for the current create form values

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/create-cost-estimate

func (*ResourcesNamespace) CreatePricing

CreatePricing: Pricing per size for a create form

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/create-pricing

func (*ResourcesNamespace) Delete

func (n *ResourcesNamespace) Delete(ctx context.Context, params ResourcesDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a resource via the plugin

_Requires permission: `resources:delete`._

DELETE /api/org/{orgId}/resources/{pluginId}/{typeId}

Raises on 400: Bad request

Raises on 404: Not found

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

func (*ResourcesNamespace) Describe

Describe: Get human-readable describe text for a resource

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/describe

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) Detail

Detail: Full resource detail page payload

Performs a live `listResources` against the provider, falls back to DB on failure, and returns the plugin's `renderDetail` schema plus host-derived flags (SQL/KV/SSH availability, child resources, peer panes, etc).

_Requires permission: `resources:read`._

GET /api/org/{orgId}/resources/{pluginId}/{typeId}/detail

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) ExportCredential

ExportCredential: Export a credential file for a resource (one-time reveal)

_Requires permission: `secrets:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/export-credential

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) FieldAction

FieldAction: Execute an in-form field action (e.g. generate an IAM role)

Calls the plugin's `executeFieldAction`. Returns `{ value }` to assign to the field; for `select` fields the optional `option` should be spliced into the options list so the new value can be displayed.

POST /api/org/{orgId}/resources/field-action

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) ImportYAML

ImportYAML: Bulk-import resources from YAML (kubectl apply -f equivalent)

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/{pluginId}/import-yaml

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) InvokeAction

func (n *ResourcesNamespace) InvokeAction(ctx context.Context, params ResourcesInvokeActionParams, opts ...RequestOption) (*OK, error)

InvokeAction: Invoke a plugin-defined action on a resource

Actions the plugin marks `destructive: true` in its detail schema are blocked with `423` while an org change freeze is in effect.

_Requires permission: `resources:write`._

POST /api/org/{orgId}/resources/invoke-action

Raises on 400: Bad request

Raises on 404: Not found

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

func (*ResourcesNamespace) Logs

Logs: Fetch logs for a resource

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/logs

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) Metrics

Metrics: Fetch metric series for a resource

Historical points from the metrics store when the resource has accumulated any (resources pinned to a dashboard are polled continuously); otherwise the series are fetched live from the provider on demand.

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/metrics

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) NoSQLCommand

NoSQLCommand: Run a NoSQL document-browser command (e.g. MongoDB shell)

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/resources/nosql-command

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesNamespace) PeerPanes

func (n *ResourcesNamespace) PeerPanes(ctx context.Context, params ResourcesPeerPanesParams, opts ...RequestOption) ([]PeerPane, error)

PeerPanes: Lazy-fetch peer-integration panes for a resource

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/peer-panes

Raises on 404: Not found

func (*ResourcesNamespace) PickerResources

PickerResources: Fetch options for a `resource-picker` field

_Requires permission: `resources:read`._

POST /api/org/{orgId}/resources/picker-resources

func (*ResourcesNamespace) Update

Update: Update a resource via its plugin

Applies the supplied field changes upstream and persists the refreshed fields/display name to the DB. The body's `fields` map only carries the keys the caller actually changed. Blocked with `423` while an org change freeze is in effect (this is also the path that applies right-sizing recommendations); every applied update is audit-logged.

POST /api/org/{orgId}/resources/update

Raises on 400: Bad request

Raises on 404: Not found

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

type ResourcesNoSQLCommandParams

type ResourcesNoSQLCommandParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body NoSQLCommandRequest
}

ResourcesNoSQLCommandParams holds the parameters for `client.resources.nosqlCommand`.

type ResourcesNoSqlcommandResponse

type ResourcesNoSqlcommandResponse struct {
	Result JSONObject `json:"result"`
}

ResourcesNoSqlcommandResponse is an object the spec declares inline.

type ResourcesPeerPanesParams

type ResourcesPeerPanesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body PeerPanesRequest
}

ResourcesPeerPanesParams holds the parameters for `client.resources.peerPanes`.

type ResourcesPickerResourcesParams

type ResourcesPickerResourcesParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body PickerResourcesRequest
}

ResourcesPickerResourcesParams holds the parameters for `client.resources.pickerResources`.

type ResourcesSecretVersionsAccessParams

type ResourcesSecretVersionsAccessParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body SecretAccessRequest
}

ResourcesSecretVersionsAccessParams holds the parameters for `client.resources.secretVersions.access`.

type ResourcesSecretVersionsAddParams

type ResourcesSecretVersionsAddParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body SecretAddRequest
}

ResourcesSecretVersionsAddParams holds the parameters for `client.resources.secretVersions.add`.

type ResourcesSecretVersionsGetParams

type ResourcesSecretVersionsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID            *string
	PluginID         PluginID
	TypeID           ResourceTypeID
	ResourceID       ResourceID
	AccountID        string
	ParentResourceID *ResourceID
}

ResourcesSecretVersionsGetParams holds the parameters for `client.resources.secretVersions.get`.

type ResourcesSecretVersionsModifyParams

type ResourcesSecretVersionsModifyParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID    *string
	PluginID PluginID
	TypeID   ResourceTypeID
	// Body: the JSON request body.
	Body SecretModifyRequest
}

ResourcesSecretVersionsModifyParams holds the parameters for `client.resources.secretVersions.modify`.

type ResourcesSecretVersionsNamespace

type ResourcesSecretVersionsNamespace struct {
	// contains filtered or unexported fields
}

ResourcesSecretVersionsNamespace is `client.resources.secretVersions`.

func (*ResourcesSecretVersionsNamespace) Access

Access: Reveal the plaintext value of a specific version (one-time)

_Requires permission: `secrets:read`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/secret-versions/access

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesSecretVersionsNamespace) Add

Add: Add a new secret version

_Requires permission: `secrets:write`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/secret-versions/add

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesSecretVersionsNamespace) Get

Get: List secret versions for a versioned-secret resource

_Requires permission: `secrets:read`._

GET /api/org/{orgId}/resources/{pluginId}/{typeId}/secret-versions

Raises on 400: Bad request

Raises on 404: Not found

func (*ResourcesSecretVersionsNamespace) Modify

Modify: Enable/disable/destroy a secret version

_Requires permission: `secrets:write`._

POST /api/org/{orgId}/resources/{pluginId}/{typeId}/secret-versions/modify

Raises on 400: Bad request

Raises on 404: Not found

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

type ResourcesUpdateParams

type ResourcesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body UpdateResourceRequest
}

ResourcesUpdateParams holds the parameters for `client.resources.update`.

type RightsizingGetParams added in v0.29.0

type RightsizingGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Refresh: Bypass the short server-side cache and recompute now.
	//
	// One of "true", "false".
	Refresh *string
}

RightsizingGetParams holds the parameters for `client.rightsizing.get`.

Every field is optional; pass nil to take the defaults.

type RightsizingListResponse added in v0.29.0

type RightsizingListResponse struct {
	// Accounts: Groups sorted by account name.
	Accounts   []OversizedAccountGroup `json:"accounts"`
	TotalCount int64                   `json:"totalCount"`
	// WindowDays: Days of stored metrics the percentiles cover.
	WindowDays  int64  `json:"windowDays"`
	GeneratedAt string `json:"generatedAt"`
}

RightsizingListResponse is the `RightsizingListResponse` schema.

type RightsizingNamespace added in v0.29.0

type RightsizingNamespace struct {
	// contains filtered or unexported fields
}

RightsizingNamespace is `client.rightsizing`.

func (*RightsizingNamespace) Get added in v0.29.0

Get: List oversized resources with resize recommendations

Computes p95 CPU/memory utilisation over the last 14 days of stored metrics for every resource whose plugin declares right-sizing support, and matches under-utilised ones against the plugin's real size catalog (the create form's size options, live-priced). Each recommendation names the cheapest smaller size that still clears a headroom margin and quotes the monthly saving. Apply one by submitting `sizeFieldKey` with the recommended size id through the resource-update endpoint — which enforces change freezes and writes the audit trail. Results are cached for a few minutes; pass `refresh=true` to recompute.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/rightsizing

type Role

type Role struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Description *string      `json:"description"`
	IsSystem    bool         `json:"isSystem"`
	SystemKey   *string      `json:"systemKey"`
	Permissions []Permission `json:"permissions"`
}

Role is the `Role` schema.

type RoleChangeRequest

type RoleChangeRequest struct {
	Role   *OrganizationRole `json:"role,omitempty"`
	RoleID *string           `json:"roleId,omitempty"`
}

RoleChangeRequest is the `RoleChangeRequest` schema.

type RoleCreateRequest

type RoleCreateRequest struct {
	Name        string       `json:"name"`
	Description *string      `json:"description,omitempty"`
	Permissions []Permission `json:"permissions"`
}

RoleCreateRequest is the `RoleCreateRequest` schema.

type RoleSummary

type RoleSummary struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
	IsSystem    bool    `json:"isSystem"`
	SystemKey   *string `json:"systemKey"`
}

RoleSummary is the `RoleSummary` schema.

The API may send null in its place.

type RoleUpdateRequest

type RoleUpdateRequest struct {
	Name        *string      `json:"name,omitempty"`
	Description *string      `json:"description,omitempty"`
	Permissions []Permission `json:"permissions,omitempty"`
}

RoleUpdateRequest is the `RoleUpdateRequest` schema.

type SFTPDeleteParams

type SFTPDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SFTPDeleteRequest
}

SFTPDeleteParams holds the parameters for `client.sftp.delete`.

type SFTPDeleteRequest

type SFTPDeleteRequest struct {
	AccountID   string  `json:"accountId"`
	Path        string  `json:"path"`
	SSHKeyID    *string `json:"sshKeyId,omitempty"`
	SSHHost     *string `json:"sshHost,omitempty"`
	SSHUsername *string `json:"sshUsername,omitempty"`
	IsDir       bool    `json:"isDir"`
}

SFTPDeleteRequest is the `SftpDeleteRequest` schema.

Spec schema: `SftpDeleteRequest`.

type SFTPDownloadParams

type SFTPDownloadParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID     *string
	AccountID string
	// Paths: JSON-encoded array of remote paths
	Paths       string
	BasePath    *string
	SSHKeyID    *string
	SSHHost     *string
	SSHUsername *string
}

SFTPDownloadParams holds the parameters for `client.sftp.download`.

type SFTPEntry

type SFTPEntry struct {
	// Key: Absolute remote path.
	Key          string  `json:"key"`
	Name         string  `json:"name"`
	Size         float64 `json:"size"`
	LastModified string  `json:"lastModified"`
	IsDirectory  bool    `json:"isDirectory"`
	ContentType  *string `json:"contentType,omitempty"`
}

SFTPEntry is the `SftpEntry` schema.

Spec schema: `SftpEntry`.

type SFTPListParams

type SFTPListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SFTPListRequest
}

SFTPListParams holds the parameters for `client.sftp.list`.

type SFTPListRequest

type SFTPListRequest struct {
	AccountID   string  `json:"accountId"`
	Path        string  `json:"path"`
	SSHKeyID    *string `json:"sshKeyId,omitempty"`
	SSHHost     *string `json:"sshHost,omitempty"`
	SSHUsername *string `json:"sshUsername,omitempty"`
}

SFTPListRequest is the `SftpListRequest` schema.

Spec schema: `SftpListRequest`.

type SFTPMkdirParams

type SFTPMkdirParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SFTPPathRequest
}

SFTPMkdirParams holds the parameters for `client.sftp.mkdir`.

type SFTPNamespace

type SFTPNamespace struct {
	// contains filtered or unexported fields
}

SFTPNamespace is `client.sftp`.

func (*SFTPNamespace) Delete

func (n *SFTPNamespace) Delete(ctx context.Context, params SFTPDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a file or directory over SFTP

_Requires permission: `storage:write`._

POST /api/org/{orgId}/sftp/delete

Raises on 404: Not found

Raises on 500: Server error

func (*SFTPNamespace) Download

func (n *SFTPNamespace) Download(ctx context.Context, params SFTPDownloadParams, opts ...RequestOption) (io.ReadCloser, error)

Download: Download one or many files via SFTP (zipped if more than one)

_Requires permission: `storage:read`._

GET /api/org/{orgId}/v1/sftp/download

Raises on 400: Bad request

Raises on 404: Not found

Raises on 500: Server error

func (*SFTPNamespace) List

func (n *SFTPNamespace) List(ctx context.Context, params SFTPListParams, opts ...RequestOption) ([]SFTPEntry, error)

List: List a directory over SFTP

_Requires permission: `storage:read`._

POST /api/org/{orgId}/sftp/list

Raises on 404: Not found

Raises on 500: Server error

func (*SFTPNamespace) Mkdir

func (n *SFTPNamespace) Mkdir(ctx context.Context, params SFTPMkdirParams, opts ...RequestOption) (*OK, error)

Mkdir: Create a directory over SFTP

_Requires permission: `storage:write`._

POST /api/org/{orgId}/sftp/mkdir

Raises on 404: Not found

Raises on 500: Server error

func (*SFTPNamespace) Upload

func (n *SFTPNamespace) Upload(ctx context.Context, params SFTPUploadParams, opts ...RequestOption) (*OK, error)

Upload: Upload a file via SFTP

_Requires permission: `storage:write`._

POST /api/org/{orgId}/v1/sftp/upload

Raises on 400: Bad request

Raises on 404: Not found

type SFTPPathRequest

type SFTPPathRequest struct {
	AccountID   string  `json:"accountId"`
	Path        string  `json:"path"`
	SSHKeyID    *string `json:"sshKeyId,omitempty"`
	SSHHost     *string `json:"sshHost,omitempty"`
	SSHUsername *string `json:"sshUsername,omitempty"`
}

SFTPPathRequest is the `SftpPathRequest` schema.

Spec schema: `SftpPathRequest`.

type SFTPUploadForm

type SFTPUploadForm struct {
	AccountID   string    `json:"accountId"`
	RemotePath  string    `json:"remotePath"`
	File        io.Reader `json:"file"`
	SSHKeyID    *string   `json:"sshKeyId,omitempty"`
	SSHHost     *string   `json:"sshHost,omitempty"`
	SSHUsername *string   `json:"sshUsername,omitempty"`
}

SFTPUploadForm is the `SftpUploadForm` schema.

Spec schema: `SftpUploadForm`.

type SFTPUploadParams

type SFTPUploadParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: sent as `multipart/form-data`; the `io.Reader` field is the file.
	Body SFTPUploadForm
}

SFTPUploadParams holds the parameters for `client.sftp.upload`.

type SQLEstimateParams

type SQLEstimateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SQLEstimateRequest
}

SQLEstimateParams holds the parameters for `client.sql.estimate`.

type SQLEstimateRequest

type SQLEstimateRequest struct {
	AccountID  string     `json:"accountId"`
	ResourceID ResourceID `json:"resourceId"`
	SQL        string     `json:"sql"`
}

SQLEstimateRequest is the `SqlEstimateRequest` schema.

Spec schema: `SqlEstimateRequest`.

type SQLExecuteParams

type SQLExecuteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SQLExecuteRequest
}

SQLExecuteParams holds the parameters for `client.sql.execute`.

type SQLExecuteRequest

type SQLExecuteRequest struct {
	AccountID      string      `json:"accountId"`
	ResourceID     *ResourceID `json:"resourceId,omitempty"`
	ResourceTypeID *string     `json:"resourceTypeId,omitempty"`
	SQL            string      `json:"sql"`
	Params         []any       `json:"params,omitempty"`
}

SQLExecuteRequest is the `SqlExecuteRequest` schema.

Spec schema: `SqlExecuteRequest`.

type SQLExecuteResponse

type SQLExecuteResponse struct {
	AffectedRows int64 `json:"affectedRows"`
}

SQLExecuteResponse is the `SqlExecuteResponse` schema.

Spec schema: `SqlExecuteResponse`.

type SQLNamespace

type SQLNamespace struct {
	// contains filtered or unexported fields
}

SQLNamespace is `client.sql`.

func (*SQLNamespace) Estimate

func (n *SQLNamespace) Estimate(ctx context.Context, params SQLEstimateParams, opts ...RequestOption) (JSONObject, error)

Estimate: Dry-run cost estimate (e.g. BigQuery byte scan)

_Requires permission: `resources:read`._

POST /api/org/{orgId}/sql/estimate

Raises on 400: Bad request

Raises on 404: Not found

func (*SQLNamespace) Execute

func (n *SQLNamespace) Execute(ctx context.Context, params SQLExecuteParams, opts ...RequestOption) (*SQLExecuteResponse, error)

Execute: Run an INSERT/UPDATE/DELETE/DDL statement

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/sql/execute

Raises on 400: Bad request

Raises on 404: Not found

func (*SQLNamespace) Query

func (n *SQLNamespace) Query(ctx context.Context, params SQLQueryParams, opts ...RequestOption) (any, error)

Query: Run a read-only SQL query

Routes to the right driver: REST `executeQuery` (BigQuery, Databricks), per-resource SQL driver (Neon, Turso) or account-level SQL driver (Postgres, MySQL).

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/sql/query

Raises on 400: Bad request

Raises on 404: Not found

type SQLQueryParams

type SQLQueryParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SQLQueryRequest
}

SQLQueryParams holds the parameters for `client.sql.query`.

type SQLQueryRequest

type SQLQueryRequest struct {
	AccountID      string      `json:"accountId"`
	ResourceID     *ResourceID `json:"resourceId,omitempty"`
	ResourceTypeID *string     `json:"resourceTypeId,omitempty"`
	SQL            string      `json:"sql"`
}

SQLQueryRequest is the `SqlQueryRequest` schema.

Spec schema: `SqlQueryRequest`.

type SQLQueryResponse

type SQLQueryResponse struct {
	Rows       []JSONObject `json:"rows"`
	DurationMs *int64       `json:"durationMs,omitempty"`
}

SQLQueryResponse is the `SqlQueryResponse` schema.

Spec schema: `SqlQueryResponse`.

type SSHExecRequest

type SSHExecRequest struct {
	SSHHost  string `json:"sshHost"`
	SSHPort  int64  `json:"sshPort"`
	SSHUser  string `json:"sshUser"`
	SSHKeyID string `json:"sshKeyId"`
	Command  string `json:"command"`
}

SSHExecRequest is the `SshExecRequest` schema.

Spec schema: `SshExecRequest`.

type SSHExecResponse

type SSHExecResponse struct {
	Stdout string  `json:"stdout"`
	Stderr *string `json:"stderr,omitempty"`
	Code   int64   `json:"code"`
}

SSHExecResponse is the `SshExecResponse` schema.

Spec schema: `SshExecResponse`.

type SSHFanoutHostResult added in v0.30.0

type SSHFanoutHostResult struct {
	// Kind: One of "account", "resource".
	Kind     string `json:"kind"`
	TargetID string `json:"targetId"`
	Label    string `json:"label"`
	// Status: One of "done", "error", "blocked".
	Status       string                           `json:"status"`
	ExitCode     *int64                           `json:"exitCode"`
	Stdout       string                           `json:"stdout"`
	Stderr       string                           `json:"stderr"`
	Error        *string                          `json:"error,omitempty"`
	DurationMs   float64                          `json:"durationMs"`
	HostKeyTrust *SshfanoutHostResultHostKeyTrust `json:"hostKeyTrust,omitempty"`
}

SSHFanoutHostResult is the `SshFanoutHostResult` schema.

Spec schema: `SshFanoutHostResult`.

type SSHFanoutNamespace added in v0.30.0

type SSHFanoutNamespace struct {

	// Snippets: `client.sshFanout.snippets`.
	Snippets *SSHFanoutSnippetsNamespace
	// contains filtered or unexported fields
}

SSHFanoutNamespace is `client.sshFanout`.

func (*SSHFanoutNamespace) Run added in v0.30.0

Run: Run one command across many SSH hosts

Executes the command on every selected target under a concurrency cap (default 8, max 16). Per-host results carry stdout, stderr, and exit code; transport failures (unreachable, untrusted host key, blocked internal host) are per-host too. Resource targets need `sshKeyId` (an org SSH key owned by the caller). Blocked with HTTP 423 while a change freeze is in effect; audit-logged.

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/ssh-fanout/run

Raises on 400: Bad request

Raises on 423: Blocked by an active change freeze. Retry with the `x-change-freeze-override: true` header if you hold `freezes:override`; both blocks and overrides are audit-logged.

func (*SSHFanoutNamespace) Targets added in v0.30.0

Targets: List SSH-capable fan-out targets

Every SSH-capable target in the org: `ssh` plugin accounts (native credentials) plus resources whose type declares an sshEndpoint with a resolvable host (EC2 instances, droplets, Hetzner servers, …).

_Requires permission: `resources:read`._

GET /api/org/{orgId}/ssh-fanout/targets

type SSHFanoutRunParams added in v0.30.0

type SSHFanoutRunParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SSHFanoutRunRequest
}

SSHFanoutRunParams holds the parameters for `client.sshFanout.run`.

type SSHFanoutRunRequest added in v0.30.0

type SSHFanoutRunRequest struct {
	Command     string                       `json:"command"`
	Targets     []SshfanoutRunRequestTargets `json:"targets"`
	SSHKeyID    *string                      `json:"sshKeyId,omitempty"`
	Username    *string                      `json:"username,omitempty"`
	Concurrency *int64                       `json:"concurrency,omitempty"`
}

SSHFanoutRunRequest is the `SshFanoutRunRequest` schema.

Spec schema: `SshFanoutRunRequest`.

type SSHFanoutRunResponse added in v0.30.0

type SSHFanoutRunResponse struct {
	Results []SSHFanoutHostResult `json:"results"`
}

SSHFanoutRunResponse is the `SshFanoutRunResponse` schema.

Spec schema: `SshFanoutRunResponse`.

type SSHFanoutSnippetsCreateParams added in v0.30.0

type SSHFanoutSnippetsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SSHSnippetInput
}

SSHFanoutSnippetsCreateParams holds the parameters for `client.sshFanout.snippets.create`.

type SSHFanoutSnippetsDeleteParams added in v0.30.0

type SSHFanoutSnippetsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

SSHFanoutSnippetsDeleteParams holds the parameters for `client.sshFanout.snippets.delete`.

type SSHFanoutSnippetsGetParams added in v0.30.0

type SSHFanoutSnippetsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SSHFanoutSnippetsGetParams holds the parameters for `client.sshFanout.snippets.get`.

Every field is optional; pass nil to take the defaults.

type SSHFanoutSnippetsNamespace added in v0.30.0

type SSHFanoutSnippetsNamespace struct {
	// contains filtered or unexported fields
}

SSHFanoutSnippetsNamespace is `client.sshFanout.snippets`.

func (*SSHFanoutSnippetsNamespace) Create added in v0.30.0

Create: Save a command snippet

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/ssh-fanout/snippets

Raises on 400: Bad request

Raises on 409: Conflict

func (*SSHFanoutSnippetsNamespace) Delete added in v0.30.0

Delete: Delete a saved command snippet

_Requires permission: `resources:execute`._

DELETE /api/org/{orgId}/ssh-fanout/snippets/{id}

Raises on 404: Not found

func (*SSHFanoutSnippetsNamespace) Get added in v0.30.0

Get: List saved command snippets

Org-shared saved commands for reuse from the fan-out screen and CLI.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/ssh-fanout/snippets

func (*SSHFanoutSnippetsNamespace) Update added in v0.30.0

Update: Update a saved command snippet

_Requires permission: `resources:execute`._

PUT /api/org/{orgId}/ssh-fanout/snippets/{id}

Raises on 400: Bad request

Raises on 404: Not found

type SSHFanoutSnippetsUpdateParams added in v0.30.0

type SSHFanoutSnippetsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body SSHSnippetInput
}

SSHFanoutSnippetsUpdateParams holds the parameters for `client.sshFanout.snippets.update`.

type SSHFanoutTarget added in v0.30.0

type SSHFanoutTarget struct {
	// Kind: One of "account", "resource".
	Kind            string   `json:"kind"`
	ID              string   `json:"id"`
	AccountID       string   `json:"accountId"`
	Label           string   `json:"label"`
	PluginID        string   `json:"pluginId"`
	ResourceTypeID  *string  `json:"resourceTypeId,omitempty"`
	Host            *string  `json:"host,omitempty"`
	DefaultUsername *string  `json:"defaultUsername,omitempty"`
	Running         bool     `json:"running"`
	NeedsKey        bool     `json:"needsKey"`
	Tags            []string `json:"tags"`
}

SSHFanoutTarget is the `SshFanoutTarget` schema.

Spec schema: `SshFanoutTarget`.

type SSHFanoutTargetsParams added in v0.30.0

type SSHFanoutTargetsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SSHFanoutTargetsParams holds the parameters for `client.sshFanout.targets`.

Every field is optional; pass nil to take the defaults.

type SSHFanoutTargetsResponse added in v0.30.0

type SSHFanoutTargetsResponse struct {
	Targets []SSHFanoutTarget `json:"targets"`
}

SSHFanoutTargetsResponse is the `SshFanoutTargetsResponse` schema.

Spec schema: `SshFanoutTargetsResponse`.

type SSHKey

type SSHKey struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	KeyType     SSHKeyType `json:"keyType"`
	IsImported  bool       `json:"isImported"`
	Fingerprint *string    `json:"fingerprint"`
	PublicKey   string     `json:"publicKey"`
	UserID      string     `json:"userId"`
	OwnerEmail  string     `json:"ownerEmail"`
	OwnerName   string     `json:"ownerName"`
	CreatedAt   string     `json:"createdAt"`
}

SSHKey is the `SshKey` schema.

Spec schema: `SshKey`.

type SSHKeyType

type SSHKeyType = string

SSHKeyType is the `SshKeyType` schema.

Spec schema: `SshKeyType`.

const (
	SSHKeyTypeSSHRsa                        SSHKeyType = "ssh-rsa"
	SSHKeyTypeSSHEd25519                    SSHKeyType = "ssh-ed25519"
	SSHKeyTypeSSHDss                        SSHKeyType = "ssh-dss"
	SSHKeyTypeEcdsaSha2Nistp256             SSHKeyType = "ecdsa-sha2-nistp256"
	SSHKeyTypeEcdsaSha2Nistp384             SSHKeyType = "ecdsa-sha2-nistp384"
	SSHKeyTypeEcdsaSha2Nistp521             SSHKeyType = "ecdsa-sha2-nistp521"
	SSHKeyTypeSkSSHEd25519OpensshCom        SSHKeyType = "sk-ssh-ed25519@openssh.com"
	SSHKeyTypeSkEcdsaSha2Nistp256OpensshCom SSHKeyType = "sk-ecdsa-sha2-nistp256@openssh.com"
)

The values SSHKeyType takes.

type SSHKeysCreateParams

type SSHKeysCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body GenerateSSHKeyRequest
}

SSHKeysCreateParams holds the parameters for `client.sshKeys.create`.

type SSHKeysDeleteParams

type SSHKeysDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

SSHKeysDeleteParams holds the parameters for `client.sshKeys.delete`.

type SSHKeysImportParams

type SSHKeysImportParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body ImportSSHKeyRequest
}

SSHKeysImportParams holds the parameters for `client.sshKeys.import`.

type SSHKeysListParams

type SSHKeysListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SSHKeysListParams holds the parameters for `client.sshKeys.list`.

Every field is optional; pass nil to take the defaults.

type SSHKeysNamespace

type SSHKeysNamespace struct {
	// contains filtered or unexported fields
}

SSHKeysNamespace is `client.sshKeys`.

func (*SSHKeysNamespace) Create

Create: Generate a new Ed25519 keypair (private key returned once)

_Requires permission: `ssh-keys:write`._

POST /api/org/{orgId}/ssh-keys

Raises on 400: Bad request

func (*SSHKeysNamespace) Delete

func (n *SSHKeysNamespace) Delete(ctx context.Context, params SSHKeysDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete an SSH key (owner only)

_Requires permission: `ssh-keys:write`._

DELETE /api/org/{orgId}/ssh-keys/{id}

func (*SSHKeysNamespace) Import

Import: Import an existing public key

_Requires permission: `ssh-keys:write`._

POST /api/org/{orgId}/ssh-keys/import

Raises on 400: Bad request

func (*SSHKeysNamespace) List

func (n *SSHKeysNamespace) List(ctx context.Context, params *SSHKeysListParams, opts ...RequestOption) ([]SSHKey, error)

List: List org SSH keys

_Requires permission: `ssh-keys:read`._

GET /api/org/{orgId}/ssh-keys

type SSHSnippet added in v0.30.0

type SSHSnippet struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Command     string  `json:"command"`
	Description *string `json:"description"`
	CreatedAt   string  `json:"createdAt"`
	UpdatedAt   string  `json:"updatedAt"`
}

SSHSnippet is the `SshSnippet` schema.

Spec schema: `SshSnippet`.

type SSHSnippetInput added in v0.30.0

type SSHSnippetInput struct {
	Name        string  `json:"name"`
	Command     string  `json:"command"`
	Description *string `json:"description,omitempty"`
}

SSHSnippetInput is the `SshSnippetInput` schema.

Spec schema: `SshSnippetInput`.

type SSHTunnelCreateAccountRequest

type SSHTunnelCreateAccountRequest struct {
	SSHHost     string            `json:"sshHost"`
	SSHPort     int64             `json:"sshPort"`
	SSHUser     string            `json:"sshUser"`
	SSHKeyID    string            `json:"sshKeyId"`
	RemoteHost  string            `json:"remoteHost"`
	RemotePort  int64             `json:"remotePort"`
	PluginID    string            `json:"pluginId"`
	DisplayName string            `json:"displayName"`
	Credentials map[string]string `json:"credentials"`
}

SSHTunnelCreateAccountRequest is the `SshTunnelCreateAccountRequest` schema.

Spec schema: `SshTunnelCreateAccountRequest`.

type SSHTunnelCreateAccountResponse

type SSHTunnelCreateAccountResponse struct {
	AccountID string `json:"accountId"`
}

SSHTunnelCreateAccountResponse is the `SshTunnelCreateAccountResponse` schema.

Spec schema: `SshTunnelCreateAccountResponse`.

type SSHTunnelsActiveParams

type SSHTunnelsActiveParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SSHTunnelsActiveParams holds the parameters for `client.sshTunnels.active`.

Every field is optional; pass nil to take the defaults.

type SSHTunnelsCloseParams

type SSHTunnelsCloseParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SshtunnelsCloseRequest
}

SSHTunnelsCloseParams holds the parameters for `client.sshTunnels.close`.

type SSHTunnelsCreateAccountParams

type SSHTunnelsCreateAccountParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SSHTunnelCreateAccountRequest
}

SSHTunnelsCreateAccountParams holds the parameters for `client.sshTunnels.createAccount`.

type SSHTunnelsExecParams

type SSHTunnelsExecParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SSHExecRequest
}

SSHTunnelsExecParams holds the parameters for `client.sshTunnels.exec`.

type SSHTunnelsNamespace

type SSHTunnelsNamespace struct {
	// contains filtered or unexported fields
}

SSHTunnelsNamespace is `client.sshTunnels`.

func (*SSHTunnelsNamespace) Active

Active: List active tunnels for this org

_Requires permission: `resources:execute`._

GET /api/org/{orgId}/ssh-tunnels/active

func (*SSHTunnelsNamespace) Close

func (n *SSHTunnelsNamespace) Close(ctx context.Context, params SSHTunnelsCloseParams, opts ...RequestOption) (*OK, error)

Close: Close a tunnel by id

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/ssh-tunnels/close

func (*SSHTunnelsNamespace) CreateAccount

CreateAccount: Create an account whose traffic is tunneled over SSH

Verifies the SSH connection works before persisting.

_Requires permission: `accounts:write`._

POST /api/org/{orgId}/ssh-tunnels/create-account

Raises on 400: Bad request

Raises on 404: Not found

func (*SSHTunnelsNamespace) Exec

Exec: Run a command over SSH using an org SSH key

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/ssh-tunnels/exec

Raises on 400: Bad request

Raises on 404: Not found

func (*SSHTunnelsNamespace) Open

Open: Re-open the tunnel for an existing account

_Requires permission: `resources:execute`._

POST /api/org/{orgId}/ssh-tunnels/open

Raises on 404: Not found

type SSHTunnelsOpenParams

type SSHTunnelsOpenParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body SshtunnelsOpenRequest
}

SSHTunnelsOpenParams holds the parameters for `client.sshTunnels.open`.

type ScheduleConflict added in v0.29.0

type ScheduleConflict struct {
	Error string `json:"error"`
}

ScheduleConflict is the `ScheduleConflict` schema.

type ScheduleTransition added in v0.29.0

type ScheduleTransition struct {
	At string `json:"at"`
	// Action: A schedule transition: `stop` powers the resource off, `start`
	// powers it on.
	//
	// One of "stop", "start".
	Action string `json:"action"`
}

ScheduleTransition is the `ScheduleTransition` schema.

type SchedulesCreateParams added in v0.29.0

type SchedulesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *SleepScheduleCreate
}

SchedulesCreateParams holds the parameters for `client.schedules.create`.

Every field is optional; pass nil to take the defaults.

type SchedulesDeleteParams added in v0.29.0

type SchedulesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	ScheduleID string
}

SchedulesDeleteParams holds the parameters for `client.schedules.delete`.

type SchedulesGetParams added in v0.29.0

type SchedulesGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SchedulesGetParams holds the parameters for `client.schedules.get`.

Every field is optional; pass nil to take the defaults.

type SchedulesNamespace added in v0.29.0

type SchedulesNamespace struct {
	// contains filtered or unexported fields
}

SchedulesNamespace is `client.schedules`.

func (*SchedulesNamespace) Create added in v0.29.0

Create: Create a sleep/wake schedule

Attach an off-at/on-at weekly window to a resource. The resource's type must declare lifecycle start/stop actions (see the resource type metadata); one schedule per resource. Times are wall-clock in the given IANA timezone and remain correct across DST. Audit-logged.

_Requires permission: `resources:write`._

POST /api/org/{orgId}/schedules

Raises on 400: Bad request

Raises on 404: Not found

Raises on 409: The resource already has a schedule

func (*SchedulesNamespace) Delete added in v0.29.0

Delete: Delete a schedule

Remove the schedule. The resource is left in whatever state it is in. Audit-logged.

_Requires permission: `resources:write`._

DELETE /api/org/{orgId}/schedules/{scheduleId}

Raises on 404: Not found

func (*SchedulesNamespace) Get added in v0.29.0

Get: List sleep/wake schedules

Every schedule in the organization with its next transition, last run outcome and a projected monthly saving computed from trailing per-resource spend and the weekly off-hours fraction. Schedules attach to resources whose plugin declares lifecycle start/stop actions; the poller executes due transitions server-side.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/schedules

func (*SchedulesNamespace) Preview added in v0.29.0

Preview: Preview a schedule's projected saving

Quote a timing against a resource before saving: the weekly off-hours fraction, the resource's trailing spend normalized to a month, the projected monthly saving, and the next few transitions. Makes no provider API calls and changes nothing.

_Requires permission: `resources:read`._

POST /api/org/{orgId}/schedules/preview

Raises on 400: Bad request

Raises on 404: Not found

func (*SchedulesNamespace) Update added in v0.29.0

Update: Update or pause a schedule

Edit the timing and/or toggle `paused`. Any change recomputes the next transition; pausing clears it. Audit-logged.

_Requires permission: `resources:write`._

PUT /api/org/{orgId}/schedules/{scheduleId}

Raises on 400: Bad request

Raises on 404: Not found

type SchedulesPreviewParams added in v0.29.0

type SchedulesPreviewParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *SleepSchedulePreviewRequest
}

SchedulesPreviewParams holds the parameters for `client.schedules.preview`.

Every field is optional; pass nil to take the defaults.

type SchedulesUpdateParams added in v0.29.0

type SchedulesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	ScheduleID string
	// Body: the JSON request body.
	Body *SleepScheduleUpdate
}

SchedulesUpdateParams holds the parameters for `client.schedules.update`.

type SearchHit

type SearchHit struct {
	ID                ResourceID `json:"id"`
	PluginID          string     `json:"pluginId"`
	PluginDisplayName string     `json:"pluginDisplayName"`
	PluginLogoSvg     string     `json:"pluginLogoSvg"`
	ResourceTypeID    string     `json:"resourceTypeId"`
	ResourceTypeLabel string     `json:"resourceTypeLabel"`
	AccountID         string     `json:"accountId"`
	AccountName       string     `json:"accountName"`
	DisplayName       string     `json:"displayName"`
	Subtitle          *string    `json:"subtitle,omitempty"`
}

SearchHit is the `SearchHit` schema.

type SearchListParams

type SearchListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	Q     *string
}

SearchListParams holds the parameters for `client.search.list`.

Every field is optional; pass nil to take the defaults.

type SearchNamespace

type SearchNamespace struct {
	// contains filtered or unexported fields
}

SearchNamespace is `client.search`.

func (*SearchNamespace) List

func (n *SearchNamespace) List(ctx context.Context, params *SearchListParams, opts ...RequestOption) ([]SearchHit, error)

List: Search resources (capped at 50 hits) and workflows across the org

_Requires permission: `resources:read`._

GET /api/org/{orgId}/search

type SeatLimitResponse added in v0.12.0

type SeatLimitResponse struct {
	Error string `json:"error"`
	// Code: One of "seat_limit_reached".
	Code string `json:"code"`
	// SeatCount: Seats on the plan
	SeatCount int64 `json:"seatCount"`
	// SeatsUsed: Members plus pending unexpired invitations
	SeatsUsed int64 `json:"seatsUsed"`
}

SeatLimitResponse is the `SeatLimitResponse` schema.

type SecretAccessRequest

type SecretAccessRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	VersionID        string      `json:"versionId"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

SecretAccessRequest is the `SecretAccessRequest` schema.

type SecretAccessResponse

type SecretAccessResponse struct {
	Value string `json:"value"`
}

SecretAccessResponse is the `SecretAccessResponse` schema.

type SecretAddRequest

type SecretAddRequest struct {
	AccountID        string      `json:"accountId"`
	ResourceID       ResourceID  `json:"resourceId"`
	Value            string      `json:"value"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

SecretAddRequest is the `SecretAddRequest` schema.

type SecretExportTemplate

type SecretExportTemplate struct {
	ID          string                        `json:"id"`
	Label       string                        `json:"label"`
	Description *string                       `json:"description,omitempty"`
	Entries     []SecretExportTemplateEntries `json:"entries"`
}

SecretExportTemplate is the `SecretExportTemplate` schema.

type SecretExportTemplateEntries

type SecretExportTemplateEntries struct {
	OutputKey string `json:"outputKey"`
	EnvKey    string `json:"envKey"`
}

SecretExportTemplateEntries is an object the spec declares inline.

type SecretModifyRequest

type SecretModifyRequest struct {
	AccountID  string     `json:"accountId"`
	ResourceID ResourceID `json:"resourceId"`
	VersionID  string     `json:"versionId"`
	// Action: One of "enable", "disable", "destroy".
	Action           string      `json:"action"`
	ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}

SecretModifyRequest is the `SecretModifyRequest` schema.

type SecretVersion

type SecretVersion struct {
	ID string `json:"id"`
	// State: One of "enabled", "disabled", "destroyed".
	State string `json:"state"`
	// CreatedAt: ISO-8601.
	CreatedAt string `json:"createdAt"`
	// DestroyedAt: Set only when destroyed.
	DestroyedAt *string `json:"destroyedAt,omitempty"`
	IsLatest    *bool   `json:"isLatest,omitempty"`
}

SecretVersion is the `SecretVersion` schema.

type SecretVersionResponse

type SecretVersionResponse struct {
	Version SecretVersion `json:"version"`
}

SecretVersionResponse is the `SecretVersionResponse` schema.

type SecretVersionsResponse

type SecretVersionsResponse struct {
	Versions []SecretVersion `json:"versions"`
}

SecretVersionsResponse is the `SecretVersionsResponse` schema.

type Session

type Session struct {
	UserID          string  `json:"userId"`
	Email           *string `json:"email"`
	NeedsOnboarding bool    `json:"needsOnboarding"`
}

Session is the `Session` schema.

type ShowbackReport added in v0.29.0

type ShowbackReport struct {
	From       string                  `json:"from"`
	To         string                  `json:"to"`
	Currencies []string                `json:"currencies"`
	Centres    []ShowbackReportCentres `json:"centres"`
}

ShowbackReport is the `ShowbackReport` schema.

type ShowbackReportCentres added in v0.29.0

type ShowbackReportCentres struct {
	// CostCentreID: Null for the synthetic "Unallocated" bucket.
	CostCentreID *string `json:"costCentreId"`
	Name         string  `json:"name"`
	// Totals: Currency code → amount in the currency's major unit.
	Totals map[string]float64 `json:"totals"`
}

ShowbackReportCentres is an object the spec declares inline.

type SlackAvailableChannel added in v0.3.0

type SlackAvailableChannel struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	IsPrivate bool   `json:"isPrivate"`
}

SlackAvailableChannel is the `SlackAvailableChannel` schema.

type SlackChannel added in v0.3.0

type SlackChannel struct {
	ID             string `json:"id"`
	InstallationID string `json:"installationId"`
	// ChannelID: Slack channel id (C…/G…)
	ChannelID string `json:"channelId"`
	// ChannelName: Channel name without the leading #
	ChannelName   string `json:"channelName"`
	IsPrivate     bool   `json:"isPrivate"`
	SyncIncidents bool   `json:"syncIncidents"`
	BudgetAlerts  bool   `json:"budgetAlerts"`
	// AnomalyAlerts: Statistical spend-spike (cost anomaly) alerts
	AnomalyAlerts bool `json:"anomalyAlerts"`
	// MetricAlerts: Metric threshold rule firings and recoveries
	MetricAlerts bool `json:"metricAlerts"`
	// ResourceDrift: Batched resource-drift digests from the change timeline.
	// Defaults to false when a channel is added — drift is continuous where the
	// other triggers are exceptional.
	ResourceDrift bool `json:"resourceDrift"`
	// WorkflowPages: Pages and approval requests raised by a workflow
	// (infra.page / infra.waitForApproval) or by POST /pages
	WorkflowPages bool `json:"workflowPages"`
	// ProviderIncidents: A provider status-page incident overlaps resources you
	// hold.
	ProviderIncidents bool `json:"providerIncidents"`
	// ExpiryAlerts: Daily digests of approaching resource deadlines — expiring
	// certificates, domains, tokens and keys past their rotation budget.
	ExpiryAlerts bool `json:"expiryAlerts"`
	// LogMatchAlerts: A saved log-workspace query with alerting enabled found
	// matching log lines.
	LogMatchAlerts bool `json:"logMatchAlerts"`
	// WeeklyDigest: The Monday-morning weekly digest. Only sends when the
	// organization has enabled the digest (see /digest).
	WeeklyDigest bool `json:"weeklyDigest"`
}

SlackChannel is the `SlackChannel` schema.

type SlackChannelCreate added in v0.3.0

type SlackChannelCreate struct {
	InstallationID    string `json:"installationId"`
	ChannelID         string `json:"channelId"`
	ChannelName       string `json:"channelName"`
	IsPrivate         *bool  `json:"isPrivate,omitempty"`
	SyncIncidents     *bool  `json:"syncIncidents,omitempty"`
	BudgetAlerts      *bool  `json:"budgetAlerts,omitempty"`
	AnomalyAlerts     *bool  `json:"anomalyAlerts,omitempty"`
	MetricAlerts      *bool  `json:"metricAlerts,omitempty"`
	ResourceDrift     *bool  `json:"resourceDrift,omitempty"`
	WorkflowPages     *bool  `json:"workflowPages,omitempty"`
	ProviderIncidents *bool  `json:"providerIncidents,omitempty"`
	ExpiryAlerts      *bool  `json:"expiryAlerts,omitempty"`
	LogMatchAlerts    *bool  `json:"logMatchAlerts,omitempty"`
	WeeklyDigest      *bool  `json:"weeklyDigest,omitempty"`
}

SlackChannelCreate is the `SlackChannelCreate` schema.

type SlackChannelUpdate added in v0.3.0

type SlackChannelUpdate struct {
	SyncIncidents     *bool `json:"syncIncidents,omitempty"`
	BudgetAlerts      *bool `json:"budgetAlerts,omitempty"`
	AnomalyAlerts     *bool `json:"anomalyAlerts,omitempty"`
	MetricAlerts      *bool `json:"metricAlerts,omitempty"`
	ResourceDrift     *bool `json:"resourceDrift,omitempty"`
	WorkflowPages     *bool `json:"workflowPages,omitempty"`
	ProviderIncidents *bool `json:"providerIncidents,omitempty"`
	ExpiryAlerts      *bool `json:"expiryAlerts,omitempty"`
	LogMatchAlerts    *bool `json:"logMatchAlerts,omitempty"`
	WeeklyDigest      *bool `json:"weeklyDigest,omitempty"`
}

SlackChannelUpdate is the `SlackChannelUpdate` schema.

type SlackChannelsCreateParams added in v0.3.0

type SlackChannelsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body *SlackChannelCreate
}

SlackChannelsCreateParams holds the parameters for `client.slack.channels.create`.

Every field is optional; pass nil to take the defaults.

type SlackChannelsDeleteParams added in v0.3.0

type SlackChannelsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

SlackChannelsDeleteParams holds the parameters for `client.slack.channels.delete`.

type SlackChannelsNamespace added in v0.3.0

type SlackChannelsNamespace struct {
	// contains filtered or unexported fields
}

SlackChannelsNamespace is `client.slack.channels`.

func (*SlackChannelsNamespace) Create added in v0.3.0

Create: Route alerts to a Slack channel

Adds a channel, or updates the trigger opt-ins of one already added. Each trigger defaults to enabled.

POST /api/org/{orgId}/slack/channels

Raises on 400: Bad request

Raises on 404: Not found

func (*SlackChannelsNamespace) Delete added in v0.3.0

Delete: Stop routing alerts to a channel

DELETE /api/org/{orgId}/slack/channels/{id}

Raises on 404: Not found

func (*SlackChannelsNamespace) Update added in v0.3.0

Update: Change which alerts a channel receives

PATCH /api/org/{orgId}/slack/channels/{id}

Raises on 404: Not found

type SlackChannelsUpdateParams added in v0.3.0

type SlackChannelsUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body *SlackChannelUpdate
}

SlackChannelsUpdateParams holds the parameters for `client.slack.channels.update`.

type SlackInstallURLParams added in v0.3.0

type SlackInstallURLParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SlackInstallURLParams holds the parameters for `client.slack.installUrl`.

Every field is optional; pass nil to take the defaults.

type SlackInstallUrlresponse added in v0.3.0

type SlackInstallUrlresponse struct {
	URL string `json:"url"`
}

SlackInstallUrlresponse is an object the spec declares inline.

type SlackInstallation added in v0.3.0

type SlackInstallation struct {
	// ID: Infrawrench id for this workspace connection
	ID string `json:"id"`
	// TeamID: Slack workspace id (T…)
	TeamID   string  `json:"teamId"`
	TeamName *string `json:"teamName"`
}

SlackInstallation is the `SlackInstallation` schema.

type SlackInstallationsAvailableChannelsParams added in v0.3.0

type SlackInstallationsAvailableChannelsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID          *string
	InstallationID string
}

SlackInstallationsAvailableChannelsParams holds the parameters for `client.slack.installations.availableChannels`.

type SlackInstallationsAvailableChannelsResponse added in v0.3.0

type SlackInstallationsAvailableChannelsResponse struct {
	Channels []SlackAvailableChannel `json:"channels"`
}

SlackInstallationsAvailableChannelsResponse is an object the spec declares inline.

type SlackInstallationsDeleteParams added in v0.3.0

type SlackInstallationsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID          *string
	InstallationID string
}

SlackInstallationsDeleteParams holds the parameters for `client.slack.installations.delete`.

type SlackInstallationsNamespace added in v0.3.0

type SlackInstallationsNamespace struct {
	// contains filtered or unexported fields
}

SlackInstallationsNamespace is `client.slack.installations`.

func (*SlackInstallationsNamespace) AvailableChannels added in v0.3.0

AvailableChannels: List channels the connected workspace can see

Live call to Slack's conversations.list, for populating a channel picker. Returns non-archived public and private channels visible to the bot.

GET /api/org/{orgId}/slack/installations/{installationId}/available-channels

Raises on 400: Bad request

func (*SlackInstallationsNamespace) Delete added in v0.3.0

Delete: Disconnect a Slack workspace

Stops all delivery to this workspace. The channel routing is retained, so re-installing restores it.

DELETE /api/org/{orgId}/slack/installations/{installationId}

Raises on 404: Not found

type SlackNamespace added in v0.3.0

type SlackNamespace struct {

	// Channels: `client.slack.channels`.
	Channels *SlackChannelsNamespace
	// Installations: `client.slack.installations`.
	Installations *SlackInstallationsNamespace
	// contains filtered or unexported fields
}

SlackNamespace is `client.slack`.

func (*SlackNamespace) InstallURL added in v0.3.0

InstallURL: Get the Add to Slack URL

Returns a slack.com/oauth/v2/authorize URL carrying a signed `state` that binds the resulting install to this organization. Send the user's browser there; Slack redirects back to /api/slack/oauth/callback.

GET /api/org/{orgId}/slack/install-url

Raises on 400: Bad request

func (*SlackNamespace) Status added in v0.3.0

func (n *SlackNamespace) Status(ctx context.Context, params *SlackStatusParams, opts ...RequestOption) (*SlackStatus, error)

Status: Get the organization's Slack connection

Reports whether the server has a Slack app registered, which workspaces this organization has connected, and which channels alerts are routed to.

GET /api/org/{orgId}/slack/status

func (*SlackNamespace) Test added in v0.3.0

Test: Post a test message to every configured channel

Ignores trigger opt-ins — every channel gets the test. Fails with the Slack error when nothing could be delivered (`not_in_channel` means the bot needs inviting to a private channel).

POST /api/org/{orgId}/slack/test

Raises on 400: Bad request

type SlackStatus added in v0.3.0

type SlackStatus struct {
	// Configured: True when this deployment has a Slack app registered
	Configured    bool                `json:"configured"`
	Installations []SlackInstallation `json:"installations"`
	Channels      []SlackChannel      `json:"channels"`
}

SlackStatus is the `SlackStatus` schema.

type SlackStatusParams added in v0.3.0

type SlackStatusParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SlackStatusParams holds the parameters for `client.slack.status`.

Every field is optional; pass nil to take the defaults.

type SlackTestParams added in v0.3.0

type SlackTestParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

SlackTestParams holds the parameters for `client.slack.test`.

Every field is optional; pass nil to take the defaults.

type SlackTestResponse added in v0.3.0

type SlackTestResponse struct {
	OK           bool  `json:"ok"`
	ChannelCount int64 `json:"channelCount"`
	Attempted    int64 `json:"attempted"`
	Succeeded    int64 `json:"succeeded"`
}

SlackTestResponse is an object the spec declares inline.

type SleepSchedule added in v0.29.0

type SleepSchedule struct {
	ID string `json:"id"`
	// ResourceID: Infrawrench resource id the schedule powers on and off.
	ResourceID     string   `json:"resourceId"`
	AccountID      string   `json:"accountId"`
	PluginID       PluginID `json:"pluginId"`
	ResourceTypeID string   `json:"resourceTypeId"`
	// ResourceName: Resource display name at read time.
	ResourceName string `json:"resourceName"`
	AccountName  string `json:"accountName"`
	// DaysOfWeek: ISO weekdays the resource is worked on: 1 = Monday … 7 =
	// Sunday.
	DaysOfWeek []int64 `json:"daysOfWeek"`
	// StopTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StopTime string `json:"stopTime"`
	// StartTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StartTime string `json:"startTime"`
	// Timezone: IANA timezone the wall-clock times are computed in (DST-safe).
	Timezone string `json:"timezone"`
	// Paused: Paused schedules keep their timing but never fire.
	Paused bool `json:"paused"`
	// NextTransitionAt: Next due transition; null while paused.
	NextTransitionAt *string `json:"nextTransitionAt"`
	// NextTransitionAction: A schedule transition: `stop` powers the resource
	// off, `start` powers it on.
	//
	// One of "stop", "start".
	NextTransitionAction *string `json:"nextTransitionAction"`
	LastRunAt            *string `json:"lastRunAt"`
	// LastRunAction: A schedule transition: `stop` powers the resource off,
	// `start` powers it on.
	//
	// One of "stop", "start".
	LastRunAction *string `json:"lastRunAction"`
	// LastRunStatus: Outcome of the last executed transition: `ok`, `failed`
	// (see `lastRunError`), or `skipped_freeze` (an org change freeze was in
	// effect, so the transition was skipped).
	//
	// One of "ok", "failed", "skipped_freeze".
	LastRunStatus *string `json:"lastRunStatus"`
	// LastRunError: Failure detail for a failed run.
	LastRunError *string `json:"lastRunError"`
	// ProjectedMonthlySaving: Projected monthly saving from trailing
	// per-resource spend × the weekly off-hours fraction; null when billing
	// holds no rows for the resource.
	ProjectedMonthlySaving *float64 `json:"projectedMonthlySaving"`
	// Currency: Currency of the projection, when present.
	Currency  *string `json:"currency"`
	CreatedAt string  `json:"createdAt"`
	UpdatedAt string  `json:"updatedAt"`
}

SleepSchedule is the `SleepSchedule` schema.

type SleepScheduleCreate added in v0.29.0

type SleepScheduleCreate struct {
	ResourceID string `json:"resourceId"`
	AccountID  string `json:"accountId"`
	// DaysOfWeek: ISO weekdays the resource is worked on: 1 = Monday … 7 =
	// Sunday.
	DaysOfWeek []int64 `json:"daysOfWeek"`
	// StopTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StopTime string `json:"stopTime"`
	// StartTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StartTime string `json:"startTime"`
	// Timezone: IANA timezone the wall-clock times are computed in (DST-safe).
	Timezone string `json:"timezone"`
}

SleepScheduleCreate is the `SleepScheduleCreate` schema.

type SleepScheduleList added in v0.29.0

type SleepScheduleList struct {
	Schedules []SleepSchedule `json:"schedules"`
}

SleepScheduleList is the `SleepScheduleList` schema.

type SleepSchedulePreview added in v0.29.0

type SleepSchedulePreview struct {
	// OffFraction: Fraction of the week (0–1) the schedule keeps the resource
	// stopped.
	OffFraction float64 `json:"offFraction"`
	// MonthlyCost: Trailing spend normalized to a month; null when billing holds
	// no rows.
	MonthlyCost            *float64 `json:"monthlyCost"`
	ProjectedMonthlySaving *float64 `json:"projectedMonthlySaving"`
	Currency               *string  `json:"currency"`
	// CostWindowDays: Days of billing data the estimate was computed over (0 =
	// none found).
	CostWindowDays int64 `json:"costWindowDays"`
	// NextTransitions: The next few transitions, soonest first — a timezone
	// sanity check.
	NextTransitions []ScheduleTransition `json:"nextTransitions"`
}

SleepSchedulePreview is the `SleepSchedulePreview` schema.

type SleepSchedulePreviewRequest added in v0.29.0

type SleepSchedulePreviewRequest struct {
	ResourceID string `json:"resourceId"`
	AccountID  string `json:"accountId"`
	// DaysOfWeek: ISO weekdays the resource is worked on: 1 = Monday … 7 =
	// Sunday.
	DaysOfWeek []int64 `json:"daysOfWeek"`
	// StopTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StopTime string `json:"stopTime"`
	// StartTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StartTime string `json:"startTime"`
	// Timezone: IANA timezone the wall-clock times are computed in (DST-safe).
	Timezone string `json:"timezone"`
}

SleepSchedulePreviewRequest is the `SleepSchedulePreviewRequest` schema.

type SleepScheduleUpdate added in v0.29.0

type SleepScheduleUpdate struct {
	// DaysOfWeek: ISO weekdays the resource is worked on: 1 = Monday … 7 =
	// Sunday.
	DaysOfWeek []int64 `json:"daysOfWeek,omitempty"`
	// StopTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StopTime *string `json:"stopTime,omitempty"`
	// StartTime: Wall-clock time of day, 24-hour `"HH:MM"`, in the schedule's
	// timezone.
	StartTime *string `json:"startTime,omitempty"`
	// Timezone: IANA timezone the wall-clock times are computed in (DST-safe).
	Timezone *string `json:"timezone,omitempty"`
	Paused   *bool   `json:"paused,omitempty"`
}

SleepScheduleUpdate is the `SleepScheduleUpdate` schema.

type SshfanoutHostResultHostKeyTrust added in v0.30.0

type SshfanoutHostResultHostKeyTrust struct {
	// Kind: One of "unknown", "mismatch".
	Kind                 string  `json:"kind"`
	Host                 string  `json:"host"`
	Port                 int64   `json:"port"`
	PresentedFingerprint string  `json:"presentedFingerprint"`
	StoredFingerprint    *string `json:"storedFingerprint"`
}

SshfanoutHostResultHostKeyTrust is an object the spec declares inline.

type SshfanoutRunRequestTargets added in v0.30.0

type SshfanoutRunRequestTargets struct {
	// Kind: One of "account", "resource".
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

SshfanoutRunRequestTargets is an object the spec declares inline.

type SshfanoutSnippetsCreateResponse added in v0.30.0

type SshfanoutSnippetsCreateResponse struct {
	ID string `json:"id"`
}

SshfanoutSnippetsCreateResponse is an object the spec declares inline.

type SshfanoutSnippetsGetResponse added in v0.30.0

type SshfanoutSnippetsGetResponse struct {
	Snippets []SSHSnippet `json:"snippets"`
}

SshfanoutSnippetsGetResponse is an object the spec declares inline.

type SshtunnelsCloseRequest

type SshtunnelsCloseRequest struct {
	TunnelID string `json:"tunnelId"`
}

SshtunnelsCloseRequest is an object the spec declares inline.

type SshtunnelsOpenRequest

type SshtunnelsOpenRequest struct {
	AccountID string `json:"accountId"`
}

SshtunnelsOpenRequest is an object the spec declares inline.

type SshtunnelsOpenResponse

type SshtunnelsOpenResponse struct {
	TunnelID  string `json:"tunnelId"`
	LocalPort int64  `json:"localPort"`
}

SshtunnelsOpenResponse is an object the spec declares inline.

type StatusDot

type StatusDot struct {
	// Kind: One of "status-dot".
	Kind   string         `json:"kind"`
	Status ResourceStatus `json:"status"`
	Label  *string        `json:"label,omitempty"`
}

StatusDot is the `StatusDot` schema.

type StatusIncidentsGetParams added in v0.29.0

type StatusIncidentsGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

StatusIncidentsGetParams holds the parameters for `client.statusIncidents.get`.

Every field is optional; pass nil to take the defaults.

type StatusIncidentsNamespace added in v0.29.0

type StatusIncidentsNamespace struct {
	// contains filtered or unexported fields
}

StatusIncidentsNamespace is `client.statusIncidents`.

func (*StatusIncidentsNamespace) Get added in v0.29.0

Get: Provider incidents overlapping your resources

The "is it me or is it them?" feed. The poller watches each provider plugin's public status feed (declared on its manifest — zero credentials, zero rate-limit risk), caches active incidents, and this endpoint correlates them against the resources the organization holds: an incident matches a resource when it is provider-wide, names the resource's region, or names its resource type. Includes incidents resolved within the last 24 hours so recent drift can still be correlated. Active incidents first, most severe first.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/status-incidents

Raises on 400: Bad request

type StorageDeleteParams

type StorageDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body StoragePathRequest
}

StorageDeleteParams holds the parameters for `client.storage.delete`.

type StorageDownloadParams

type StorageDownloadParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID     *string
	AccountID string
	Bucket    string
	// Keys: JSON-encoded array of object keys, e.g. `["a.txt","b.txt"]`
	Keys string
}

StorageDownloadParams holds the parameters for `client.storage.download`.

type StorageListParams

type StorageListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body StorageListRequest
}

StorageListParams holds the parameters for `client.storage.list`.

type StorageListRequest

type StorageListRequest struct {
	AccountID string `json:"accountId"`
	Bucket    string `json:"bucket"`
	Prefix    string `json:"prefix"`
}

StorageListRequest is the `StorageListRequest` schema.

type StorageMkdirParams

type StorageMkdirParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body StoragePathRequest
}

StorageMkdirParams holds the parameters for `client.storage.mkdir`.

type StorageNamespace

type StorageNamespace struct {
	// contains filtered or unexported fields
}

StorageNamespace is `client.storage`.

func (*StorageNamespace) Delete

func (n *StorageNamespace) Delete(ctx context.Context, params StorageDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a storage object

_Requires permission: `storage:write`._

POST /api/org/{orgId}/storage/delete

Raises on 400: Bad request

Raises on 404: Not found

func (*StorageNamespace) Download

Download: Download one or many objects (zipped if more than one)

_Requires permission: `storage:read`._

GET /api/org/{orgId}/v1/storage/download

Raises on 400: Bad request

Raises on 404: Not found

Raises on 500: Server error

func (*StorageNamespace) List

List: List objects in a bucket / prefix

_Requires permission: `storage:read`._

POST /api/org/{orgId}/storage/list

Raises on 400: Bad request

Raises on 404: Not found

func (*StorageNamespace) Mkdir

func (n *StorageNamespace) Mkdir(ctx context.Context, params StorageMkdirParams, opts ...RequestOption) (*OK, error)

Mkdir: Create a folder marker in a bucket

_Requires permission: `storage:write`._

POST /api/org/{orgId}/storage/mkdir

Raises on 400: Bad request

Raises on 404: Not found

func (*StorageNamespace) Upload

func (n *StorageNamespace) Upload(ctx context.Context, params StorageUploadParams, opts ...RequestOption) (*OK, error)

Upload: Upload a file to object storage

Multipart/form-data. Plugin must implement `uploadStorageObject`.

_Requires permission: `storage:write`._

POST /api/org/{orgId}/v1/storage/upload

Raises on 400: Bad request

Raises on 404: Not found

type StorageObject

type StorageObject struct {
	// Key: Full path within the bucket.
	Key string `json:"key"`
	// Name: Last path segment — what the browser renders.
	Name         string  `json:"name"`
	Size         float64 `json:"size"`
	LastModified string  `json:"lastModified"`
	IsDirectory  bool    `json:"isDirectory"`
	ContentType  *string `json:"contentType,omitempty"`
}

StorageObject is the `StorageObject` schema.

type StoragePathRequest

type StoragePathRequest struct {
	AccountID string `json:"accountId"`
	Bucket    string `json:"bucket"`
	Key       string `json:"key"`
}

StoragePathRequest is the `StoragePathRequest` schema.

type StorageUploadForm

type StorageUploadForm struct {
	AccountID string `json:"accountId"`
	Bucket    string `json:"bucket"`
	Key       string `json:"key"`
	// File: Raw file bytes
	File io.Reader `json:"file"`
}

StorageUploadForm is the `StorageUploadForm` schema.

type StorageUploadParams

type StorageUploadParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: sent as `multipart/form-data`; the `io.Reader` field is the file.
	Body StorageUploadForm
}

StorageUploadParams holds the parameters for `client.storage.upload`.

type StripeRedirectURL

type StripeRedirectURL struct {
	URL string `json:"url"`
}

StripeRedirectURL is the `StripeRedirectUrl` schema.

Spec schema: `StripeRedirectUrl`.

type Subscription

type Subscription struct {
	// Status: One of "trialing", "active", "past_due", "canceled", "unpaid".
	Status           string  `json:"status"`
	SeatCount        int64   `json:"seatCount"`
	CurrentPeriodEnd *string `json:"currentPeriodEnd"`
	StripeCustomerID string  `json:"stripeCustomerId"`
}

Subscription is the `Subscription` schema.

The API may send null in its place.

type SwapAllocationRulesBody added in v0.29.0

type SwapAllocationRulesBody struct {
	AID string `json:"aId"`
	BID string `json:"bId"`
}

SwapAllocationRulesBody: Two allocation rule ids in the same org whose priorities should be swapped.

type SyncResponse

type SyncResponse struct {
	Synced int64 `json:"synced"`
}

SyncResponse is the `SyncResponse` schema.

type SyncedResource added in v0.7.0

type SyncedResource struct {
	ID               ResourceID  `json:"id"`
	PluginID         string      `json:"pluginId"`
	ResourceTypeID   string      `json:"resourceTypeId"`
	DisplayName      string      `json:"displayName"`
	ExternalID       *string     `json:"externalId"`
	FieldsJSON       JSONObject  `json:"fieldsJson"`
	OutputsJSON      JSONObject  `json:"outputsJson"`
	ParentResourceID *ResourceID `json:"parentResourceId"`
}

SyncedResource is the `SyncedResource` schema.

type TOTPEnrollment

type TOTPEnrollment struct {
	FactorID    string `json:"factorId"`
	ChallengeID string `json:"challengeId"`
	// QrCode: Data-URI image of the enrolment QR code
	QrCode *string `json:"qrCode"`
	// Secret: Base32 secret, for manual entry
	Secret *string `json:"secret"`
	// URI: `otpauth://` URI
	URI *string `json:"uri"`
}

TOTPEnrollment is the `TotpEnrollment` schema.

Spec schema: `TotpEnrollment`.

type TabTarget

type TabTarget struct {
	// Kind: One of "dashboard", "account", "resource", "agents", "costs",
	// "savings", "graph", "logs", "changes", "expiring", "ssh-fanout",
	// "metric-alerts", "workflows", "deployments", "chat".
	Kind           string      `json:"kind"`
	DashboardID    *string     `json:"dashboardId,omitempty"`
	AccountID      *string     `json:"accountId,omitempty"`
	ResourceID     *ResourceID `json:"resourceId,omitempty"`
	ConversationID *string     `json:"conversationId,omitempty"`
}

TabTarget is the `TabTarget` schema.

type TagComplianceReport added in v0.29.0

type TagComplianceReport struct {
	Policy   TagPolicy              `json:"policy"`
	Accounts []AccountTagCompliance `json:"accounts"`
}

TagComplianceReport is the `TagComplianceReport` schema.

type TagPolicy added in v0.29.0

type TagPolicy struct {
	RequiredTags []RequiredTag `json:"requiredTags"`
	// EnforceOnCreate: When true, resource creation is rejected with a 422
	// (`tag_policy_unmet`) if the submitted fields carry a tag map missing a
	// required tag. Types whose create form has no `tags`/`labels` field are
	// exempt.
	EnforceOnCreate bool `json:"enforceOnCreate"`
}

TagPolicy is the `TagPolicy` schema.

type TagPolicyBlocked added in v0.29.0

type TagPolicyBlocked struct {
	Error string `json:"error"`
	// Code: One of "tag_policy_unmet".
	Code         string               `json:"code"`
	Violations   []TagPolicyViolation `json:"violations"`
	RequiredTags []RequiredTag        `json:"requiredTags"`
}

TagPolicyBlocked is the `TagPolicyBlocked` schema.

type TagPolicyComplianceParams added in v0.29.0

type TagPolicyComplianceParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TagPolicyComplianceParams holds the parameters for `client.tagPolicy.compliance`.

Every field is optional; pass nil to take the defaults.

type TagPolicyGetParams added in v0.29.0

type TagPolicyGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TagPolicyGetParams holds the parameters for `client.tagPolicy.get`.

Every field is optional; pass nil to take the defaults.

type TagPolicyNamespace added in v0.29.0

type TagPolicyNamespace struct {
	// contains filtered or unexported fields
}

TagPolicyNamespace is `client.tagPolicy`.

func (*TagPolicyNamespace) Compliance added in v0.29.0

Compliance: Per-account tag compliance scores

For each account: how many of its resources expose tags and how many of those carry every required tag with an allowed value. `score` is over the evaluated (tag-capable) set so untaggable resource types don't drag it.

_Requires permission: `resources:read`._

GET /api/org/{orgId}/tag-policy/compliance

func (*TagPolicyNamespace) Get added in v0.29.0

Get: The org's required-tag policy

_Requires permission: `resources:read`._

GET /api/org/{orgId}/tag-policy

func (*TagPolicyNamespace) Update added in v0.29.0

Update: Replace the org's tag policy

Sets the required tag keys (each optionally restricted to allowed values) and whether resource creation is blocked when they are missing. Keys are matched case-insensitively against the generic `tags`/`labels` field convention.

_Requires permission: `org:settings:write`._

PUT /api/org/{orgId}/tag-policy

Raises on 400: Bad request

type TagPolicyUpdateParams added in v0.29.0

type TagPolicyUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body TagPolicy
}

TagPolicyUpdateParams holds the parameters for `client.tagPolicy.update`.

type TagPolicyViolation added in v0.29.0

type TagPolicyViolation struct {
	Key string `json:"key"`
	// Reason: One of "missing", "value_not_allowed".
	Reason        string   `json:"reason"`
	Value         *string  `json:"value,omitempty"`
	AllowedValues []string `json:"allowedValues,omitempty"`
}

TagPolicyViolation is the `TagPolicyViolation` schema.

type TeamInvitationsCreateParams

type TeamInvitationsCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body InviteRequest
}

TeamInvitationsCreateParams holds the parameters for `client.team.invitations.create`.

type TeamInvitationsDeleteParams

type TeamInvitationsDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

TeamInvitationsDeleteParams holds the parameters for `client.team.invitations.delete`.

type TeamInvitationsListParams

type TeamInvitationsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TeamInvitationsListParams holds the parameters for `client.team.invitations.list`.

Every field is optional; pass nil to take the defaults.

type TeamInvitationsNamespace

type TeamInvitationsNamespace struct {
	// contains filtered or unexported fields
}

TeamInvitationsNamespace is `client.team.invitations`.

func (*TeamInvitationsNamespace) Create

Create: Create an invitation (token valid for 7 days)

_Requires permission: `team:invite`._

POST /api/org/{orgId}/team/invitations

Raises on 402: Payment required — the organization's plan does not include this

Raises on 409: All seats are in use; retry with addSeat to buy one more

Raises on 502: Buying the extra seat failed; the invitation was not sent

func (*TeamInvitationsNamespace) Delete

Delete: Revoke a pending invitation

_Requires permission: `team:invite`._

DELETE /api/org/{orgId}/team/invitations/{id}

Raises on 404: Not found

func (*TeamInvitationsNamespace) List

List: List pending and historical invitations

_Requires permission: `team:read`._

GET /api/org/{orgId}/team/invitations

type TeamMeParams

type TeamMeParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TeamMeParams holds the parameters for `client.team.me`.

Every field is optional; pass nil to take the defaults.

type TeamMembersDeleteParams

type TeamMembersDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

TeamMembersDeleteParams holds the parameters for `client.team.members.delete`.

type TeamMembersListParams

type TeamMembersListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TeamMembersListParams holds the parameters for `client.team.members.list`.

Every field is optional; pass nil to take the defaults.

type TeamMembersNamespace

type TeamMembersNamespace struct {
	// contains filtered or unexported fields
}

TeamMembersNamespace is `client.team.members`.

func (*TeamMembersNamespace) Delete

Delete: Remove a member from the org

_Requires permission: `team:remove`._

DELETE /api/org/{orgId}/team/members/{id}

func (*TeamMembersNamespace) List

List: List org members

_Requires permission: `team:read`._

GET /api/org/{orgId}/team/members

func (*TeamMembersNamespace) Role

Role: Change a member's role

_Requires permission: `team:role:write`._

PATCH /api/org/{orgId}/team/members/{id}/role

type TeamMembersRoleParams

type TeamMembersRoleParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body RoleChangeRequest
}

TeamMembersRoleParams holds the parameters for `client.team.members.role`.

type TeamNamespace

type TeamNamespace struct {

	// Invitations: `client.team.invitations`.
	Invitations *TeamInvitationsNamespace
	// Members: `client.team.members`.
	Members *TeamMembersNamespace
	// Roles: `client.team.roles`.
	Roles *TeamRolesNamespace
	// contains filtered or unexported fields
}

TeamNamespace is `client.team`.

func (*TeamNamespace) Me

func (n *TeamNamespace) Me(ctx context.Context, params *TeamMeParams, opts ...RequestOption) (*MeResponse, error)

Me: Current user's effective permissions and role

GET /api/org/{orgId}/team/me

func (*TeamNamespace) Permissions

func (n *TeamNamespace) Permissions(ctx context.Context, params *TeamPermissionsParams, opts ...RequestOption) (*PermissionCatalog, error)

Permissions: List all permission strings the server recognises

_Requires permission: `team:read`._

GET /api/org/{orgId}/team/permissions

type TeamPermissionsParams

type TeamPermissionsParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TeamPermissionsParams holds the parameters for `client.team.permissions`.

Every field is optional; pass nil to take the defaults.

type TeamRolesCreateParams

type TeamRolesCreateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// Body: the JSON request body.
	Body RoleCreateRequest
}

TeamRolesCreateParams holds the parameters for `client.team.roles.create`.

type TeamRolesDeleteParams

type TeamRolesDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

TeamRolesDeleteParams holds the parameters for `client.team.roles.delete`.

type TeamRolesListParams

type TeamRolesListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
}

TeamRolesListParams holds the parameters for `client.team.roles.list`.

Every field is optional; pass nil to take the defaults.

type TeamRolesNamespace

type TeamRolesNamespace struct {
	// contains filtered or unexported fields
}

TeamRolesNamespace is `client.team.roles`.

func (*TeamRolesNamespace) Create

func (n *TeamRolesNamespace) Create(ctx context.Context, params TeamRolesCreateParams, opts ...RequestOption) (*Role, error)

Create: Create a custom role

_Requires permission: `team:role:write`._

POST /api/org/{orgId}/team/roles

func (*TeamRolesNamespace) Delete

func (n *TeamRolesNamespace) Delete(ctx context.Context, params TeamRolesDeleteParams, opts ...RequestOption) (*OK, error)

Delete: Delete a custom role (must have no members or pending invitations)

_Requires permission: `team:role:write`._

DELETE /api/org/{orgId}/team/roles/{id}

Raises on 404: Not found

Raises on 409: Conflict

Raises on 422: Bad request

func (*TeamRolesNamespace) List

func (n *TeamRolesNamespace) List(ctx context.Context, params *TeamRolesListParams, opts ...RequestOption) ([]Role, error)

List: List roles (system + custom)

_Requires permission: `team:read`._

GET /api/org/{orgId}/team/roles

func (*TeamRolesNamespace) Update

func (n *TeamRolesNamespace) Update(ctx context.Context, params TeamRolesUpdateParams, opts ...RequestOption) (*Role, error)

Update: Edit a custom role

_Requires permission: `team:role:write`._

PATCH /api/org/{orgId}/team/roles/{id}

Raises on 404: Not found

Raises on 422: Bad request

type TeamRolesUpdateParams

type TeamRolesUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
	// Body: the JSON request body.
	Body RoleUpdateRequest
}

TeamRolesUpdateParams holds the parameters for `client.team.roles.update`.

type UnpinRequest

type UnpinRequest struct {
	DashboardID string     `json:"dashboardId"`
	ResourceID  ResourceID `json:"resourceId"`
}

UnpinRequest is the `UnpinRequest` schema.

type UntaggedSpendReport added in v0.29.0

type UntaggedSpendReport struct {
	From         string   `json:"from"`
	To           string   `json:"to"`
	RequiredKeys []string `json:"requiredKeys"`
	Currencies   []string `json:"currencies"`
	// Totals: Currency code → amount in the currency's major unit.
	Totals map[string]float64 `json:"totals"`
	// UntaggedTotals: Spend on rows missing at least one required tag key, per
	// currency.
	UntaggedTotals map[string]float64               `json:"untaggedTotals"`
	ByKey          []UntaggedSpendReportByKey       `json:"byKey"`
	TopUntagged    []UntaggedSpendReportTopUntagged `json:"topUntagged"`
}

UntaggedSpendReport is the `UntaggedSpendReport` schema.

type UntaggedSpendReportByKey added in v0.29.0

type UntaggedSpendReportByKey struct {
	Key string `json:"key"`
	// Untagged: Currency code → amount in the currency's major unit.
	Untagged map[string]float64 `json:"untagged"`
}

UntaggedSpendReportByKey is an object the spec declares inline.

type UntaggedSpendReportTopUntagged added in v0.29.0

type UntaggedSpendReportTopUntagged struct {
	AccountID    string  `json:"accountId"`
	AccountLabel string  `json:"accountLabel"`
	Service      string  `json:"service"`
	Currency     string  `json:"currency"`
	Amount       float64 `json:"amount"`
}

UntaggedSpendReportTopUntagged is an object the spec declares inline.

type UpdateAccountRequest

type UpdateAccountRequest struct {
	DisplayName *string `json:"displayName,omitempty"`
	// BastionID: Pass `null` to unbind, a uuid to bind, or omit the field to
	// leave the binding unchanged.
	BastionID *string `json:"bastionId,omitempty"`
}

UpdateAccountRequest is the `UpdateAccountRequest` schema.

type UpdateResourceRequest

type UpdateResourceRequest struct {
	AccountID        string            `json:"accountId"`
	PluginID         string            `json:"pluginId"`
	ResourceTypeID   string            `json:"resourceTypeId"`
	ResourceID       ResourceID        `json:"resourceId"`
	Fields           map[string]string `json:"fields"`
	ParentResourceID *ResourceID       `json:"parentResourceId,omitempty"`
}

UpdateResourceRequest is the `UpdateResourceRequest` schema.

type UpdateResourceResponse

type UpdateResourceResponse struct {
	ID          ResourceID        `json:"id"`
	DisplayName string            `json:"displayName"`
	Fields      map[string]string `json:"fields"`
}

UpdateResourceResponse is the `UpdateResourceResponse` schema.

type UpdateWidgetRequest

type UpdateWidgetRequest struct {
	Title  *string    `json:"title,omitempty"`
	Config JSONObject `json:"config,omitempty"`
	GridX  *int64     `json:"gridX,omitempty"`
	GridY  *int64     `json:"gridY,omitempty"`
	GridW  *int64     `json:"gridW,omitempty"`
	GridH  *int64     `json:"gridH,omitempty"`
}

UpdateWidgetRequest is the `UpdateWidgetRequest` schema.

type UpdatedAccount

type UpdatedAccount struct {
	ID          string  `json:"id"`
	DisplayName string  `json:"displayName"`
	BastionID   *string `json:"bastionId"`
}

UpdatedAccount is the `UpdatedAccount` schema.

type UserSession

type UserSession struct {
	ID         string  `json:"id"`
	IPAddress  *string `json:"ipAddress"`
	UserAgent  *string `json:"userAgent"`
	AuthMethod string  `json:"authMethod"`
	Status     string  `json:"status"`
	ExpiresAt  string  `json:"expiresAt"`
	CreatedAt  string  `json:"createdAt"`
	UpdatedAt  string  `json:"updatedAt"`
	// Current: True for the session making this request
	Current bool `json:"current"`
}

UserSession is the `UserSession` schema.

type ValidateTabsRequest

type ValidateTabsRequest struct {
	Tabs []ValidateTabsRequestTabs `json:"tabs"`
}

ValidateTabsRequest is the `ValidateTabsRequest` schema.

type ValidateTabsRequestTabs

type ValidateTabsRequestTabs struct {
	ID     string    `json:"id"`
	Target TabTarget `json:"target"`
}

ValidateTabsRequestTabs is an object the spec declares inline.

type ValidateTabsResponse

type ValidateTabsResponse struct {
	ValidTabIDs []string `json:"validTabIds"`
}

ValidateTabsResponse is the `ValidateTabsResponse` schema.

type WorkflowApproval added in v0.21.0

type WorkflowApproval struct {
	ID            string                 `json:"id"`
	WorkflowID    string                 `json:"workflowId"`
	WorkflowName  *string                `json:"workflowName"`
	RunID         string                 `json:"runId"`
	Title         string                 `json:"title"`
	Message       string                 `json:"message"`
	Status        WorkflowApprovalStatus `json:"status"`
	ExpiresAt     string                 `json:"expiresAt"`
	DecidedAt     *string                `json:"decidedAt"`
	DecidedByName *string                `json:"decidedByName"`
	CreatedAt     string                 `json:"createdAt"`
}

WorkflowApproval is the `WorkflowApproval` schema.

type WorkflowApprovalStatus added in v0.21.0

type WorkflowApprovalStatus = string

WorkflowApprovalStatus is the `WorkflowApprovalStatus` schema.

const (
	WorkflowApprovalStatusPending  WorkflowApprovalStatus = "pending"
	WorkflowApprovalStatusApproved WorkflowApprovalStatus = "approved"
	WorkflowApprovalStatusDenied   WorkflowApprovalStatus = "denied"
	WorkflowApprovalStatusExpired  WorkflowApprovalStatus = "expired"
)

The values WorkflowApprovalStatus takes.

type WorkflowApprovalsApproveParams added in v0.21.0

type WorkflowApprovalsApproveParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

WorkflowApprovalsApproveParams holds the parameters for `client.workflowApprovals.approve`.

type WorkflowApprovalsDenyParams added in v0.21.0

type WorkflowApprovalsDenyParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	ID    string
}

WorkflowApprovalsDenyParams holds the parameters for `client.workflowApprovals.deny`.

type WorkflowApprovalsListParams added in v0.21.0

type WorkflowApprovalsListParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID      *string
	Status     *WorkflowApprovalStatus
	WorkflowID *string
	RunID      *string
}

WorkflowApprovalsListParams holds the parameters for `client.workflowApprovals.list`.

Every field is optional; pass nil to take the defaults.

type WorkflowApprovalsNamespace added in v0.21.0

type WorkflowApprovalsNamespace struct {
	// contains filtered or unexported fields
}

WorkflowApprovalsNamespace is `client.workflowApprovals`.

func (*WorkflowApprovalsNamespace) Approve added in v0.21.0

Approve: Approve a pending workflow approval request

The suspended run resumes within a few seconds of the decision landing.

_Requires permission: `workflows:approve`._

POST /api/org/{orgId}/workflow-approvals/{id}/approve

Raises on 404: Not found

Raises on 409: Conflict

func (*WorkflowApprovalsNamespace) Deny added in v0.21.0

Deny: Deny a pending workflow approval request

Denial fails the waiting `infra.waitForApproval(...)` call in the run.

_Requires permission: `workflows:approve`._

POST /api/org/{orgId}/workflow-approvals/{id}/deny

Raises on 404: Not found

Raises on 409: Conflict

func (*WorkflowApprovalsNamespace) List added in v0.21.0

List: List workflow approval requests

Approval requests raised by `infra.waitForApproval(...)` inside workflow runs, newest first. Filter with `status=pending` to build an approvals inbox.

_Requires permission: `workflows:read`._

GET /api/org/{orgId}/workflow-approvals

Raises on 400: Bad request

type WorkflowPinRequest

type WorkflowPinRequest struct {
	DashboardID string `json:"dashboardId"`
	WorkflowID  string `json:"workflowId"`
}

WorkflowPinRequest is the `WorkflowPinRequest` schema.

type WorkflowSchedule added in v0.28.0

type WorkflowSchedule struct {
	// Expression: Standard 5-field cron expression (minute hour day-of-month
	// month day-of-week). Supports `*`, lists, ranges, and steps; 3-letter
	// month/weekday names; `7` as Sunday. When both day fields are restricted, a
	// date matches if either does (POSIX).
	Expression string `json:"expression"`
	// Timezone: IANA timezone the expression's wall times are evaluated in. Omit
	// or null for UTC.
	Timezone *string `json:"timezone"`
	// Enabled: Mirrors the workflow's enabled flag — a disabled workflow's
	// schedule never fires.
	Enabled bool `json:"enabled"`
	// LastRunAt: When the workflow last finished a run (any trigger source).
	LastRunAt *string `json:"lastRunAt"`
	// NextRunAt: The persisted next fire time the scheduler will claim. Null
	// while disabled, or when the expression never matches.
	NextRunAt *string `json:"nextRunAt"`
	// NextRuns: Preview of the next few fire times, computed at read time.
	NextRuns []string `json:"nextRuns"`
}

WorkflowSchedule is the `WorkflowSchedule` schema.

type WorkflowScheduleInput added in v0.28.0

type WorkflowScheduleInput struct {
	// Expression: Standard 5-field cron expression (minute hour day-of-month
	// month day-of-week). Supports `*`, lists, ranges, and steps; 3-letter
	// month/weekday names; `7` as Sunday. When both day fields are restricted, a
	// date matches if either does (POSIX).
	Expression string `json:"expression"`
	// Timezone: IANA timezone the expression's wall times are evaluated in. Omit
	// or null for UTC.
	Timezone *string `json:"timezone,omitempty"`
	// Enabled: Also set the workflow's enabled flag. Omit to leave it unchanged.
	Enabled *bool `json:"enabled,omitempty"`
}

WorkflowScheduleInput is the `WorkflowScheduleInput` schema.

type WorkflowScheduleResponse added in v0.28.0

type WorkflowScheduleResponse struct {
	// Schedule: Null when the workflow's trigger is not cron.
	Schedule *WorkflowSchedule `json:"schedule"`
}

WorkflowScheduleResponse is the `WorkflowScheduleResponse` schema.

type WorkflowsNamespace added in v0.28.0

type WorkflowsNamespace struct {

	// Schedule: `client.workflows.schedule`.
	Schedule *WorkflowsScheduleNamespace
	// contains filtered or unexported fields
}

WorkflowsNamespace is `client.workflows`.

type WorkflowsScheduleDeleteParams added in v0.28.0

type WorkflowsScheduleDeleteParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// ID: Workflow id
	ID string
}

WorkflowsScheduleDeleteParams holds the parameters for `client.workflows.schedule.delete`.

type WorkflowsScheduleGetParams added in v0.28.0

type WorkflowsScheduleGetParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// ID: Workflow id
	ID string
}

WorkflowsScheduleGetParams holds the parameters for `client.workflows.schedule.get`.

type WorkflowsScheduleNamespace added in v0.28.0

type WorkflowsScheduleNamespace struct {
	// contains filtered or unexported fields
}

WorkflowsScheduleNamespace is `client.workflows.schedule`.

func (*WorkflowsScheduleNamespace) Delete added in v0.28.0

Delete: Remove a workflow's cron schedule

Reverts the workflow's trigger to manual and clears the pending fire time. A no-op when the trigger is not cron.

_Requires permission: `dashboards:write`._

DELETE /api/org/{orgId}/workflows/{id}/schedule

Raises on 404: Not found

func (*WorkflowsScheduleNamespace) Get added in v0.28.0

Get: Get a workflow's cron schedule

The schedule view of the workflow's trigger, with the next few computed fire times. `schedule` is null when the workflow is triggered some other way (manual, git, budget).

_Requires permission: `dashboards:read`._

GET /api/org/{orgId}/workflows/{id}/schedule

Raises on 404: Not found

func (*WorkflowsScheduleNamespace) Update added in v0.28.0

Update: Create or replace a workflow's cron schedule

Sets the workflow's trigger to cron with the given expression and timezone, validating both, and computes the next fire time. The workflow fires at the schedule's next occurrence — never immediately on save.

_Requires permission: `dashboards:write`._

PUT /api/org/{orgId}/workflows/{id}/schedule

Raises on 400: Bad request

Raises on 404: Not found

type WorkflowsScheduleUpdateParams added in v0.28.0

type WorkflowsScheduleUpdateParams struct {
	// OrgID: Organization id
	//
	// Falls back to the client's `orgId` when omitted.
	OrgID *string
	// ID: Workflow id
	ID string
	// Body: the JSON request body.
	Body WorkflowScheduleInput
}

WorkflowsScheduleUpdateParams holds the parameters for `client.workflows.schedule.update`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL